|
|
|
|
@ -1201,6 +1201,289 @@
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="countOrderList" parameterType="EmisWaybill" resultType="long">
|
|
|
|
|
select count(1)
|
|
|
|
|
from emis_waybill a
|
|
|
|
|
<where>
|
|
|
|
|
a.del_flag='0' and a.order_type='0'
|
|
|
|
|
|
|
|
|
|
<if test="id != null "> and a.id = #{id}</if>
|
|
|
|
|
<if test="orderSn != null and orderSn != ''"> and ( FIND_IN_SET(a.`order_sn`,#{orderSn}) or a.order_sn like concat('%', #{orderSn}, '%') ) </if>
|
|
|
|
|
|
|
|
|
|
<if test="billCode != null and billCode != '' and ( params.billCodeSortList == null or (params.billCodeSortList != null and params.billCodeSortList.size() == 1 ) )">
|
|
|
|
|
and ( a.`bill_code`=#{billCode} or a.bill_code like concat('%',#{billCode}) )
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.billCodeSortList != null and params.billCodeSortList.size() > 1 ">
|
|
|
|
|
and a.bill_code in
|
|
|
|
|
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test="orderType != null and orderType != ''"> and a.order_type=#{orderType}</if>
|
|
|
|
|
<if test="custOrderId != null and custOrderId != ''"> and a.cust_order_id=#{custOrderId}</if>
|
|
|
|
|
<if test="billCodeSub != null and billCodeSub != ''"> and a.bill_code_sub like concat('%', #{billCodeSub}, '%')</if>
|
|
|
|
|
<if test="orderStatus != null and orderStatus != ''"> and a.order_status=#{orderStatus}</if>
|
|
|
|
|
<if test="waybillStatus != null and waybillStatus != ''"> and a.waybill_status=#{waybillStatus}</if>
|
|
|
|
|
<if test="orderType != null and orderType != ''"> and a.order_type=#{orderType}</if>
|
|
|
|
|
<if test="orderDate != null "> and a.order_date = #{orderDate}</if>
|
|
|
|
|
<if test="userId != null "> and a.user_id = #{userId}</if>
|
|
|
|
|
<if test="customerCode != null and customerCode != ''"> and a.customer_code=#{customerCode}</if>
|
|
|
|
|
<if test="customerName != null and customerName != ''"> and a.customer_name like concat('%', #{customerName}, '%')</if>
|
|
|
|
|
<if test="openId != null and openId != ''"> and a.open_id like concat('%', #{openId}, '%')</if>
|
|
|
|
|
<if test="receiveName != null and receiveName != ''"> and a.receive_name like concat('%', #{receiveName}, '%')</if>
|
|
|
|
|
<if test="receiveCompany != null and receiveCompany != ''"> and a.receive_company like concat('%', #{receiveCompany}, '%')</if>
|
|
|
|
|
<if test="receiveMobile != null and receiveMobile != ''"> and a.receive_mobile like concat('%', #{receiveMobile}, '%')</if>
|
|
|
|
|
<if test="receiveTel != null and receiveTel != ''"> and a.receive_tel like concat('%', #{receiveTel}, '%')</if>
|
|
|
|
|
<if test="receiveCountry != null and receiveCountry != ''"> and a.receive_country=#{receiveCountry}</if>
|
|
|
|
|
<if test="receiveProvince != null and receiveProvince != ''"> and a.receive_province=#{receiveProvince}</if>
|
|
|
|
|
<if test="receiveCity != null and receiveCity != ''"> and a.receive_city=#{receiveCity}</if>
|
|
|
|
|
<if test="receiveCounty != null and receiveCounty != ''"> and a.receive_county=#{receiveCounty}</if>
|
|
|
|
|
<if test="receiveTown != null and receiveTown != ''"> and a.receive_town=#{receiveTown}</if>
|
|
|
|
|
<if test="receiveAddress != null and receiveAddress != ''"> and a.receive_address like concat('%', #{receiveAddress}, '%')</if>
|
|
|
|
|
<if test="receivePostcode != null and receivePostcode != ''"> and a.receive_postcode like concat('%', #{receivePostcode}, '%')</if>
|
|
|
|
|
<if test="receivePcd != null and receivePcd != ''"> and a.receive_pcd like concat('%', #{receivePcd}, '%')</if>
|
|
|
|
|
<if test="sendName != null and sendName != ''"> and a.send_name like concat('%', #{sendName}, '%')</if>
|
|
|
|
|
<if test="sendCompany != null and sendCompany != ''"> and a.send_company like concat('%', #{sendCompany}, '%')</if>
|
|
|
|
|
<if test="sendMobile != null and sendMobile != ''"> and a.send_mobile like concat('%', #{sendMobile}, '%')</if>
|
|
|
|
|
<if test="sendTel != null and sendTel != ''"> and a.send_tel like concat('%', #{sendTel}, '%')</if>
|
|
|
|
|
<if test="sendCountry != null and sendCountry != ''"> and a.send_country=#{sendCountry}</if>
|
|
|
|
|
<if test="sendProvince != null and sendProvince != ''"> and a.send_province=#{sendProvince}</if>
|
|
|
|
|
<if test="sendCity != null and sendCity != ''"> and a.send_city=#{sendCity}</if>
|
|
|
|
|
<if test="sendCounty != null and sendCounty != ''"> and a.send_county=#{sendCounty}</if>
|
|
|
|
|
<if test="sendTown != null and sendTown != ''"> and a.send_town=#{sendTown}</if>
|
|
|
|
|
<if test="sendAddress != null and sendAddress != ''"> and a.send_address like concat('%', #{sendAddress}, '%')</if>
|
|
|
|
|
<if test="sendPostcode != null and sendPostcode != ''"> and a.send_postcode like concat('%', #{sendPostcode}, '%')</if>
|
|
|
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and a.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
|
|
|
|
<if test="enterpriseTaxId != null and enterpriseTaxId != ''"> and a.enterprise_tax_id like concat('%', #{enterpriseTaxId}, '%')</if>
|
|
|
|
|
<if test="paymentType != null and paymentType != ''"> and a.payment_type=#{paymentType}</if>
|
|
|
|
|
<if test="calcFeeType != null and calcFeeType != ''"> and a.calc_fee_type=#{calcFeeType}</if>
|
|
|
|
|
<if test="custNo != null and custNo != ''"> and a.cust_no like concat('%', #{custNo}, '%')</if>
|
|
|
|
|
<if test="custName != null and custName != ''"> and a.cust_name like concat('%', #{custName}, '%')</if>
|
|
|
|
|
<include refid="salesSupportFilter"/>
|
|
|
|
|
<if test="transLineType != null and transLineType != ''"> and a.trans_line_type=#{transLineType}</if>
|
|
|
|
|
<if test="productType != null and productType != ''"> and a.product_type=#{productType}</if>
|
|
|
|
|
<if test="timeType != null and timeType != ''"> and a.time_type like concat('%', #{timeType}, '%')</if>
|
|
|
|
|
<if test="meterType != null and meterType != ''"> and a.meter_type like concat('%', #{meterType}, '%')</if>
|
|
|
|
|
<if test="carryType != null and carryType != ''"> and a.carry_type like concat('%', #{carryType}, '%')</if>
|
|
|
|
|
<if test="customsClear != null and customsClear != ''"> and a.customs_clear=#{customsClear}</if>
|
|
|
|
|
<if test="customsEclaration != null and customsEclaration != ''"> and a.customs_eclaration=#{customsEclaration}</if>
|
|
|
|
|
<if test="estimateDate != null "> and a.estimate_date = #{estimateDate}</if>
|
|
|
|
|
<if test="packType != null and packType != ''"> and FIND_IN_SET(#{packType},a.pack_type)</if>
|
|
|
|
|
<if test="dispatchMethod != null and dispatchMethod != ''"> and a.dispatch_method=#{dispatchMethod}</if>
|
|
|
|
|
<if test="pickupMethod != null and pickupMethod != ''"> and a.pickup_method= #{pickupMethod}</if>
|
|
|
|
|
<if test="pickStartDate != null "> and a.pick_start_date = #{pickStartDate}</if>
|
|
|
|
|
<if test="pickFinishDate != null "> and a.pick_finish_date = #{pickFinishDate}</if>
|
|
|
|
|
<if test="pickFailReason != null and pickFailReason != ''"> and a.pick_fail_reason like concat('%', #{pickFailReason}, '%')</if>
|
|
|
|
|
<if test="intoWarehouseCode != null and intoWarehouseCode != ''"> and a.into_warehouse_code like concat('%', #{intoWarehouseCode}, '%')</if>
|
|
|
|
|
<if test="intoWarehouseName != null and intoWarehouseName != ''"> and a.into_warehouse_name like concat('%', #{intoWarehouseName}, '%')</if>
|
|
|
|
|
<if test="intoWarehouseAddress != null and intoWarehouseAddress != ''"> and a.into_warehouse_address like concat('%', #{intoWarehouseAddress}, '%')</if>
|
|
|
|
|
<if test="intoWarehouseContact != null and intoWarehouseContact != ''"> and a.into_warehouse_contact like concat('%', #{intoWarehouseContact}, '%')</if>
|
|
|
|
|
<if test="intoWarehousePhone != null and intoWarehousePhone != ''"> and a.into_warehouse_phone like concat('%', #{intoWarehousePhone}, '%')</if>
|
|
|
|
|
<if test="intoWarehouseBillCode != null and intoWarehouseBillCode != ''"> and a.into_warehouse_bill_code like concat('%', #{intoWarehouseBillCode}, '%')</if>
|
|
|
|
|
<if test="warehouseInNo != null and warehouseInNo != ''"> and a.warehouse_in_no like concat('%', #{warehouseInNo}, '%')</if>
|
|
|
|
|
<if test="customerDeliveryBeginTime != null and customerDeliveryBeginTime != ''"> and a.customer_delivery_begin_time like concat('%', #{customerDeliveryBeginTime}, '%')</if>
|
|
|
|
|
<if test="customerDeliveryEndTime != null and customerDeliveryEndTime != ''"> and a.customer_delivery_end_time like concat('%', #{customerDeliveryEndTime}, '%')</if>
|
|
|
|
|
<if test="goodsInfo != null and goodsInfo != ''"> and a.goods_info like concat('%', #{goodsInfo}, '%')</if>
|
|
|
|
|
<if test="blPrepareInFreight != null and blPrepareInFreight != ''"> and a.bl_prepare_in_freight=#{blPrepareInFreight}</if>
|
|
|
|
|
<if test="prepareInEstFee != null "> and a.prepare_in_est_fee = #{prepareInEstFee}</if>
|
|
|
|
|
<if test="prepareInRealFee != null "> and a.prepare_in_real_fee = #{prepareInRealFee}</if>
|
|
|
|
|
<if test="prepareInExpress != null and prepareInExpress != ''"> and a.prepare_in_express like concat('%', #{prepareInExpress}, '%')</if>
|
|
|
|
|
<if test="prepareInBillCode != null and prepareInBillCode != ''"> and a.prepare_in_bill_code like concat('%', #{prepareInBillCode}, '%')</if>
|
|
|
|
|
<if test="prepareInRemark != null and prepareInRemark != ''"> and a.prepare_in_remark like concat('%', #{prepareInRemark}, '%')</if>
|
|
|
|
|
<if test="prepareInSupplier != null and prepareInSupplier != ''"> and a.prepare_in_supplier like concat('%', #{prepareInSupplier}, '%')</if>
|
|
|
|
|
<if test="totalWeight != null "> and a.total_weight = #{totalWeight}</if>
|
|
|
|
|
<if test="totalVolume != null "> and a.total_volume = #{totalVolume}</if>
|
|
|
|
|
<if test="parcelQty != null "> and a.parcel_qty = #{parcelQty}</if>
|
|
|
|
|
<if test="billWeight != null "> and a.bill_weight = #{billWeight}</if>
|
|
|
|
|
<if test="volumeWeight != null "> and a.volume_weight = #{volumeWeight}</if>
|
|
|
|
|
<if test="currency != null and currency != ''"> and a.currency= #{currency}</if>
|
|
|
|
|
<if test="settlementWeight != null "> and a.settlement_weight = #{settlementWeight}</if>
|
|
|
|
|
<if test="scanWeight != null "> and a.scan_weight = #{scanWeight}</if>
|
|
|
|
|
<if test="feeWeight != null "> and a.fee_weight = #{feeWeight}</if>
|
|
|
|
|
<if test="freight != null "> and a.freight = #{freight}</if>
|
|
|
|
|
<if test="realPaymentType != null and realPaymentType != ''"> and a.real_payment_type=#{realPaymentType}</if>
|
|
|
|
|
<if test="realFee != null "> and a.real_fee = #{realFee}</if>
|
|
|
|
|
<if test="blSpecialQuote != null and blSpecialQuote != ''"> and a.bl_special_quote=#{blSpecialQuote}</if>
|
|
|
|
|
<if test="blOverLong != null and blOverLong != ''"> and a.bl_over_long=#{blOverLong}</if>
|
|
|
|
|
<if test="blBill != null and blBill != ''"> and a.bl_bill=#{blBill}</if>
|
|
|
|
|
<if test="blBillText != null and blBillText != ''"> and a.bl_bill_text like concat('%', #{blBillText}, '%')</if>
|
|
|
|
|
<if test="blOverWeight != null and blOverWeight != ''"> and a.bl_over_weight like concat('%', #{blOverWeight}, '%')</if>
|
|
|
|
|
<if test="overWeightNumber != null and overWeightNumber != ''"> and a.over_weight_number like concat('%', #{overWeightNumber}, '%')</if>
|
|
|
|
|
<if test="feeRemark != null and feeRemark != ''"> and a.fee_remark like concat('%', #{feeRemark}, '%')</if>
|
|
|
|
|
<if test="thirdCode != null and thirdCode != ''"> and a.third_code like concat('%', #{thirdCode}, '%')</if>
|
|
|
|
|
<if test="realValue != null and realValue != ''"> and a.real_value like concat('%', #{realValue}, '%')</if>
|
|
|
|
|
<if test="blInsure != null and blInsure != ''"> and a.bl_insure= #{blInsure}</if>
|
|
|
|
|
<if test="insureValue != null and insureValue != ''"> and a.insure_value like concat('%', #{insureValue}, '%')</if>
|
|
|
|
|
<if test="insureValueCurrency != null and insureValueCurrency != ''"> and a.insure_value_currency like concat('%', #{insureValueCurrency}, '%')</if>
|
|
|
|
|
<if test="insureFeeCurrency != null and insureFeeCurrency != ''"> and a.insure_fee_currency like concat('%', #{insureFeeCurrency}, '%')</if>
|
|
|
|
|
<if test="insureFee != null "> and a.insure_fee = #{insureFee}</if>
|
|
|
|
|
<if test="insureRemark != null and insureRemark != ''"> and a.insure_remark like concat('%', #{insureRemark}, '%')</if>
|
|
|
|
|
<if test="insureSiteCode != null and insureSiteCode != ''"> and a.insure_site_code=#{insureSiteCode}</if>
|
|
|
|
|
<if test="blPrint != null and blPrint != ''"> and a.bl_print=#{blPrint}</if>
|
|
|
|
|
<if test="printManCode != null and printManCode != ''"> and a.print_man_code like concat('%', #{printManCode}, '%')</if>
|
|
|
|
|
<if test="printSite != null and printSite != ''"> and a.print_site=#{printSite},</if>
|
|
|
|
|
<if test="printDate != null and printDate != ''"> and a.print_date like concat('%', #{printDate}, '%')</if>
|
|
|
|
|
<if test="blDispFd != null and blDispFd != ''"> and a.bl_disp_fd=#{blDispFd}</if>
|
|
|
|
|
<if test="transferCode != null and transferCode != ''"> and a.transfer_code like concat('%', #{transferCode}, '%')</if>
|
|
|
|
|
<if test="transferBillcode != null and transferBillcode != ''"> and a.transfer_billcode like concat('%', #{transferBillcode}, '%')</if>
|
|
|
|
|
<if test="dispFdDate != null "> and a.disp_fd_date = #{dispFdDate}</if>
|
|
|
|
|
<if test="dispFdReason != null and dispFdReason != ''"> and a.disp_fd_reason like concat('%', #{dispFdReason}, '%')</if>
|
|
|
|
|
<if test="currentSiteCode != null and currentSiteCode != ''"> and a.current_site_code=#{currentSiteCode}</if>
|
|
|
|
|
<if test="nextSiteCode != null and nextSiteCode != ''"> and a.next_site_code= #{nextSiteCode}</if>
|
|
|
|
|
<if test="lastSiteCode != null and lastSiteCode != ''"> and a.last_site_code=#{lastSiteCode}</if>
|
|
|
|
|
<if test="registerSiteCode != null and registerSiteCode != ''"> and a.register_site_code=#{registerSiteCode}</if>
|
|
|
|
|
<if test="registerDate != null "> and a.register_date = #{registerDate}</if>
|
|
|
|
|
<if test="registerManCode != null and registerManCode != ''"> and a.register_man_code= #{registerManCode}</if>
|
|
|
|
|
<if test="takePieceEmployeeCode != null and takePieceEmployeeCode != ''"> and a.take_piece_employee_code=#{takePieceEmployeeCode}</if>
|
|
|
|
|
<if test="sendDate != null "> and a.send_date = #{sendDate}</if>
|
|
|
|
|
<if test="dispatchManCode != null and dispatchManCode != ''"> and a.dispatch_man_code=#{dispatchManCode}</if>
|
|
|
|
|
<if test="dispatchSiteCode != null and dispatchSiteCode != ''"> and a.dispatch_site_code=#{dispatchSiteCode}</if>
|
|
|
|
|
<if test="produceBillDate != null "> and a.produce_bill_date = #{produceBillDate}</if>
|
|
|
|
|
<if test="produceBillSiteCode != null and produceBillSiteCode != ''"> and a.produce_bill_site_code=#{produceBillSiteCode}</if>
|
|
|
|
|
<if test="produceBillManCode != null and produceBillManCode != ''"> and a.produce_bill_man_code=#{produceBillManCode}</if>
|
|
|
|
|
<if test="destinationCode != null and destinationCode != ''"> and a.destination_code =#{destinationCode}</if>
|
|
|
|
|
<if test="destinationProvince != null and destinationProvince != ''"> and a.destination_province=#{destinationProvince}</if>
|
|
|
|
|
<if test="destinationCity != null and destinationCity != ''"> and a.destination_city=#{destinationCity}</if>
|
|
|
|
|
<if test="destinationCounty != null and destinationCounty != ''"> and a.destination_county=#{destinationCounty}</if>
|
|
|
|
|
<if test="dispatchUnderlingSiteCode != null and dispatchUnderlingSiteCode != ''"> and a.dispatch_underling_site_code=#{dispatchUnderlingSiteCode}</if>
|
|
|
|
|
<if test="destinationCenterCode != null and destinationCenterCode != ''"> and a.destination_center_code=#{destinationCenterCode}</if>
|
|
|
|
|
<if test="marketManCode != null and marketManCode != ''"> and a.market_man_code = #{marketManCode}</if>
|
|
|
|
|
|
|
|
|
|
<if test="operateEmployeeCode != null and operateEmployeeCode != ''"> and a.operate_employee_code=#{operateEmployeeCode}</if>
|
|
|
|
|
<if test="blIsQuestion != null and blIsQuestion != ''"> and a.bl_is_question=#{blIsQuestion}</if>
|
|
|
|
|
<if test="problemType != null and problemType != ''"> and a.problem_type=#{problemType}</if>
|
|
|
|
|
<if test="problemCause != null and problemCause != ''"> and a.problem_cause like concat('%', #{problemCause}, '%')</if>
|
|
|
|
|
<if test="problemDelayDays != null "> and a.problem_delay_days = #{problemDelayDays}</if>
|
|
|
|
|
<if test="blMessage != null and blMessage != ''"> and a.bl_message=#{blMessage}</if>
|
|
|
|
|
<if test="blAcceptMessage != null and blAcceptMessage != ''"> and a.bl_accept_message=#{blAcceptMessage}</if>
|
|
|
|
|
<if test="blGenSubbill != null and blGenSubbill != ''"> and a.bl_gen_subbill=#{blGenSubbill}</if>
|
|
|
|
|
<if test="signMan != null and signMan != ''"> and a.sign_man like concat('%', #{signMan}, '%')</if>
|
|
|
|
|
<if test="signManCode != null and signManCode != ''"> and a.sign_man_code=#{signManCode}</if>
|
|
|
|
|
<if test="signSiteCode != null and signSiteCode != ''"> and a.sign_site_code=#{signSiteCode}</if>
|
|
|
|
|
<if test="paymentStatus != null and paymentStatus != ''"> and a.payment_status =#{paymentStatus}</if>
|
|
|
|
|
<if test="paymentDate != null "> and a.payment_date = #{paymentDate}</if>
|
|
|
|
|
<if test="paymentRemark != null and paymentRemark != ''"> and a.payment_remark like concat('%', #{paymentRemark}, '%')</if>
|
|
|
|
|
<if test="orderRemark != null and orderRemark != ''"> and a.order_remark like concat('%', #{orderRemark}, '%')</if>
|
|
|
|
|
|
|
|
|
|
<if test="dataFrom != null and dataFrom != ''">and a.data_from = #{dataFrom} </if>
|
|
|
|
|
|
|
|
|
|
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and a.create_by= #{createBy}</if>
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
<if test="params.problemQueryType != null and params.problemQueryType == 1 and params.problemQueryIds != null and params.problemQueryIds !=''">
|
|
|
|
|
and exists (
|
|
|
|
|
select 1 from emis_waybill_problem_info ewpi where a.bill_code=ewpi.bill_code and ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="params.problemQueryType != null and params.problemQueryType == 2 and params.problemQueryIds != null and params.problemQueryIds !=''">
|
|
|
|
|
and not exists (
|
|
|
|
|
select 1 from emis_waybill_problem_info ewpi where a.bill_code=ewpi.bill_code and ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test="params.waybillStatType != null and params.waybillStatType == 1">
|
|
|
|
|
and a.order_type='0'
|
|
|
|
|
and a.waybill_status='0'
|
|
|
|
|
and a.order_status in('0','3')
|
|
|
|
|
and (
|
|
|
|
|
a.take_piece_employee_code=#{params.privEmpCode}
|
|
|
|
|
or (a.pickup_method in('1','3') and a.operate_employee_code is null )
|
|
|
|
|
or (a.operate_employee_code=#{params.privEmpCode} )
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="params.waybillStatType != null and params.waybillStatType == 2">
|
|
|
|
|
and a.waybill_status!='0' and a.order_status!='2'
|
|
|
|
|
and (
|
|
|
|
|
a.operate_employee_code=#{params.privEmpCode}
|
|
|
|
|
or a.take_piece_employee_code=#{params.privEmpCode}
|
|
|
|
|
or a.register_man_code=#{params.privEmpCode}
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="params.waybillStatType != null and params.waybillStatType == 3">
|
|
|
|
|
and a.order_status='2'
|
|
|
|
|
and (
|
|
|
|
|
a.operate_employee_code=#{params.privEmpCode}
|
|
|
|
|
or a.take_piece_employee_code=#{params.privEmpCode}
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<!-- 转单 -->
|
|
|
|
|
<if test="params.waybillStatType != null and params.waybillStatType == 4">
|
|
|
|
|
and a.order_status in('0','3') and exists (
|
|
|
|
|
select 1 from emis_waybill_change_to ewcto where a.bill_code=ewcto.bill_code and ewcto.change_from=#{params.privEmpCode}
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="params.beginOrderDate != null and params.beginOrderDate != ''">
|
|
|
|
|
and a.order_date <![CDATA[ >= ]]> #{params.beginOrderDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.endOrderDate != null and params.endOrderDate != ''">
|
|
|
|
|
and a.order_date <![CDATA[ <= ]]> #{params.endOrderDate}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="params.beginPickStartDate != null and params.beginPickStartDate != ''">
|
|
|
|
|
and a.pick_start_date <![CDATA[ >= ]]> #{params.beginPickStartDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.endPickStartDate != null and params.endPickStartDate != ''">
|
|
|
|
|
and a.pick_start_date <![CDATA[ <= ]]> #{params.endPickStartDate}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="payee != null and payee != ''">
|
|
|
|
|
and a.payee=#{payee}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="salesmen != null and salesmen != '' " >
|
|
|
|
|
and a.salesmen=#{salesmen}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="sendSiteCode != null and sendSiteCode != ''">
|
|
|
|
|
and a.send_site_code=#{sendSiteCode}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="blSign != null and blSign != ''">
|
|
|
|
|
and a.bl_sign=#{blSign}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="params.beginDate != null and params.beginDate != ''">
|
|
|
|
|
and a.create_time <![CDATA[ >= ]]> #{params.beginDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.endDate != null and params.endDate != ''">
|
|
|
|
|
and a.create_time <![CDATA[ <= ]]> #{params.endDate}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="params.beginSendDate != null and params.beginSendDate != ''">
|
|
|
|
|
and a.send_date <![CDATA[ >= ]]> #{params.beginSendDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.endSendDate != null and params.endSendDate != ''">
|
|
|
|
|
and a.send_date <![CDATA[ <= ]]> #{params.endSendDate}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="params.beginCreateTime != null and params.beginCreateTime != ''">
|
|
|
|
|
and a.create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.endCreateTime != null and params.endCreateTime != ''">
|
|
|
|
|
and a.create_time <![CDATA[ <= ]]> #{params.endCreateTime}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test="salesmen == null and params.privSiteCode != null and params.privSiteCode != '88888'">
|
|
|
|
|
and (
|
|
|
|
|
a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmisWaybillList" parameterType="EmisWaybill" resultMap="EmisWaybillResult">
|
|
|
|
|
<include refid="selectEmisWaybillVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
|