demand: 月结客户出货统计增加其他

committer: heyu
This commit is contained in:
aike 2025-11-12 11:31:06 +08:00
parent 0b90432a1b
commit 8049915cd8
2 changed files with 34 additions and 12 deletions

View File

@ -87,5 +87,13 @@ public class MonthlyCustomerShipmentStatVO implements Serializable {
/* 进口实际重量 */ /* 进口实际重量 */
@Excel(name = "进口实际重量") @Excel(name = "进口实际重量")
private BigDecimal importWeight; private BigDecimal importWeight;
/* 其他票数 */
@Excel(name = "其他票数")
private Integer otherTickets;
/* 其他实际重量 */
@Excel(name = "其他实际重量")
private BigDecimal otherWeight;
} }

View File

@ -4009,7 +4009,9 @@
SUM(CASE WHEN a.send_country = '0086' AND tl.trans_type = '4' THEN 1 ELSE 0 END) AS seaTickets, SUM(CASE WHEN a.send_country = '0086' AND tl.trans_type = '4' THEN 1 ELSE 0 END) AS seaTickets,
IFNULL(SUM(CASE WHEN a.send_country = '0086' AND tl.trans_type = '4' THEN a.bill_weight ELSE 0 END), 0) AS seaWeight, IFNULL(SUM(CASE WHEN a.send_country = '0086' AND tl.trans_type = '4' THEN a.bill_weight ELSE 0 END), 0) AS seaWeight,
SUM(CASE WHEN a.receive_country = '0086' THEN 1 ELSE 0 END) AS importTickets, SUM(CASE WHEN a.receive_country = '0086' THEN 1 ELSE 0 END) AS importTickets,
IFNULL(SUM(CASE WHEN a.receive_country = '0086' THEN a.bill_weight ELSE 0 END), 0) AS importWeight IFNULL(SUM(CASE WHEN a.receive_country = '0086' THEN a.bill_weight ELSE 0 END), 0) AS importWeight,
SUM(CASE WHEN a.receive_country != '0086' AND NOT (a.send_country = '0086' AND tl.trans_type IN ('1','2','3','4','5')) THEN 1 ELSE 0 END) AS otherTickets,
IFNULL(SUM(CASE WHEN a.receive_country != '0086' AND NOT (a.send_country = '0086' AND tl.trans_type IN ('1','2','3','4','5')) THEN a.bill_weight ELSE 0 END), 0) AS otherWeight
FROM emis_waybill a FROM emis_waybill a
LEFT JOIN emis_trans_line tl ON a.trans_line_type = tl.line_code AND tl.del_flag = '0' LEFT JOIN emis_trans_line tl ON a.trans_line_type = tl.line_code AND tl.del_flag = '0'
LEFT JOIN emis_customer_user cu ON a.customer_code = cu.customer_code AND cu.del_flag = '0' LEFT JOIN emis_customer_user cu ON a.customer_code = cu.customer_code AND cu.del_flag = '0'
@ -4139,6 +4141,17 @@
</if> </if>
<!-- 运输方式筛选 --> <!-- 运输方式筛选 -->
<if test="transType != null and transType != ''"> <if test="transType != null and transType != ''">
<if test="transType == 'other'">
AND a.receive_country != '0086'
AND NOT EXISTS (
SELECT 1 FROM emis_trans_line tl
WHERE tl.line_code = a.trans_line_type
AND tl.del_flag = '0'
AND a.send_country = '0086'
AND tl.trans_type IN ('1','2','3','4','5')
)
</if>
<if test="transType != 'other'">
AND EXISTS ( AND EXISTS (
SELECT 1 FROM emis_trans_line tl SELECT 1 FROM emis_trans_line tl
WHERE tl.line_code = a.trans_line_type WHERE tl.line_code = a.trans_line_type
@ -4152,6 +4165,7 @@
</if> </if>
) )
</if> </if>
</if>
<!-- 权限控制 --> <!-- 权限控制 -->
<if test="params.privSiteCode != null and params.privSiteCode != '88888'"> <if test="params.privSiteCode != null and params.privSiteCode != '88888'">
AND EXISTS ( AND EXISTS (