demand: 运单录入/运单修改/运单批量录入/网点费用申请:目的国、产品信息、寄件国家地区信息需要和起始网点一致, 报价计算逻辑改为根据始发网点计算

committer: heyu
This commit is contained in:
aike 2025-07-15 19:15:25 +08:00
parent 9cca3c8345
commit 06ea898d8a
3 changed files with 30 additions and 16 deletions

View File

@ -2619,8 +2619,8 @@ public class EmisBaseService {
order.put("kdgs", "TANEX");
// 获取起始网点
EmisSite sendSite = getSiteByCode(waybill.getSendSiteCode());
// 获取始发网点
EmisSite startSite = getSiteByCode(waybill.getStartSiteCode());
// 计算三段码 目的网点2字码+目的地名称
String destSite2Code = "";
@ -2636,7 +2636,7 @@ public class EmisBaseService {
destName=destination.getDestName();
}
String package3dm=sendSite.getSiteName()+'-'+destName;
String package3dm=startSite.getSiteName()+'-'+destName;
String packageWJC=destSite2Code;
String pdfInfo="["+package3dm+"]["+packageWJC+"]";
order.put("pdfInfo", pdfInfo);
@ -2756,7 +2756,7 @@ public class EmisBaseService {
extData.put("k7",WaybillHelper.removeUnSeeChar(k7));
extData.put("k8",WaybillHelper.removeUnSeeChar(sendSite.getSiteNameEn()));
extData.put("k8",WaybillHelper.removeUnSeeChar(startSite.getSiteNameEn()));
extData.put("k10",WaybillHelper.removeUnSeeChar(waybill.getSendSiteName()));
extData.put("k9",WaybillHelper.removeUnSeeChar(destSite.getSiteNameEn()));

View File

@ -2095,8 +2095,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
// }
// }
emisTmsScanRecord.setScanSite(emisWaybill.getSendSiteName());
emisTmsScanRecord.setScanSiteCode(emisWaybill.getSendSiteCode());
emisTmsScanRecord.setScanSite(emisWaybill.getStartSiteName());
emisTmsScanRecord.setScanSiteCode(emisWaybill.getStartSiteCode());
String dispatchOrSendManCode = MapUtils.getString(scanDataItem,"dispatchOrSendManCode",null);

View File

@ -814,6 +814,7 @@
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode}
and (
a.take_piece_employee_code=#{params.privEmpCode}
or (a.pickup_method in('1','3') and a.operate_employee_code is null )
@ -1110,7 +1111,7 @@
<if test="salesmen == null and params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code=#{params.privSiteCode}
a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}
)
</if>
@ -1299,7 +1300,8 @@
<if test="paymentRemark != null and paymentRemark != ''"> and payment_remark like concat('%', #{paymentRemark}, '%')</if>
<if test="orderRemark != null and orderRemark != ''"> and order_remark like concat('%', #{orderRemark}, '%')</if>
<if test="sendSiteCode != null and sendSiteCode != ''"> and FIND_IN_SET(`send_site_code`,#{sendSiteCode})</if>
<if test="sendSiteCode != null and sendSiteCode != ''">and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
</if>
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>
<if test="createBy != null and createBy != ''"> and a.create_by= #{createBy}</if>
@ -1420,7 +1422,8 @@
select line_code from emis_trans_line etl where etl.trans_type=1
)
and bl_sign!='1' and waybill_status!='40'
and a.send_site_code=#{params.privSiteCode} and a.current_site_code=#{params.privSiteCode}
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
and a.current_site_code=#{params.privSiteCode}
</if>
@ -1450,6 +1453,7 @@
a.send_site_code=#{params.privSiteCode}
or a.dispatch_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode}
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
</if>
@ -1512,6 +1516,7 @@
a.send_site_code=#{params.privSiteCode}
or
a.dispatch_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode}
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
</if>
@ -1844,6 +1849,7 @@
and (
a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode}
or a.dispatch_site_code=#{params.privSiteCode}
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
@ -1929,6 +1935,7 @@
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode}
or
a.dispatch_underling_site_code=#{params.privSiteCode}
)
@ -1979,6 +1986,7 @@
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode}
or a.dispatch_underling_site_code=#{params.privSiteCode}
)
</if>
@ -2293,7 +2301,8 @@
select line_code from emis_trans_line etl where etl.trans_type=1
)
and bl_sign!='1' and waybill_status!='40'
and a.send_site_code=#{params.privSiteCode} and a.current_site_code=#{params.privSiteCode}
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
and a.current_site_code=#{params.privSiteCode}
</if>
<if test="params.isNeedBatch != null and params.isNeedBatch == 1">
@ -2309,6 +2318,7 @@
and (
a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode}
or
a.dispatch_site_code=#{params.privSiteCode}
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
@ -2500,6 +2510,7 @@
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode}
or
a.dispatch_site_code=#{params.privSiteCode}
or
@ -2557,7 +2568,8 @@
and a.order_status in('0','3')
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code=#{params.privSiteCode}
(a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode})
and (
a.take_piece_employee_code=#{params.privEmpCode}
or (a.pickup_method in('1','3') and a.operate_employee_code is null )
@ -2579,7 +2591,8 @@
and a.waybill_status!='0'
and a.order_status!='2'
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and a.send_site_code=#{params.privSiteCode}
and (a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode})
and (
a.operate_employee_code=#{params.privEmpCode}
or a.take_piece_employee_code=#{params.privEmpCode}
@ -2599,7 +2612,8 @@
where a.del_flag='0'
and a.order_status='2'
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and a.send_site_code=#{params.privSiteCode}
and (a.send_site_code=#{params.privSiteCode}
or a.start_site_code=#{params.privSiteCode})
and (
a.operate_employee_code=#{params.privEmpCode}
or a.take_piece_employee_code=#{params.privEmpCode}
@ -2619,7 +2633,7 @@
where a.del_flag='0'
and a.order_status in('0','3')
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and a.send_site_code=#{params.privSiteCode}
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
and exists (
select 1 from emis_waybill_change_to ewcto where a.bill_code=ewcto.bill_code and ewcto.change_from=#{params.privEmpCode}
)
@ -2637,7 +2651,7 @@
where a.del_flag='0'
and a.waybill_status='40'
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and a.send_site_code=#{params.privSiteCode}
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
and (
a.operate_employee_code=#{params.privEmpCode}
or a.take_piece_employee_code=#{params.privEmpCode}
@ -2657,7 +2671,7 @@
where a.del_flag='0'
and a.bl_sign='1'
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and a.send_site_code=#{params.privSiteCode}
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
and (
a.operate_employee_code=#{params.privEmpCode}
or a.take_piece_employee_code=#{params.privEmpCode}