2024-02-29 08:23:35 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
< !DOCTYPE mapper
2024-03-01 06:47:57 +00:00
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2024-02-29 08:23:35 +00:00
<mapper namespace= "com.xdadan.erp.emis.mapper.EmisWaybillMapper" >
2024-03-01 06:47:57 +00:00
2024-06-02 02:57:46 +00:00
<resultMap type= "EmisWaybill" id= "BaseEmisWaybillResult" extends= "com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult" >
2024-06-01 15:10:36 +00:00
<result property= "id" column= "id" />
<result property= "orderSn" column= "order_sn" />
<result property= "custOrderId" column= "cust_order_id" />
<result property= "billCode" column= "bill_code" />
<result property= "billCodeSub" column= "bill_code_sub" />
<result property= "orderStatus" column= "order_status" />
<result property= "waybillStatus" column= "waybill_status" />
<result property= "orderType" column= "order_type" />
<result property= "orderDate" column= "order_date" />
<result property= "userId" column= "user_id" />
<result property= "customerCode" column= "customer_code" />
<result property= "customerName" column= "customer_name" />
<result property= "openId" column= "open_id" />
<result property= "receiveName" column= "receive_name" />
<result property= "receiveCompany" column= "receive_company" />
<result property= "receiveMobile" column= "receive_mobile" />
<result property= "receiveTel" column= "receive_tel" />
<result property= "receiveCountry" column= "receive_country" />
<result property= "receiveProvince" column= "receive_province" />
<result property= "receiveCity" column= "receive_city" />
<result property= "receiveCounty" column= "receive_county" />
<result property= "receiveTown" column= "receive_town" />
<result property= "receiveAddress" column= "receive_address" />
<result property= "receivePostcode" column= "receive_postcode" />
<result property= "receivePcd" column= "receive_pcd" />
<result property= "sendName" column= "send_name" />
<result property= "sendCompany" column= "send_company" />
<result property= "sendMobile" column= "send_mobile" />
<result property= "sendTel" column= "send_tel" />
<result property= "sendCountry" column= "send_country" />
<result property= "sendProvince" column= "send_province" />
<result property= "sendCity" column= "send_city" />
<result property= "sendCounty" column= "send_county" />
<result property= "sendTown" column= "send_town" />
<result property= "sendAddress" column= "send_address" />
<result property= "sendPostcode" column= "send_postcode" />
<result property= "sendPcd" column= "send_pcd" />
<result property= "paymentType" column= "payment_type" />
<result property= "calcFeeType" column= "calc_fee_type" />
<result property= "custNo" column= "cust_no" />
<result property= "custName" column= "cust_name" />
<result property= "transLineType" column= "trans_line_type" />
<result property= "productType" column= "product_type" />
<result property= "timeType" column= "time_type" />
<result property= "meterType" column= "meter_type" />
<result property= "carryType" column= "carry_type" />
<result property= "customsClear" column= "customs_clear" />
<result property= "customsEclaration" column= "customs_eclaration" />
<result property= "estimateDate" column= "estimate_date" />
<result property= "packType" column= "pack_type" />
<result property= "dispatchMethod" column= "dispatch_method" />
<result property= "pickupMethod" column= "pickup_method" />
<result property= "pickStartDate" column= "pick_start_date" />
<result property= "pickFinishDate" column= "pick_finish_date" />
<result property= "pickFailReason" column= "pick_fail_reason" />
<result property= "intoWarehouseCode" column= "into_warehouse_code" />
<result property= "intoWarehouseName" column= "into_warehouse_name" />
<result property= "intoWarehouseAddress" column= "into_warehouse_address" />
<result property= "intoWarehouseContact" column= "into_warehouse_contact" />
<result property= "intoWarehousePhone" column= "into_warehouse_phone" />
<result property= "intoWarehouseBillCode" column= "into_warehouse_bill_code" />
<result property= "warehouseInNo" column= "warehouse_in_no" />
<result property= "customerDeliveryBeginTime" column= "customer_delivery_begin_time" />
<result property= "customerDeliveryEndTime" column= "customer_delivery_end_time" />
<result property= "goodsType" column= "goods_type" />
<result property= "goodsInfo" column= "goods_info" />
<result property= "goodsPics" column= "goods_pics" />
<result property= "blPrepareInFreight" column= "bl_prepare_in_freight" />
<result property= "prepareInEstFee" column= "prepare_in_est_fee" />
<result property= "prepareInRealFee" column= "prepare_in_real_fee" />
<result property= "prepareInExpress" column= "prepare_in_express" />
<result property= "prepareInBillCode" column= "prepare_in_bill_code" />
<result property= "prepareInRemark" column= "prepare_in_remark" />
<result property= "prepareInSupplier" column= "prepare_in_supplier" />
<result property= "totalWeight" column= "total_weight" />
<result property= "totalVolume" column= "total_volume" />
<result property= "parcelQty" column= "parcel_qty" />
<result property= "billWeight" column= "bill_weight" />
<result property= "volumeWeight" column= "volume_weight" />
<result property= "currency" column= "currency" />
<result property= "settlementWeight" column= "settlement_weight" />
<result property= "scanWeight" column= "scan_weight" />
<result property= "feeWeight" column= "fee_weight" />
<result property= "freight" column= "freight" />
<result property= "realPaymentType" column= "real_payment_type" />
<result property= "realFee" column= "real_fee" />
<result property= "blSpecialQuote" column= "bl_special_quote" />
<result property= "blOverLong" column= "bl_over_long" />
<result property= "blBill" column= "bl_bill" />
<result property= "blBillText" column= "bl_bill_text" />
<result property= "blOverWeight" column= "bl_over_weight" />
<result property= "overWeightNumber" column= "over_weight_number" />
2024-06-08 07:18:42 +00:00
<result property= "feeRemark" column= "fee_remark" />
2024-06-01 15:10:36 +00:00
<result property= "thirdCode" column= "third_code" />
<result property= "realValue" column= "real_value" />
<result property= "blInsure" column= "bl_insure" />
<result property= "insureValue" column= "insure_value" />
<result property= "insureValueCurrency" column= "insure_value_currency" />
<result property= "insureFeeCurrency" column= "insure_fee_currency" />
<result property= "insureFee" column= "insure_fee" />
<result property= "insureRemark" column= "insure_remark" />
<result property= "insureSiteCode" column= "insure_site_code" />
<result property= "insureDate" column= "insure_date" />
<result property= "blPrint" column= "bl_print" />
<result property= "printManCode" column= "print_man_code" />
<result property= "printSite" column= "print_site" />
<result property= "printDate" column= "print_date" />
<result property= "printCount" column= "print_count" />
<result property= "blDispFd" column= "bl_disp_fd" />
<result property= "transferCode" column= "transfer_code" />
<result property= "transferBillcode" column= "transfer_billcode" />
<result property= "dispFdDate" column= "disp_fd_date" />
<result property= "dispFdReason" column= "disp_fd_reason" />
<result property= "currentSiteCode" column= "current_site_code" />
<result property= "nextSiteCode" column= "next_site_code" />
<result property= "lastSiteCode" column= "last_site_code" />
<result property= "registerSiteCode" column= "register_site_code" />
<result property= "registerDate" column= "register_date" />
<result property= "registerManCode" column= "register_man_code" />
<result property= "takePieceEmployeeCode" column= "take_piece_employee_code" />
<result property= "sendSiteCode" column= "send_site_code" />
2024-06-02 01:10:24 +00:00
<result property= "sendCenterCode" column= "send_center_code" />
2024-06-01 15:10:36 +00:00
<result property= "sendDate" column= "send_date" />
<result property= "dispatchManCode" column= "dispatch_man_code" />
<result property= "dispatchDate" column= "dispatch_date" />
<result property= "dispatchSiteCode" column= "dispatch_site_code" />
<result property= "produceBillDate" column= "produce_bill_date" />
<result property= "produceBillSiteCode" column= "produce_bill_site_code" />
<result property= "produceBillManCode" column= "produce_bill_man_code" />
<result property= "destinationCode" column= "destination_code" />
<result property= "destinationProvince" column= "destination_province" />
<result property= "destinationCity" column= "destination_city" />
<result property= "destinationCounty" column= "destination_county" />
<result property= "dispatchUnderlingSiteCode" column= "dispatch_underling_site_code" />
<result property= "destinationCenterCode" column= "destination_center_code" />
<result property= "marketManCode" column= "market_man_code" />
<result property= "payee" column= "payee" />
<result property= "salesmen" column= "salesmen" />
<result property= "operateEmployeeCode" column= "operate_employee_code" />
<result property= "blIsQuestion" column= "bl_is_question" />
<result property= "problemType" column= "problem_type" />
<result property= "problemCause" column= "problem_cause" />
<result property= "problemDelayDays" column= "problem_delay_days" />
<result property= "blMessage" column= "bl_message" />
<result property= "blAcceptMessage" column= "bl_accept_message" />
<result property= "blGenSubbill" column= "bl_gen_subbill" />
2024-06-02 01:10:24 +00:00
<result property= "blSign" column= "bl_sign" />
2024-06-01 15:10:36 +00:00
<result property= "signMan" column= "sign_man" />
<result property= "signManCode" column= "sign_man_code" />
<result property= "signSiteCode" column= "sign_site_code" />
<result property= "signDate" column= "sign_date" />
<result property= "billPicSendRmk" column= "bill_pic_send_rmk" />
<result property= "billPicDispatchRmk" column= "bill_pic_dispatch_rmk" />
<result property= "timezoneOffset" column= "timezone_offset" />
<result property= "paymentStatus" column= "payment_status" />
<result property= "paymentDate" column= "payment_date" />
<result property= "paymentRemark" column= "payment_remark" />
<result property= "orderRemark" column= "order_remark" />
<result property= "dataFrom" column= "data_from" />
2024-06-02 01:10:24 +00:00
<result property= "blSpecialGoods" column= "bl_special_goods" />
2024-06-02 02:57:46 +00:00
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<!-- 扩展属性 -->
<result property= "receiveCountryName" column= "receive_country_name" />
<result property= "receiveProvinceName" column= "receive_province_name" />
<result property= "receiveCityName" column= "receive_city_name" />
<result property= "receiveCountyName" column= "receive_county_name" />
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<result property= "sendCountryName" column= "send_country_name" />
<result property= "sendProvinceName" column= "send_province_name" />
<result property= "sendCityName" column= "send_city_name" />
<result property= "sendCountyName" column= "send_county_name" />
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<result property= "productTypeName" column= "product_type_name" />
<result property= "transLineTypeName" column= "trans_line_type_name" />
<result property= "sendSiteName" column= "send_site_name" />
<result property= "dispatchUnderlingSiteName" column= "dispatch_underling_site_name" />
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<result property= "destinationName" column= "destination_name" />
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<result property= "dispatchSiteName" column= "dispatch_site_name" />
<result property= "dispatchManName" column= "dispatch_man_name" />
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<result property= "printSiteName" column= "print_site_name" />
<result property= "printManName" column= "print_man_name" />
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<result property= "takePieceEmployeeName" column= "take_piece_employee_name" />
<result property= "operateEmployeeName" column= "operate_employee_name" />
<result property= "registerSiteName" column= "register_site_name" />
<result property= "registerManName" column= "register_man_name" />
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<result property= "currentSiteName" column= "current_site_name" />
<result property= "nextSiteName" column= "next_site_name" />
<result property= "lastSiteName" column= "last_site_name" />
2024-06-01 15:10:36 +00:00
2024-06-07 07:30:35 +00:00
<result property= "problemTypeName" column= "problem_type_name" />
2024-06-03 04:34:35 +00:00
2024-06-01 15:10:36 +00:00
</resultMap>
2024-06-01 15:13:33 +00:00
<resultMap id= "EmisWaybillResult" extends= "BaseEmisWaybillResult" type= "EmisWaybill" >
2024-06-02 01:10:24 +00:00
<!-- 获取订单最后一条扫描记录 -->
<association property= "lastScanRecord" column= "bill_code" select= "com.xdadan.erp.emis.mapper.EmisTmsScanRecordMapper.selectLastRecordByBillCode" />
2024-02-29 08:23:35 +00:00
</resultMap>
2024-06-02 02:13:00 +00:00
<!-- 获取运单统计条数 -->
2024-05-08 11:34:34 +00:00
<select id= "selectWaybillStatByEmpCode" parameterType= "String" resultType= "map" >
2024-06-02 02:13:00 +00:00
select waybill_status as waybillStatus,count(1) as cnt from emis_waybill
2024-05-08 11:33:05 +00:00
<where >
del_flag='0'
<if test= "empCode != null and empCode != ''" >
2024-06-02 02:13:00 +00:00
and take_piece_employee_code=#{empCode}
2024-05-08 11:33:05 +00:00
</if>
<if test= "waybillStatus != null and waybillStatus != ''" >
and waybill_status=#{waybillStatus}
</if>
</where>
2024-06-02 02:13:00 +00:00
group by waybill_status
2024-05-08 11:01:23 +00:00
</select>
2024-06-02 02:13:00 +00:00
2024-05-08 11:01:23 +00:00
<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>
2024-06-02 02:13:00 +00:00
<!-- 其他基本信息 -->
2024-06-07 07:30:35 +00:00
<sql id= "selectEmisWaybillVoOld" >
2024-06-08 07:18:42 +00:00
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_remark, 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
2024-06-02 02:13:00 +00:00
</sql>
2024-06-07 07:30:35 +00:00
<sql id= "selectEmisWaybillVo" >
select
2024-06-07 07:39:53 +00:00
a.id,a.order_sn, a.cust_order_id, a.bill_code, a.bill_code_sub, a.order_status, a.waybill_status,
a.order_type, a.order_date, a.user_id, a.customer_code, a.customer_name, a.open_id, a.receive_name,
a.receive_company, a.receive_mobile, a.receive_tel, a.receive_country, a.receive_province, a.receive_city,
a.receive_county, a.receive_town, a.receive_address, a.receive_postcode, a.receive_pcd, a.send_name, a.send_company,
a.send_mobile, a.send_tel, a.send_country, a.send_province, a.send_city, a.send_county, a.send_town, a.send_address,
a.send_postcode, a.send_pcd, a.payment_type, a.calc_fee_type, a.cust_no, a.cust_name, a.trans_line_type, a.product_type,
a.time_type, a.meter_type, a.carry_type, a.customs_clear, a.customs_eclaration, a.estimate_date, a.pack_type, a.dispatch_method,
a.pickup_method, a.pick_start_date, a.pick_finish_date, a.pick_fail_reason, a.into_warehouse_code,
a.into_warehouse_name, a.into_warehouse_address, a.into_warehouse_contact, a.into_warehouse_phone,
a.into_warehouse_bill_code, a.warehouse_in_no, a.customer_delivery_begin_time, a.customer_delivery_end_time,
a.goods_type, a.goods_info, a.goods_pics, a.bl_prepare_in_freight, a.prepare_in_est_fee,
a.prepare_in_real_fee, a.prepare_in_express, a.prepare_in_bill_code, a.prepare_in_remark,
a.prepare_in_supplier, a.total_weight, a.total_volume, a.parcel_qty, a.bill_weight, a.volume_weight, a.currency,
a.settlement_weight, a.scan_weight, a.fee_weight, a.freight, a.real_payment_type, a.real_fee, a.bl_special_quote,
2024-06-08 07:18:42 +00:00
a.bl_over_long, a.bl_bill, a.bl_bill_text, a.bl_over_weight, a.over_weight_number, a.fee_remark, a.third_code,
2024-06-07 07:39:53 +00:00
a.real_value, a.bl_insure, a.insure_value, a.insure_value_currency, a.insure_fee_currency, a.insure_fee, a.insure_remark,
a.insure_site_code, a.insure_date, a.bl_print, a.print_man_code, a.print_site, a.print_date, a.print_count, a.bl_disp_fd,
a.transfer_code, a.transfer_billcode, a.disp_fd_date, a.disp_fd_reason, a.current_site_code, a.next_site_code, a.last_site_code,
a.register_site_code, a.register_date, a.register_man_code, a.take_piece_employee_code, a.send_site_code, a.send_center_code,
a.send_date, a.dispatch_man_code, a.dispatch_date, a.dispatch_site_code, a.produce_bill_date, a.produce_bill_site_code,
a.produce_bill_man_code, a.destination_code, a.destination_province, a.destination_city, a.destination_county,
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,
2024-06-07 07:34:31 +00:00
a.remark, a.del_flag, a.create_by,
a.create_time, a.update_by, a.update_time, a.create_site, a.update_site,
2024-06-07 07:30:35 +00:00
b.name as receive_country_name,c.name as send_country_name,
d.region_name as receive_province_name,e.region_name as receive_city_name,f.region_name as receive_county_name,
g.region_name as send_province_name,h.region_name as send_city_name,i.region_name as send_county_name,
j.prod_name as product_type_name,k.line_name as trans_line_type_name,
l.site_name as send_site_name,m.site_name as dispatch_underling_site_name,
n.dest_name as destination_name,o.site_name as dispatch_site_name,
p.emp_name as dispatch_man_name,q.site_name as print_site_name,
r.emp_name as print_man_name,
s.emp_name as take_piece_employee_name,
t.emp_name as operate_employee_name,
u.site_name as register_site_name,
v.emp_name as register_man_name,
w.site_name as current_site_name,
x.site_name as next_site_name,
y.site_name as last_site_name,
z.type_name as problem_type_name
from emis_waybill a
left join emis_country b on a.receive_country=b.code
left join emis_country c on a.send_country=c.code
left join emis_region d on a.receive_province=d.region_code
left join emis_region e on a.receive_city=e.region_code
left join emis_region f on a.receive_county=f.region_code
left join emis_region g on a.send_province=g.region_code
left join emis_region h on a.send_city=h.region_code
left join emis_region i on a.send_county=i.region_code
left join emis_trans_product j on a.product_type=j.prod_code
left join emis_trans_line k on a.trans_line_type=k.line_code
left join emis_site l on a.send_site_code=l.site_code
left join emis_site m on a.dispatch_underling_site_code=m.site_code
left join emis_destination n on a.destination_code=n.dest_code
left join emis_site o on a.dispatch_site_code=o.site_code
left join sys_user p on a.dispatch_man_code=p.emp_code
left join emis_site q on a.print_site=q.site_code
left join sys_user r on a.print_man_code=r.emp_code
left join sys_user s on a.take_piece_employee_code=s.emp_code
left join sys_user t on a.operate_employee_code=t.emp_code
left join emis_site u on a.register_site_code=u.site_code
left join sys_user v on a.register_man_code=v.emp_code
left join emis_site w on a.current_site_code=w.site_code
left join emis_site x on a.next_site_code=x.site_code
left join emis_site y on a.last_site_code=y.site_code
left join emis_problem_type z on a.problem_type=z.id
</sql>
2024-06-02 02:13:00 +00:00
<!-- 根据运单号获取运单信息 -->
2024-04-28 16:08:11 +00:00
<select id= "selectEmisWaybillByBillCode" parameterType= "String" resultMap= "EmisWaybillResult" >
<include refid= "selectEmisWaybillVo" />
<where >
2024-05-19 20:21:59 +00:00
bill_code = #{billCode} or FIND_IN_SET(#{billCode},bill_code_sub)
2024-04-28 16:08:11 +00:00
</where>
2024-05-19 20:21:59 +00:00
limit 1
2024-04-28 16:08:11 +00:00
</select>
2024-06-02 02:13:00 +00:00
<!-- 提供给扫描记录 查询使用,简化的,不包含扫描记录 -->
2024-06-01 15:10:36 +00:00
<select id= "selectWaybillBaseInfoByBillCode" parameterType= "String" resultMap= "BaseEmisWaybillResult" >
<include refid= "selectEmisWaybillVo" />
<where >
bill_code = #{billCode}
</where>
limit 1
</select>
2024-06-02 02:13:00 +00:00
<!-- 根据订单号查询 -->
2024-04-28 16:08:11 +00:00
<select id= "selectEmisWaybillByOrderSn" parameterType= "String" resultMap= "EmisWaybillResult" >
<include refid= "selectEmisWaybillVo" />
<where >
order_sn = #{orderSn}
</where>
</select>
2024-06-02 02:13:00 +00:00
<!-- 多个运单查询 -->
2024-04-30 14:34:56 +00:00
<select id= "selectEmisWaybillByMutiBillCode" parameterType= "String" resultMap= "EmisWaybillResult" >
2024-05-20 10:24:31 +00:00
select
2024-06-08 07:18:42 +00:00
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_remark, 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
2024-04-30 14:34:56 +00:00
from emis_waybill
where billCode in
<foreach item= "id" collection= "array" open= "(" separator= "," close= ")" >
#{billCode}
</foreach>
</select>
2024-04-28 16:08:11 +00:00
2024-02-29 08:23:35 +00:00
<select id= "selectEmisWaybillList" parameterType= "EmisWaybill" resultMap= "EmisWaybillResult" >
<include refid= "selectEmisWaybillVo" />
2024-03-01 06:47:57 +00:00
<where >
2024-06-07 07:45:47 +00:00
a.del_flag='0'
<if test= "id != null " > and a.id = #{id}</if>
2024-06-05 05:14:12 +00:00
<if test= "orderSn != null and orderSn != ''" > and ( FIND_IN_SET(`order_sn`,#{orderSn}) or order_sn like concat('%', #{orderSn}, '%') ) </if>
<if test= "billCode != null and billCode != ''" > and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') ) </if>
2024-05-23 04:45:34 +00:00
<if test= "custOrderId != null and custOrderId != ''" > and cust_order_id=#{custOrderId}</if>
2024-02-29 08:23:35 +00:00
<if test= "billCodeSub != null and billCodeSub != ''" > and bill_code_sub like concat('%', #{billCodeSub}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "orderStatus != null and orderStatus != ''" > and order_status=#{orderStatus}</if>
<if test= "waybillStatus != null and waybillStatus != ''" > and waybill_status=#{waybillStatus}</if>
2024-02-29 08:23:35 +00:00
<if test= "orderType != null and orderType != ''" > and order_type like concat('%', #{orderType}, '%')</if>
2024-03-19 12:54:06 +00:00
<if test= "orderDate != null " > and order_date = #{orderDate}</if>
2024-03-01 06:47:57 +00:00
<if test= "userId != null " > and user_id = #{userId}</if>
2024-06-07 06:30:33 +00:00
<if test= "customerCode != null and customerCode != ''" > and customer_code=#{customerCode}</if>
2024-02-29 08:23:35 +00:00
<if test= "customerName != null and customerName != ''" > and customer_name like concat('%', #{customerName}, '%')</if>
<if test= "openId != null and openId != ''" > and open_id like concat('%', #{openId}, '%')</if>
<if test= "receiveName != null and receiveName != ''" > and receive_name like concat('%', #{receiveName}, '%')</if>
<if test= "receiveCompany != null and receiveCompany != ''" > and receive_company like concat('%', #{receiveCompany}, '%')</if>
<if test= "receiveMobile != null and receiveMobile != ''" > and receive_mobile like concat('%', #{receiveMobile}, '%')</if>
<if test= "receiveTel != null and receiveTel != ''" > and receive_tel like concat('%', #{receiveTel}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "receiveCountry != null and receiveCountry != ''" > and receive_country=#{receiveCountry}</if>
<if test= "receiveProvince != null and receiveProvince != ''" > and receive_province=#{receiveProvince}</if>
<if test= "receiveCity != null and receiveCity != ''" > and receive_city=#{receiveCity}</if>
<if test= "receiveCounty != null and receiveCounty != ''" > and receive_county=#{receiveCounty}</if>
<if test= "receiveTown != null and receiveTown != ''" > and receive_town=#{receiveTown}</if>
2024-02-29 08:23:35 +00:00
<if test= "receiveAddress != null and receiveAddress != ''" > and receive_address like concat('%', #{receiveAddress}, '%')</if>
<if test= "receivePostcode != null and receivePostcode != ''" > and receive_postcode like concat('%', #{receivePostcode}, '%')</if>
2024-04-11 05:47:34 +00:00
<if test= "receivePcd != null and receivePcd != ''" > and receive_pcd like concat('%', #{receivePcd}, '%')</if>
2024-02-29 08:23:35 +00:00
<if test= "sendName != null and sendName != ''" > and send_name like concat('%', #{sendName}, '%')</if>
<if test= "sendCompany != null and sendCompany != ''" > and send_company like concat('%', #{sendCompany}, '%')</if>
<if test= "sendMobile != null and sendMobile != ''" > and send_mobile like concat('%', #{sendMobile}, '%')</if>
<if test= "sendTel != null and sendTel != ''" > and send_tel like concat('%', #{sendTel}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "sendCountry != null and sendCountry != ''" > and send_country=#{sendCountry}</if>
<if test= "sendProvince != null and sendProvince != ''" > and send_province=#{sendProvince}</if>
<if test= "sendCity != null and sendCity != ''" > and send_city=#{sendCity}</if>
<if test= "sendCounty != null and sendCounty != ''" > and send_county=#{sendCounty}</if>
<if test= "sendTown != null and sendTown != ''" > and send_town=#{sendTown}</if>
2024-02-29 08:23:35 +00:00
<if test= "sendAddress != null and sendAddress != ''" > and send_address like concat('%', #{sendAddress}, '%')</if>
<if test= "sendPostcode != null and sendPostcode != ''" > and send_postcode like concat('%', #{sendPostcode}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "paymentType != null and paymentType != ''" > and payment_type=#{paymentType}</if>
<if test= "calcFeeType != null and calcFeeType != ''" > and calc_fee_type=#{calcFeeType}</if>
2024-04-11 05:47:34 +00:00
<if test= "custNo != null and custNo != ''" > and cust_no like concat('%', #{custNo}, '%')</if>
2024-05-22 23:51:32 +00:00
<if test= "custName != null and custName != ''" > and cust_name like concat('%', #{custName}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "transLineType != null and transLineType != ''" > and trans_line_type=#{transLineType}</if>
<if test= "productType != null and productType != ''" > and product_type=#{productType}</if>
2024-03-01 06:47:57 +00:00
<if test= "timeType != null and timeType != ''" > and time_type like concat('%', #{timeType}, '%')</if>
<if test= "meterType != null and meterType != ''" > and meter_type like concat('%', #{meterType}, '%')</if>
2024-05-20 10:24:31 +00:00
<if test= "carryType != null and carryType != ''" > and carry_type like concat('%', #{carryType}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "customsClear != null and customsClear != ''" > and customs_clear=#{customsClear}</if>
<if test= "customsEclaration != null and customsEclaration != ''" > and customs_eclaration=#{customsEclaration}</if>
2024-03-01 06:47:57 +00:00
<if test= "estimateDate != null " > and estimate_date = #{estimateDate}</if>
2024-06-07 06:30:33 +00:00
<if test= "packType != null and packType != ''" > and FIND_IN_SET(#{packType},pack_type)</if>
<if test= "dispatchMethod != null and dispatchMethod != ''" > and dispatch_method=#{dispatchMethod}</if>
<if test= "pickupMethod != null and pickupMethod != ''" > and pickup_method= #{pickupMethod}</if>
2024-02-29 08:23:35 +00:00
<if test= "pickStartDate != null " > and pick_start_date = #{pickStartDate}</if>
<if test= "pickFinishDate != null " > and pick_finish_date = #{pickFinishDate}</if>
<if test= "pickFailReason != null and pickFailReason != ''" > and pick_fail_reason like concat('%', #{pickFailReason}, '%')</if>
<if test= "intoWarehouseCode != null and intoWarehouseCode != ''" > and into_warehouse_code like concat('%', #{intoWarehouseCode}, '%')</if>
<if test= "intoWarehouseName != null and intoWarehouseName != ''" > and into_warehouse_name like concat('%', #{intoWarehouseName}, '%')</if>
<if test= "intoWarehouseAddress != null and intoWarehouseAddress != ''" > and into_warehouse_address like concat('%', #{intoWarehouseAddress}, '%')</if>
<if test= "intoWarehouseContact != null and intoWarehouseContact != ''" > and into_warehouse_contact like concat('%', #{intoWarehouseContact}, '%')</if>
<if test= "intoWarehousePhone != null and intoWarehousePhone != ''" > and into_warehouse_phone like concat('%', #{intoWarehousePhone}, '%')</if>
<if test= "intoWarehouseBillCode != null and intoWarehouseBillCode != ''" > and into_warehouse_bill_code like concat('%', #{intoWarehouseBillCode}, '%')</if>
2024-04-27 10:31:11 +00:00
<if test= "warehouseInNo != null and warehouseInNo != ''" > and warehouse_in_no like concat('%', #{warehouseInNo}, '%')</if>
2024-02-29 08:23:35 +00:00
<if test= "customerDeliveryBeginTime != null and customerDeliveryBeginTime != ''" > and customer_delivery_begin_time like concat('%', #{customerDeliveryBeginTime}, '%')</if>
<if test= "customerDeliveryEndTime != null and customerDeliveryEndTime != ''" > and customer_delivery_end_time like concat('%', #{customerDeliveryEndTime}, '%')</if>
<if test= "goodsInfo != null and goodsInfo != ''" > and goods_info like concat('%', #{goodsInfo}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "blPrepareInFreight != null and blPrepareInFreight != ''" > and bl_prepare_in_freight=#{blPrepareInFreight}</if>
2024-04-27 10:31:11 +00:00
<if test= "prepareInEstFee != null " > and prepare_in_est_fee = #{prepareInEstFee}</if>
<if test= "prepareInRealFee != null " > and prepare_in_real_fee = #{prepareInRealFee}</if>
<if test= "prepareInExpress != null and prepareInExpress != ''" > and prepare_in_express like concat('%', #{prepareInExpress}, '%')</if>
<if test= "prepareInBillCode != null and prepareInBillCode != ''" > and prepare_in_bill_code like concat('%', #{prepareInBillCode}, '%')</if>
<if test= "prepareInRemark != null and prepareInRemark != ''" > and prepare_in_remark like concat('%', #{prepareInRemark}, '%')</if>
<if test= "prepareInSupplier != null and prepareInSupplier != ''" > and prepare_in_supplier like concat('%', #{prepareInSupplier}, '%')</if>
2024-05-20 10:24:31 +00:00
<if test= "totalWeight != null " > and total_weight = #{totalWeight}</if>
<if test= "totalVolume != null " > and total_volume = #{totalVolume}</if>
<if test= "parcelQty != null " > and parcel_qty = #{parcelQty}</if>
<if test= "billWeight != null " > and bill_weight = #{billWeight}</if>
<if test= "volumeWeight != null " > and volume_weight = #{volumeWeight}</if>
2024-06-07 06:30:33 +00:00
<if test= "currency != null and currency != ''" > and currency= #{currency}</if>
2024-05-20 10:24:31 +00:00
<if test= "settlementWeight != null " > and settlement_weight = #{settlementWeight}</if>
<if test= "scanWeight != null " > and scan_weight = #{scanWeight}</if>
<if test= "feeWeight != null " > and fee_weight = #{feeWeight}</if>
<if test= "freight != null " > and freight = #{freight}</if>
2024-06-07 06:30:33 +00:00
<if test= "realPaymentType != null and realPaymentType != ''" > and real_payment_type=#{realPaymentType}</if>
2024-05-20 10:24:31 +00:00
<if test= "realFee != null " > and real_fee = #{realFee}</if>
2024-06-07 06:30:33 +00:00
<if test= "blSpecialQuote != null and blSpecialQuote != ''" > and bl_special_quote=#{blSpecialQuote}</if>
<if test= "blOverLong != null and blOverLong != ''" > and bl_over_long=#{blOverLong}</if>
<if test= "blBill != null and blBill != ''" > and bl_bill=#{blBill}</if>
<if test= "blSign != null and blSign != ''" > and bl_sign=#{blSign}</if>
2024-04-11 05:47:34 +00:00
<if test= "blBillText != null and blBillText != ''" > and bl_bill_text like concat('%', #{blBillText}, '%')</if>
2024-02-29 08:23:35 +00:00
<if test= "blOverWeight != null and blOverWeight != ''" > and bl_over_weight like concat('%', #{blOverWeight}, '%')</if>
<if test= "overWeightNumber != null and overWeightNumber != ''" > and over_weight_number like concat('%', #{overWeightNumber}, '%')</if>
2024-06-08 07:18:42 +00:00
<if test= "feeRemark != null and feeRemark != ''" > and fee_remark like concat('%', #{feeRemark}, '%')</if>
2024-02-29 08:23:35 +00:00
<if test= "thirdCode != null and thirdCode != ''" > and third_code like concat('%', #{thirdCode}, '%')</if>
<if test= "realValue != null and realValue != ''" > and real_value like concat('%', #{realValue}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "blInsure != null and blInsure != ''" > and bl_insure= #{blInsure}</if>
2024-02-29 08:23:35 +00:00
<if test= "insureValue != null and insureValue != ''" > and insure_value like concat('%', #{insureValue}, '%')</if>
<if test= "insureValueCurrency != null and insureValueCurrency != ''" > and insure_value_currency like concat('%', #{insureValueCurrency}, '%')</if>
<if test= "insureFeeCurrency != null and insureFeeCurrency != ''" > and insure_fee_currency like concat('%', #{insureFeeCurrency}, '%')</if>
<if test= "insureFee != null " > and insure_fee = #{insureFee}</if>
<if test= "insureRemark != null and insureRemark != ''" > and insure_remark like concat('%', #{insureRemark}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "insureSiteCode != null and insureSiteCode != ''" > and insure_site_code=#{insureSiteCode}</if>
<if test= "blPrint != null and blPrint != ''" > and bl_print=#{blPrint}</if>
2024-02-29 08:23:35 +00:00
<if test= "printManCode != null and printManCode != ''" > and print_man_code like concat('%', #{printManCode}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "printSite != null and printSite != ''" > and print_site=#{printSite},</if>
2024-02-29 08:23:35 +00:00
<if test= "printDate != null and printDate != ''" > and print_date like concat('%', #{printDate}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "blDispFd != null and blDispFd != ''" > and bl_disp_fd=#{blDispFd}</if>
2024-02-29 08:23:35 +00:00
<if test= "transferCode != null and transferCode != ''" > and transfer_code like concat('%', #{transferCode}, '%')</if>
<if test= "transferBillcode != null and transferBillcode != ''" > and transfer_billcode like concat('%', #{transferBillcode}, '%')</if>
2024-04-11 05:47:34 +00:00
<if test= "dispFdDate != null " > and disp_fd_date = #{dispFdDate}</if>
<if test= "dispFdReason != null and dispFdReason != ''" > and disp_fd_reason like concat('%', #{dispFdReason}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "currentSiteCode != null and currentSiteCode != ''" > and current_site_code=#{currentSiteCode}</if>
<if test= "nextSiteCode != null and nextSiteCode != ''" > and next_site_code= #{nextSiteCode}</if>
<if test= "lastSiteCode != null and lastSiteCode != ''" > and last_site_code=#{lastSiteCode}</if>
<if test= "registerSiteCode != null and registerSiteCode != ''" > and register_site_code=#{registerSiteCode}</if>
2024-03-19 12:54:06 +00:00
<if test= "registerDate != null " > and register_date = #{registerDate}</if>
2024-06-07 06:30:33 +00:00
<if test= "registerManCode != null and registerManCode != ''" > and register_man_code= #{registerManCode}</if>
<if test= "takePieceEmployeeCode != null and takePieceEmployeeCode != ''" > and take_piece_employee_code=#{takePieceEmployeeCode}</if>
2024-06-05 10:02:29 +00:00
<if test= "sendSiteCode != null and sendSiteCode != ''" > and send_site_code=#{sendSiteCode}</if>
2024-03-19 12:54:06 +00:00
<if test= "sendDate != null " > and send_date = #{sendDate}</if>
2024-06-07 06:30:33 +00:00
<if test= "dispatchManCode != null and dispatchManCode != ''" > and dispatch_man_code=#{dispatchManCode}</if>
<if test= "dispatchSiteCode != null and dispatchSiteCode != ''" > and dispatch_site_code=#{dispatchSiteCode}</if>
2024-02-29 08:23:35 +00:00
<if test= "produceBillDate != null " > and produce_bill_date = #{produceBillDate}</if>
2024-06-07 06:30:33 +00:00
<if test= "produceBillSiteCode != null and produceBillSiteCode != ''" > and produce_bill_site_code=#{produceBillSiteCode}</if>
<if test= "produceBillManCode != null and produceBillManCode != ''" > and produce_bill_man_code=#{produceBillManCode}</if>
<if test= "destinationCode != null and destinationCode != ''" > and destination_code =#{destinationCode}</if>
<if test= "destinationProvince != null and destinationProvince != ''" > and destination_province=#{destinationProvince}</if>
<if test= "destinationCity != null and destinationCity != ''" > and destination_city=#{destinationCity}</if>
<if test= "destinationCounty != null and destinationCounty != ''" > and destination_county=#{destinationCounty}</if>
<if test= "dispatchUnderlingSiteCode != null and dispatchUnderlingSiteCode != ''" > and dispatch_underling_site_code=#{dispatchUnderlingSiteCode}</if>
<if test= "destinationCenterCode != null and destinationCenterCode != ''" > and destination_center_code=#{destinationCenterCode}</if>
<if test= "marketManCode != null and marketManCode != ''" > and market_man_code = #{marketManCode}</if>
<if test= "payee != null and payee != ''" > and payee=#{payee}</if>
2024-02-29 08:23:35 +00:00
<if test= "salesmen != null and salesmen != ''" > and salesmen like concat('%', #{salesmen}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "operateEmployeeCode != null and operateEmployeeCode != ''" > and operate_employee_code=#{operateEmployeeCode}</if>
<if test= "blIsQuestion != null and blIsQuestion != ''" > and bl_is_question=#{blIsQuestion}</if>
<if test= "problemType != null and problemType != ''" > and problem_type=#{problemType}</if>
2024-02-29 08:23:35 +00:00
<if test= "problemCause != null and problemCause != ''" > and problem_cause like concat('%', #{problemCause}, '%')</if>
2024-04-28 16:08:11 +00:00
<if test= "problemDelayDays != null " > and problem_delay_days = #{problemDelayDays}</if>
2024-06-07 06:30:33 +00:00
<if test= "blMessage != null and blMessage != ''" > and bl_message=#{blMessage}</if>
<if test= "blAcceptMessage != null and blAcceptMessage != ''" > and bl_accept_message=#{blAcceptMessage}</if>
<if test= "blGenSubbill != null and blGenSubbill != ''" > and bl_gen_subbill=#{blGenSubbill}</if>
2024-02-29 08:23:35 +00:00
<if test= "signMan != null and signMan != ''" > and sign_man like concat('%', #{signMan}, '%')</if>
2024-06-07 06:30:33 +00:00
<if test= "signManCode != null and signManCode != ''" > and sign_man_code=#{signManCode}</if>
<if test= "signSiteCode != null and signSiteCode != ''" > and sign_site_code=#{signSiteCode}</if>
<if test= "paymentStatus != null and paymentStatus != ''" > and payment_status =#{paymentStatus}</if>
2024-05-22 23:51:32 +00:00
<if test= "paymentDate != null " > and payment_date = #{paymentDate}</if>
<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>
2024-06-07 07:45:47 +00:00
2024-06-07 08:09:28 +00:00
<if test= "sendSiteCode != null and sendSiteCode != ''" > and a.send_site_code= #{sendSiteCode}</if>
2024-06-07 07:45:47 +00:00
<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>
<if test= "updateBy != null and updateBy != ''" > and a.update_by=#{updateBy}</if>
<if test= "createSite != null and createSite != ''" > and a.create_site=#{createSite}</if>
<if test= "updateSite != null and updateSite != ''" > and a.update_site=#{updateSite}</if>
2024-06-07 06:30:33 +00:00
2024-05-22 23:51:32 +00:00
2024-05-12 11:19:28 +00:00
<if test= "params.beginSendDate != null and params.beginSendDate != ''" >
2024-06-08 04:44:56 +00:00
and a.send_date <![CDATA[ >= ]]> #{params.beginSendDate}
2024-05-12 11:19:28 +00:00
</if>
<if test= "params.endSendDate != null and params.endSendDate != ''" >
2024-06-08 04:44:56 +00:00
and a.send_date <![CDATA[ <= ]]> #{params.endSendDate}
2024-05-12 11:19:28 +00:00
</if>
2024-05-23 04:45:34 +00:00
<if test= "params.beginCreateTime != null and params.beginCreateTime != ''" >
2024-06-08 04:44:56 +00:00
and a.create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
2024-05-23 04:45:34 +00:00
</if>
<if test= "params.endCreateTime != null and params.endCreateTime != ''" >
2024-06-08 04:44:56 +00:00
and a.create_time <![CDATA[ <= ]]> #{params.endCreateTime}
2024-05-23 04:45:34 +00:00
</if>
2024-06-08 13:03:11 +00:00
<if test= "params.expireNotSign != null and params.expireNotSign == 1" >
2024-06-08 04:44:56 +00:00
and a.estimate_date <![CDATA[ < ]]> now() and bl_sign!='1'
2024-06-06 09:30:01 +00:00
</if>
2024-06-08 13:03:11 +00:00
<if test= "params.printFlag != null " >
2024-06-08 04:44:56 +00:00
and a.bl_print=#{params.printFlag}
2024-05-12 11:19:28 +00:00
</if>
2024-05-28 04:41:52 +00:00
<if test= "params.isNeedPack != null and params.isNeedPack == 1" >
2024-06-08 04:44:56 +00:00
and a.bill_code not in( select m.bill_code from emis_tms_pack_dtl m where m.del_flag='0' )
2024-05-28 04:41:26 +00:00
</if>
2024-05-20 23:20:20 +00:00
2024-06-05 10:02:29 +00:00
<if test= "params.privSiteCode != null and params.privSiteCode != '88888'" >
2024-05-20 23:20:20 +00:00
and (
2024-06-08 04:44:56 +00:00
a.send_site_code in (
2024-06-05 10:02:29 +00:00
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
)
2024-06-05 06:28:21 +00:00
2024-06-08 04:44:56 +00:00
or a.salesmen=#{params.privEmpCode}
or a.payee=#{params.privEmpName}
2024-05-20 23:20:20 +00:00
)
</if>
2024-05-12 11:19:28 +00:00
2024-02-29 08:23:35 +00:00
</where>
2024-05-30 22:05:37 +00:00
2024-06-04 10:09:34 +00:00
2024-05-30 22:32:26 +00:00
ORDER BY
2024-05-30 22:19:35 +00:00
<if test= "params.orderSnSortList != null and params.orderSnSortList.size >0 " >
2024-05-30 22:32:26 +00:00
FIELD
2024-05-30 22:19:59 +00:00
<foreach collection= "params.orderSnSortList" item= "item" open= "(order_sn," separator= "," close= ")" >
#{item}
2024-05-30 22:05:37 +00:00
</foreach>
,
</if>
2024-05-30 22:19:35 +00:00
<if test= "params.billCodeSortList != null and params.billCodeSortList.size >0 " >
2024-05-30 22:32:26 +00:00
FIELD
2024-05-30 22:19:59 +00:00
<foreach collection= "params.billCodeSortList" item= "item" open= "(bill_code," separator= "," close= ")" >
#{item}
2024-05-30 22:05:37 +00:00
</foreach>
,
</if>
2024-06-07 07:49:31 +00:00
a.create_time desc
2024-02-29 08:23:35 +00:00
</select>
2024-03-01 06:47:57 +00:00
2024-06-04 10:09:34 +00:00
<!-- 通用权限判断 参数 isPrivQuery -->
2024-02-29 08:23:35 +00:00
<select id= "selectEmisWaybillById" parameterType= "Long" resultMap= "EmisWaybillResult" >
2024-06-08 07:18:42 +00:00
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_remark, 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
2024-02-29 08:23:35 +00:00
from emis_waybill a
where a.id = #{id}
</select>
2024-03-01 06:47:57 +00:00
2024-05-21 07:17:11 +00:00
<insert id= "insertEmisWaybill" parameterType= "EmisWaybill" useGeneratedKeys= "true" keyProperty= "id" >
2024-02-29 08:23:35 +00:00
insert into emis_waybill
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
<if test= "id != null" > id,</if>
<if test= "orderSn != null and orderSn != ''" > order_sn,</if>
<if test= "custOrderId != null and custOrderId != ''" > cust_order_id,</if>
<if test= "billCode != null and billCode != ''" > bill_code,</if>
<if test= "billCodeSub != null and billCodeSub != ''" > bill_code_sub,</if>
<if test= "orderStatus != null and orderStatus != ''" > order_status,</if>
2024-04-11 05:47:34 +00:00
<if test= "waybillStatus != null and waybillStatus != ''" > waybill_status,</if>
2024-02-29 08:23:35 +00:00
<if test= "orderType != null and orderType != ''" > order_type,</if>
2024-03-19 12:54:06 +00:00
<if test= "orderDate != null" > order_date,</if>
2024-03-01 06:47:57 +00:00
<if test= "userId != null" > user_id,</if>
2024-02-29 08:23:35 +00:00
<if test= "customerCode != null and customerCode != ''" > customer_code,</if>
<if test= "customerName != null and customerName != ''" > customer_name,</if>
<if test= "openId != null and openId != ''" > open_id,</if>
<if test= "receiveName != null and receiveName != ''" > receive_name,</if>
<if test= "receiveCompany != null and receiveCompany != ''" > receive_company,</if>
<if test= "receiveMobile != null and receiveMobile != ''" > receive_mobile,</if>
<if test= "receiveTel != null and receiveTel != ''" > receive_tel,</if>
<if test= "receiveCountry != null and receiveCountry != ''" > receive_country,</if>
<if test= "receiveProvince != null and receiveProvince != ''" > receive_province,</if>
<if test= "receiveCity != null and receiveCity != ''" > receive_city,</if>
<if test= "receiveCounty != null and receiveCounty != ''" > receive_county,</if>
<if test= "receiveTown != null and receiveTown != ''" > receive_town,</if>
<if test= "receiveAddress != null and receiveAddress != ''" > receive_address,</if>
<if test= "receivePostcode != null and receivePostcode != ''" > receive_postcode,</if>
2024-04-11 05:47:34 +00:00
<if test= "receivePcd != null and receivePcd != ''" > receive_pcd,</if>
2024-02-29 08:23:35 +00:00
<if test= "sendName != null and sendName != ''" > send_name,</if>
<if test= "sendCompany != null and sendCompany != ''" > send_company,</if>
<if test= "sendMobile != null and sendMobile != ''" > send_mobile,</if>
<if test= "sendTel != null and sendTel != ''" > send_tel,</if>
<if test= "sendCountry != null and sendCountry != ''" > send_country,</if>
<if test= "sendProvince != null and sendProvince != ''" > send_province,</if>
<if test= "sendCity != null and sendCity != ''" > send_city,</if>
<if test= "sendCounty != null and sendCounty != ''" > send_county,</if>
<if test= "sendTown != null and sendTown != ''" > send_town,</if>
<if test= "sendAddress != null and sendAddress != ''" > send_address,</if>
<if test= "sendPostcode != null and sendPostcode != ''" > send_postcode,</if>
2024-04-11 05:47:34 +00:00
<if test= "sendPcd != null and sendPcd != ''" > send_pcd,</if>
2024-02-29 08:23:35 +00:00
<if test= "paymentType != null and paymentType != ''" > payment_type,</if>
2024-03-31 15:19:52 +00:00
<if test= "calcFeeType != null and calcFeeType != ''" > calc_fee_type,</if>
2024-04-11 05:47:34 +00:00
<if test= "custNo != null and custNo != ''" > cust_no,</if>
2024-05-22 23:27:08 +00:00
<if test= "custName != null and custName != ''" > cust_name,</if>
2024-02-29 08:23:35 +00:00
<if test= "transLineType != null and transLineType != ''" > trans_line_type,</if>
<if test= "productType != null and productType != ''" > product_type,</if>
2024-03-01 06:47:57 +00:00
<if test= "timeType != null and timeType != ''" > time_type,</if>
<if test= "meterType != null and meterType != ''" > meter_type,</if>
2024-05-20 10:24:31 +00:00
<if test= "carryType != null and carryType != ''" > carry_type,</if>
2024-02-29 08:23:35 +00:00
<if test= "customsClear != null and customsClear != ''" > customs_clear,</if>
<if test= "customsEclaration != null and customsEclaration != ''" > customs_eclaration,</if>
2024-03-01 06:47:57 +00:00
<if test= "estimateDate != null" > estimate_date,</if>
2024-02-29 08:23:35 +00:00
<if test= "packType != null and packType != ''" > pack_type,</if>
<if test= "dispatchMethod != null and dispatchMethod != ''" > dispatch_method,</if>
<if test= "pickupMethod != null and pickupMethod != ''" > pickup_method,</if>
<if test= "pickStartDate != null" > pick_start_date,</if>
<if test= "pickFinishDate != null" > pick_finish_date,</if>
<if test= "pickFailReason != null and pickFailReason != ''" > pick_fail_reason,</if>
<if test= "intoWarehouseCode != null and intoWarehouseCode != ''" > into_warehouse_code,</if>
<if test= "intoWarehouseName != null and intoWarehouseName != ''" > into_warehouse_name,</if>
<if test= "intoWarehouseAddress != null and intoWarehouseAddress != ''" > into_warehouse_address,</if>
<if test= "intoWarehouseContact != null and intoWarehouseContact != ''" > into_warehouse_contact,</if>
<if test= "intoWarehousePhone != null and intoWarehousePhone != ''" > into_warehouse_phone,</if>
<if test= "intoWarehouseBillCode != null and intoWarehouseBillCode != ''" > into_warehouse_bill_code,</if>
2024-04-27 10:31:11 +00:00
<if test= "warehouseInNo != null and warehouseInNo != ''" > warehouse_in_no,</if>
2024-02-29 08:23:35 +00:00
<if test= "customerDeliveryBeginTime != null and customerDeliveryBeginTime != ''" > customer_delivery_begin_time,</if>
<if test= "customerDeliveryEndTime != null and customerDeliveryEndTime != ''" > customer_delivery_end_time,</if>
<if test= "goodsType != null and goodsType != ''" > goods_type,</if>
<if test= "goodsInfo != null and goodsInfo != ''" > goods_info,</if>
2024-04-27 10:31:11 +00:00
<if test= "goodsPics != null and goodsPics != ''" > goods_pics,</if>
<if test= "blPrepareInFreight != null and blPrepareInFreight != ''" > bl_prepare_in_freight,</if>
<if test= "prepareInEstFee != null" > prepare_in_est_fee,</if>
<if test= "prepareInRealFee != null" > prepare_in_real_fee,</if>
<if test= "prepareInExpress != null and prepareInExpress != ''" > prepare_in_express,</if>
<if test= "prepareInBillCode != null and prepareInBillCode != ''" > prepare_in_bill_code,</if>
<if test= "prepareInRemark != null and prepareInRemark != ''" > prepare_in_remark,</if>
<if test= "prepareInSupplier != null and prepareInSupplier != ''" > prepare_in_supplier,</if>
2024-04-11 05:47:34 +00:00
<if test= "totalWeight != null" > total_weight,</if>
<if test= "totalVolume != null" > total_volume,</if>
<if test= "parcelQty != null" > parcel_qty,</if>
<if test= "billWeight != null" > bill_weight,</if>
<if test= "volumeWeight != null" > volume_weight,</if>
2024-02-29 08:23:35 +00:00
<if test= "currency != null and currency != ''" > currency,</if>
2024-04-11 05:47:34 +00:00
<if test= "settlementWeight != null" > settlement_weight,</if>
2024-05-20 10:24:31 +00:00
<if test= "scanWeight != null" > scan_weight,</if>
2024-04-11 05:47:34 +00:00
<if test= "feeWeight != null" > fee_weight,</if>
<if test= "freight != null" > freight,</if>
2024-05-20 10:24:31 +00:00
<if test= "realPaymentType != null and realPaymentType != ''" > real_payment_type,</if>
<if test= "realFee != null" > real_fee,</if>
<if test= "blSpecialQuote != null and blSpecialQuote != ''" > bl_special_quote,</if>
2024-02-29 08:23:35 +00:00
<if test= "blOverLong != null and blOverLong != ''" > bl_over_long,</if>
<if test= "blBill != null and blBill != ''" > bl_bill,</if>
2024-04-11 05:47:34 +00:00
<if test= "blBillText != null and blBillText != ''" > bl_bill_text,</if>
2024-02-29 08:23:35 +00:00
<if test= "blOverWeight != null and blOverWeight != ''" > bl_over_weight,</if>
<if test= "overWeightNumber != null and overWeightNumber != ''" > over_weight_number,</if>
2024-06-08 07:18:42 +00:00
<if test= "feeRemark != null and feeRemark != ''" > fee_remark,</if>
2024-02-29 08:23:35 +00:00
<if test= "thirdCode != null and thirdCode != ''" > third_code,</if>
<if test= "realValue != null and realValue != ''" > real_value,</if>
<if test= "blInsure != null and blInsure != ''" > bl_insure,</if>
<if test= "insureValue != null and insureValue != ''" > insure_value,</if>
<if test= "insureValueCurrency != null and insureValueCurrency != ''" > insure_value_currency,</if>
<if test= "insureFeeCurrency != null and insureFeeCurrency != ''" > insure_fee_currency,</if>
<if test= "insureFee != null" > insure_fee,</if>
<if test= "insureRemark != null and insureRemark != ''" > insure_remark,</if>
<if test= "insureSiteCode != null and insureSiteCode != ''" > insure_site_code,</if>
<if test= "insureDate != null and insureDate != ''" > insure_date,</if>
<if test= "blPrint != null and blPrint != ''" > bl_print,</if>
<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>
2024-06-02 02:13:00 +00:00
<if test= "printCount != null" > print_count,</if>
2024-02-29 08:23:35 +00:00
<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>
2024-04-11 05:47:34 +00:00
<if test= "dispFdDate != null" > disp_fd_date,</if>
<if test= "dispFdReason != null and dispFdReason != ''" > disp_fd_reason,</if>
2024-03-08 11:34:22 +00:00
<if test= "currentSiteCode != null and currentSiteCode != ''" > current_site_code,</if>
<if test= "nextSiteCode != null and nextSiteCode != ''" > next_site_code,</if>
<if test= "lastSiteCode != null and lastSiteCode != ''" > last_site_code,</if>
2024-03-19 12:54:06 +00:00
<if test= "registerSiteCode != null and registerSiteCode != ''" > register_site_code,</if>
<if test= "registerDate != null" > register_date,</if>
<if test= "registerManCode != null and registerManCode != ''" > register_man_code,</if>
<if test= "takePieceEmployeeCode != null and takePieceEmployeeCode != ''" > take_piece_employee_code,</if>
2024-02-29 08:23:35 +00:00
<if test= "sendSiteCode != null and sendSiteCode != ''" > send_site_code,</if>
2024-06-02 02:13:00 +00:00
<if test= "sendCenterCode != null and sendCenterCode != ''" > send_center_code,</if>
2024-03-19 12:54:06 +00:00
<if test= "sendDate != null" > send_date,</if>
2024-02-29 08:23:35 +00:00
<if test= "dispatchManCode != null and dispatchManCode != ''" > dispatch_man_code,</if>
<if test= "dispatchDate != null and dispatchDate != ''" > dispatch_date,</if>
<if test= "dispatchSiteCode != null and dispatchSiteCode != ''" > dispatch_site_code,</if>
<if test= "produceBillDate != null" > produce_bill_date,</if>
<if test= "produceBillSiteCode != null and produceBillSiteCode != ''" > produce_bill_site_code,</if>
<if test= "produceBillManCode != null and produceBillManCode != ''" > produce_bill_man_code,</if>
<if test= "destinationCode != null and destinationCode != ''" > destination_code,</if>
<if test= "destinationProvince != null and destinationProvince != ''" > destination_province,</if>
<if test= "destinationCity != null and destinationCity != ''" > destination_city,</if>
<if test= "destinationCounty != null and destinationCounty != ''" > destination_county,</if>
2024-03-31 05:05:14 +00:00
<if test= "dispatchUnderlingSiteCode != null and dispatchUnderlingSiteCode != ''" > dispatch_underling_site_code,</if>
2024-02-29 08:23:35 +00:00
<if test= "destinationCenterCode != null and destinationCenterCode != ''" > destination_center_code,</if>
<if test= "marketManCode != null and marketManCode != ''" > market_man_code,</if>
<if test= "payee != null and payee != ''" > payee,</if>
<if test= "salesmen != null and salesmen != ''" > salesmen,</if>
<if test= "operateEmployeeCode != null and operateEmployeeCode != ''" > operate_employee_code,</if>
<if test= "blIsQuestion != null and blIsQuestion != ''" > bl_is_question,</if>
2024-04-28 16:08:11 +00:00
<if test= "problemType != null and problemType != ''" > problem_type,</if>
2024-02-29 08:23:35 +00:00
<if test= "problemCause != null and problemCause != ''" > problem_cause,</if>
2024-04-28 16:08:11 +00:00
<if test= "problemDelayDays != null" > problem_delay_days,</if>
2024-02-29 08:23:35 +00:00
<if test= "blMessage != null and blMessage != ''" > bl_message,</if>
<if test= "blAcceptMessage != null and blAcceptMessage != ''" > bl_accept_message,</if>
2024-03-31 08:38:13 +00:00
<if test= "blGenSubbill != null and blGenSubbill != ''" > bl_gen_subbill,</if>
2024-06-02 02:13:00 +00:00
<if test= "blSign != null and blSign != ''" > bl_sign,</if>
2024-02-29 08:23:35 +00:00
<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>
2024-06-02 02:13:00 +00:00
<if test= "signDate != null" > sign_date,</if>
2024-02-29 08:23:35 +00:00
<if test= "billPicSendRmk != null and billPicSendRmk != ''" > bill_pic_send_rmk,</if>
<if test= "billPicDispatchRmk != null and billPicDispatchRmk != ''" > bill_pic_dispatch_rmk,</if>
2024-03-19 12:54:06 +00:00
<if test= "timezoneOffset != null and timezoneOffset != ''" > timezone_offset,</if>
2024-05-22 23:27:08 +00:00
<if test= "paymentStatus != null and paymentStatus != ''" > payment_status,</if>
<if test= "paymentDate != null" > payment_date,</if>
<if test= "paymentRemark != null and paymentRemark != ''" > payment_remark,</if>
<if test= "orderRemark != null and orderRemark != ''" > order_remark,</if>
2024-05-20 10:24:31 +00:00
<if test= "dataFrom != null and dataFrom != ''" > data_from,</if>
2024-06-02 02:13:00 +00:00
<if test= "blSpecialGoods != null and blSpecialGoods != ''" > bl_special_goods,</if>
2024-05-22 23:27:08 +00:00
<if test= "remark != null and remark != ''" > remark,</if>
2024-02-29 08:23:35 +00:00
<if test= "delFlag != null and delFlag != ''" > del_flag,</if>
<if test= "createBy != null and createBy != ''" > create_by,</if>
<if test= "createTime != null" > create_time,</if>
<if test= "updateBy != null and updateBy != ''" > update_by,</if>
<if test= "updateTime != null" > update_time,</if>
2024-04-11 05:47:34 +00:00
<if test= "createSite != null and createSite != ''" > create_site,</if>
<if test= "updateSite != null and updateSite != ''" > update_site,</if>
2024-03-01 06:47:57 +00:00
</trim>
2024-02-29 08:23:35 +00:00
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
<if test= "id != null" > #{id},</if>
<if test= "orderSn != null and orderSn != ''" > #{orderSn},</if>
<if test= "custOrderId != null and custOrderId != ''" > #{custOrderId},</if>
<if test= "billCode != null and billCode != ''" > #{billCode},</if>
<if test= "billCodeSub != null and billCodeSub != ''" > #{billCodeSub},</if>
<if test= "orderStatus != null and orderStatus != ''" > #{orderStatus},</if>
2024-04-11 05:47:34 +00:00
<if test= "waybillStatus != null and waybillStatus != ''" > #{waybillStatus},</if>
2024-02-29 08:23:35 +00:00
<if test= "orderType != null and orderType != ''" > #{orderType},</if>
2024-03-19 12:54:06 +00:00
<if test= "orderDate != null" > #{orderDate},</if>
2024-03-01 06:47:57 +00:00
<if test= "userId != null" > #{userId},</if>
2024-02-29 08:23:35 +00:00
<if test= "customerCode != null and customerCode != ''" > #{customerCode},</if>
<if test= "customerName != null and customerName != ''" > #{customerName},</if>
<if test= "openId != null and openId != ''" > #{openId},</if>
<if test= "receiveName != null and receiveName != ''" > #{receiveName},</if>
<if test= "receiveCompany != null and receiveCompany != ''" > #{receiveCompany},</if>
<if test= "receiveMobile != null and receiveMobile != ''" > #{receiveMobile},</if>
<if test= "receiveTel != null and receiveTel != ''" > #{receiveTel},</if>
<if test= "receiveCountry != null and receiveCountry != ''" > #{receiveCountry},</if>
<if test= "receiveProvince != null and receiveProvince != ''" > #{receiveProvince},</if>
<if test= "receiveCity != null and receiveCity != ''" > #{receiveCity},</if>
<if test= "receiveCounty != null and receiveCounty != ''" > #{receiveCounty},</if>
<if test= "receiveTown != null and receiveTown != ''" > #{receiveTown},</if>
<if test= "receiveAddress != null and receiveAddress != ''" > #{receiveAddress},</if>
<if test= "receivePostcode != null and receivePostcode != ''" > #{receivePostcode},</if>
2024-04-11 05:47:34 +00:00
<if test= "receivePcd != null and receivePcd != ''" > #{receivePcd},</if>
2024-02-29 08:23:35 +00:00
<if test= "sendName != null and sendName != ''" > #{sendName},</if>
<if test= "sendCompany != null and sendCompany != ''" > #{sendCompany},</if>
<if test= "sendMobile != null and sendMobile != ''" > #{sendMobile},</if>
<if test= "sendTel != null and sendTel != ''" > #{sendTel},</if>
<if test= "sendCountry != null and sendCountry != ''" > #{sendCountry},</if>
<if test= "sendProvince != null and sendProvince != ''" > #{sendProvince},</if>
<if test= "sendCity != null and sendCity != ''" > #{sendCity},</if>
<if test= "sendCounty != null and sendCounty != ''" > #{sendCounty},</if>
<if test= "sendTown != null and sendTown != ''" > #{sendTown},</if>
<if test= "sendAddress != null and sendAddress != ''" > #{sendAddress},</if>
<if test= "sendPostcode != null and sendPostcode != ''" > #{sendPostcode},</if>
2024-04-11 05:47:34 +00:00
<if test= "sendPcd != null and sendPcd != ''" > #{sendPcd},</if>
2024-02-29 08:23:35 +00:00
<if test= "paymentType != null and paymentType != ''" > #{paymentType},</if>
2024-03-31 15:19:52 +00:00
<if test= "calcFeeType != null and calcFeeType != ''" > #{calcFeeType},</if>
2024-04-11 05:47:34 +00:00
<if test= "custNo != null and custNo != ''" > #{custNo},</if>
2024-05-22 23:27:08 +00:00
<if test= "custName != null and custName != ''" > #{custName},</if>
2024-02-29 08:23:35 +00:00
<if test= "transLineType != null and transLineType != ''" > #{transLineType},</if>
<if test= "productType != null and productType != ''" > #{productType},</if>
2024-03-01 06:47:57 +00:00
<if test= "timeType != null and timeType != ''" > #{timeType},</if>
<if test= "meterType != null and meterType != ''" > #{meterType},</if>
2024-05-20 10:24:31 +00:00
<if test= "carryType != null and carryType != ''" > #{carryType},</if>
2024-02-29 08:23:35 +00:00
<if test= "customsClear != null and customsClear != ''" > #{customsClear},</if>
<if test= "customsEclaration != null and customsEclaration != ''" > #{customsEclaration},</if>
2024-03-01 06:47:57 +00:00
<if test= "estimateDate != null" > #{estimateDate},</if>
2024-02-29 08:23:35 +00:00
<if test= "packType != null and packType != ''" > #{packType},</if>
<if test= "dispatchMethod != null and dispatchMethod != ''" > #{dispatchMethod},</if>
<if test= "pickupMethod != null and pickupMethod != ''" > #{pickupMethod},</if>
<if test= "pickStartDate != null" > #{pickStartDate},</if>
<if test= "pickFinishDate != null" > #{pickFinishDate},</if>
<if test= "pickFailReason != null and pickFailReason != ''" > #{pickFailReason},</if>
<if test= "intoWarehouseCode != null and intoWarehouseCode != ''" > #{intoWarehouseCode},</if>
<if test= "intoWarehouseName != null and intoWarehouseName != ''" > #{intoWarehouseName},</if>
<if test= "intoWarehouseAddress != null and intoWarehouseAddress != ''" > #{intoWarehouseAddress},</if>
<if test= "intoWarehouseContact != null and intoWarehouseContact != ''" > #{intoWarehouseContact},</if>
<if test= "intoWarehousePhone != null and intoWarehousePhone != ''" > #{intoWarehousePhone},</if>
<if test= "intoWarehouseBillCode != null and intoWarehouseBillCode != ''" > #{intoWarehouseBillCode},</if>
2024-04-27 10:31:11 +00:00
<if test= "warehouseInNo != null and warehouseInNo != ''" > #{warehouseInNo},</if>
2024-02-29 08:23:35 +00:00
<if test= "customerDeliveryBeginTime != null and customerDeliveryBeginTime != ''" > #{customerDeliveryBeginTime},</if>
<if test= "customerDeliveryEndTime != null and customerDeliveryEndTime != ''" > #{customerDeliveryEndTime},</if>
<if test= "goodsType != null and goodsType != ''" > #{goodsType},</if>
<if test= "goodsInfo != null and goodsInfo != ''" > #{goodsInfo},</if>
2024-04-27 10:31:11 +00:00
<if test= "goodsPics != null and goodsPics != ''" > #{goodsPics},</if>
<if test= "blPrepareInFreight != null and blPrepareInFreight != ''" > #{blPrepareInFreight},</if>
<if test= "prepareInEstFee != null" > #{prepareInEstFee},</if>
<if test= "prepareInRealFee != null" > #{prepareInRealFee},</if>
<if test= "prepareInExpress != null and prepareInExpress != ''" > #{prepareInExpress},</if>
<if test= "prepareInBillCode != null and prepareInBillCode != ''" > #{prepareInBillCode},</if>
<if test= "prepareInRemark != null and prepareInRemark != ''" > #{prepareInRemark},</if>
<if test= "prepareInSupplier != null and prepareInSupplier != ''" > #{prepareInSupplier},</if>
2024-04-11 05:47:34 +00:00
<if test= "totalWeight != null" > #{totalWeight},</if>
<if test= "totalVolume != null" > #{totalVolume},</if>
<if test= "parcelQty != null" > #{parcelQty},</if>
<if test= "billWeight != null" > #{billWeight},</if>
<if test= "volumeWeight != null" > #{volumeWeight},</if>
2024-02-29 08:23:35 +00:00
<if test= "currency != null and currency != ''" > #{currency},</if>
2024-04-11 05:47:34 +00:00
<if test= "settlementWeight != null" > #{settlementWeight},</if>
2024-05-20 10:24:31 +00:00
<if test= "scanWeight != null" > #{scanWeight},</if>
2024-04-11 05:47:34 +00:00
<if test= "feeWeight != null" > #{feeWeight},</if>
<if test= "freight != null" > #{freight},</if>
2024-05-20 10:24:31 +00:00
<if test= "realPaymentType != null and realPaymentType != ''" > #{realPaymentType},</if>
<if test= "realFee != null" > #{realFee},</if>
<if test= "blSpecialQuote != null and blSpecialQuote != ''" > #{blSpecialQuote},</if>
2024-02-29 08:23:35 +00:00
<if test= "blOverLong != null and blOverLong != ''" > #{blOverLong},</if>
<if test= "blBill != null and blBill != ''" > #{blBill},</if>
2024-04-11 05:47:34 +00:00
<if test= "blBillText != null and blBillText != ''" > #{blBillText},</if>
2024-02-29 08:23:35 +00:00
<if test= "blOverWeight != null and blOverWeight != ''" > #{blOverWeight},</if>
<if test= "overWeightNumber != null and overWeightNumber != ''" > #{overWeightNumber},</if>
2024-06-08 07:18:42 +00:00
<if test= "feeRemark != null and feeRemark != ''" > #{feeRemark},</if>
2024-02-29 08:23:35 +00:00
<if test= "thirdCode != null and thirdCode != ''" > #{thirdCode},</if>
<if test= "realValue != null and realValue != ''" > #{realValue},</if>
<if test= "blInsure != null and blInsure != ''" > #{blInsure},</if>
<if test= "insureValue != null and insureValue != ''" > #{insureValue},</if>
<if test= "insureValueCurrency != null and insureValueCurrency != ''" > #{insureValueCurrency},</if>
<if test= "insureFeeCurrency != null and insureFeeCurrency != ''" > #{insureFeeCurrency},</if>
<if test= "insureFee != null" > #{insureFee},</if>
<if test= "insureRemark != null and insureRemark != ''" > #{insureRemark},</if>
<if test= "insureSiteCode != null and insureSiteCode != ''" > #{insureSiteCode},</if>
<if test= "insureDate != null and insureDate != ''" > #{insureDate},</if>
<if test= "blPrint != null and blPrint != ''" > #{blPrint},</if>
<if test= "printManCode != null and printManCode != ''" > #{printManCode},</if>
<if test= "printSite != null and printSite != ''" > #{printSite},</if>
<if test= "printDate != null and printDate != ''" > #{printDate},</if>
2024-06-02 02:13:00 +00:00
<if test= "printCount != null" > #{printCount},</if>
2024-02-29 08:23:35 +00:00
<if test= "blDispFd != null and blDispFd != ''" > #{blDispFd},</if>
<if test= "transferCode != null and transferCode != ''" > #{transferCode},</if>
<if test= "transferBillcode != null and transferBillcode != ''" > #{transferBillcode},</if>
2024-04-11 05:47:34 +00:00
<if test= "dispFdDate != null" > #{dispFdDate},</if>
<if test= "dispFdReason != null and dispFdReason != ''" > #{dispFdReason},</if>
2024-03-08 11:34:22 +00:00
<if test= "currentSiteCode != null and currentSiteCode != ''" > #{currentSiteCode},</if>
<if test= "nextSiteCode != null and nextSiteCode != ''" > #{nextSiteCode},</if>
<if test= "lastSiteCode != null and lastSiteCode != ''" > #{lastSiteCode},</if>
2024-03-19 12:54:06 +00:00
<if test= "registerSiteCode != null and registerSiteCode != ''" > #{registerSiteCode},</if>
<if test= "registerDate != null" > #{registerDate},</if>
<if test= "registerManCode != null and registerManCode != ''" > #{registerManCode},</if>
<if test= "takePieceEmployeeCode != null and takePieceEmployeeCode != ''" > #{takePieceEmployeeCode},</if>
2024-02-29 08:23:35 +00:00
<if test= "sendSiteCode != null and sendSiteCode != ''" > #{sendSiteCode},</if>
2024-06-02 02:13:00 +00:00
<if test= "sendCenterCode != null and sendCenterCode != ''" > #{sendCenterCode},</if>
2024-03-19 12:54:06 +00:00
<if test= "sendDate != null" > #{sendDate},</if>
2024-02-29 08:23:35 +00:00
<if test= "dispatchManCode != null and dispatchManCode != ''" > #{dispatchManCode},</if>
<if test= "dispatchDate != null and dispatchDate != ''" > #{dispatchDate},</if>
<if test= "dispatchSiteCode != null and dispatchSiteCode != ''" > #{dispatchSiteCode},</if>
<if test= "produceBillDate != null" > #{produceBillDate},</if>
<if test= "produceBillSiteCode != null and produceBillSiteCode != ''" > #{produceBillSiteCode},</if>
<if test= "produceBillManCode != null and produceBillManCode != ''" > #{produceBillManCode},</if>
<if test= "destinationCode != null and destinationCode != ''" > #{destinationCode},</if>
<if test= "destinationProvince != null and destinationProvince != ''" > #{destinationProvince},</if>
<if test= "destinationCity != null and destinationCity != ''" > #{destinationCity},</if>
<if test= "destinationCounty != null and destinationCounty != ''" > #{destinationCounty},</if>
2024-03-31 05:05:14 +00:00
<if test= "dispatchUnderlingSiteCode != null and dispatchUnderlingSiteCode != ''" > #{dispatchUnderlingSiteCode},</if>
2024-02-29 08:23:35 +00:00
<if test= "destinationCenterCode != null and destinationCenterCode != ''" > #{destinationCenterCode},</if>
<if test= "marketManCode != null and marketManCode != ''" > #{marketManCode},</if>
<if test= "payee != null and payee != ''" > #{payee},</if>
<if test= "salesmen != null and salesmen != ''" > #{salesmen},</if>
<if test= "operateEmployeeCode != null and operateEmployeeCode != ''" > #{operateEmployeeCode},</if>
<if test= "blIsQuestion != null and blIsQuestion != ''" > #{blIsQuestion},</if>
2024-04-28 16:08:11 +00:00
<if test= "problemType != null and problemType != ''" > #{problemType},</if>
2024-02-29 08:23:35 +00:00
<if test= "problemCause != null and problemCause != ''" > #{problemCause},</if>
2024-04-28 16:08:11 +00:00
<if test= "problemDelayDays != null" > #{problemDelayDays},</if>
2024-02-29 08:23:35 +00:00
<if test= "blMessage != null and blMessage != ''" > #{blMessage},</if>
<if test= "blAcceptMessage != null and blAcceptMessage != ''" > #{blAcceptMessage},</if>
2024-03-31 08:38:13 +00:00
<if test= "blGenSubbill != null and blGenSubbill != ''" > #{blGenSubbill},</if>
2024-06-02 02:13:00 +00:00
<if test= "blSign != null and blSign != ''" > #{blSign},</if>
2024-02-29 08:23:35 +00:00
<if test= "signMan != null and signMan != ''" > #{signMan},</if>
<if test= "signManCode != null and signManCode != ''" > #{signManCode},</if>
<if test= "signSiteCode != null and signSiteCode != ''" > #{signSiteCode},</if>
2024-06-02 02:13:00 +00:00
<if test= "signDate != null" > #{signDate},</if>
2024-02-29 08:23:35 +00:00
<if test= "billPicSendRmk != null and billPicSendRmk != ''" > #{billPicSendRmk},</if>
<if test= "billPicDispatchRmk != null and billPicDispatchRmk != ''" > #{billPicDispatchRmk},</if>
2024-03-19 12:54:06 +00:00
<if test= "timezoneOffset != null and timezoneOffset != ''" > #{timezoneOffset},</if>
2024-05-22 23:27:08 +00:00
<if test= "paymentStatus != null and paymentStatus != ''" > #{paymentStatus},</if>
<if test= "paymentDate != null" > #{paymentDate},</if>
<if test= "paymentRemark != null and paymentRemark != ''" > #{paymentRemark},</if>
<if test= "orderRemark != null and orderRemark != ''" > #{orderRemark},</if>
2024-05-20 10:24:31 +00:00
<if test= "dataFrom != null and dataFrom != ''" > #{dataFrom},</if>
2024-06-02 02:13:00 +00:00
<if test= "blSpecialGoods != null and blSpecialGoods != ''" > #{blSpecialGoods},</if>
2024-05-22 23:27:08 +00:00
<if test= "remark != null and remark != ''" > #{remark},</if>
2024-02-29 08:23:35 +00:00
<if test= "delFlag != null and delFlag != ''" > #{delFlag},</if>
<if test= "createBy != null and createBy != ''" > #{createBy},</if>
<if test= "createTime != null" > #{createTime},</if>
<if test= "updateBy != null and updateBy != ''" > #{updateBy},</if>
<if test= "updateTime != null" > #{updateTime},</if>
2024-04-11 05:47:34 +00:00
<if test= "createSite != null and createSite != ''" > #{createSite},</if>
<if test= "updateSite != null and updateSite != ''" > #{updateSite},</if>
2024-03-01 06:47:57 +00:00
</trim>
2024-02-29 08:23:35 +00:00
</insert>
<update id= "updateEmisWaybill" parameterType= "EmisWaybill" >
update emis_waybill
<trim prefix= "SET" suffixOverrides= "," >
2024-05-20 09:42:50 +00:00
<if test= "custOrderId != null and custOrderId != ''" > cust_order_id = #{custOrderId},</if>
2024-02-29 08:23:35 +00:00
<if test= "billCodeSub != null and billCodeSub != ''" > bill_code_sub = #{billCodeSub},</if>
2024-06-02 02:13:00 +00:00
<if test= "orderStatus != null and orderStatus != ''" > order_status = #{orderStatus},</if>
<if test= "waybillStatus != null and waybillStatus != ''" > waybill_status = #{waybillStatus},</if>
2024-05-20 09:42:50 +00:00
<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>
2024-02-29 08:23:35 +00:00
<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>
2024-04-11 05:47:34 +00:00
<if test= "receivePcd != null and receivePcd != ''" > receive_pcd = #{receivePcd},</if>
2024-02-29 08:23:35 +00:00
<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>
2024-04-11 05:47:34 +00:00
<if test= "sendPcd != null and sendPcd != ''" > send_pcd = #{sendPcd},</if>
2024-02-29 08:23:35 +00:00
<if test= "paymentType != null and paymentType != ''" > payment_type = #{paymentType},</if>
2024-03-31 15:19:52 +00:00
<if test= "calcFeeType != null and calcFeeType != ''" > calc_fee_type = #{calcFeeType},</if>
2024-04-11 05:47:34 +00:00
<if test= "custNo != null and custNo != ''" > cust_no = #{custNo},</if>
2024-05-22 23:27:08 +00:00
<if test= "custName != null and custName != ''" > cust_name = #{custName},</if>
2024-02-29 08:23:35 +00:00
<if test= "transLineType != null and transLineType != ''" > trans_line_type = #{transLineType},</if>
<if test= "productType != null and productType != ''" > product_type = #{productType},</if>
2024-03-01 06:47:57 +00:00
<if test= "timeType != null and timeType != ''" > time_type = #{timeType},</if>
<if test= "meterType != null and meterType != ''" > meter_type = #{meterType},</if>
2024-05-20 09:42:50 +00:00
<if test= "carryType != null and carryType != ''" > carry_type = #{carryType},</if>
2024-02-29 08:23:35 +00:00
<if test= "customsClear != null and customsClear != ''" > customs_clear = #{customsClear},</if>
<if test= "customsEclaration != null and customsEclaration != ''" > customs_eclaration = #{customsEclaration},</if>
2024-03-01 06:47:57 +00:00
<if test= "estimateDate != null" > estimate_date = #{estimateDate},</if>
2024-02-29 08:23:35 +00:00
<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>
2024-04-27 10:31:11 +00:00
<if test= "warehouseInNo != null and warehouseInNo != ''" > warehouse_in_no = #{warehouseInNo},</if>
2024-02-29 08:23:35 +00:00
<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>
2024-04-27 10:31:11 +00:00
<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>
2024-04-11 05:47:34 +00:00
<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>
2024-02-29 08:23:35 +00:00
<if test= "currency != null and currency != ''" > currency = #{currency},</if>
2024-04-11 05:47:34 +00:00
<if test= "settlementWeight != null" > settlement_weight = #{settlementWeight},</if>
2024-05-20 09:42:50 +00:00
<if test= "scanWeight != null" > scan_weight = #{scanWeight},</if>
2024-04-11 05:47:34 +00:00
<if test= "feeWeight != null" > fee_weight = #{feeWeight},</if>
<if test= "freight != null" > freight = #{freight},</if>
2024-05-20 09:42:50 +00:00
<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>
2024-02-29 08:23:35 +00:00
<if test= "blOverLong != null and blOverLong != ''" > bl_over_long = #{blOverLong},</if>
2024-05-20 09:42:50 +00:00
<if test= "blBill != null and blBill != ''" > bl_bill = #{blBill},</if>
<if test= "blBillText != null and blBillText != ''" > bl_bill_text = #{blBillText},</if>
2024-02-29 08:23:35 +00:00
<if test= "blOverWeight != null and blOverWeight != ''" > bl_over_weight = #{blOverWeight},</if>
<if test= "overWeightNumber != null and overWeightNumber != ''" > over_weight_number = #{overWeightNumber},</if>
2024-06-08 07:18:42 +00:00
<if test= "feeRemark != null and feeRemark != ''" > fee_remark = #{feeRemark},</if>
2024-02-29 08:23:35 +00:00
<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>
2024-05-20 09:42:50 +00:00
<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>
2024-06-02 02:13:00 +00:00
<if test= "printCount != null" > print_count = #{printCount},</if>
2024-05-20 09:42:50 +00:00
<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>
2024-03-19 12:54:06 +00:00
<if test= "takePieceEmployeeCode != null and takePieceEmployeeCode != ''" > take_piece_employee_code = #{takePieceEmployeeCode},</if>
2024-05-20 09:42:50 +00:00
<if test= "sendSiteCode != null and sendSiteCode != ''" > send_site_code = #{sendSiteCode},</if>
2024-06-02 02:13:00 +00:00
<if test= "sendCenterCode != null and sendCenterCode != ''" > send_center_code = #{sendCenterCode},</if>
2024-05-20 09:42:50 +00:00
<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>
2024-02-29 08:23:35 +00:00
<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>
2024-03-31 05:05:14 +00:00
<if test= "dispatchUnderlingSiteCode != null and dispatchUnderlingSiteCode != ''" > dispatch_underling_site_code = #{dispatchUnderlingSiteCode},</if>
2024-02-29 08:23:35 +00:00
<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>
2024-05-20 09:42:50 +00:00
<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>
2024-02-29 08:23:35 +00:00
<if test= "blMessage != null and blMessage != ''" > bl_message = #{blMessage},</if>
<if test= "blAcceptMessage != null and blAcceptMessage != ''" > bl_accept_message = #{blAcceptMessage},</if>
2024-05-20 09:42:50 +00:00
<if test= "blGenSubbill != null and blGenSubbill != ''" > bl_gen_subbill = #{blGenSubbill},</if>
2024-06-02 02:13:00 +00:00
<if test= "blSign != null and blSign != ''" > bl_sign = #{blSign},</if>
2024-05-20 09:42:50 +00:00
<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>
2024-06-02 02:13:00 +00:00
<if test= "signDate != null" > sign_date = #{signDate},</if>
2024-05-20 09:42:50 +00:00
<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>
2024-05-22 23:27:08 +00:00
<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>
2024-05-20 09:42:50 +00:00
<if test= "dataFrom != null and dataFrom != ''" > data_from = #{dataFrom},</if>
2024-06-02 02:13:00 +00:00
<if test= "blSpecialGoods != null and blSpecialGoods != ''" > bl_special_goods = #{blSpecialGoods},</if>
2024-05-22 23:27:08 +00:00
<if test= "remark != null and remark != ''" > remark = #{remark},</if>
2024-05-20 09:42:50 +00:00
<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>
2024-02-29 08:23:35 +00:00
<if test= "updateBy != null and updateBy != ''" > update_by = #{updateBy},</if>
<if test= "updateTime != null" > update_time = #{updateTime},</if>
2024-05-20 09:42:50 +00:00
<if test= "createSite != null and createSite != ''" > create_site = #{createSite},</if>
2024-04-11 05:47:34 +00:00
<if test= "updateSite != null and updateSite != ''" > update_site = #{updateSite},</if>
2024-02-29 08:23:35 +00:00
</trim>
where id = #{id}
</update>
2024-05-08 05:29:47 +00:00
2024-05-14 03:07:53 +00:00
<update id= "updatePrintStatus" parameterType= "EmisWaybill" >
2024-06-03 07:56:54 +00:00
update emis_waybill set
bl_print='1',
print_man_code=#{printManCode},
print_site=#{printSite},
print_date=now(),
print_count=print_count+1
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
where bill_code=#{billCode}
2024-05-14 03:07:53 +00:00
</update>
2024-06-01 03:20:38 +00:00
<update id= "updateSignStatus" parameterType= "EmisWaybill" >
update emis_waybill
set sign_man=#{signMan},
2024-06-05 08:45:59 +00:00
bl_sign = '1',
2024-06-01 03:20:38 +00:00
sign_man_code=#{signManCode},
sign_site_code = #{signSiteCode},
sign_date = #{signDate},
bill_pic_dispatch_rmk = #{billPicDispatchRmk}
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
where bill_code=#{billCode}
</update>
2024-06-05 09:53:47 +00:00
<update id= "updateDispatchStatus" parameterType= "EmisWaybill" >
update emis_waybill set
dispatch_man_code = #{dispatchManCode},
dispatch_date = #{dispatchDate},
dispatch_site_code = #{dispatchSiteCode}
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
where bill_code=#{billCode}
</update>
2024-06-05 08:45:59 +00:00
<update id= "updateUnSignStatus" parameterType= "EmisWaybill" >
update emis_waybill
set sign_man=null,
bl_sign = '0',
sign_man_code=null,
sign_site_code = null,
sign_date = null,
bill_pic_dispatch_rmk =null
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
where bill_code=#{billCode}
</update>
2024-06-01 03:20:38 +00:00
<update id= "updateProblemStatus" parameterType= "EmisWaybill" >
2024-06-03 07:56:54 +00:00
update emis_waybill
<trim prefix= "SET" suffixOverrides= "," >
bl_is_question = '1',
2024-06-01 03:20:38 +00:00
problem_type = #{problemType},
problem_cause = #{problemCause},
2024-06-06 02:32:29 +00:00
problem_delay_days = #{problemDelayDays},
estimate_date = #{estimateDate}
2024-06-03 02:52:47 +00:00
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
2024-06-03 07:56:54 +00:00
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
</trim>
where bill_code=#{billCode}
</update>
<update id= "updateTransferInfo" parameterType= "EmisWaybill" >
update emis_waybill
<trim prefix= "SET" suffixOverrides= "," >
bl_disp_fd ='1',
transfer_code = #{transferCode},
transfer_billcode = #{transferBillcode},
disp_fd_date = #{dispFdDate},
disp_fd_reason = #{dispFdReason}
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
</trim>
2024-06-01 03:20:38 +00:00
where bill_code=#{billCode}
</update>
2024-06-03 02:34:21 +00:00
<update id= "updatePreOrNextSiteByBillCode" parameterType= "EmisWaybill" >
2024-06-03 02:55:39 +00:00
update emis_waybill
2024-06-03 02:52:47 +00:00
<trim prefix= "SET" suffixOverrides= "," >
<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= "updateBy != null and updateBy != ''" > update_by = #{updateBy},</if>
<if test= "updateSite != null and updateSite != ''" > update_site = #{updateSite},</if>
</trim>
2024-06-03 02:34:21 +00:00
where bill_code=#{billCode}
</update>
2024-06-01 03:20:38 +00:00
2024-05-08 05:29:47 +00:00
<update id= "changeWaybillStatusByBillCode" parameterType= "EmisWaybill" >
2024-06-03 07:56:54 +00:00
update emis_waybill
<trim prefix= "SET" suffixOverrides= "," >
waybill_status=#{waybillStatus}
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
</trim>
where bill_code=#{billCode}
2024-05-08 05:29:47 +00:00
</update>
<update id= "changeOrderStatusByBillCode" parameterType= "EmisWaybill" >
2024-06-03 07:56:54 +00:00
update emis_waybill set order_status=#{orderStatus}
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
where bill_code=#{billCode}
2024-05-08 05:29:47 +00:00
</update>
<update id= "changeOrderStatusByOrderSn" parameterType= "EmisWaybill" >
2024-06-03 07:56:54 +00:00
update emis_waybill set order_status=#{orderStatus}
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
where order_sn=#{orderSn}
2024-05-08 05:29:47 +00:00
</update>
2024-02-29 08:23:35 +00:00
<delete id= "deleteEmisWaybillById" parameterType= "Long" >
2024-06-03 07:56:54 +00:00
update emis_waybill set del_flag='1'
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
where id = #{id}
2024-02-29 08:23:35 +00:00
</delete>
<delete id= "deleteEmisWaybillByIds" parameterType= "String" >
2024-06-03 07:56:54 +00:00
update emis_waybill set del_flag='1
<if test= "updateBy != null and updateBy != ''" > ,update_by = #{updateBy}</if>
<if test= "updateSite != null and updateSite != ''" > ,update_site = #{updateSite}</if>
where id in
2024-02-29 08:23:35 +00:00
<foreach item= "id" collection= "array" open= "(" separator= "," close= ")" >
#{id}
</foreach>
</delete>
</mapper>