diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java index d017e8f8b..3b1785a2e 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java @@ -2553,7 +2553,6 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm EmisTmsScanRecord record=selectEmisTmsScanRecordById(id); // 删除运单签收记录 updateUnSignStatus(record.getMainBillCode()); - record.setRemark(remark); emisTmsScanRecordMapper.updateEmisTmsScanRecord(record); } diff --git a/emis-biz/src/main/resources/mapper/EmisTmsScanRecordMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsScanRecordMapper.xml index a92127a56..8ec2b68c2 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsScanRecordMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsScanRecordMapper.xml @@ -174,28 +174,24 @@ group by a.main_bill_code - - - - - + select tbA.scan_site_code ,count(tbA.bill_code) as scan_count,sum(if(tbA.bl_sign=1,1,0)) as sign_count,round(round(ifnull(sum(if(tbA.bl_sign=1,1,0)),0)/count(tbA.bill_code),3)*100,1) as sign_rate from ( - select a.scan_site_code ,count(DISTINCT a.main_bill_code) as scan_count + select DISTINCT a.scan_site_code,b.bill_code , b.bl_sign from emis_tms_scan_record a,emis_waybill b - where a.del_flag='0' and b.del_flag='0' and a.main_bill_code=b.bill_code - and not EXISTS ( - select 1 from emis_waybill_problem_info ewpi where ewpi.bill_code=b.bill_code and ewpi.del_flag='0' and ewpi.`problem_type` in(151,173,170) - ) - and a.scan_type=#{scanType} + where a.del_flag='0' and b.del_flag='0' and a.main_bill_code=b.bill_code and a.bl_sub_bill='0' + and not EXISTS ( + select 1 from emis_waybill_problem_info ewpi where ewpi.bill_code=b.bill_code and ewpi.del_flag='0' and ewpi.`problem_type` in(151,173,170) + ) + and a.scan_type=#{scanType} - - and a.scan_site_code=b.send_site_code - + + and a.scan_site_code=b.send_site_code + and a.scan_site_code=#{scanSiteCode} and a.pre_or_next_station_code=#{preOrNextStationCode} @@ -204,88 +200,18 @@ and a.scan_date #{params.endScanDate} and a.scan_site_code in ( - SELECT t1.site_code FROM ( - SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid := - #{params.privSiteCode} ) pd - WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code) - UNION - SELECT #{params.privSiteCode} FROM dual + SELECT t1.site_code FROM ( + SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid := + #{params.privSiteCode} ) pd + WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code) + UNION + SELECT #{params.privSiteCode} FROM dual ) - GROUP BY a.scan_site_code - ) t1 left join - ( - select a.scan_site_code ,count(DISTINCT a.main_bill_code) as sign_count - from emis_tms_scan_record a,emis_waybill b - where a.del_flag='0' and b.del_flag='0' and a.main_bill_code=b.bill_code and b.bl_sign='1' - and b.bill_code not in ( - select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and ewpi.`problem_type` in(151,173,170) - ) - and a.scan_type=#{scanType} - - and a.scan_site_code=b.send_site_code - - - and a.scan_site_code=#{scanSiteCode} - and a.pre_or_next_station_code=#{preOrNextStationCode} - and a.scan_man_code=#{scanManCode} - - - - and a.scan_site_code in ( - SELECT t1.site_code FROM ( - SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid := - #{params.privSiteCode} ) pd - WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code) - UNION - SELECT #{params.privSiteCode} FROM dual - ) - - GROUP BY a.scan_site_code - ) t2 - on t1.scan_site_code=t2.scan_site_code - + ) tbA + GROUP BY tbA.scan_site_code - - - -