From 8049915cd871fdba1e5799f8dc9d46af5cb2690b Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Wed, 12 Nov 2025 11:31:06 +0800
Subject: [PATCH] =?UTF-8?q?demand:=20=20=20=20=E6=9C=88=E7=BB=93=E5=AE=A2?=
=?UTF-8?q?=E6=88=B7=E5=87=BA=E8=B4=A7=E7=BB=9F=E8=AE=A1=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=85=B6=E4=BB=96=20committer:=20heyu?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../vo/MonthlyCustomerShipmentStatVO.java | 8 ++++
.../resources/mapper/EmisWaybillMapper.xml | 38 +++++++++++++------
2 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/MonthlyCustomerShipmentStatVO.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/MonthlyCustomerShipmentStatVO.java
index 68adf333a..8d03d1636 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/MonthlyCustomerShipmentStatVO.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/MonthlyCustomerShipmentStatVO.java
@@ -87,5 +87,13 @@ public class MonthlyCustomerShipmentStatVO implements Serializable {
/* 进口实际重量 */
@Excel(name = "进口实际重量")
private BigDecimal importWeight;
+
+ /* 其他票数 */
+ @Excel(name = "其他票数")
+ private Integer otherTickets;
+
+ /* 其他实际重量 */
+ @Excel(name = "其他实际重量")
+ private BigDecimal otherWeight;
}
diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
index 8ea1e99f7..653255a7a 100644
--- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
@@ -4009,7 +4009,9 @@
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,
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
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'
@@ -4139,18 +4141,30 @@
- AND EXISTS (
- SELECT 1 FROM emis_trans_line tl
- WHERE tl.line_code = a.trans_line_type
- AND tl.del_flag = '0'
-
- AND a.receive_country = '0086'
-
-
- AND FIND_IN_SET(tl.trans_type, #{transType})
+
+ 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')
+ )
+
+
+ AND EXISTS (
+ SELECT 1 FROM emis_trans_line tl
+ WHERE tl.line_code = a.trans_line_type
+ AND tl.del_flag = '0'
+
+ AND a.receive_country = '0086'
+
+
+ AND FIND_IN_SET(tl.trans_type, #{transType})
+ AND a.send_country = '0086'
+
+ )
+