From 19a816afef2cfa40f0c8769fc46544df73fccbf9 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Mon, 20 Oct 2025 10:48:36 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=20TMS=E7=B3=BB=E7=BB=9F-=E8=BF=90?= =?UTF-8?q?=E8=BE=93=E7=AE=A1=E7=90=86-=E6=BC=8F=E7=BB=84=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E8=AE=A2=E5=8D=95-=E9=92=88=E5=AF=B9=E4=BB=8E?= =?UTF-8?q?=E6=9C=AA=E7=BB=84=E6=89=B9=E6=AC=A1=E7=B1=BB=E5=9E=8B=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8F=96=E8=BF=90=E5=8D=95=E5=A7=8B=E5=8F=91=E7=BD=91?= =?UTF-8?q?=E7=82=B9=E4=B8=BA=E8=B5=B7=E5=A7=8B=E8=8A=82=E7=82=B9=20=20TMS?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F-=E8=BF=90=E8=BE=93=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E6=BC=8F=E7=BB=84=E6=89=B9=E6=AC=A1=E7=BB=9F=E8=AE=A1=20-?= =?UTF-8?q?=E9=92=88=E5=AF=B9=E4=BB=8E=E6=9C=AA=E7=BB=84=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=95=B0=E6=8D=AE=E5=8F=96=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E5=A7=8B=E5=8F=91=E7=BD=91=E7=82=B9=E4=B8=BA=E8=B5=B7=E5=A7=8B?= =?UTF-8?q?=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../mapper/EmisTmsSiteBatchMissMapper.xml | 13 ++++--- .../EmisTmsSiteBatchMissStatisticsMapper.xml | 34 +++++++++++-------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissMapper.xml index f00bbef64..ab385207b 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissMapper.xml @@ -58,7 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select m.id, m.bill_code, m.miss_reason, m.create_time, m.update_time, m.remark, m.del_flag, - m.line_code, m.product_type, m.start_site_code, m.next_site_code, m.supplier_code, m.start_date, m.end_date,m.miss_type, + m.line_code, m.product_type, + COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) as start_site_code, + COALESCE(m.next_site_code, w.destination_code) as next_site_code, + m.supplier_code, m.start_date, m.end_date,m.miss_type, w.send_site_code, s1.site_name as send_site_name,s2.site_name as start_site_name,s3.site_name as next_site_name, w.send_country, c1.name as send_country_name, w.destination_code, s4.site_name as dispatch_underling_site_name,w.bl_is_question, l.line_name as line_name, w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date, @@ -77,8 +80,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from emis_tms_site_batch_miss m left join emis_waybill w on m.bill_code = w.bill_code and w.del_flag='0' left join emis_site s1 on w.send_site_code=s1.site_code and s1.del_flag=0 - left join emis_site s2 on m.start_site_code=s2.site_code and s2.del_flag=0 - left join emis_site s3 on m.next_site_code=s3.site_code and s3.del_flag=0 + left join emis_site s2 on COALESCE(m.start_site_code, w.start_site_code, w.send_site_code)=s2.site_code and s2.del_flag=0 + left join emis_site s3 on COALESCE(m.next_site_code, w.destination_code)=s3.site_code and s3.del_flag=0 left join emis_country c1 on w.send_country=c1.code and c1.del_flag='0' left join emis_country c2 on w.receive_country=c2.code and c2.del_flag='0' left join emis_site s4 on w.dispatch_underling_site_code=s4.site_code and s4.del_flag=0 @@ -145,7 +148,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" b.bill_code, null as id, '已组批次成功' as miss_reason, null as create_by, null as create_time, null as update_by, null as update_time, null as remark, '0' as del_flag, - w.trans_line_type as line_code, w.product_type, w.start_site_code, w.next_site_code, + w.trans_line_type as line_code, w.product_type, + COALESCE(null, w.start_site_code, w.send_site_code) as start_site_code, + COALESCE(null, w.destination_code) as next_site_code, null as supplier_code, null as start_date, null as end_date, '0' as miss_type, w.send_site_code, s1.site_name as send_site_name, w.send_country, c1.name as send_country_name, w.destination_code, s2.site_name as dispatch_underling_site_name, w.bl_is_question, diff --git a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissStatisticsMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissStatisticsMapper.xml index c6d537157..e48ceaedd 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissStatisticsMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissStatisticsMapper.xml @@ -13,16 +13,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select m.id, m.bill_code, m.miss_reason, m.create_time, m.update_time, m.remark, m.del_flag, - m.line_code, m.product_type, m.start_site_code, m.next_site_code, m.supplier_code, m.start_date, m.end_date,m.miss_type, + m.line_code, m.product_type, + COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) as start_site_code, + COALESCE(m.next_site_code, w.destination_code) as next_site_code, + m.supplier_code, m.start_date, m.end_date,m.miss_type, w.send_site_code, s1.site_name as send_site_name,s2.site_name as start_site_name,s3.site_name as next_site_name, w.send_country, c1.name as send_country_name, w.destination_code, s4.site_name as dispatch_underling_site_name,w.bl_is_question, l.line_name as line_name, w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date, @@ -115,8 +121,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from emis_tms_site_batch_miss m left join emis_waybill w on m.bill_code = w.bill_code and w.del_flag='0' left join emis_site s1 on w.send_site_code=s1.site_code and s1.del_flag='0' - left join emis_site s2 on m.start_site_code=s2.site_code and s2.del_flag='0' - left join emis_site s3 on m.next_site_code=s3.site_code and s3.del_flag='0' + left join emis_site s2 on COALESCE(m.start_site_code, w.start_site_code, w.send_site_code)=s2.site_code and s2.del_flag='0' + left join emis_site s3 on COALESCE(m.next_site_code, w.destination_code)=s3.site_code and s3.del_flag='0' left join emis_country c1 on w.send_country=c1.code and c1.del_flag='0' left join emis_country c2 on w.receive_country=c2.code and c2.del_flag='0' left join emis_site s4 on w.dispatch_underling_site_code=s4.site_code and s4.del_flag='0' @@ -126,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_user u on w.register_man_code=u.emp_code and u.del_flag='0' WHERE m.del_flag = '0' - AND m.start_site_code = #{query.startSiteCode} + AND COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) = #{query.startSiteCode} AND DATE_FORMAT(w.send_date, '%Y-%m') = ]]> #{query.startTime} @@ -150,7 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN emis_waybill w ON m.bill_code = w.bill_code AND w.del_flag='0' WHERE m.del_flag = '0' - AND m.start_site_code = #{startSiteCode} + AND COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) = #{startSiteCode} AND DATE_FORMAT(w.send_date, '%Y-%m') = ]]> #{startTime}