更新
This commit is contained in:
parent
a6c3fde9e1
commit
517fce52fe
@ -826,6 +826,19 @@ public class PartnerOwnController extends BaseController {
|
|||||||
return success(partnerList.staticsTable5(partners.getPartnerId(), startTime, endTime));
|
return success(partnerList.staticsTable5(partners.getPartnerId(), startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description :待收款
|
||||||
|
* @author xyc
|
||||||
|
* @date 09:46 2025/10/10
|
||||||
|
* @param startTime {@link String}
|
||||||
|
* @param endTime {@link String}
|
||||||
|
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult
|
||||||
|
**/
|
||||||
|
@GetMapping("/channelMoneyStaticsByBusi")
|
||||||
|
public CommonResult<?> channelMoneyStaticsByBusi(String busi, String startTime, String endTime) throws Exception {
|
||||||
|
return success(partnerList.channelMoneyStaticsByBusi(busi,startTime, endTime));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询检测类型统计
|
* 查询检测类型统计
|
||||||
*
|
*
|
||||||
|
|||||||
@ -757,13 +757,33 @@ public class UserClientPartnerOwnController extends BaseController {
|
|||||||
return success(partnerList.staticsTable4(partners.getPartnerId(), startTime, endTime));
|
return success(partnerList.staticsTable4(partners.getPartnerId(), startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
//统计表格5
|
/**
|
||||||
|
* @description :待收款
|
||||||
|
* @author xyc
|
||||||
|
* @date 09:46 2025/10/10
|
||||||
|
* @param startTime {@link String}
|
||||||
|
* @param endTime {@link String}
|
||||||
|
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult
|
||||||
|
**/
|
||||||
@GetMapping("/staticsTable5")
|
@GetMapping("/staticsTable5")
|
||||||
public CommonResult staticsTable5(String startTime, String endTime) throws Exception {
|
public CommonResult staticsTable5(String startTime, String endTime) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable5(partners.getPartnerId(), startTime, endTime));
|
return success(partnerList.staticsTable5(partners.getPartnerId(), startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description :待收款
|
||||||
|
* @author xyc
|
||||||
|
* @date 09:46 2025/10/10
|
||||||
|
* @param startTime {@link String}
|
||||||
|
* @param endTime {@link String}
|
||||||
|
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult
|
||||||
|
**/
|
||||||
|
@GetMapping("/channelMoneyStaticsByBusi")
|
||||||
|
public CommonResult<?> channelMoneyStaticsByBusi(String busi, String startTime, String endTime) throws Exception {
|
||||||
|
return success(partnerList.channelMoneyStaticsByBusi(busi,startTime, endTime));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询检测类型统计
|
* 查询检测类型统计
|
||||||
*
|
*
|
||||||
|
|||||||
@ -101,6 +101,8 @@ public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners>
|
|||||||
List<Map<String, Object>> staticsTable4(@Param("partnerId") Long partnerId, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<Map<String, Object>> staticsTable4(@Param("partnerId") Long partnerId, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
List<Map<String, Object>> staticsTable5(@Param("partnerId") Long partnerId, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<Map<String, Object>> staticsTable5(@Param("partnerId") Long partnerId, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
List<Map<String, Object>> busiMoneyStatics( @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
List<Map<String, Object>> channelMoneyStaticsByBusi(@Param("busi")String busi, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
Long dhjNum(@Param("partnerId") Long partnerId, @Param("dateStr") String dateStr);
|
Long dhjNum(@Param("partnerId") Long partnerId, @Param("dateStr") String dateStr);
|
||||||
|
|
||||||
|
|||||||
@ -36,4 +36,9 @@ public class InspectionListQuery {
|
|||||||
* 项目id
|
* 项目id
|
||||||
*/
|
*/
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 1=待收款
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -169,6 +169,15 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
|||||||
List<Map<String, Object>> staticsTable4(Long partnerId, String startTime, String endTime);
|
List<Map<String, Object>> staticsTable4(Long partnerId, String startTime, String endTime);
|
||||||
|
|
||||||
List<Map<String, Object>> staticsTable5(Long partnerId, String startTime, String endTime);
|
List<Map<String, Object>> staticsTable5(Long partnerId, String startTime, String endTime);
|
||||||
|
/**
|
||||||
|
* @description : 来源待收款金额统计(通过渠道)
|
||||||
|
* @author xyc
|
||||||
|
* @date 10:53 2025/10/10
|
||||||
|
* @param startTime {@link String}
|
||||||
|
* @param endTime {@link String}
|
||||||
|
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
**/
|
||||||
|
List<Map<String, Object>> channelMoneyStaticsByBusi(String busi,String startTime, String endTime);
|
||||||
|
|
||||||
|
|
||||||
//新检测金额折线图
|
//新检测金额折线图
|
||||||
|
|||||||
@ -2285,6 +2285,15 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description :待收款
|
||||||
|
* @author xyc
|
||||||
|
* @date 09:47 2025/10/10
|
||||||
|
* @param partnerId {@link Long}
|
||||||
|
* @param startTime {@link String}
|
||||||
|
* @param endTime {@link String}
|
||||||
|
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> staticsTable5(Long partnerId, String startTime, String endTime) {
|
public List<Map<String, Object>> staticsTable5(Long partnerId, String startTime, String endTime) {
|
||||||
if (StringUtils.isEmpty(startTime)) {
|
if (StringUtils.isEmpty(startTime)) {
|
||||||
@ -2293,7 +2302,27 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
}
|
}
|
||||||
startTime = startTime + " 00:00:00";
|
startTime = startTime + " 00:00:00";
|
||||||
endTime = endTime + " 23:59:59";
|
endTime = endTime + " 23:59:59";
|
||||||
List<Map<String, Object>> res = baseMapper.staticsTable5(partnerId, startTime, endTime);
|
List<Map<String, Object>> res = baseMapper.busiMoneyStatics(startTime, endTime);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description : 来源待收款金额统计(通过渠道)
|
||||||
|
* @author xyc
|
||||||
|
* @date 10:53 2025/10/10
|
||||||
|
* @param startTime {@link String}
|
||||||
|
* @param endTime {@link String}
|
||||||
|
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> channelMoneyStaticsByBusi(String busi,String startTime, String endTime) {
|
||||||
|
if (StringUtils.isEmpty(startTime)) {
|
||||||
|
startTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||||
|
endTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
startTime = startTime + " 00:00:00";
|
||||||
|
endTime = endTime + " 23:59:59";
|
||||||
|
List<Map<String, Object>> res = baseMapper.channelMoneyStaticsByBusi(busi,startTime, endTime);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -364,8 +364,8 @@
|
|||||||
<if test="query.datetimeRange != null">
|
<if test="query.datetimeRange != null">
|
||||||
AND ii.create_time BETWEEN CONCAT(#{query.datetimeRange[0]}, ' 00:00:00') AND CONCAT(#{query.datetimeRange[1]}, ' 23:59:59')
|
AND ii.create_time BETWEEN CONCAT(#{query.datetimeRange[0]}, ' 00:00:00') AND CONCAT(#{query.datetimeRange[1]}, ' 23:59:59')
|
||||||
</if>
|
</if>
|
||||||
<if test="query.customSource != null">
|
<if test="query.type != null and query.type == 1">
|
||||||
AND ii.customer_source = #{query.customSource}
|
AND (oi.pay_type = 'sz' OR oi.cashier_confirm != '1' OR oi.pay_money IS NULL)
|
||||||
</if>
|
</if>
|
||||||
<if test="query.bussiness != null">
|
<if test="query.bussiness != null">
|
||||||
AND ii.business_channel = #{query.bussiness}
|
AND ii.business_channel = #{query.bussiness}
|
||||||
@ -373,7 +373,10 @@
|
|||||||
<if test="query.projectId != null">
|
<if test="query.projectId != null">
|
||||||
AND ip.id = #{query.projectId}
|
AND ip.id = #{query.projectId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.type != 1">
|
||||||
AND iwn.status = '2'
|
AND iwn.status = '2'
|
||||||
|
</if>
|
||||||
|
|
||||||
AND iwn.deleted = b'0'
|
AND iwn.deleted = b'0'
|
||||||
</where>
|
</where>
|
||||||
GROUP BY ii.id
|
GROUP BY ii.id
|
||||||
|
|||||||
@ -919,5 +919,43 @@ FROM
|
|||||||
GROUP BY
|
GROUP BY
|
||||||
ibc.name
|
ibc.name
|
||||||
</select>
|
</select>
|
||||||
|
<select id="busiMoneyStatics" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
ii.business_channel AS channel, -- 渠道
|
||||||
|
COUNT(oi.id) AS order_count, -- 台次(订单数量)
|
||||||
|
ROUND(IFNULL(SUM(oi.goods_price), 0) / 100) AS theAmount -- 金额(单位:元)
|
||||||
|
FROM
|
||||||
|
order_info oi
|
||||||
|
INNER JOIN
|
||||||
|
inspection_info ii ON oi.id = ii.inspection_order_id
|
||||||
|
WHERE
|
||||||
|
ii.create_time BETWEEN #{startTime} AND #{endTime}
|
||||||
|
AND (oi.pay_type = 'sz' OR oi.cashier_confirm != '1' OR oi.pay_money IS NULL)
|
||||||
|
GROUP BY
|
||||||
|
ii.business_channel -- 按渠道分组
|
||||||
|
ORDER BY
|
||||||
|
theAmount DESC;
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="channelMoneyStaticsByBusi" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
cs.name AS sourceName,
|
||||||
|
COUNT(DISTINCT ii.id) AS pendingCount,
|
||||||
|
ROUND(SUM(COALESCE(oi.goods_price, 0)) / 100, 2) AS pendingAmountYuan
|
||||||
|
FROM inspection_business_channel bc
|
||||||
|
INNER JOIN inspection_business_channel cs ON cs.pid = bc.id AND cs.type = 1
|
||||||
|
INNER JOIN inspection_info ii ON ii.customer_source = cs.name AND ii.deleted = 0
|
||||||
|
INNER JOIN order_info oi ON oi.id = ii.inspection_order_id AND oi.deleted = 0
|
||||||
|
WHERE bc.type = 0
|
||||||
|
<if test="startTime != null">
|
||||||
|
AND ii.create_time BETWEEN #{startTime} AND #{endTime}
|
||||||
|
</if>
|
||||||
|
AND bc.name = #{busi}
|
||||||
|
AND (oi.pay_type = 'sz' OR oi.cashier_confirm != '1' OR oi.pay_money IS NULL)
|
||||||
|
AND bc.deleted = 0
|
||||||
|
AND cs.deleted = 0
|
||||||
|
GROUP BY cs.id, cs.name
|
||||||
|
ORDER BY pendingAmountYuan DESC;
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user