From 95d01b1c122266a90b9331d580b414fe2bb822cd Mon Sep 17 00:00:00 2001 From: linfso Date: Thu, 13 Jun 2024 22:42:49 +0800 Subject: [PATCH] md --- .../impl/EmisTmsScanRecordServiceImpl.java | 2 + .../resources/mapper/EmisTmsPackMapper.xml | 55 +++++++++++----- .../mapper/EmisTmsSiteBatchMapper.xml | 62 ++++++++++++++----- .../resources/mapper/EmisWaybillMapper.xml | 3 + 4 files changed, 92 insertions(+), 30 deletions(-) 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 c2732ac0d..6724c8763 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 @@ -522,6 +522,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm // 获取快递公司 String transferCompanyName=DictUtils.getDictLabel("emis_express_code",transferCode); emisTmsScanRecord.setRemark("["+transferCompanyName+" "+transferBillcode +"] 发往["+destCity+"]"); + emisTmsScanRecord.setScanSite(transferCompanyName); + emisTmsScanRecord.setScanMan(transferCompanyName); // 更新waybill做转单 wayBillTransfer(emisTmsScanRecord.getBillCode(),transferCode,transferBillcode,destCity); diff --git a/emis-biz/src/main/resources/mapper/EmisTmsPackMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsPackMapper.xml index 4c75eba7e..3cbb8ad17 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsPackMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsPackMapper.xml @@ -38,35 +38,62 @@ del_flag='0' and id = #{id} - and pack_no like concat('%', #{packNo}, '%') + and ( FIND_IN_SET(`pack_no`,#{packNo}) or pack_no like concat('%', #{packNo}, '%') ) and pack_name like concat('%', #{packName}, '%') and pack_date like concat('%', #{packDate}, '%') - and dest_country like concat('%', #{destCountry}, '%') + and dest_country=#{destCountry} and dest_country_name like concat('%', #{destCountryName}, '%') - and bl_unpack like concat('%', #{blUnpack}, '%') - and send_stite_code like concat('%', #{sendStiteCode}, '%') - and next_site_code like concat('%', #{nextSiteCode}, '%') + and bl_unpack= #{blUnpack} + and send_stite_code= #{sendStiteCode} + and next_site_code=#{nextSiteCode} and next_station like concat('%', #{nextStation}, '%') and total_parcel_qty = #{totalParcelQty} and total_waybill_qty = #{totalWaybillQty} and total_volume = #{totalVolume} and total_weight = #{totalWeight} - and pack_status like concat('%', #{packStatus}, '%') + and pack_status=#{packStatus} and ext_data like concat('%', #{extData}, '%') and op_man like concat('%', #{opMan}, '%') - and ext1 like concat('%', #{ext1}, '%') - and ext2 like concat('%', #{ext2}, '%') - and ext3 like concat('%', #{ext3}, '%') - and ext4 like concat('%', #{ext4}, '%') and remark like concat('%', #{remark}, '%') and tenant_id like concat('%', #{tenantId}, '%') and del_flag like concat('%', #{delFlag}, '%') - and create_by like concat('%', #{createBy}, '%') + and create_by=#{createBy} and create_time = #{createTime} - and update_by like concat('%', #{updateBy}, '%') + and update_by=#{updateBy} and update_time = #{updateTime} - and create_site like concat('%', #{createSite}, '%') - and update_site like concat('%', #{updateSite}, '%') + and create_site=#{createSite} + and update_site=#{updateSite} + + + and create_time = ]]> #{params.beginCreateTime} + + + and create_time #{params.endCreateTime} + + + + and ( + send_stite_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 + ) + or + create_site 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 + ) + ) + + + order by create_time desc diff --git a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMapper.xml index 866bb26cd..2524bee27 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMapper.xml @@ -53,25 +53,25 @@ del_flag='0' and id = #{id} - and batch_no like concat('%', #{batchNo}, '%') + and ( FIND_IN_SET(`batch_no`,#{batchNo}) or batch_no like concat('%', #{batchNo}, '%') ) and batch_name like concat('%', #{batchName}, '%') and batch_date = #{batchDate} - and trans_line_type like concat('%', #{transLineType}, '%') - and product_type like concat('%', #{productType}, '%') - and batch_type like concat('%', #{batchType}, '%') - and trans_type like concat('%', #{transType}, '%') - and start_site_code like concat('%', #{startSiteCode}, '%') - and send_country like concat('%', #{sendCountry}, '%') - and next_site_code like concat('%', #{nextSiteCode}, '%') - and air_billl_no like concat('%', #{airBilllNo}, '%') + and trans_line_type=#{transLineType} + and product_type=#{productType} + and batch_type=#{batchType} + and trans_type=#{transType} + and start_site_code=#{startSiteCode} + and send_country=#{sendCountry} + and next_site_code=#{nextSiteCode} + and air_billl_no=#{airBilllNo} and etd = #{etd} and eta = #{eta} and pack_num = #{packNum} - and car_no like concat('%', #{carNo}, '%') - and ship_no like concat('%', #{shipNo}, '%') - and clearance_res_status like concat('%', #{clearanceResStatus}, '%') - and declare_res_status like concat('%', #{declareResStatus}, '%') - and dest_country like concat('%', #{destCountry}, '%') + and car_no=#{carNo} + and ship_no=#{shipNo} + and clearance_res_status= #{clearanceResStatus} + and declare_res_status=#{declareResStatus} + and dest_country=#{destCountry} and dest_country_name like concat('%', #{destCountryName}, '%') and total_parcel_qty = #{totalParcelQty} and total_waybill_qty = #{totalWaybillQty} @@ -85,8 +85,38 @@ and create_time = #{createTime} and update_by like concat('%', #{updateBy}, '%') and update_time = #{updateTime} - and create_site like concat('%', #{createSite}, '%') - and update_site like concat('%', #{updateSite}, '%') + and create_site=#{createSite} + and update_site=#{updateSite} + + + + and create_time = ]]> #{params.beginCreateTime} + + + and create_time #{params.endCreateTime} + + + + and ( + start_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 + ) + or + create_site 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 + ) + ) + order by create_time desc diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 2cf8011c3..c8dc20501 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -568,6 +568,9 @@ and a.bill_code not in( select etp.bill_code from emis_tms_pack_dtl etp where etp.del_flag='0' ) + and a.trans_line_type in( + select line_code from emis_trans_line etl where etl.trans_type=1 + ) and a.bl_is_question = '0'