Files
nanguangszwlback/mhd_oms/src/main/resources/mapper/businessDocumentOrder/BusinessDocumentOrderMapper.xml
T
2026-05-27 20:16:43 +08:00

1251 lines
61 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mhd.oms.domain.businessDocumentOrder.repository.mapper.BusinessDocumentOrderMapper">
<resultMap type="com.mhd.oms.domain.businessDocumentOrder.repository.po.BusinessDocumentOrderPO" id="BusinessDocumentOrderResult">
<result property="id" column="ID" />
<result property="realCreateBy" column="REAL_CREATE_BY" />
<result property="realCreateName" column="REAL_CREATE_NAME" />
<result property="createBy" column="CREATE_BY" />
<result property="createCompanyId" column="CREATE_COMPANY_ID" />
<result property="createTime" column="CREATE_TIME" />
<result property="updateBy" column="UPDATE_BY" />
<result property="updateTime" column="UPDATE_TIME" />
<result property="goodsNumber" column="GOODS_NUMBER" />
<result property="loadingAreaId" column="LOADING_AREA_ID" />
<result property="loadingName" column="LOADING_NAME" />
<result property="loadingAddress" column="LOADING_ADDRESS" />
<result property="loadingLongitude" column="LOADING_LONGITUDE" />
<result property="loadingLatitude" column="LOADING_LATITUDE" />
<result property="loadingUnit" column="LOADING_UNIT" />
<result property="freighterName" column="FREIGHTER_NAME" />
<result property="loadingPhone" column="LOADING_PHONE" />
<result property="loadingDate" column="LOADING_DATE" />
<result property="unloadAreaId" column="UNLOAD_AREA_ID" />
<result property="unloadName" column="UNLOAD_NAME" />
<result property="unloadAddress" column="UNLOAD_ADDRESS" />
<result property="unloadLongitude" column="UNLOAD_LONGITUDE" />
<result property="unloadLatitude" column="UNLOAD_LATITUDE" />
<result property="dischargerName" column="DISCHARGER_NAME" />
<result property="unloadPhone" column="UNLOAD_PHONE" />
<result property="unloadingData" column="UNLOADING_DATA" />
<result property="goodsTypeId" column="GOODS_TYPE_ID" />
<result property="goodsType" column="GOODS_TYPE" />
<result property="goodsNameId" column="GOODS_NAME_ID" />
<result property="goodsName" column="GOODS_NAME" />
<result property="weightMin" column="WEIGHT_MIN" />
<result property="weightMax" column="WEIGHT_MAX" />
<result property="goodsUntisId" column="GOODS_UNTIS_ID" />
<result property="goodsUntis" column="GOODS_UNTIS" />
<result property="transportationModeId" column="TRANSPORTATION_MODE_ID" />
<result property="transportationName" column="TRANSPORTATION_NAME" />
<result property="carType" column="CAR_TYPE" />
<result property="carTypeName" column="CAR_TYPE_NAME" />
<result property="serviceRequireId" column="SERVICE_REQUIRE_ID" />
<result property="serviceRequire" column="SERVICE_REQUIRE" />
<result property="remarks" column="REMARKS" />
<result property="waybillFrom" column="WAYBILL_FROM" />
<result property="isSource" column="IS_SOURCE" />
<result property="sourceCloseTime" column="SOURCE_CLOSE_TIME" />
<result property="executorId" column="EXECUTOR_ID" />
<result property="isDelete" column="IS_DELETE" />
<result property="lineTitleLeft" column="LINE_TITLE_LEFT" />
<result property="lineTitleRight" column="LINE_TITLE_RIGHT" />
<result property="sysOrgCode" column="SYS_ORG_CODE" />
<result property="isCommon" column="IS_COMMON" />
<result property="goodsTypeMajor" column="GOODS_TYPE_MAJOR" />
<result property="auditStatus" column="AUDIT_STATUS" />
<result property="waybillMode" column="WAYBILL_MODE" />
<result property="latestBiddingTime" column="LATEST_BIDDING_TIME" />
<result property="deliveryFreight" column="DELIVERY_FREIGHT" />
<result property="collectedFreight" column="COLLECTED_FREIGHT" />
<result property="uncollectedFreight" column="UNCOLLECTED_FREIGHT" />
<result property="collectLessFreight" column="COLLECT_LESS_FREIGHT" />
<result property="auditBy" column="AUDIT_BY" />
<result property="auditTime" column="AUDIT_TIME" />
<result property="businessType" column="BUSINESS_TYPE" />
<result property="transportationUnitPrice" column="TRANSPORTATION_UNIT_PRICE" />
<result property="radioValue" column="RADIO_VALUE" />
<result property="createrName" column="CREATER_NAME" />
<result property="createrPhone" column="CREATER_PHONE" />
<result property="isElectricFence" column="IS_ELECTRIC_FENCE" />
<result property="wxaQrcode" column="WXA_QRCODE" />
<result property="appointShipperId" column="APPOINT_SHIPPER_ID" />
<result property="createUserId" column="CREATE_USER_ID" />
<result property="appointShipper" column="APPOINT_SHIPPER" />
<result property="isStatus" column="IS_STATUS" />
<result property="signatureAddress" column="SIGNATURE_ADDRESS" />
<result property="qrCodeImgUrl" column="QR_CODE_IMG_URL" />
<result property="shippingNote" column="SHIPPING_NOTE" />
<result property="receivableType" column="RECEIVABLE_TYPE" />
<result property="thirdPartyOrderNumber" column="THIRD_PARTY_ORDER_NUMBER" />
<result property="dispatchOrderNumber" column="DISPATCH_ORDER_NUMBER" />
<result property="appointDriverEnterpriseId" column="APPOINT_DRIVER_ENTERPRISE_ID" />
<result property="appointDriverEnterprise" column="APPOINT_DRIVER_ENTERPRISE" />
<result property="cancelOrderRemark" column="CANCEL_ORDER_REMARK" />
<result property="orderDriverId" column="ORDER_DRIVER_ID" />
<result property="goodsQuantity" column="GOODS_QUANTITY" />
<result property="goodsQuantityUnitId" column="GOODS_QUANTITY_UNIT_ID" />
<result property="goodsQuantityUnit" column="GOODS_QUANTITY_UNIT" />
<result property="biddingUnit" column="BIDDING_UNIT" />
<result property="orderStatus" column="ORDER_STATUS" />
<result property="splicingOrderType" column="SPLICING_ORDER_TYPE" />
<result property="splicingStatus" column="SPLICING_STATUS" />
<result property="mainOrderId" column="MAIN_ORDER_ID" />
<result property="mainOrderNum" column="MAIN_ORDER_NUM" />
<result property="mergeOrderId" column="MERGE_ORDER_ID" />
<result property="mergeOrderNum" column="MERGE_ORDER_NUM" />
<result property="payerType" column="PAYER_TYPE" />
<result property="machineNumber" column="MACHINE_NUMBER" />
<result property="stockFlag" column="STOCK_FLAG" />
<result property="infoFee" column="INFO_FEE" />
<result property="infoFeePayeeType" column="INFO_FEE_PAYEE_TYPE" />
<result property="infoFeePayee" column="INFO_FEE_PAYEE" />
<result property="infoFeeStatus" column="INFO_FEE_STATUS" />
<result property="infoFeeDocumentNumber" column="INFO_FEE_DOCUMENT_NUMBER" />
<result property="orderShippingType" column="ORDER_SHIPPING_TYPE" />
<result property="recipientId" column="RECIPIENT_ID" />
<result property="recipientName" column="RECIPIENT_NAME" />
<result property="settlementStatus" column="SETTLEMENT_STATUS" />
<result property="settlementTime" column="SETTLEMENT_TIME" />
<result property="paymentTime" column="PAYMENT_TIME" />
<result property="reconciliationInnerNumber" column="RECONCILIATION_INNER_NUMBER" />
<result property="receivePaymentNumber" column="RECEIVE_PAYMENT_NUMBER" />
<result property="invoiceId" column="INVOICE_ID" />
<result property="isInvoice" column="IS_INVOICE" />
<result property="vehicleTypeId" column="VEHICLE_TYPE_ID" />
<result property="vehicleTypeName" column="VEHICLE_TYPE_NAME" />
<result property="carrier" column="CARRIER" />
<result property="carrierName" column="CARRIER_NAME" />
<result property="szwlUserId" column="SZWL_USER_ID" />
<result property="freightUnitPrice" column="FREIGHT_UNIT_PRICE" />
<result property="biddingStatus" column="BIDDING_STATUS" />
<result property="biddingRemarks" column="BIDDING_REMARKS" />
<result property="cargoInsuranceAmount" column="CARGO_INSURANCE_AMOUNT" />
<result property="destination" column="DESTINATION" />
<result property="freightCharges" column="FREIGHT_CHARGES" />
<result property="payer" column="PAYER" />
<result property="salesmanId" column="SALESMAN_ID" />
<result property="isDeclare" column="IS_DECLARE" />
<result property="route" column="ROUTE" />
<result property="containerType" column="CONTAINER_TYPE" />
<result property="containerTypeName" column="CONTAINER_TYPE_NAME" />
<result property="cardType" column="CARD_TYPE" />
<result property="cardTypeName" column="CARD_TYPE_NAME" />
<result property="externalContainerNo" column="EXTERNAL_CONTAINER_NO" />
<result property="transitPlace" column="TRANSIT_PLACE" />
<result property="shipper" column="SHIPPER" />
<result property="customsShipper" column="CUSTOMS_SHIPPER" />
<result property="customsShipperTel" column="CUSTOMS_SHIPPER_TEL" />
<result property="unloadingCompany" column="UNLOADING_COMPANY" />
<result property="contractNo" column="CONTRACT_NO" />
<result property="freightFee" column="FREIGHT_FEE" />
<result property="unloadingFee" column="UNLOADING_FEE" />
<result property="customsFee" column="CUSTOMS_FEE" />
<result property="shortageFee" column="SHORTAGE_FEE" />
<result property="miscellaneousFee" column="MISCELLANEOUS_FEE" />
<result property="otherFee" column="OTHER_FEE" />
<result property="detentionFee" column="DETENTION_FEE" />
<result property="taxRate" column="TAX_RATE" />
<result property="settlementCurrency" column="SETTLEMENT_CURRENCY" />
<result property="volume" column="VOLUME" />
<result property="detailContent" column="DETAIL_CONTENT" />
<result property="customsRoute" column="CUSTOMS_ROUTE" />
<result property="customsPort" column="CUSTOMS_PORT" />
<result property="customsContact" column="CUSTOMS_CONTACT" />
<result property="customsContactPhone" column="CUSTOMS_CONTACT_PHONE" />
<result property="customsRemark" column="CUSTOMS_REMARK" />
<result property="orgId" column="ORG_ID" />
<result property="goodsCategory" column="GOODS_CATEGORY" />
<result property="makerCodeNc" column="MAKER_CODE_NC" />
<result property="salesmanCodeNc" column="SALESMAN_CODE_NC" />
<result property="customerCodeNc" column="CUSTOMER_CODE_NC" />
<result property="salesmanName" column="SALESMAN_NAME" />
<result property="orgName" column="ORG_NAME" />
<result property="organizationId" column="ORGANIZATION_ID" />
<result property="organizationName" column="ORGANIZATION_NAME" />
<result property="topOrganizationId" column="TOP_ORGANIZATION_ID" />
<result property="documentDate" column="DOCUMENT_DATE" />
<result property="ieType" column="IE_TYPE" />
<result property="materialCode" column="MATERIAL_CODE" />
<result property="pushBy" column="PUSH_BY" />
<result property="pushByName" column="PUSH_BY_NAME" />
<result property="pushStatus" column="PUSH_STATUS" />
<result property="pushTime" column="PUSH_TIME" />
<result property="productType" column="PRODUCT_TYPE" />
<result property="reviseApplyType" column="REVISE_APPLY_TYPE" />
<result property="reviseApplyStatus" column="REVISE_APPLY_STATUS" />
<result property="reviseApplyBy" column="REVISE_APPLY_BY" />
<result property="reviseApplyByName" column="REVISE_APPLY_BY_NAME" />
<result property="reviseApplyReason" column="REVISE_APPLY_REASON" />
<result property="reviseApplyTime" column="REVISE_APPLY_TIME" />
<result property="cargoNum" column="CARGO_NUM" />
</resultMap>
<sql id="selectBusinessDocumentOrderPo">
SELECT bdo.*,
NVL(tms_count.total, 0) AS tms_order_status_count
FROM business_document_order bdo
LEFT JOIN (
SELECT child.MAIN_ORDER_NUM, COUNT(1) AS total
FROM business_document_order child
INNER JOIN NGWL_TEST_WLHY.TMS_ORDER t
ON t.EXECUTE_ORDER_NUMBER = child.goods_number
AND t.SPLICING_ORDER_TYPE = 2
INNER JOIN NGWL_TEST_WLHY.TMS_TRANSPORT_NOTE tr
ON tr.ORDER_ID = t.ID
AND tr.WAYBILL_STATUS IN (8,9,10,11)
GROUP BY child.MAIN_ORDER_NUM
) tms_count ON tms_count.MAIN_ORDER_NUM = bdo.goods_number
-- SELECT bdo.*,
-- NVL(tms_count.total, 0) AS tms_order_status_count
-- FROM business_document_order bdo
-- LEFT JOIN (
-- SELECT child.MAIN_ORDER_NUM, COUNT(1) AS total
-- FROM business_document_order child
-- INNER JOIN NGWL_TEST_WLHY.TMS_ORDER t
-- ON t.EXECUTE_ORDER_NUMBER = child.goods_number
-- AND t.ORDER_STATUS IN (7, 8)
-- AND t.SPLICING_ORDER_TYPE = 2
-- GROUP BY child.MAIN_ORDER_NUM
-- ) tms_count ON tms_count.MAIN_ORDER_NUM = bdo.goods_number
</sql>
<sql id="selectBusinessDocumentOrderPo1">
<where>
bdo.SPLICING_ORDER_TYPE in (0, 2, 4)
<if test="id != null ">
and bdo.ID = #{id}
</if>
<if test="orderSource != null and orderSource != ''">
and bdo.ORDER_SOURCE = #{orderSource}
</if>
<if test="inOrderNumber != null and inOrderNumber != ''">
AND bdo.IN_ORDER_NUMBER LIKE CONCAT('%', #{inOrderNumber}, '%')
</if>
<if test="createCompanyId != null and createCompanyId != ''">
and bdo.CREATE_COMPANY_ID = #{createCompanyId}
</if>
<if test="createStartTime != null">
and bdo.CREATE_TIME &gt;= #{createStartTime}
</if>
<if test="createEndTime != null">
and bdo.CREATE_TIME &lt;= #{createEndTime} + 1 - 1/86400
</if>
<if test="goodsNumber != null and goodsNumber != ''">
AND bdo.GOODS_NUMBER LIKE CONCAT('%', #{goodsNumber}, '%')
</if>
<if test="loadingAreaId != null and loadingAreaId != ''">
and bdo.LOADING_AREA_ID = #{loadingAreaId}
</if>
<if test="loadingName != null and loadingName != ''">
and bdo.LOADING_NAME like concat('%', #{loadingName}, '%')
</if>
<if test="loadingAddress != null and loadingAddress != ''">
and bdo.LOADING_ADDRESS = #{loadingAddress}
</if>
<if test="loadingLongitude != null and loadingLongitude != ''">
and bdo.LOADING_LONGITUDE = #{loadingLongitude}
</if>
<if test="loadingLatitude != null and loadingLatitude != ''">
and bdo.LOADING_LATITUDE = #{loadingLatitude}
</if>
<if test="loadingUnit != null and loadingUnit != ''">
and bdo.LOADING_UNIT = #{loadingUnit}
</if>
<if test="freighterName != null and freighterName != ''">
and bdo.FREIGHTER_NAME like concat('%', #{freighterName}, '%')
</if>
<if test="loadingPhone != null and loadingPhone != ''">
and bdo.LOADING_PHONE = #{loadingPhone}
</if>
<if test="loadingDate != null ">
and bdo.LOADING_DATE = #{loadingDate}
</if>
<if test="unloadAreaId != null and unloadAreaId != ''">
and bdo.UNLOAD_AREA_ID = #{unloadAreaId}
</if>
<if test="unloadName != null and unloadName != ''">
and bdo.UNLOAD_NAME like concat('%', #{unloadName}, '%')
</if>
<if test="unloadAddress != null and unloadAddress != ''">
and bdo.UNLOAD_ADDRESS = #{unloadAddress}
</if>
<if test="unloadLongitude != null and unloadLongitude != ''">
and bdo.UNLOAD_LONGITUDE = #{unloadLongitude}
</if>
<if test="unloadLatitude != null and unloadLatitude != ''">
and bdo.UNLOAD_LATITUDE = #{unloadLatitude}
</if>
<if test="dischargerName != null and dischargerName != ''">
and bdo.DISCHARGER_NAME like concat('%', #{dischargerName}, '%')
</if>
<if test="unloadPhone != null and unloadPhone != ''">
and bdo.UNLOAD_PHONE = #{unloadPhone}
</if>
<if test="unloadingData != null ">
and bdo.UNLOADING_DATA = #{unloadingData}
</if>
<if test="goodsTypeId != null and goodsTypeId != ''">
and bdo.GOODS_TYPE_ID = #{goodsTypeId}
</if>
<if test="goodsType != null and goodsType != ''">
and bdo.GOODS_TYPE = #{goodsType}
</if>
<if test="goodsNameId != null and goodsNameId != ''">
and bdo.GOODS_NAME_ID = #{goodsNameId}
</if>
<if test="goodsName != null and goodsName != ''">
and bdo.GOODS_NAME like concat('%', #{goodsName}, '%')
</if>
<if test="weightMin != null ">
and bdo.WEIGHT_MIN = #{weightMin}
</if>
<if test="weightMax != null ">
and bdo.WEIGHT_MAX = #{weightMax}
</if>
<if test="goodsUntisId != null and goodsUntisId != ''">
and bdo.GOODS_UNTIS_ID = #{goodsUntisId}
</if>
<if test="goodsUntis != null and goodsUntis != ''">
and bdo.GOODS_UNTIS = #{goodsUntis}
</if>
<if test="transportationModeId != null ">
and bdo.TRANSPORTATION_MODE_ID = #{transportationModeId}
</if>
<if test="transportationName != null and transportationName != ''">
and bdo.TRANSPORTATION_NAME like concat('%', #{transportationName}, '%')
</if>
<if test="carType != null and carType != ''">
and bdo.CAR_TYPE = #{carType}
</if>
<if test="carTypeName != null and carTypeName != ''">
and bdo.CAR_TYPE_NAME like concat('%', #{carTypeName}, '%')
</if>
<if test="serviceRequireId != null and serviceRequireId != ''">
and bdo.SERVICE_REQUIRE_ID = #{serviceRequireId}
</if>
<if test="serviceRequire != null and serviceRequire != ''">
and bdo.SERVICE_REQUIRE = #{serviceRequire}
</if>
<if test="remarks != null and remarks != ''">
and bdo.REMARKS = #{remarks}
</if>
<if test="waybillFrom != null ">
and bdo.WAYBILL_FROM = #{waybillFrom}
</if>
<if test="isSource != null ">
and bdo.IS_SOURCE = #{isSource}
</if>
<if test="sourceCloseTime != null ">
and bdo.SOURCE_CLOSE_TIME = #{sourceCloseTime}
</if>
<if test="executorId != null and executorId != ''">
and bdo.EXECUTOR_ID = #{executorId}
</if>
<if test="isDelete != null ">
and bdo.IS_DELETE = #{isDelete}
</if>
<if test="lineTitleLeft != null and lineTitleLeft != ''">
and bdo.LINE_TITLE_LEFT = #{lineTitleLeft}
</if>
<if test="lineTitleRight != null and lineTitleRight != ''">
and bdo.LINE_TITLE_RIGHT = #{lineTitleRight}
</if>
<if test="sysOrgCode != null and sysOrgCode != ''">
and bdo.SYS_ORG_CODE = #{sysOrgCode}
</if>
<if test="isCommon != null ">
and bdo.IS_COMMON = #{isCommon}
</if>
<if test="goodsTypeMajor != null and goodsTypeMajor != ''">
and bdo.GOODS_TYPE_MAJOR = #{goodsTypeMajor}
</if>
<if test="auditStatus != null ">
and bdo.AUDIT_STATUS = #{auditStatus}
</if>
<if test="waybillMode != null ">
and bdo.WAYBILL_MODE = #{waybillMode}
</if>
<if test="latestBiddingTime != null ">
and bdo.LATEST_BIDDING_TIME = #{latestBiddingTime}
</if>
<if test="deliveryFreight != null ">
and bdo.DELIVERY_FREIGHT = #{deliveryFreight}
</if>
<if test="collectedFreight != null ">
and bdo.COLLECTED_FREIGHT = #{collectedFreight}
</if>
<if test="uncollectedFreight != null ">
and bdo.UNCOLLECTED_FREIGHT = #{uncollectedFreight}
</if>
<if test="collectLessFreight != null ">
and bdo.COLLECT_LESS_FREIGHT = #{collectLessFreight}
</if>
<if test="auditBy != null and auditBy != ''">
and bdo.AUDIT_BY = #{auditBy}
</if>
<if test="auditTime != null ">
and bdo.AUDIT_TIME = #{auditTime}
</if>
<if test="businessType != null and businessType != ''">
and bdo.BUSINESS_TYPE = #{businessType}
</if>
<if test="transportationUnitPrice != null ">
and bdo.TRANSPORTATION_UNIT_PRICE = #{transportationUnitPrice}
</if>
<if test="radioValue != null ">
and bdo.RADIO_VALUE = #{radioValue}
</if>
<if test="createrName != null and createrName != ''">
and bdo.CREATER_NAME like concat('%', #{createrName}, '%')
</if>
<if test="createrPhone != null and createrPhone != ''">
and bdo.CREATER_PHONE = #{createrPhone}
</if>
<if test="isElectricFence != null ">
and bdo.IS_ELECTRIC_FENCE = #{isElectricFence}
</if>
<if test="wxaQrcode != null and wxaQrcode != ''">
and bdo.WXA_QRCODE = #{wxaQrcode}
</if>
<if test="appointShipperId != null and appointShipperId != ''">
and bdo.APPOINT_SHIPPER_ID = #{appointShipperId}
</if>
<if test="createUserId != null and createUserId != ''">
and bdo.CREATE_USER_ID = #{createUserId}
</if>
<if test="appointShipper != null and appointShipper != ''">
AND bdo.APPOINT_SHIPPER LIKE CONCAT('%', #{appointShipper}, '%')
</if>
<if test="isStatus != null ">
and bdo.IS_STATUS = #{isStatus}
</if>
<if test="signatureAddress != null and signatureAddress != ''">
and bdo.SIGNATURE_ADDRESS = #{signatureAddress}
</if>
<if test="qrCodeImgUrl != null and qrCodeImgUrl != ''">
and bdo.QR_CODE_IMG_URL = #{qrCodeImgUrl}
</if>
<if test="shippingNote != null and shippingNote != ''">
and bdo.SHIPPING_NOTE = #{shippingNote}
</if>
<if test="receivableType != null ">
and bdo.RECEIVABLE_TYPE = #{receivableType}
</if>
<if test="thirdPartyOrderNumber != null and thirdPartyOrderNumber != ''">
and bdo.THIRD_PARTY_ORDER_NUMBER = #{thirdPartyOrderNumber}
</if>
<if test="dispatchOrderNumber != null and dispatchOrderNumber != ''">
and bdo.DISPATCH_ORDER_NUMBER = #{dispatchOrderNumber}
</if>
<if test="appointDriverEnterpriseId != null and appointDriverEnterpriseId != ''">
and bdo.APPOINT_DRIVER_ENTERPRISE_ID = #{appointDriverEnterpriseId}
</if>
<if test="appointDriverEnterprise != null and appointDriverEnterprise != ''">
and bdo.APPOINT_DRIVER_ENTERPRISE = #{appointDriverEnterprise}
</if>
<if test="cancelOrderRemark != null and cancelOrderRemark != ''">
and bdo.CANCEL_ORDER_REMARK = #{cancelOrderRemark}
</if>
<if test="orderDriverId != null and orderDriverId != ''">
and bdo.ORDER_DRIVER_ID = #{orderDriverId}
</if>
<if test="goodsQuantity != null ">
and bdo.GOODS_QUANTITY = #{goodsQuantity}
</if>
<if test="goodsQuantityUnitId != null and goodsQuantityUnitId != ''">
and bdo.GOODS_QUANTITY_UNIT_ID = #{goodsQuantityUnitId}
</if>
<if test="goodsQuantityUnit != null and goodsQuantityUnit != ''">
and bdo.GOODS_QUANTITY_UNIT = #{goodsQuantityUnit}
</if>
<if test="biddingUnit != null and biddingUnit != ''">
and bdo.BIDDING_UNIT = #{biddingUnit}
</if>
<if test="orderStatus != null ">
and bdo.ORDER_STATUS = #{orderStatus}
</if>
<if test="splicingOrderType != null ">
and bdo.SPLICING_ORDER_TYPE = #{splicingOrderType}
</if>
<if test="splicingStatus != null ">
and bdo.SPLICING_STATUS = #{splicingStatus}
</if>
<if test="mainOrderId != null and mainOrderId != ''">
and bdo.MAIN_ORDER_ID = #{mainOrderId}
</if>
<if test="mainOrderNum != null and mainOrderNum != ''">
and bdo.MAIN_ORDER_NUM = #{mainOrderNum}
</if>
<if test="mergeOrderId != null and mergeOrderId != ''">
and bdo.MERGE_ORDER_ID = #{mergeOrderId}
</if>
<if test="mergeOrderNum != null and mergeOrderNum != ''">
and bdo.MERGE_ORDER_NUM = #{mergeOrderNum}
</if>
<if test="payerType != null ">
and bdo.PAYER_TYPE = #{payerType}
</if>
<if test="machineNumber != null and machineNumber != ''">
and bdo.MACHINE_NUMBER = #{machineNumber}
</if>
<if test="stockFlag != null ">
and bdo.STOCK_FLAG = #{stockFlag}
</if>
<if test="infoFee != null ">
and bdo.INFO_FEE = #{infoFee}
</if>
<if test="infoFeePayeeType != null ">
and bdo.INFO_FEE_PAYEE_TYPE = #{infoFeePayeeType}
</if>
<if test="infoFeePayee != null and infoFeePayee != ''">
and bdo.INFO_FEE_PAYEE = #{infoFeePayee}
</if>
<if test="infoFeeStatus != null ">
and bdo.INFO_FEE_STATUS = #{infoFeeStatus}
</if>
<if test="infoFeeDocumentNumber != null and infoFeeDocumentNumber != ''">
and bdo.INFO_FEE_DOCUMENT_NUMBER = #{infoFeeDocumentNumber}
</if>
<if test="orderShippingType != null ">
and bdo.ORDER_SHIPPING_TYPE = #{orderShippingType}
</if>
<if test="recipientId != null and recipientId != ''">
and bdo.RECIPIENT_ID = #{recipientId}
</if>
<if test="recipientName != null and recipientName != ''">
and bdo.RECIPIENT_NAME like concat('%', #{recipientName}, '%')
</if>
<if test="settlementStatus != null ">
and bdo.SETTLEMENT_STATUS = #{settlementStatus}
</if>
<if test="settlementTime != null ">
and bdo.SETTLEMENT_TIME = #{settlementTime}
</if>
<if test="paymentTime != null ">
and bdo.PAYMENT_TIME = #{paymentTime}
</if>
<if test="reconciliationInnerNumber != null and reconciliationInnerNumber != ''">
and bdo.RECONCILIATION_INNER_NUMBER = #{reconciliationInnerNumber}
</if>
<if test="receivePaymentNumber != null and receivePaymentNumber != ''">
and bdo.RECEIVE_PAYMENT_NUMBER = #{receivePaymentNumber}
</if>
<if test="invoiceId != null and invoiceId != ''">
and bdo.INVOICE_ID = #{invoiceId}
</if>
<if test="isInvoice != null ">
and bdo.IS_INVOICE = #{isInvoice}
</if>
<if test="vehicleTypeId != null and vehicleTypeId != ''">
and bdo.VEHICLE_TYPE_ID = #{vehicleTypeId}
</if>
<if test="vehicleTypeName != null and vehicleTypeName != ''">
and bdo.VEHICLE_TYPE_NAME like concat('%', #{vehicleTypeName}, '%')
</if>
<if test="carrier != null and carrier != ''">
and bdo.CARRIER = #{carrier}
</if>
<if test="carrierName != null and carrierName != ''">
and bdo.CARRIER_NAME like concat('%', #{carrierName}, '%')
</if>
<if test="szwlUserId != null ">
and bdo.SZWL_USER_ID = #{szwlUserId}
</if>
<if test="freightUnitPrice != null ">
and bdo.FREIGHT_UNIT_PRICE = #{freightUnitPrice}
</if>
<if test="biddingStatus != null ">
and bdo.BIDDING_STATUS = #{biddingStatus}
</if>
<if test="biddingRemarks != null and biddingRemarks != ''">
and bdo.BIDDING_REMARKS = #{biddingRemarks}
</if>
<if test="cargoInsuranceAmount != null ">
and bdo.CARGO_INSURANCE_AMOUNT = #{cargoInsuranceAmount}
</if>
<if test="destination != null and destination != ''">
and bdo.DESTINATION = #{destination}
</if>
<if test="freightCharges != null ">
and bdo.FREIGHT_CHARGES = #{freightCharges}
</if>
<if test="payer != null and payer != ''">
and bdo.PAYER = #{payer}
</if>
<if test="salesmanId != null and salesmanId != ''">
and bdo.SALESMAN_ID = #{salesmanId}
</if>
<if test="isDeclare != null ">
and bdo.IS_DECLARE = #{isDeclare}
</if>
<if test="route != null and route != ''">
and bdo.ROUTE = #{route}
</if>
<if test="containerType != null and containerType != ''">
and bdo.CONTAINER_TYPE = #{containerType}
</if>
<if test="containerTypeName != null and containerTypeName != ''">
and bdo.CONTAINER_TYPE_NAME like concat('%', #{containerTypeName}, '%')
</if>
<if test="cardType != null and cardType != ''">
and bdo.CARD_TYPE = #{cardType}
</if>
<if test="cardTypeName != null and cardTypeName != ''">
and bdo.CARD_TYPE_NAME like concat('%', #{cardTypeName}, '%')
</if>
<if test="externalContainerNo != null and externalContainerNo != ''">
and bdo.EXTERNAL_CONTAINER_NO = #{externalContainerNo}
</if>
<if test="transitPlace != null and transitPlace != ''">
and bdo.TRANSIT_PLACE = #{transitPlace}
</if>
<if test="shipper != null and shipper != ''">
and bdo.SHIPPER = #{shipper}
</if>
<if test="customsShipper != null and customsShipper != ''">
and bdo.CUSTOMS_SHIPPER = #{customsShipper}
</if>
<if test="customsShipperTel != null and customsShipperTel != ''">
and bdo.CUSTOMS_SHIPPER_TEL = #{customsShipperTel}
</if>
<if test="unloadingCompany != null and unloadingCompany != ''">
and bdo.UNLOADING_COMPANY = #{unloadingCompany}
</if>
<if test="contractNo != null and contractNo != ''">
and bdo.CONTRACT_NO = #{contractNo}
</if>
<if test="freightFee != null ">
and bdo.FREIGHT_FEE = #{freightFee}
</if>
<if test="unloadingFee != null ">
and bdo.UNLOADING_FEE = #{unloadingFee}
</if>
<if test="customsFee != null ">
and bdo.CUSTOMS_FEE = #{customsFee}
</if>
<if test="shortageFee != null ">
and bdo.SHORTAGE_FEE = #{shortageFee}
</if>
<if test="miscellaneousFee != null ">
and bdo.MISCELLANEOUS_FEE = #{miscellaneousFee}
</if>
<if test="otherFee != null ">
and bdo.OTHER_FEE = #{otherFee}
</if>
<if test="detentionFee != null ">
and bdo.DETENTION_FEE = #{detentionFee}
</if>
<if test="taxRate != null ">
and bdo.TAX_RATE = #{taxRate}
</if>
<if test="settlementCurrency != null and settlementCurrency != ''">
and bdo.SETTLEMENT_CURRENCY = #{settlementCurrency}
</if>
<if test="volume != null ">
and bdo.VOLUME = #{volume}
</if>
<if test="detailContent != null and detailContent != ''">
and bdo.DETAIL_CONTENT = #{detailContent}
</if>
<if test="customsRoute != null and customsRoute != ''">
and bdo.CUSTOMS_ROUTE = #{customsRoute}
</if>
<if test="customsPort != null and customsPort != ''">
and bdo.CUSTOMS_PORT = #{customsPort}
</if>
<if test="customsContact != null and customsContact != ''">
and bdo.CUSTOMS_CONTACT = #{customsContact}
</if>
<if test="customsContactPhone != null and customsContactPhone != ''">
and bdo.CUSTOMS_CONTACT_PHONE = #{customsContactPhone}
</if>
<if test="customsRemark != null and customsRemark != ''">
and bdo.CUSTOMS_REMARK = #{customsRemark}
</if>
<if test="orgId != null and orgId != ''">
and bdo.ORG_ID = #{orgId}
</if>
<if test="goodsCategory != null and goodsCategory != ''">
and bdo.GOODS_CATEGORY = #{goodsCategory}
</if>
<if test="organizationId != null ">
and bdo.ORGANIZATION_ID = #{organizationId}
</if>
<if test="documentDate != null ">
and bdo.DOCUMENT_DATE = #{documentDate}
</if>
<if test="documentDateStart != null">
and bdo.DOCUMENT_DATE <![CDATA[>=]]> #{documentDateStart}
</if>
<if test="documentDateEnd != null">
and bdo.DOCUMENT_DATE <![CDATA[<=]]> #{documentDateEnd}
</if>
<if test="pushTimeStart != null">
and bdo.PUSH_TIME <![CDATA[>=]]> #{pushTimeStart}
</if>
<if test="pushTimeEnd != null">
and bdo.PUSH_TIME <![CDATA[<=]]> #{pushTimeEnd}
</if>
<if test="ieType != null ">
and bdo.IE_TYPE = #{ieType}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.oms.domain.businessDocumentOrder.repository.todo.BusinessDocumentOrderDO" resultMap="BusinessDocumentOrderResult">
<include refid="selectBusinessDocumentOrderPo"/>
<include refid="selectBusinessDocumentOrderPo1"/>
order by create_time desc
</select>
<select id="selectByMakerCodeNc" parameterType="java.lang.String" resultType="java.lang.String">
select DOCUMENT_PREPARER_NC_code from NGWL_TEST_USER."USER" where USER_ID = #{salesmanCodeNc}</select>
<select id="selectByMakerCodeNc1" resultType="java.lang.String" parameterType="java.lang.String">
select SALESPERSON_NC_CODE from NGWL_TEST_USER."USER" where USER_ID = #{salesmanCodeNc}</select>
<select id="queryListAndMaterial" parameterType="com.mhd.oms.domain.businessDocumentOrder.repository.todo.BusinessDocumentOrderDO" resultMap="BusinessDocumentOrderResult">
select o.*,a.material_code , a.material_base_info_id ,a.product_type,a.cargo_num
from business_document_order as o
left join business_document_cargo_multi as a ON o.id = a.order_id
<include refid="selectBusinessDocumentOrderPo3"/>
order by create_time desc
</select>
<select id="getAddressByUserAccount" resultType="com.mhd.common.core.domain.po.UserPo">
select * from NGWL_TEST_USER."USER" where user_member_code =#{customerNumber}
</select>
<select id="getTmsOrderInfo" resultType="java.lang.String">
select id from NGWL_TEST_WLHY.TMS_ORDER where EXECUTE_ORDER_NUMBER = #{goodsNumber} and SPLICING_ORDER_TYPE = 2
</select>
<select id="getTmsTransportNote" resultType="com.mhd.system.api.domain.TmsTransportNote">
select * from NGWL_TEST_WLHY.TMS_TRANSPORT_NOTE where ORDER_ID = #{tmsOrderId}
</select>
<sql id="selectBusinessDocumentOrderPo3">
<where>
<if test="id != null ">
and o.ID = #{id}
</if>
<!-- <if test="realCreateBy != null and realCreateBy != ''">-->
<!-- and REAL_CREATE_BY = #{realCreateBy}-->
<!-- </if>-->
<!-- <if test="realCreateName != null and realCreateName != ''">-->
<!-- and REAL_CREATE_NAME like concat('%', #{realCreateName}, '%')-->
<!-- </if>-->
<if test="orderSource != null and orderSource != ''">
and ORDER_SOURCE = #{orderSource}
</if>
<if test="inOrderNumber != null and inOrderNumber != ''">
AND IN_ORDER_NUMBER LIKE CONCAT('%', #{inOrderNumber}, '%')
</if>
<if test="createCompanyId != null and createCompanyId != ''">
and CREATE_COMPANY_ID = #{createCompanyId}
</if>
<if test="createStartTime != null">
and CREATE_TIME &gt;= #{createStartTime}
</if>
<if test="createEndTime != null">
and CREATE_TIME &lt;= #{createEndTime} + 1 - 1/86400
</if>
<!-- <if test="updateTime != null ">-->
<!-- and UPDATE_TIME = #{updateTime}-->
<!-- </if>-->
<if test="goodsNumber != null and goodsNumber != ''">
AND GOODS_NUMBER LIKE CONCAT('%', #{goodsNumber}, '%')
</if>
<if test="loadingAreaId != null and loadingAreaId != ''">
and LOADING_AREA_ID = #{loadingAreaId}
</if>
<if test="loadingName != null and loadingName != ''">
and LOADING_NAME like concat('%', #{loadingName}, '%')
</if>
<if test="loadingAddress != null and loadingAddress != ''">
and LOADING_ADDRESS = #{loadingAddress}
</if>
<if test="loadingLongitude != null and loadingLongitude != ''">
and LOADING_LONGITUDE = #{loadingLongitude}
</if>
<if test="loadingLatitude != null and loadingLatitude != ''">
and LOADING_LATITUDE = #{loadingLatitude}
</if>
<if test="loadingUnit != null and loadingUnit != ''">
and LOADING_UNIT = #{loadingUnit}
</if>
<if test="freighterName != null and freighterName != ''">
and FREIGHTER_NAME like concat('%', #{freighterName}, '%')
</if>
<if test="loadingPhone != null and loadingPhone != ''">
and LOADING_PHONE = #{loadingPhone}
</if>
<if test="loadingDate != null ">
and LOADING_DATE = #{loadingDate}
</if>
<if test="unloadAreaId != null and unloadAreaId != ''">
and UNLOAD_AREA_ID = #{unloadAreaId}
</if>
<if test="unloadName != null and unloadName != ''">
and UNLOAD_NAME like concat('%', #{unloadName}, '%')
</if>
<if test="unloadAddress != null and unloadAddress != ''">
and UNLOAD_ADDRESS = #{unloadAddress}
</if>
<if test="unloadLongitude != null and unloadLongitude != ''">
and UNLOAD_LONGITUDE = #{unloadLongitude}
</if>
<if test="unloadLatitude != null and unloadLatitude != ''">
and UNLOAD_LATITUDE = #{unloadLatitude}
</if>
<if test="dischargerName != null and dischargerName != ''">
and DISCHARGER_NAME like concat('%', #{dischargerName}, '%')
</if>
<if test="unloadPhone != null and unloadPhone != ''">
and UNLOAD_PHONE = #{unloadPhone}
</if>
<if test="unloadingData != null ">
and UNLOADING_DATA = #{unloadingData}
</if>
<if test="goodsTypeId != null and goodsTypeId != ''">
and GOODS_TYPE_ID = #{goodsTypeId}
</if>
<if test="goodsType != null and goodsType != ''">
and GOODS_TYPE = #{goodsType}
</if>
<if test="goodsNameId != null and goodsNameId != ''">
and GOODS_NAME_ID = #{goodsNameId}
</if>
<if test="goodsName != null and goodsName != ''">
and GOODS_NAME like concat('%', #{goodsName}, '%')
</if>
<if test="weightMin != null ">
and WEIGHT_MIN = #{weightMin}
</if>
<if test="weightMax != null ">
and WEIGHT_MAX = #{weightMax}
</if>
<if test="goodsUntisId != null and goodsUntisId != ''">
and GOODS_UNTIS_ID = #{goodsUntisId}
</if>
<if test="goodsUntis != null and goodsUntis != ''">
and GOODS_UNTIS = #{goodsUntis}
</if>
<if test="transportationModeId != null ">
and TRANSPORTATION_MODE_ID = #{transportationModeId}
</if>
<if test="transportationName != null and transportationName != ''">
and TRANSPORTATION_NAME like concat('%', #{transportationName}, '%')
</if>
<if test="carType != null and carType != ''">
and CAR_TYPE = #{carType}
</if>
<if test="carTypeName != null and carTypeName != ''">
and CAR_TYPE_NAME like concat('%', #{carTypeName}, '%')
</if>
<if test="serviceRequireId != null and serviceRequireId != ''">
and SERVICE_REQUIRE_ID = #{serviceRequireId}
</if>
<if test="serviceRequire != null and serviceRequire != ''">
and SERVICE_REQUIRE = #{serviceRequire}
</if>
<if test="remarks != null and remarks != ''">
and REMARKS = #{remarks}
</if>
<if test="waybillFrom != null ">
and WAYBILL_FROM = #{waybillFrom}
</if>
<if test="isSource != null ">
and IS_SOURCE = #{isSource}
</if>
<if test="sourceCloseTime != null ">
and SOURCE_CLOSE_TIME = #{sourceCloseTime}
</if>
<if test="executorId != null and executorId != ''">
and EXECUTOR_ID = #{executorId}
</if>
<if test="isDelete != null ">
and IS_DELETE = #{isDelete}
</if>
<if test="lineTitleLeft != null and lineTitleLeft != ''">
and LINE_TITLE_LEFT = #{lineTitleLeft}
</if>
<if test="lineTitleRight != null and lineTitleRight != ''">
and LINE_TITLE_RIGHT = #{lineTitleRight}
</if>
<if test="sysOrgCode != null and sysOrgCode != ''">
and SYS_ORG_CODE = #{sysOrgCode}
</if>
<if test="isCommon != null ">
and IS_COMMON = #{isCommon}
</if>
<if test="goodsTypeMajor != null and goodsTypeMajor != ''">
and GOODS_TYPE_MAJOR = #{goodsTypeMajor}
</if>
<if test="auditStatus != null ">
and AUDIT_STATUS = #{auditStatus}
</if>
<if test="waybillMode != null ">
and WAYBILL_MODE = #{waybillMode}
</if>
<if test="latestBiddingTime != null ">
and LATEST_BIDDING_TIME = #{latestBiddingTime}
</if>
<if test="deliveryFreight != null ">
and DELIVERY_FREIGHT = #{deliveryFreight}
</if>
<if test="collectedFreight != null ">
and COLLECTED_FREIGHT = #{collectedFreight}
</if>
<if test="uncollectedFreight != null ">
and UNCOLLECTED_FREIGHT = #{uncollectedFreight}
</if>
<if test="collectLessFreight != null ">
and COLLECT_LESS_FREIGHT = #{collectLessFreight}
</if>
<if test="auditBy != null and auditBy != ''">
and AUDIT_BY = #{auditBy}
</if>
<if test="auditTime != null ">
and AUDIT_TIME = #{auditTime}
</if>
<if test="businessType != null and businessType != ''">
and BUSINESS_TYPE = #{businessType}
</if>
<if test="transportationUnitPrice != null ">
and TRANSPORTATION_UNIT_PRICE = #{transportationUnitPrice}
</if>
<if test="radioValue != null ">
and RADIO_VALUE = #{radioValue}
</if>
<if test="createrName != null and createrName != ''">
and CREATER_NAME like concat('%', #{createrName}, '%')
</if>
<if test="createrPhone != null and createrPhone != ''">
and CREATER_PHONE = #{createrPhone}
</if>
<if test="isElectricFence != null ">
and IS_ELECTRIC_FENCE = #{isElectricFence}
</if>
<if test="wxaQrcode != null and wxaQrcode != ''">
and WXA_QRCODE = #{wxaQrcode}
</if>
<if test="appointShipperId != null and appointShipperId != ''">
and APPOINT_SHIPPER_ID = #{appointShipperId}
</if>
<if test="createUserId != null and createUserId != ''">
and CREATE_USER_ID = #{createUserId}
</if>
<if test="appointShipper != null and appointShipper != ''">
AND APPOINT_SHIPPER LIKE CONCAT('%', #{appointShipper}, '%')
</if>
<if test="isStatus != null ">
and IS_STATUS = #{isStatus}
</if>
<if test="signatureAddress != null and signatureAddress != ''">
and SIGNATURE_ADDRESS = #{signatureAddress}
</if>
<if test="qrCodeImgUrl != null and qrCodeImgUrl != ''">
and QR_CODE_IMG_URL = #{qrCodeImgUrl}
</if>
<if test="shippingNote != null and shippingNote != ''">
and SHIPPING_NOTE = #{shippingNote}
</if>
<if test="receivableType != null ">
and RECEIVABLE_TYPE = #{receivableType}
</if>
<if test="thirdPartyOrderNumber != null and thirdPartyOrderNumber != ''">
and THIRD_PARTY_ORDER_NUMBER = #{thirdPartyOrderNumber}
</if>
<if test="dispatchOrderNumber != null and dispatchOrderNumber != ''">
and DISPATCH_ORDER_NUMBER = #{dispatchOrderNumber}
</if>
<if test="appointDriverEnterpriseId != null and appointDriverEnterpriseId != ''">
and APPOINT_DRIVER_ENTERPRISE_ID = #{appointDriverEnterpriseId}
</if>
<if test="appointDriverEnterprise != null and appointDriverEnterprise != ''">
and APPOINT_DRIVER_ENTERPRISE = #{appointDriverEnterprise}
</if>
<if test="cancelOrderRemark != null and cancelOrderRemark != ''">
and CANCEL_ORDER_REMARK = #{cancelOrderRemark}
</if>
<if test="orderDriverId != null and orderDriverId != ''">
and ORDER_DRIVER_ID = #{orderDriverId}
</if>
<if test="goodsQuantity != null ">
and GOODS_QUANTITY = #{goodsQuantity}
</if>
<if test="goodsQuantityUnitId != null and goodsQuantityUnitId != ''">
and GOODS_QUANTITY_UNIT_ID = #{goodsQuantityUnitId}
</if>
<if test="goodsQuantityUnit != null and goodsQuantityUnit != ''">
and GOODS_QUANTITY_UNIT = #{goodsQuantityUnit}
</if>
<if test="biddingUnit != null and biddingUnit != ''">
and BIDDING_UNIT = #{biddingUnit}
</if>
<if test="orderStatus != null ">
and ORDER_STATUS = #{orderStatus}
</if>
<if test="splicingOrderType != null ">
and SPLICING_ORDER_TYPE = #{splicingOrderType}
</if>
<if test="splicingStatus != null ">
and SPLICING_STATUS = #{splicingStatus}
</if>
<if test="mainOrderId != null and mainOrderId != ''">
and MAIN_ORDER_ID = #{mainOrderId}
</if>
<if test="mainOrderNum != null and mainOrderNum != ''">
and MAIN_ORDER_NUM = #{mainOrderNum}
</if>
<if test="mergeOrderId != null and mergeOrderId != ''">
and MERGE_ORDER_ID = #{mergeOrderId}
</if>
<if test="mergeOrderNum != null and mergeOrderNum != ''">
and MERGE_ORDER_NUM = #{mergeOrderNum}
</if>
<if test="payerType != null ">
and PAYER_TYPE = #{payerType}
</if>
<if test="machineNumber != null and machineNumber != ''">
and MACHINE_NUMBER = #{machineNumber}
</if>
<if test="stockFlag != null ">
and STOCK_FLAG = #{stockFlag}
</if>
<if test="infoFee != null ">
and INFO_FEE = #{infoFee}
</if>
<if test="infoFeePayeeType != null ">
and INFO_FEE_PAYEE_TYPE = #{infoFeePayeeType}
</if>
<if test="infoFeePayee != null and infoFeePayee != ''">
and INFO_FEE_PAYEE = #{infoFeePayee}
</if>
<if test="infoFeeStatus != null ">
and INFO_FEE_STATUS = #{infoFeeStatus}
</if>
<if test="infoFeeDocumentNumber != null and infoFeeDocumentNumber != ''">
and INFO_FEE_DOCUMENT_NUMBER = #{infoFeeDocumentNumber}
</if>
<if test="orderShippingType != null ">
and ORDER_SHIPPING_TYPE = #{orderShippingType}
</if>
<if test="recipientId != null and recipientId != ''">
and RECIPIENT_ID = #{recipientId}
</if>
<if test="recipientName != null and recipientName != ''">
and RECIPIENT_NAME like concat('%', #{recipientName}, '%')
</if>
<if test="settlementStatus != null ">
and SETTLEMENT_STATUS = #{settlementStatus}
</if>
<if test="settlementTime != null ">
and SETTLEMENT_TIME = #{settlementTime}
</if>
<if test="paymentTime != null ">
and PAYMENT_TIME = #{paymentTime}
</if>
<if test="reconciliationInnerNumber != null and reconciliationInnerNumber != ''">
and RECONCILIATION_INNER_NUMBER = #{reconciliationInnerNumber}
</if>
<if test="receivePaymentNumber != null and receivePaymentNumber != ''">
and RECEIVE_PAYMENT_NUMBER = #{receivePaymentNumber}
</if>
<if test="invoiceId != null and invoiceId != ''">
and INVOICE_ID = #{invoiceId}
</if>
<if test="isInvoice != null ">
and IS_INVOICE = #{isInvoice}
</if>
<if test="vehicleTypeId != null and vehicleTypeId != ''">
and VEHICLE_TYPE_ID = #{vehicleTypeId}
</if>
<if test="vehicleTypeName != null and vehicleTypeName != ''">
and VEHICLE_TYPE_NAME like concat('%', #{vehicleTypeName}, '%')
</if>
<if test="carrier != null and carrier != ''">
and CARRIER = #{carrier}
</if>
<if test="carrierName != null and carrierName != ''">
and CARRIER_NAME like concat('%', #{carrierName}, '%')
</if>
<if test="szwlUserId != null ">
and SZWL_USER_ID = #{szwlUserId}
</if>
<if test="freightUnitPrice != null ">
and FREIGHT_UNIT_PRICE = #{freightUnitPrice}
</if>
<if test="biddingStatus != null ">
and BIDDING_STATUS = #{biddingStatus}
</if>
<if test="biddingRemarks != null and biddingRemarks != ''">
and BIDDING_REMARKS = #{biddingRemarks}
</if>
<if test="cargoInsuranceAmount != null ">
and CARGO_INSURANCE_AMOUNT = #{cargoInsuranceAmount}
</if>
<if test="destination != null and destination != ''">
and DESTINATION = #{destination}
</if>
<if test="freightCharges != null ">
and FREIGHT_CHARGES = #{freightCharges}
</if>
<if test="payer != null and payer != ''">
and PAYER = #{payer}
</if>
<if test="salesmanId != null and salesmanId != ''">
and SALESMAN_ID = #{salesmanId}
</if>
<if test="isDeclare != null ">
and IS_DECLARE = #{isDeclare}
</if>
<if test="route != null and route != ''">
and ROUTE = #{route}
</if>
<if test="containerType != null and containerType != ''">
and CONTAINER_TYPE = #{containerType}
</if>
<if test="containerTypeName != null and containerTypeName != ''">
and CONTAINER_TYPE_NAME like concat('%', #{containerTypeName}, '%')
</if>
<if test="cardType != null and cardType != ''">
and CARD_TYPE = #{cardType}
</if>
<if test="cardTypeName != null and cardTypeName != ''">
and CARD_TYPE_NAME like concat('%', #{cardTypeName}, '%')
</if>
<if test="externalContainerNo != null and externalContainerNo != ''">
and EXTERNAL_CONTAINER_NO = #{externalContainerNo}
</if>
<if test="transitPlace != null and transitPlace != ''">
and TRANSIT_PLACE = #{transitPlace}
</if>
<if test="shipper != null and shipper != ''">
and SHIPPER = #{shipper}
</if>
<if test="customsShipper != null and customsShipper != ''">
and CUSTOMS_SHIPPER = #{customsShipper}
</if>
<if test="customsShipperTel != null and customsShipperTel != ''">
and CUSTOMS_SHIPPER_TEL = #{customsShipperTel}
</if>
<if test="unloadingCompany != null and unloadingCompany != ''">
and UNLOADING_COMPANY = #{unloadingCompany}
</if>
<if test="contractNo != null and contractNo != ''">
and CONTRACT_NO = #{contractNo}
</if>
<if test="freightFee != null ">
and FREIGHT_FEE = #{freightFee}
</if>
<if test="unloadingFee != null ">
and UNLOADING_FEE = #{unloadingFee}
</if>
<if test="customsFee != null ">
and CUSTOMS_FEE = #{customsFee}
</if>
<if test="shortageFee != null ">
and SHORTAGE_FEE = #{shortageFee}
</if>
<if test="miscellaneousFee != null ">
and MISCELLANEOUS_FEE = #{miscellaneousFee}
</if>
<if test="otherFee != null ">
and OTHER_FEE = #{otherFee}
</if>
<if test="detentionFee != null ">
and DETENTION_FEE = #{detentionFee}
</if>
<if test="taxRate != null ">
and TAX_RATE = #{taxRate}
</if>
<if test="settlementCurrency != null and settlementCurrency != ''">
and SETTLEMENT_CURRENCY = #{settlementCurrency}
</if>
<if test="volume != null ">
and VOLUME = #{volume}
</if>
<if test="detailContent != null and detailContent != ''">
and DETAIL_CONTENT = #{detailContent}
</if>
<if test="customsRoute != null and customsRoute != ''">
and CUSTOMS_ROUTE = #{customsRoute}
</if>
<if test="customsPort != null and customsPort != ''">
and CUSTOMS_PORT = #{customsPort}
</if>
<if test="customsContact != null and customsContact != ''">
and CUSTOMS_CONTACT = #{customsContact}
</if>
<if test="customsContactPhone != null and customsContactPhone != ''">
and CUSTOMS_CONTACT_PHONE = #{customsContactPhone}
</if>
<if test="customsRemark != null and customsRemark != ''">
and CUSTOMS_REMARK = #{customsRemark}
</if>
<if test="orgId != null and orgId != ''">
and ORG_ID = #{orgId}
</if>
<if test="goodsCategory != null and goodsCategory != ''">
and GOODS_CATEGORY = #{goodsCategory}
</if>
<!-- <if test="makerCodeNc != null and makerCodeNc != ''">-->
<!-- and MAKER_CODE_NC = #{makerCodeNc}-->
<!-- </if>-->
<!-- <if test="salesmanCodeNc != null and salesmanCodeNc != ''">-->
<!-- and SALESMAN_CODE_NC = #{salesmanCodeNc}-->
<!-- </if>-->
<!-- <if test="customerCodeNc != null and customerCodeNc != ''">-->
<!-- and CUSTOMER_CODE_NC = #{customerCodeNc}-->
<!-- </if>-->
<!-- <if test="salesmanName != null and salesmanName != ''">-->
<!-- and SALESMAN_NAME like concat('%', #{salesmanName}, '%')-->
<!-- </if>-->
<!-- <if test="orgName != null and orgName != ''">-->
<!-- and ORG_NAME like concat('%', #{orgName}, '%')-->
<!-- </if>-->
<if test="organizationId != null ">
and o.ORGANIZATION_ID = #{organizationId}
</if>
<!-- <if test="organizationName != null and organizationName != ''">-->
<!-- and ORGANIZATION_NAME like concat('%', #{organizationName}, '%')-->
<!-- </if>-->
<if test="pushStatus != null">
and PUSH_STATUS = #{pushStatus}
</if>
<if test="documentDate != null ">
and DOCUMENT_DATE = #{documentDate}
</if>
<if test="documentDateStart != null">
and DOCUMENT_DATE <![CDATA[>=]]> #{documentDateStart}
</if>
<if test="documentDateEnd != null">
and DOCUMENT_DATE <![CDATA[<=]]> #{documentDateEnd}
</if>
<if test="pushTimeStart != null">
and PUSH_TIME <![CDATA[>=]]> #{pushTimeStart}
</if>
<if test="pushTimeEnd != null">
and PUSH_TIME <![CDATA[<=]]> #{pushTimeEnd}
</if>
<if test="ieType != null ">
and IE_TYPE = #{ieType}
</if>
<if test="reviseApplyType != null ">
and REVISE_APPLY_TYPE = #{reviseApplyType}
</if>
</where>
</sql>
</mapper>