This commit is contained in:
linfso 2024-06-02 10:13:00 +08:00
parent 41ab49da71
commit 18cbb32041

View File

@ -212,31 +212,35 @@
<association property="lastScanRecord" column="bill_code" select="com.xdadan.erp.emis.mapper.EmisTmsScanRecordMapper.selectLastRecordByBillCode"/>
</resultMap>
<sql id="selectEmisWaybillVo">
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, cust_name, trans_line_type, product_type, time_type, meter_type, carry_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, scan_weight, fee_weight, freight, real_payment_type, real_fee, bl_special_quote, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_type, problem_cause, problem_delay_days, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, payment_status, payment_date, payment_remark, order_remark, data_from, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_waybill
</sql>
<!-- 获取运单统计条数-->
<select id="selectWaybillStatByEmpCode" parameterType="String" resultType="map">
select waybill_status as waybillStatus,count(1) as cnt from emis_waybill
select waybill_status as waybillStatus,count(1) as cnt from emis_waybill
<where>
del_flag='0'
<if test="empCode != null and empCode != ''">
and take_piece_employee_code=#{empCode}
and take_piece_employee_code=#{empCode}
</if>
<if test="waybillStatus != null and waybillStatus != ''">
and waybill_status=#{waybillStatus}
</if>
</where>
group by waybill_status
group by waybill_status
</select>
<select id="selectCommissionStatDataByEmp" parameterType="String" resultType="map">
select waybill_status as waybillStatus,count(1) as cnt from emis_waybill
where take_piece_employee_code is not null
group by waybill_status
</select>
<!-- 其他基本信息 -->
<sql id="selectEmisWaybillVo">
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, cust_name, trans_line_type, product_type, time_type, meter_type, carry_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, scan_weight, fee_weight, freight, real_payment_type, real_fee, bl_special_quote, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_center_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_type, problem_cause, problem_delay_days, bl_message, bl_accept_message, bl_gen_subbill, bl_sign, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, payment_status, payment_date, payment_remark, order_remark, data_from, bl_special_goods, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_waybill
</sql>
<!--根据运单号获取运单信息-->
<select id="selectEmisWaybillByBillCode" parameterType="String" resultMap="EmisWaybillResult">
<include refid="selectEmisWaybillVo"/>
<where>
@ -245,7 +249,7 @@
limit 1
</select>
<!-- 提供给扫描记录 查询使用-->
<!-- 提供给扫描记录 查询使用,简化的,不包含扫描记录-->
<select id="selectWaybillBaseInfoByBillCode" parameterType="String" resultMap="BaseEmisWaybillResult">
<include refid="selectEmisWaybillVo"/>
<where>
@ -254,6 +258,7 @@
limit 1
</select>
<!-- 根据订单号查询 -->
<select id="selectEmisWaybillByOrderSn" parameterType="String" resultMap="EmisWaybillResult">
<include refid="selectEmisWaybillVo"/>
<where>
@ -261,6 +266,7 @@
</where>
</select>
<!-- 多个运单查询-->
<select id="selectEmisWaybillByMutiBillCode" parameterType="String" resultMap="EmisWaybillResult">
select
id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, receive_customer_code, receive_customer_name, third_customer_code, third_customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, trans_line_type, product_type, time_type, meter_type, carry_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, scan_weight, fee_weight, freight, real_payment_type, real_fee, bl_special_quote, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_type, problem_cause, problem_delay_days, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, data_from, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
@ -495,7 +501,7 @@
</select>
<select id="selectEmisWaybillById" parameterType="Long" resultMap="EmisWaybillResult">
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, cust_name, trans_line_type, product_type, time_type, meter_type, carry_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, scan_weight, fee_weight, freight, real_payment_type, real_fee, bl_special_quote, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_type, problem_cause, problem_delay_days, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, payment_status, payment_date, payment_remark, order_remark, data_from, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_waybill
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, cust_name, trans_line_type, product_type, time_type, meter_type, carry_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, scan_weight, fee_weight, freight, real_payment_type, real_fee, bl_special_quote, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_center_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_type, problem_cause, problem_delay_days, bl_message, bl_accept_message, bl_gen_subbill, bl_sign, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, payment_status, payment_date, payment_remark, order_remark, data_from, bl_special_goods, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_waybill a
where a.id = #{id}
</select>
@ -610,7 +616,7 @@
<if test="printManCode != null and printManCode != ''">print_man_code,</if>
<if test="printSite != null and printSite != ''">print_site,</if>
<if test="printDate != null and printDate != ''">print_date,</if>
<if test="printCount != null and printCount != ''">print_count,</if>
<if test="printCount != null">print_count,</if>
<if test="blDispFd != null and blDispFd != ''">bl_disp_fd,</if>
<if test="transferCode != null and transferCode != ''">transfer_code,</if>
<if test="transferBillcode != null and transferBillcode != ''">transfer_billcode,</if>
@ -624,6 +630,7 @@
<if test="registerManCode != null and registerManCode != ''">register_man_code,</if>
<if test="takePieceEmployeeCode != null and takePieceEmployeeCode != ''">take_piece_employee_code,</if>
<if test="sendSiteCode != null and sendSiteCode != ''">send_site_code,</if>
<if test="sendCenterCode != null and sendCenterCode != ''">send_center_code,</if>
<if test="sendDate != null">send_date,</if>
<if test="dispatchManCode != null and dispatchManCode != ''">dispatch_man_code,</if>
<if test="dispatchDate != null and dispatchDate != ''">dispatch_date,</if>
@ -648,10 +655,11 @@
<if test="blMessage != null and blMessage != ''">bl_message,</if>
<if test="blAcceptMessage != null and blAcceptMessage != ''">bl_accept_message,</if>
<if test="blGenSubbill != null and blGenSubbill != ''">bl_gen_subbill,</if>
<if test="blSign != null and blSign != ''">bl_sign,</if>
<if test="signMan != null and signMan != ''">sign_man,</if>
<if test="signManCode != null and signManCode != ''">sign_man_code,</if>
<if test="signSiteCode != null and signSiteCode != ''">sign_site_code,</if>
<if test="signDate != null and signDate != ''">sign_date,</if>
<if test="signDate != null">sign_date,</if>
<if test="billPicSendRmk != null and billPicSendRmk != ''">bill_pic_send_rmk,</if>
<if test="billPicDispatchRmk != null and billPicDispatchRmk != ''">bill_pic_dispatch_rmk,</if>
<if test="timezoneOffset != null and timezoneOffset != ''">timezone_offset,</if>
@ -660,6 +668,7 @@
<if test="paymentRemark != null and paymentRemark != ''">payment_remark,</if>
<if test="orderRemark != null and orderRemark != ''">order_remark,</if>
<if test="dataFrom != null and dataFrom != ''">data_from,</if>
<if test="blSpecialGoods != null and blSpecialGoods != ''">bl_special_goods,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
@ -777,7 +786,7 @@
<if test="printManCode != null and printManCode != ''">#{printManCode},</if>
<if test="printSite != null and printSite != ''">#{printSite},</if>
<if test="printDate != null and printDate != ''">#{printDate},</if>
<if test="printCount != null and printCount != ''">#{printCount},</if>
<if test="printCount != null">#{printCount},</if>
<if test="blDispFd != null and blDispFd != ''">#{blDispFd},</if>
<if test="transferCode != null and transferCode != ''">#{transferCode},</if>
<if test="transferBillcode != null and transferBillcode != ''">#{transferBillcode},</if>
@ -791,6 +800,7 @@
<if test="registerManCode != null and registerManCode != ''">#{registerManCode},</if>
<if test="takePieceEmployeeCode != null and takePieceEmployeeCode != ''">#{takePieceEmployeeCode},</if>
<if test="sendSiteCode != null and sendSiteCode != ''">#{sendSiteCode},</if>
<if test="sendCenterCode != null and sendCenterCode != ''">#{sendCenterCode},</if>
<if test="sendDate != null">#{sendDate},</if>
<if test="dispatchManCode != null and dispatchManCode != ''">#{dispatchManCode},</if>
<if test="dispatchDate != null and dispatchDate != ''">#{dispatchDate},</if>
@ -815,10 +825,11 @@
<if test="blMessage != null and blMessage != ''">#{blMessage},</if>
<if test="blAcceptMessage != null and blAcceptMessage != ''">#{blAcceptMessage},</if>
<if test="blGenSubbill != null and blGenSubbill != ''">#{blGenSubbill},</if>
<if test="blSign != null and blSign != ''">#{blSign},</if>
<if test="signMan != null and signMan != ''">#{signMan},</if>
<if test="signManCode != null and signManCode != ''">#{signManCode},</if>
<if test="signSiteCode != null and signSiteCode != ''">#{signSiteCode},</if>
<if test="signDate != null and signDate != ''">#{signDate},</if>
<if test="signDate != null">#{signDate},</if>
<if test="billPicSendRmk != null and billPicSendRmk != ''">#{billPicSendRmk},</if>
<if test="billPicDispatchRmk != null and billPicDispatchRmk != ''">#{billPicDispatchRmk},</if>
<if test="timezoneOffset != null and timezoneOffset != ''">#{timezoneOffset},</if>
@ -827,6 +838,7 @@
<if test="paymentRemark != null and paymentRemark != ''">#{paymentRemark},</if>
<if test="orderRemark != null and orderRemark != ''">#{orderRemark},</if>
<if test="dataFrom != null and dataFrom != ''">#{dataFrom},</if>
<if test="blSpecialGoods != null and blSpecialGoods != ''">#{blSpecialGoods},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
@ -838,12 +850,13 @@
</trim>
</insert>
<update id="updateEmisWaybill" parameterType="EmisWaybill">
update emis_waybill
<trim prefix="SET" suffixOverrides=",">
<if test="custOrderId != null and custOrderId != ''">cust_order_id = #{custOrderId},</if>
<if test="billCodeSub != null and billCodeSub != ''">bill_code_sub = #{billCodeSub},</if>
<if test="orderStatus != null and orderStatus != ''">order_status = #{orderStatus},</if>
<if test="waybillStatus != null and waybillStatus != ''">waybill_status = #{waybillStatus},</if>
<if test="orderType != null and orderType != ''">order_type = #{orderType},</if>
<if test="orderDate != null">order_date = #{orderDate},</if>
<if test="userId != null">user_id = #{userId},</if>
@ -944,7 +957,7 @@
<if test="printManCode != null and printManCode != ''">print_man_code = #{printManCode},</if>
<if test="printSite != null and printSite != ''">print_site = #{printSite},</if>
<if test="printDate != null and printDate != ''">print_date = #{printDate},</if>
<if test="printCount != null and printCount != ''">print_count = #{printCount},</if>
<if test="printCount != null">print_count = #{printCount},</if>
<if test="blDispFd != null and blDispFd != ''">bl_disp_fd = #{blDispFd},</if>
<if test="transferCode != null and transferCode != ''">transfer_code = #{transferCode},</if>
<if test="transferBillcode != null and transferBillcode != ''">transfer_billcode = #{transferBillcode},</if>
@ -958,6 +971,7 @@
<if test="registerManCode != null and registerManCode != ''">register_man_code = #{registerManCode},</if>
<if test="takePieceEmployeeCode != null and takePieceEmployeeCode != ''">take_piece_employee_code = #{takePieceEmployeeCode},</if>
<if test="sendSiteCode != null and sendSiteCode != ''">send_site_code = #{sendSiteCode},</if>
<if test="sendCenterCode != null and sendCenterCode != ''">send_center_code = #{sendCenterCode},</if>
<if test="sendDate != null">send_date = #{sendDate},</if>
<if test="dispatchManCode != null and dispatchManCode != ''">dispatch_man_code = #{dispatchManCode},</if>
<if test="dispatchDate != null and dispatchDate != ''">dispatch_date = #{dispatchDate},</if>
@ -982,10 +996,11 @@
<if test="blMessage != null and blMessage != ''">bl_message = #{blMessage},</if>
<if test="blAcceptMessage != null and blAcceptMessage != ''">bl_accept_message = #{blAcceptMessage},</if>
<if test="blGenSubbill != null and blGenSubbill != ''">bl_gen_subbill = #{blGenSubbill},</if>
<if test="blSign != null and blSign != ''">bl_sign = #{blSign},</if>
<if test="signMan != null and signMan != ''">sign_man = #{signMan},</if>
<if test="signManCode != null and signManCode != ''">sign_man_code = #{signManCode},</if>
<if test="signSiteCode != null and signSiteCode != ''">sign_site_code = #{signSiteCode},</if>
<if test="signDate != null and signDate != ''">sign_date = #{signDate},</if>
<if test="signDate != null">sign_date = #{signDate},</if>
<if test="billPicSendRmk != null and billPicSendRmk != ''">bill_pic_send_rmk = #{billPicSendRmk},</if>
<if test="billPicDispatchRmk != null and billPicDispatchRmk != ''">bill_pic_dispatch_rmk = #{billPicDispatchRmk},</if>
<if test="timezoneOffset != null and timezoneOffset != ''">timezone_offset = #{timezoneOffset},</if>
@ -994,6 +1009,7 @@
<if test="paymentRemark != null and paymentRemark != ''">payment_remark = #{paymentRemark},</if>
<if test="orderRemark != null and orderRemark != ''">order_remark = #{orderRemark},</if>
<if test="dataFrom != null and dataFrom != ''">data_from = #{dataFrom},</if>
<if test="blSpecialGoods != null and blSpecialGoods != ''">bl_special_goods = #{blSpecialGoods},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
@ -1006,173 +1022,6 @@
where id = #{id}
</update>
<update id="updateEmisWaybillByBillCode" parameterType="EmisWaybill">
update emis_waybill
<trim prefix="SET" suffixOverrides=",">
<if test="custOrderId != null and custOrderId != ''">cust_order_id = #{custOrderId},</if>
<if test="billCodeSub != null and billCodeSub != ''">bill_code_sub = #{billCodeSub},</if>
<if test="orderType != null and orderType != ''">order_type = #{orderType},</if>
<if test="orderDate != null">order_date = #{orderDate},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
<if test="customerName != null and customerName != ''">customer_name = #{customerName},</if>
<if test="openId != null and openId != ''">open_id = #{openId},</if>
<if test="receiveName != null and receiveName != ''">receive_name = #{receiveName},</if>
<if test="receiveCompany != null and receiveCompany != ''">receive_company = #{receiveCompany},</if>
<if test="receiveMobile != null and receiveMobile != ''">receive_mobile = #{receiveMobile},</if>
<if test="receiveTel != null and receiveTel != ''">receive_tel = #{receiveTel},</if>
<if test="receiveCountry != null and receiveCountry != ''">receive_country = #{receiveCountry},</if>
<if test="receiveProvince != null and receiveProvince != ''">receive_province = #{receiveProvince},</if>
<if test="receiveCity != null and receiveCity != ''">receive_city = #{receiveCity},</if>
<if test="receiveCounty != null and receiveCounty != ''">receive_county = #{receiveCounty},</if>
<if test="receiveTown != null and receiveTown != ''">receive_town = #{receiveTown},</if>
<if test="receiveAddress != null and receiveAddress != ''">receive_address = #{receiveAddress},</if>
<if test="receivePostcode != null and receivePostcode != ''">receive_postcode = #{receivePostcode},</if>
<if test="receivePcd != null and receivePcd != ''">receive_pcd = #{receivePcd},</if>
<if test="sendName != null and sendName != ''">send_name = #{sendName},</if>
<if test="sendCompany != null and sendCompany != ''">send_company = #{sendCompany},</if>
<if test="sendMobile != null and sendMobile != ''">send_mobile = #{sendMobile},</if>
<if test="sendTel != null and sendTel != ''">send_tel = #{sendTel},</if>
<if test="sendCountry != null and sendCountry != ''">send_country = #{sendCountry},</if>
<if test="sendProvince != null and sendProvince != ''">send_province = #{sendProvince},</if>
<if test="sendCity != null and sendCity != ''">send_city = #{sendCity},</if>
<if test="sendCounty != null and sendCounty != ''">send_county = #{sendCounty},</if>
<if test="sendTown != null and sendTown != ''">send_town = #{sendTown},</if>
<if test="sendAddress != null and sendAddress != ''">send_address = #{sendAddress},</if>
<if test="sendPostcode != null and sendPostcode != ''">send_postcode = #{sendPostcode},</if>
<if test="sendPcd != null and sendPcd != ''">send_pcd = #{sendPcd},</if>
<if test="paymentType != null and paymentType != ''">payment_type = #{paymentType},</if>
<if test="calcFeeType != null and calcFeeType != ''">calc_fee_type = #{calcFeeType},</if>
<if test="custNo != null and custNo != ''">cust_no = #{custNo},</if>
<if test="custName != null and custName != ''">cust_name = #{custName},</if>
<if test="transLineType != null and transLineType != ''">trans_line_type = #{transLineType},</if>
<if test="productType != null and productType != ''">product_type = #{productType},</if>
<if test="timeType != null and timeType != ''">time_type = #{timeType},</if>
<if test="meterType != null and meterType != ''">meter_type = #{meterType},</if>
<if test="carryType != null and carryType != ''">carry_type = #{carryType},</if>
<if test="customsClear != null and customsClear != ''">customs_clear = #{customsClear},</if>
<if test="customsEclaration != null and customsEclaration != ''">customs_eclaration = #{customsEclaration},</if>
<if test="estimateDate != null">estimate_date = #{estimateDate},</if>
<if test="packType != null and packType != ''">pack_type = #{packType},</if>
<if test="dispatchMethod != null and dispatchMethod != ''">dispatch_method = #{dispatchMethod},</if>
<if test="pickupMethod != null and pickupMethod != ''">pickup_method = #{pickupMethod},</if>
<if test="pickStartDate != null">pick_start_date = #{pickStartDate},</if>
<if test="pickFinishDate != null">pick_finish_date = #{pickFinishDate},</if>
<if test="pickFailReason != null and pickFailReason != ''">pick_fail_reason = #{pickFailReason},</if>
<if test="intoWarehouseCode != null and intoWarehouseCode != ''">into_warehouse_code = #{intoWarehouseCode},</if>
<if test="intoWarehouseName != null and intoWarehouseName != ''">into_warehouse_name = #{intoWarehouseName},</if>
<if test="intoWarehouseAddress != null and intoWarehouseAddress != ''">into_warehouse_address = #{intoWarehouseAddress},</if>
<if test="intoWarehouseContact != null and intoWarehouseContact != ''">into_warehouse_contact = #{intoWarehouseContact},</if>
<if test="intoWarehousePhone != null and intoWarehousePhone != ''">into_warehouse_phone = #{intoWarehousePhone},</if>
<if test="intoWarehouseBillCode != null and intoWarehouseBillCode != ''">into_warehouse_bill_code = #{intoWarehouseBillCode},</if>
<if test="warehouseInNo != null and warehouseInNo != ''">warehouse_in_no = #{warehouseInNo},</if>
<if test="customerDeliveryBeginTime != null and customerDeliveryBeginTime != ''">customer_delivery_begin_time = #{customerDeliveryBeginTime},</if>
<if test="customerDeliveryEndTime != null and customerDeliveryEndTime != ''">customer_delivery_end_time = #{customerDeliveryEndTime},</if>
<if test="goodsType != null and goodsType != ''">goods_type = #{goodsType},</if>
<if test="goodsInfo != null and goodsInfo != ''">goods_info = #{goodsInfo},</if>
<if test="goodsPics != null and goodsPics != ''">goods_pics = #{goodsPics},</if>
<if test="blPrepareInFreight != null and blPrepareInFreight != ''">bl_prepare_in_freight = #{blPrepareInFreight},</if>
<if test="prepareInEstFee != null">prepare_in_est_fee = #{prepareInEstFee},</if>
<if test="prepareInRealFee != null">prepare_in_real_fee = #{prepareInRealFee},</if>
<if test="prepareInExpress != null and prepareInExpress != ''">prepare_in_express = #{prepareInExpress},</if>
<if test="prepareInBillCode != null and prepareInBillCode != ''">prepare_in_bill_code = #{prepareInBillCode},</if>
<if test="prepareInRemark != null and prepareInRemark != ''">prepare_in_remark = #{prepareInRemark},</if>
<if test="prepareInSupplier != null and prepareInSupplier != ''">prepare_in_supplier = #{prepareInSupplier},</if>
<if test="totalWeight != null">total_weight = #{totalWeight},</if>
<if test="totalVolume != null">total_volume = #{totalVolume},</if>
<if test="parcelQty != null">parcel_qty = #{parcelQty},</if>
<if test="billWeight != null">bill_weight = #{billWeight},</if>
<if test="volumeWeight != null">volume_weight = #{volumeWeight},</if>
<if test="currency != null and currency != ''">currency = #{currency},</if>
<if test="settlementWeight != null">settlement_weight = #{settlementWeight},</if>
<if test="scanWeight != null">scan_weight = #{scanWeight},</if>
<if test="feeWeight != null">fee_weight = #{feeWeight},</if>
<if test="freight != null">freight = #{freight},</if>
<if test="realPaymentType != null and realPaymentType != ''">real_payment_type = #{realPaymentType},</if>
<if test="realFee != null">real_fee = #{realFee},</if>
<if test="blSpecialQuote != null and blSpecialQuote != ''">bl_special_quote = #{blSpecialQuote},</if>
<if test="blOverLong != null and blOverLong != ''">bl_over_long = #{blOverLong},</if>
<if test="blBill != null and blBill != ''">bl_bill = #{blBill},</if>
<if test="blBillText != null and blBillText != ''">bl_bill_text = #{blBillText},</if>
<if test="blOverWeight != null and blOverWeight != ''">bl_over_weight = #{blOverWeight},</if>
<if test="overWeightNumber != null and overWeightNumber != ''">over_weight_number = #{overWeightNumber},</if>
<if test="feeRemaker != null and feeRemaker != ''">fee_remaker = #{feeRemaker},</if>
<if test="thirdCode != null and thirdCode != ''">third_code = #{thirdCode},</if>
<if test="realValue != null and realValue != ''">real_value = #{realValue},</if>
<if test="blInsure != null and blInsure != ''">bl_insure = #{blInsure},</if>
<if test="insureValue != null and insureValue != ''">insure_value = #{insureValue},</if>
<if test="insureValueCurrency != null and insureValueCurrency != ''">insure_value_currency = #{insureValueCurrency},</if>
<if test="insureFeeCurrency != null and insureFeeCurrency != ''">insure_fee_currency = #{insureFeeCurrency},</if>
<if test="insureFee != null">insure_fee = #{insureFee},</if>
<if test="insureRemark != null and insureRemark != ''">insure_remark = #{insureRemark},</if>
<if test="insureSiteCode != null and insureSiteCode != ''">insure_site_code = #{insureSiteCode},</if>
<if test="insureDate != null and insureDate != ''">insure_date = #{insureDate},</if>
<if test="blPrint != null and blPrint != ''">bl_print = #{blPrint},</if>
<if test="printManCode != null and printManCode != ''">print_man_code = #{printManCode},</if>
<if test="printSite != null and printSite != ''">print_site = #{printSite},</if>
<if test="printDate != null and printDate != ''">print_date = #{printDate},</if>
<if test="printCount != null and printCount != ''">print_count = #{printCount},</if>
<if test="blDispFd != null and blDispFd != ''">bl_disp_fd = #{blDispFd},</if>
<if test="transferCode != null and transferCode != ''">transfer_code = #{transferCode},</if>
<if test="transferBillcode != null and transferBillcode != ''">transfer_billcode = #{transferBillcode},</if>
<if test="dispFdDate != null">disp_fd_date = #{dispFdDate},</if>
<if test="dispFdReason != null and dispFdReason != ''">disp_fd_reason = #{dispFdReason},</if>
<if test="currentSiteCode != null and currentSiteCode != ''">current_site_code = #{currentSiteCode},</if>
<if test="nextSiteCode != null and nextSiteCode != ''">next_site_code = #{nextSiteCode},</if>
<if test="lastSiteCode != null and lastSiteCode != ''">last_site_code = #{lastSiteCode},</if>
<if test="registerSiteCode != null and registerSiteCode != ''">register_site_code = #{registerSiteCode},</if>
<if test="registerDate != null">register_date = #{registerDate},</if>
<if test="registerManCode != null and registerManCode != ''">register_man_code = #{registerManCode},</if>
<if test="takePieceEmployeeCode != null and takePieceEmployeeCode != ''">take_piece_employee_code = #{takePieceEmployeeCode},</if>
<if test="sendSiteCode != null and sendSiteCode != ''">send_site_code = #{sendSiteCode},</if>
<if test="sendDate != null">send_date = #{sendDate},</if>
<if test="dispatchManCode != null and dispatchManCode != ''">dispatch_man_code = #{dispatchManCode},</if>
<if test="dispatchDate != null and dispatchDate != ''">dispatch_date = #{dispatchDate},</if>
<if test="dispatchSiteCode != null and dispatchSiteCode != ''">dispatch_site_code = #{dispatchSiteCode},</if>
<if test="produceBillDate != null">produce_bill_date = #{produceBillDate},</if>
<if test="produceBillSiteCode != null and produceBillSiteCode != ''">produce_bill_site_code = #{produceBillSiteCode},</if>
<if test="produceBillManCode != null and produceBillManCode != ''">produce_bill_man_code = #{produceBillManCode},</if>
<if test="destinationCode != null and destinationCode != ''">destination_code = #{destinationCode},</if>
<if test="destinationProvince != null and destinationProvince != ''">destination_province = #{destinationProvince},</if>
<if test="destinationCity != null and destinationCity != ''">destination_city = #{destinationCity},</if>
<if test="destinationCounty != null and destinationCounty != ''">destination_county = #{destinationCounty},</if>
<if test="dispatchUnderlingSiteCode != null and dispatchUnderlingSiteCode != ''">dispatch_underling_site_code = #{dispatchUnderlingSiteCode},</if>
<if test="destinationCenterCode != null and destinationCenterCode != ''">destination_center_code = #{destinationCenterCode},</if>
<if test="marketManCode != null and marketManCode != ''">market_man_code = #{marketManCode},</if>
<if test="payee != null and payee != ''">payee = #{payee},</if>
<if test="salesmen != null and salesmen != ''">salesmen = #{salesmen},</if>
<if test="operateEmployeeCode != null and operateEmployeeCode != ''">operate_employee_code = #{operateEmployeeCode},</if>
<if test="blIsQuestion != null and blIsQuestion != ''">bl_is_question = #{blIsQuestion},</if>
<if test="problemType != null and problemType != ''">problem_type = #{problemType},</if>
<if test="problemCause != null and problemCause != ''">problem_cause = #{problemCause},</if>
<if test="problemDelayDays != null">problem_delay_days = #{problemDelayDays},</if>
<if test="blMessage != null and blMessage != ''">bl_message = #{blMessage},</if>
<if test="blAcceptMessage != null and blAcceptMessage != ''">bl_accept_message = #{blAcceptMessage},</if>
<if test="blGenSubbill != null and blGenSubbill != ''">bl_gen_subbill = #{blGenSubbill},</if>
<if test="signMan != null and signMan != ''">sign_man = #{signMan},</if>
<if test="signManCode != null and signManCode != ''">sign_man_code = #{signManCode},</if>
<if test="signSiteCode != null and signSiteCode != ''">sign_site_code = #{signSiteCode},</if>
<if test="signDate != null and signDate != ''">sign_date = #{signDate},</if>
<if test="billPicSendRmk != null and billPicSendRmk != ''">bill_pic_send_rmk = #{billPicSendRmk},</if>
<if test="billPicDispatchRmk != null and billPicDispatchRmk != ''">bill_pic_dispatch_rmk = #{billPicDispatchRmk},</if>
<if test="timezoneOffset != null and timezoneOffset != ''">timezone_offset = #{timezoneOffset},</if>
<if test="paymentStatus != null and paymentStatus != ''">payment_status = #{paymentStatus},</if>
<if test="paymentDate != null">payment_date = #{paymentDate},</if>
<if test="paymentRemark != null and paymentRemark != ''">payment_remark = #{paymentRemark},</if>
<if test="orderRemark != null and orderRemark != ''">order_remark = #{orderRemark},</if>
<if test="dataFrom != null and dataFrom != ''">data_from = #{dataFrom},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where bill_code=#{billCode}
</update>
<update id="updatePrintStatus" parameterType="EmisWaybill">
update emis_waybill set bl_print='1',print_man_code=#{printManCode},print_site=#{printSite},print_date=now(),print_count=print_count+1 where bill_code=#{billCode}
@ -1206,16 +1055,10 @@
</update>
<update id="changeWaybillStatusByBillCode" parameterType="EmisWaybill">
update emis_waybill set waybill_status=#{waybillStatus} where bill_code=#{billCode}
</update>
<update id="changeOrderStatusByBillCode" parameterType="EmisWaybill">
update emis_waybill set order_status=#{orderStatus} where bill_code=#{billCode}
</update>