From 677ec7ef348e935b0ccb4f993a6efa847b613391 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Fri, 8 Aug 2025 15:40:25 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20TMS=E7=B3=BB=E7=BB=9F=20-=20=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5=20-=20=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E5=8F=B7=E5=90=AB=E6=9C=89=E7=89=B9=E6=AE=8A=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=20=E4=B8=8D=E5=85=81=E8=AE=B8=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/EmisTmsSiteBatchMapper.xml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMapper.xml index 33c57f579..df1572ce8 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMapper.xml @@ -546,11 +546,21 @@ b.trans_weight, b.pack_num, b.total_waybill_qty, b.total_settlement_weight, b.op_man, b.remark, b.tenant_id, b.del_flag, b.create_by, b.create_time, b.update_by, b.update_time, b.create_site, b.update_site, b.bl_entering, - COALESCE(SUM(d.batch_volume), 0) as total_volume, - COALESCE(SUM(d.batch_parcel_qty), 0) as total_parcel_qty, - COALESCE(SUM(d.batch_weight), 0) as total_weight + CASE + WHEN COALESCE(SUM(d.batch_volume), 0) = 0 THEN COALESCE(w.total_volume, 0) + ELSE COALESCE(SUM(d.batch_volume), 0) + END as total_volume, + CASE + WHEN COALESCE(SUM(d.batch_parcel_qty), 0) = 0 THEN COALESCE(w.parcel_qty, 0) + ELSE COALESCE(SUM(d.batch_parcel_qty), 0) + END as total_parcel_qty, + CASE + WHEN COALESCE(SUM(d.batch_weight), 0) = 0 THEN COALESCE(w.bill_weight, 0) + ELSE COALESCE(SUM(d.batch_weight), 0) + END as total_weight from emis_tms_site_batch b inner join emis_tms_site_batch_dtl d on b.batch_no = d.batch_no + left join emis_waybill w on d.bill_code = w.bill_code and w.del_flag = '0' where b.start_site_code = #{startSiteCode} and b.next_site_code = #{nextSiteCode} and d.bill_code = #{billCode} @@ -563,6 +573,7 @@ b.clearance_res_status, b.declare_res_status, b.dest_country, b.dest_country_name, b.trans_weight, b.pack_num, b.total_waybill_qty, b.total_settlement_weight, b.op_man, b.remark, b.tenant_id, b.del_flag, b.create_by, b.create_time, - b.update_by, b.update_time, b.create_site, b.update_site, b.bl_entering + b.update_by, b.update_time, b.create_site, b.update_site, b.bl_entering, + w.total_volume, w.parcel_qty, w.total_weight \ No newline at end of file