diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java
index 2b5b21687..8cc350ece 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java
@@ -3288,6 +3288,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
// 当寄件国家为0095或0855时,去除billCode和billCodeSub中的第一个T
// modifyBillCode(emisWaybillSave);
+ // 设置数据来源
+ emisWaybillSave.setDataFrom("tms");
+
// 校验运单号格式
validateBillCodeFormat(emisWaybillSave.getBillCode());
@@ -5509,6 +5512,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
// 公共计算部分
calcWayBillCommonInfoByExternal(emisWaybillSave);
+ // 设置数据来源
+ emisWaybillSave.setDataFrom("api");
+
// 插入运单数据
emisWaybillMapper.insertEmisWaybill(emisWaybillSave);
diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
index 29b2ba73f..8c4f45f78 100644
--- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
@@ -343,7 +343,9 @@
a.dispatch_underling_site_code, a.destination_center_code, a.market_man_code, a.payee, a.salesmen, a.operate_employee_code,
a.bl_is_question, a.problem_type, a.problem_cause, a.problem_delay_days, a.bl_message, a.bl_accept_message, a.bl_gen_subbill,
a.bl_sign, a.sign_man, a.sign_man_code, a.sign_site_code, a.sign_date, a.bill_pic_send_rmk, a.bill_pic_dispatch_rmk, a.timezone_offset,
- a.payment_status, a.payment_date, a.payment_remark, a.order_remark, a.data_from, a.bl_special_goods,a.ext_info,
+ a.payment_status, a.payment_date, a.payment_remark, a.order_remark,
+ (case when a.data_from is null or a.data_from = '' then 'tms' else a.data_from end) as data_from,
+ a.bl_special_goods,a.ext_info,
a.remark, a.del_flag, a.create_by,
a.create_time, a.update_by, a.update_time, a.create_site, a.update_site,
a.cod_fee_desc, a.lading_bill_code, a.company_code, a.departure_port, a.destination_port, a.box_quantity,
@@ -1288,6 +1290,17 @@
+
+
+
+ and (a.data_from is null or a.data_from = '' or a.data_from = 'tms')
+
+
+ and a.data_from = #{dataFrom}
+
+
+
+
and a.order_type=#{orderType}
and a.cust_order_id=#{custOrderId}
@@ -1558,6 +1571,17 @@
a.del_flag='0' and a.order_status !='0' and a.order_status!='2'
and a.id = #{id}
+
+
+
+ and (a.data_from is null or a.data_from = '' or a.data_from = 'tms')
+
+
+ and a.data_from = #{dataFrom}
+
+
+
+
and ( FIND_IN_SET(`order_sn`,#{orderSn}) or order_sn like concat('%', #{orderSn}, '%') )
@@ -1959,6 +1983,17 @@
+
+
+
+ and (a.data_from is null or a.data_from = '' or a.data_from = 'tms')
+
+
+ and a.data_from = #{dataFrom}
+
+
+
+
and cust_order_id=#{custOrderId}
and bill_code_sub like concat('%', #{billCodeSub}, '%')
and order_status=#{orderStatus}
@@ -2842,6 +2877,17 @@
+
+
+
+ and (a.data_from is null or a.data_from = '' or a.data_from = 'tms')
+
+
+ and a.data_from = #{dataFrom}
+
+
+
+
and cust_order_id=#{custOrderId}
and bill_code_sub like concat('%', #{billCodeSub}, '%')
and order_status=#{orderStatus}