Merge remote-tracking branch 'origin/dev_WMS20260401' into dev_WMS20260401

This commit is contained in:
王奎兴
2026-05-27 20:30:49 +08:00
6 changed files with 515 additions and 510 deletions
@@ -73,6 +73,7 @@ public class BusinessDocumentOrderApplicationService {
private GwLogMapper gwLogMapper; private GwLogMapper gwLogMapper;
@Autowired @Autowired
private BusinessDeliveryDetailsLinkMapper businessDeliveryDetailsLinkMapper; private BusinessDeliveryDetailsLinkMapper businessDeliveryDetailsLinkMapper;
@Resource
private ExecuteOrderMapper executeOrderMapper; private ExecuteOrderMapper executeOrderMapper;
/** /**
@@ -1,5 +1,7 @@
package com.mhd.oms.domain.businessDeliveryDetailsLink.entity; package com.mhd.oms.domain.businessDeliveryDetailsLink.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mhd.common.core.web.domain.BaseEntity; import com.mhd.common.core.web.domain.BaseEntity;
@@ -20,6 +22,7 @@ import java.util.Date;
@TableName("business_delivery_details_link") @TableName("business_delivery_details_link")
public class BusinessDeliveryDetailsLink extends BaseVOEntity { public class BusinessDeliveryDetailsLink extends BaseVOEntity {
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
@TableId(type = IdType.AUTO)
private Long id; private Long id;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@@ -274,8 +274,7 @@ public class BusinessDocumentOrderImpl extends ServiceImpl<BusinessDocumentOrder
businessDeliveryDetailsLinkMapper.updateById(businessDeliveryDetailsLink); businessDeliveryDetailsLinkMapper.updateById(businessDeliveryDetailsLink);
} }
//配送进度:0/子单数量 businessDocumentOrder.setDeliveryProgress(String.valueOf(subOrderCount));
businessDocumentOrder.setDeliveryProgress("0/" + subOrderCount);
} }
}else{ }else{
businessDocumentOrder.setOrderStatus(0L); businessDocumentOrder.setOrderStatus(0L);
@@ -826,4 +826,7 @@ public class BusinessDocumentOrderPO extends BaseVOEntity{
@ApiModelProperty("配送进度") @ApiModelProperty("配送进度")
private String deliveryProgress; private String deliveryProgress;
@ApiModelProperty("子单完成数量")
private Integer tmsOrderStatusCount;
} }
@@ -342,7 +342,6 @@ public class BusinessDocumentOrderDomainService {
boolean istrue = businessDocumentOrderMapper.insert(tmsOrder) > 0; boolean istrue = businessDocumentOrderMapper.insert(tmsOrder) > 0;
// 如果有明细,为每个明细生成一个子单
if (hasDetails) { if (hasDetails) {
for (BusinessDeliveryDetailsLinkDTO businessDeliveryDetailsLinkDTO : businessDeliveryDetailsLinkDTOList) { for (BusinessDeliveryDetailsLinkDTO businessDeliveryDetailsLinkDTO : businessDeliveryDetailsLinkDTOList) {
// BusinessDocumentOrder subOrder = new BusinessDocumentOrder(); // BusinessDocumentOrder subOrder = new BusinessDocumentOrder();
@@ -374,6 +373,7 @@ public class BusinessDocumentOrderDomainService {
BusinessDeliveryDetailsLink businessDeliveryDetailsLink = new BusinessDeliveryDetailsLink(); BusinessDeliveryDetailsLink businessDeliveryDetailsLink = new BusinessDeliveryDetailsLink();
BeanUtils.copyProperties(businessDeliveryDetailsLinkDTO, businessDeliveryDetailsLink); BeanUtils.copyProperties(businessDeliveryDetailsLinkDTO, businessDeliveryDetailsLink);
businessDeliveryDetailsLink.setOrderId(tmsOrder.getId()); businessDeliveryDetailsLink.setOrderId(tmsOrder.getId());
businessDeliveryDetailsLink.setId(null);
// businessDeliveryDetailsLink.setSubOrderId(subOrder.getId()); // businessDeliveryDetailsLink.setSubOrderId(subOrder.getId());
businessDeliveryDetailsLinkMapper.insert(businessDeliveryDetailsLink); businessDeliveryDetailsLinkMapper.insert(businessDeliveryDetailsLink);
} }
@@ -186,518 +186,517 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectBusinessDocumentOrderPo"> <sql id="selectBusinessDocumentOrderPo">
select * from business_document_order 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>
<sql id="selectBusinessDocumentOrderPo1"> <sql id="selectBusinessDocumentOrderPo1">
<where> <where>
AND SPLICING_ORDER_TYPE in (0, 2, 4) bdo.SPLICING_ORDER_TYPE in (0, 2, 4)
<if test="id != null "> <if test="id != null ">
and ID = #{id} and bdo.ID = #{id}
</if> </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 != ''"> <if test="orderSource != null and orderSource != ''">
and ORDER_SOURCE = #{orderSource} and bdo.ORDER_SOURCE = #{orderSource}
</if> </if>
<if test="inOrderNumber != null and inOrderNumber != ''"> <if test="inOrderNumber != null and inOrderNumber != ''">
AND IN_ORDER_NUMBER LIKE CONCAT('%', #{inOrderNumber}, '%') AND bdo.IN_ORDER_NUMBER LIKE CONCAT('%', #{inOrderNumber}, '%')
</if> </if>
<if test="createCompanyId != null and createCompanyId != ''"> <if test="createCompanyId != null and createCompanyId != ''">
and CREATE_COMPANY_ID = #{createCompanyId} and bdo.CREATE_COMPANY_ID = #{createCompanyId}
</if> </if>
<if test="createStartTime != null"> <if test="createStartTime != null">
and CREATE_TIME &gt;= #{createStartTime} and bdo.CREATE_TIME &gt;= #{createStartTime}
</if> </if>
<if test="createEndTime != null"> <if test="createEndTime != null">
and CREATE_TIME &lt;= #{createEndTime} + 1 - 1/86400 and bdo.CREATE_TIME &lt;= #{createEndTime} + 1 - 1/86400
</if> </if>
<!-- <if test="updateTime != null ">-->
<!-- and UPDATE_TIME = #{updateTime}-->
<!-- </if>-->
<if test="goodsNumber != null and goodsNumber != ''"> <if test="goodsNumber != null and goodsNumber != ''">
AND GOODS_NUMBER LIKE CONCAT('%', #{goodsNumber}, '%') AND bdo.GOODS_NUMBER LIKE CONCAT('%', #{goodsNumber}, '%')
</if> </if>
<if test="loadingAreaId != null and loadingAreaId != ''"> <if test="loadingAreaId != null and loadingAreaId != ''">
and LOADING_AREA_ID = #{loadingAreaId} and bdo.LOADING_AREA_ID = #{loadingAreaId}
</if> </if>
<if test="loadingName != null and loadingName != ''"> <if test="loadingName != null and loadingName != ''">
and LOADING_NAME like concat('%', #{loadingName}, '%') and bdo.LOADING_NAME like concat('%', #{loadingName}, '%')
</if> </if>
<if test="loadingAddress != null and loadingAddress != ''"> <if test="loadingAddress != null and loadingAddress != ''">
and LOADING_ADDRESS = #{loadingAddress} and bdo.LOADING_ADDRESS = #{loadingAddress}
</if> </if>
<if test="loadingLongitude != null and loadingLongitude != ''"> <if test="loadingLongitude != null and loadingLongitude != ''">
and LOADING_LONGITUDE = #{loadingLongitude} and bdo.LOADING_LONGITUDE = #{loadingLongitude}
</if> </if>
<if test="loadingLatitude != null and loadingLatitude != ''"> <if test="loadingLatitude != null and loadingLatitude != ''">
and LOADING_LATITUDE = #{loadingLatitude} and bdo.LOADING_LATITUDE = #{loadingLatitude}
</if> </if>
<if test="loadingUnit != null and loadingUnit != ''"> <if test="loadingUnit != null and loadingUnit != ''">
and LOADING_UNIT = #{loadingUnit} and bdo.LOADING_UNIT = #{loadingUnit}
</if> </if>
<if test="freighterName != null and freighterName != ''"> <if test="freighterName != null and freighterName != ''">
and FREIGHTER_NAME like concat('%', #{freighterName}, '%') and bdo.FREIGHTER_NAME like concat('%', #{freighterName}, '%')
</if> </if>
<if test="loadingPhone != null and loadingPhone != ''"> <if test="loadingPhone != null and loadingPhone != ''">
and LOADING_PHONE = #{loadingPhone} and bdo.LOADING_PHONE = #{loadingPhone}
</if> </if>
<if test="loadingDate != null "> <if test="loadingDate != null ">
and LOADING_DATE = #{loadingDate} and bdo.LOADING_DATE = #{loadingDate}
</if> </if>
<if test="unloadAreaId != null and unloadAreaId != ''"> <if test="unloadAreaId != null and unloadAreaId != ''">
and UNLOAD_AREA_ID = #{unloadAreaId} and bdo.UNLOAD_AREA_ID = #{unloadAreaId}
</if> </if>
<if test="unloadName != null and unloadName != ''"> <if test="unloadName != null and unloadName != ''">
and UNLOAD_NAME like concat('%', #{unloadName}, '%') and bdo.UNLOAD_NAME like concat('%', #{unloadName}, '%')
</if> </if>
<if test="unloadAddress != null and unloadAddress != ''"> <if test="unloadAddress != null and unloadAddress != ''">
and UNLOAD_ADDRESS = #{unloadAddress} and bdo.UNLOAD_ADDRESS = #{unloadAddress}
</if> </if>
<if test="unloadLongitude != null and unloadLongitude != ''"> <if test="unloadLongitude != null and unloadLongitude != ''">
and UNLOAD_LONGITUDE = #{unloadLongitude} and bdo.UNLOAD_LONGITUDE = #{unloadLongitude}
</if> </if>
<if test="unloadLatitude != null and unloadLatitude != ''"> <if test="unloadLatitude != null and unloadLatitude != ''">
and UNLOAD_LATITUDE = #{unloadLatitude} and bdo.UNLOAD_LATITUDE = #{unloadLatitude}
</if> </if>
<if test="dischargerName != null and dischargerName != ''"> <if test="dischargerName != null and dischargerName != ''">
and DISCHARGER_NAME like concat('%', #{dischargerName}, '%') and bdo.DISCHARGER_NAME like concat('%', #{dischargerName}, '%')
</if> </if>
<if test="unloadPhone != null and unloadPhone != ''"> <if test="unloadPhone != null and unloadPhone != ''">
and UNLOAD_PHONE = #{unloadPhone} and bdo.UNLOAD_PHONE = #{unloadPhone}
</if> </if>
<if test="unloadingData != null "> <if test="unloadingData != null ">
and UNLOADING_DATA = #{unloadingData} and bdo.UNLOADING_DATA = #{unloadingData}
</if> </if>
<if test="goodsTypeId != null and goodsTypeId != ''"> <if test="goodsTypeId != null and goodsTypeId != ''">
and GOODS_TYPE_ID = #{goodsTypeId} and bdo.GOODS_TYPE_ID = #{goodsTypeId}
</if> </if>
<if test="goodsType != null and goodsType != ''"> <if test="goodsType != null and goodsType != ''">
and GOODS_TYPE = #{goodsType} and bdo.GOODS_TYPE = #{goodsType}
</if> </if>
<if test="goodsNameId != null and goodsNameId != ''"> <if test="goodsNameId != null and goodsNameId != ''">
and GOODS_NAME_ID = #{goodsNameId} and bdo.GOODS_NAME_ID = #{goodsNameId}
</if> </if>
<if test="goodsName != null and goodsName != ''"> <if test="goodsName != null and goodsName != ''">
and GOODS_NAME like concat('%', #{goodsName}, '%') and bdo.GOODS_NAME like concat('%', #{goodsName}, '%')
</if> </if>
<if test="weightMin != null "> <if test="weightMin != null ">
and WEIGHT_MIN = #{weightMin} and bdo.WEIGHT_MIN = #{weightMin}
</if> </if>
<if test="weightMax != null "> <if test="weightMax != null ">
and WEIGHT_MAX = #{weightMax} and bdo.WEIGHT_MAX = #{weightMax}
</if> </if>
<if test="goodsUntisId != null and goodsUntisId != ''"> <if test="goodsUntisId != null and goodsUntisId != ''">
and GOODS_UNTIS_ID = #{goodsUntisId} and bdo.GOODS_UNTIS_ID = #{goodsUntisId}
</if> </if>
<if test="goodsUntis != null and goodsUntis != ''"> <if test="goodsUntis != null and goodsUntis != ''">
and GOODS_UNTIS = #{goodsUntis} and bdo.GOODS_UNTIS = #{goodsUntis}
</if> </if>
<if test="transportationModeId != null "> <if test="transportationModeId != null ">
and TRANSPORTATION_MODE_ID = #{transportationModeId} and bdo.TRANSPORTATION_MODE_ID = #{transportationModeId}
</if> </if>
<if test="transportationName != null and transportationName != ''"> <if test="transportationName != null and transportationName != ''">
and TRANSPORTATION_NAME like concat('%', #{transportationName}, '%') and bdo.TRANSPORTATION_NAME like concat('%', #{transportationName}, '%')
</if> </if>
<if test="carType != null and carType != ''"> <if test="carType != null and carType != ''">
and CAR_TYPE = #{carType} and bdo.CAR_TYPE = #{carType}
</if> </if>
<if test="carTypeName != null and carTypeName != ''"> <if test="carTypeName != null and carTypeName != ''">
and CAR_TYPE_NAME like concat('%', #{carTypeName}, '%') and bdo.CAR_TYPE_NAME like concat('%', #{carTypeName}, '%')
</if> </if>
<if test="serviceRequireId != null and serviceRequireId != ''"> <if test="serviceRequireId != null and serviceRequireId != ''">
and SERVICE_REQUIRE_ID = #{serviceRequireId} and bdo.SERVICE_REQUIRE_ID = #{serviceRequireId}
</if> </if>
<if test="serviceRequire != null and serviceRequire != ''"> <if test="serviceRequire != null and serviceRequire != ''">
and SERVICE_REQUIRE = #{serviceRequire} and bdo.SERVICE_REQUIRE = #{serviceRequire}
</if> </if>
<if test="remarks != null and remarks != ''"> <if test="remarks != null and remarks != ''">
and REMARKS = #{remarks} and bdo.REMARKS = #{remarks}
</if> </if>
<if test="waybillFrom != null "> <if test="waybillFrom != null ">
and WAYBILL_FROM = #{waybillFrom} and bdo.WAYBILL_FROM = #{waybillFrom}
</if> </if>
<if test="isSource != null "> <if test="isSource != null ">
and IS_SOURCE = #{isSource} and bdo.IS_SOURCE = #{isSource}
</if> </if>
<if test="sourceCloseTime != null "> <if test="sourceCloseTime != null ">
and SOURCE_CLOSE_TIME = #{sourceCloseTime} and bdo.SOURCE_CLOSE_TIME = #{sourceCloseTime}
</if> </if>
<if test="executorId != null and executorId != ''"> <if test="executorId != null and executorId != ''">
and EXECUTOR_ID = #{executorId} and bdo.EXECUTOR_ID = #{executorId}
</if> </if>
<if test="isDelete != null "> <if test="isDelete != null ">
and IS_DELETE = #{isDelete} and bdo.IS_DELETE = #{isDelete}
</if> </if>
<if test="lineTitleLeft != null and lineTitleLeft != ''"> <if test="lineTitleLeft != null and lineTitleLeft != ''">
and LINE_TITLE_LEFT = #{lineTitleLeft} and bdo.LINE_TITLE_LEFT = #{lineTitleLeft}
</if> </if>
<if test="lineTitleRight != null and lineTitleRight != ''"> <if test="lineTitleRight != null and lineTitleRight != ''">
and LINE_TITLE_RIGHT = #{lineTitleRight} and bdo.LINE_TITLE_RIGHT = #{lineTitleRight}
</if> </if>
<if test="sysOrgCode != null and sysOrgCode != ''"> <if test="sysOrgCode != null and sysOrgCode != ''">
and SYS_ORG_CODE = #{sysOrgCode} and bdo.SYS_ORG_CODE = #{sysOrgCode}
</if> </if>
<if test="isCommon != null "> <if test="isCommon != null ">
and IS_COMMON = #{isCommon} and bdo.IS_COMMON = #{isCommon}
</if> </if>
<if test="goodsTypeMajor != null and goodsTypeMajor != ''"> <if test="goodsTypeMajor != null and goodsTypeMajor != ''">
and GOODS_TYPE_MAJOR = #{goodsTypeMajor} and bdo.GOODS_TYPE_MAJOR = #{goodsTypeMajor}
</if> </if>
<if test="auditStatus != null "> <if test="auditStatus != null ">
and AUDIT_STATUS = #{auditStatus} and bdo.AUDIT_STATUS = #{auditStatus}
</if> </if>
<if test="waybillMode != null "> <if test="waybillMode != null ">
and WAYBILL_MODE = #{waybillMode} and bdo.WAYBILL_MODE = #{waybillMode}
</if> </if>
<if test="latestBiddingTime != null "> <if test="latestBiddingTime != null ">
and LATEST_BIDDING_TIME = #{latestBiddingTime} and bdo.LATEST_BIDDING_TIME = #{latestBiddingTime}
</if> </if>
<if test="deliveryFreight != null "> <if test="deliveryFreight != null ">
and DELIVERY_FREIGHT = #{deliveryFreight} and bdo.DELIVERY_FREIGHT = #{deliveryFreight}
</if> </if>
<if test="collectedFreight != null "> <if test="collectedFreight != null ">
and COLLECTED_FREIGHT = #{collectedFreight} and bdo.COLLECTED_FREIGHT = #{collectedFreight}
</if> </if>
<if test="uncollectedFreight != null "> <if test="uncollectedFreight != null ">
and UNCOLLECTED_FREIGHT = #{uncollectedFreight} and bdo.UNCOLLECTED_FREIGHT = #{uncollectedFreight}
</if> </if>
<if test="collectLessFreight != null "> <if test="collectLessFreight != null ">
and COLLECT_LESS_FREIGHT = #{collectLessFreight} and bdo.COLLECT_LESS_FREIGHT = #{collectLessFreight}
</if> </if>
<if test="auditBy != null and auditBy != ''"> <if test="auditBy != null and auditBy != ''">
and AUDIT_BY = #{auditBy} and bdo.AUDIT_BY = #{auditBy}
</if> </if>
<if test="auditTime != null "> <if test="auditTime != null ">
and AUDIT_TIME = #{auditTime} and bdo.AUDIT_TIME = #{auditTime}
</if> </if>
<if test="businessType != null and businessType != ''"> <if test="businessType != null and businessType != ''">
and BUSINESS_TYPE = #{businessType} and bdo.BUSINESS_TYPE = #{businessType}
</if> </if>
<if test="transportationUnitPrice != null "> <if test="transportationUnitPrice != null ">
and TRANSPORTATION_UNIT_PRICE = #{transportationUnitPrice} and bdo.TRANSPORTATION_UNIT_PRICE = #{transportationUnitPrice}
</if> </if>
<if test="radioValue != null "> <if test="radioValue != null ">
and RADIO_VALUE = #{radioValue} and bdo.RADIO_VALUE = #{radioValue}
</if> </if>
<if test="createrName != null and createrName != ''"> <if test="createrName != null and createrName != ''">
and CREATER_NAME like concat('%', #{createrName}, '%') and bdo.CREATER_NAME like concat('%', #{createrName}, '%')
</if> </if>
<if test="createrPhone != null and createrPhone != ''"> <if test="createrPhone != null and createrPhone != ''">
and CREATER_PHONE = #{createrPhone} and bdo.CREATER_PHONE = #{createrPhone}
</if> </if>
<if test="isElectricFence != null "> <if test="isElectricFence != null ">
and IS_ELECTRIC_FENCE = #{isElectricFence} and bdo.IS_ELECTRIC_FENCE = #{isElectricFence}
</if> </if>
<if test="wxaQrcode != null and wxaQrcode != ''"> <if test="wxaQrcode != null and wxaQrcode != ''">
and WXA_QRCODE = #{wxaQrcode} and bdo.WXA_QRCODE = #{wxaQrcode}
</if> </if>
<if test="appointShipperId != null and appointShipperId != ''"> <if test="appointShipperId != null and appointShipperId != ''">
and APPOINT_SHIPPER_ID = #{appointShipperId} and bdo.APPOINT_SHIPPER_ID = #{appointShipperId}
</if> </if>
<if test="createUserId != null and createUserId != ''"> <if test="createUserId != null and createUserId != ''">
and CREATE_USER_ID = #{createUserId} and bdo.CREATE_USER_ID = #{createUserId}
</if> </if>
<if test="appointShipper != null and appointShipper != ''"> <if test="appointShipper != null and appointShipper != ''">
AND APPOINT_SHIPPER LIKE CONCAT('%', #{appointShipper}, '%') AND bdo.APPOINT_SHIPPER LIKE CONCAT('%', #{appointShipper}, '%')
</if> </if>
<if test="isStatus != null "> <if test="isStatus != null ">
and IS_STATUS = #{isStatus} and bdo.IS_STATUS = #{isStatus}
</if> </if>
<if test="signatureAddress != null and signatureAddress != ''"> <if test="signatureAddress != null and signatureAddress != ''">
and SIGNATURE_ADDRESS = #{signatureAddress} and bdo.SIGNATURE_ADDRESS = #{signatureAddress}
</if> </if>
<if test="qrCodeImgUrl != null and qrCodeImgUrl != ''"> <if test="qrCodeImgUrl != null and qrCodeImgUrl != ''">
and QR_CODE_IMG_URL = #{qrCodeImgUrl} and bdo.QR_CODE_IMG_URL = #{qrCodeImgUrl}
</if> </if>
<if test="shippingNote != null and shippingNote != ''"> <if test="shippingNote != null and shippingNote != ''">
and SHIPPING_NOTE = #{shippingNote} and bdo.SHIPPING_NOTE = #{shippingNote}
</if> </if>
<if test="receivableType != null "> <if test="receivableType != null ">
and RECEIVABLE_TYPE = #{receivableType} and bdo.RECEIVABLE_TYPE = #{receivableType}
</if> </if>
<if test="thirdPartyOrderNumber != null and thirdPartyOrderNumber != ''"> <if test="thirdPartyOrderNumber != null and thirdPartyOrderNumber != ''">
and THIRD_PARTY_ORDER_NUMBER = #{thirdPartyOrderNumber} and bdo.THIRD_PARTY_ORDER_NUMBER = #{thirdPartyOrderNumber}
</if> </if>
<if test="dispatchOrderNumber != null and dispatchOrderNumber != ''"> <if test="dispatchOrderNumber != null and dispatchOrderNumber != ''">
and DISPATCH_ORDER_NUMBER = #{dispatchOrderNumber} and bdo.DISPATCH_ORDER_NUMBER = #{dispatchOrderNumber}
</if> </if>
<if test="appointDriverEnterpriseId != null and appointDriverEnterpriseId != ''"> <if test="appointDriverEnterpriseId != null and appointDriverEnterpriseId != ''">
and APPOINT_DRIVER_ENTERPRISE_ID = #{appointDriverEnterpriseId} and bdo.APPOINT_DRIVER_ENTERPRISE_ID = #{appointDriverEnterpriseId}
</if> </if>
<if test="appointDriverEnterprise != null and appointDriverEnterprise != ''"> <if test="appointDriverEnterprise != null and appointDriverEnterprise != ''">
and APPOINT_DRIVER_ENTERPRISE = #{appointDriverEnterprise} and bdo.APPOINT_DRIVER_ENTERPRISE = #{appointDriverEnterprise}
</if> </if>
<if test="cancelOrderRemark != null and cancelOrderRemark != ''"> <if test="cancelOrderRemark != null and cancelOrderRemark != ''">
and CANCEL_ORDER_REMARK = #{cancelOrderRemark} and bdo.CANCEL_ORDER_REMARK = #{cancelOrderRemark}
</if> </if>
<if test="orderDriverId != null and orderDriverId != ''"> <if test="orderDriverId != null and orderDriverId != ''">
and ORDER_DRIVER_ID = #{orderDriverId} and bdo.ORDER_DRIVER_ID = #{orderDriverId}
</if> </if>
<if test="goodsQuantity != null "> <if test="goodsQuantity != null ">
and GOODS_QUANTITY = #{goodsQuantity} and bdo.GOODS_QUANTITY = #{goodsQuantity}
</if> </if>
<if test="goodsQuantityUnitId != null and goodsQuantityUnitId != ''"> <if test="goodsQuantityUnitId != null and goodsQuantityUnitId != ''">
and GOODS_QUANTITY_UNIT_ID = #{goodsQuantityUnitId} and bdo.GOODS_QUANTITY_UNIT_ID = #{goodsQuantityUnitId}
</if> </if>
<if test="goodsQuantityUnit != null and goodsQuantityUnit != ''"> <if test="goodsQuantityUnit != null and goodsQuantityUnit != ''">
and GOODS_QUANTITY_UNIT = #{goodsQuantityUnit} and bdo.GOODS_QUANTITY_UNIT = #{goodsQuantityUnit}
</if> </if>
<if test="biddingUnit != null and biddingUnit != ''"> <if test="biddingUnit != null and biddingUnit != ''">
and BIDDING_UNIT = #{biddingUnit} and bdo.BIDDING_UNIT = #{biddingUnit}
</if> </if>
<if test="orderStatus != null "> <if test="orderStatus != null ">
and ORDER_STATUS = #{orderStatus} and bdo.ORDER_STATUS = #{orderStatus}
</if> </if>
<if test="splicingOrderType != null "> <if test="splicingOrderType != null ">
and SPLICING_ORDER_TYPE = #{splicingOrderType} and bdo.SPLICING_ORDER_TYPE = #{splicingOrderType}
</if> </if>
<if test="splicingStatus != null "> <if test="splicingStatus != null ">
and SPLICING_STATUS = #{splicingStatus} and bdo.SPLICING_STATUS = #{splicingStatus}
</if> </if>
<if test="mainOrderId != null and mainOrderId != ''"> <if test="mainOrderId != null and mainOrderId != ''">
and MAIN_ORDER_ID = #{mainOrderId} and bdo.MAIN_ORDER_ID = #{mainOrderId}
</if> </if>
<if test="mainOrderNum != null and mainOrderNum != ''"> <if test="mainOrderNum != null and mainOrderNum != ''">
and MAIN_ORDER_NUM = #{mainOrderNum} and bdo.MAIN_ORDER_NUM = #{mainOrderNum}
</if> </if>
<if test="mergeOrderId != null and mergeOrderId != ''"> <if test="mergeOrderId != null and mergeOrderId != ''">
and MERGE_ORDER_ID = #{mergeOrderId} and bdo.MERGE_ORDER_ID = #{mergeOrderId}
</if> </if>
<if test="mergeOrderNum != null and mergeOrderNum != ''"> <if test="mergeOrderNum != null and mergeOrderNum != ''">
and MERGE_ORDER_NUM = #{mergeOrderNum} and bdo.MERGE_ORDER_NUM = #{mergeOrderNum}
</if> </if>
<if test="payerType != null "> <if test="payerType != null ">
and PAYER_TYPE = #{payerType} and bdo.PAYER_TYPE = #{payerType}
</if> </if>
<if test="machineNumber != null and machineNumber != ''"> <if test="machineNumber != null and machineNumber != ''">
and MACHINE_NUMBER = #{machineNumber} and bdo.MACHINE_NUMBER = #{machineNumber}
</if> </if>
<if test="stockFlag != null "> <if test="stockFlag != null ">
and STOCK_FLAG = #{stockFlag} and bdo.STOCK_FLAG = #{stockFlag}
</if> </if>
<if test="infoFee != null "> <if test="infoFee != null ">
and INFO_FEE = #{infoFee} and bdo.INFO_FEE = #{infoFee}
</if> </if>
<if test="infoFeePayeeType != null "> <if test="infoFeePayeeType != null ">
and INFO_FEE_PAYEE_TYPE = #{infoFeePayeeType} and bdo.INFO_FEE_PAYEE_TYPE = #{infoFeePayeeType}
</if> </if>
<if test="infoFeePayee != null and infoFeePayee != ''"> <if test="infoFeePayee != null and infoFeePayee != ''">
and INFO_FEE_PAYEE = #{infoFeePayee} and bdo.INFO_FEE_PAYEE = #{infoFeePayee}
</if> </if>
<if test="infoFeeStatus != null "> <if test="infoFeeStatus != null ">
and INFO_FEE_STATUS = #{infoFeeStatus} and bdo.INFO_FEE_STATUS = #{infoFeeStatus}
</if> </if>
<if test="infoFeeDocumentNumber != null and infoFeeDocumentNumber != ''"> <if test="infoFeeDocumentNumber != null and infoFeeDocumentNumber != ''">
and INFO_FEE_DOCUMENT_NUMBER = #{infoFeeDocumentNumber} and bdo.INFO_FEE_DOCUMENT_NUMBER = #{infoFeeDocumentNumber}
</if> </if>
<if test="orderShippingType != null "> <if test="orderShippingType != null ">
and ORDER_SHIPPING_TYPE = #{orderShippingType} and bdo.ORDER_SHIPPING_TYPE = #{orderShippingType}
</if> </if>
<if test="recipientId != null and recipientId != ''"> <if test="recipientId != null and recipientId != ''">
and RECIPIENT_ID = #{recipientId} and bdo.RECIPIENT_ID = #{recipientId}
</if> </if>
<if test="recipientName != null and recipientName != ''"> <if test="recipientName != null and recipientName != ''">
and RECIPIENT_NAME like concat('%', #{recipientName}, '%') and bdo.RECIPIENT_NAME like concat('%', #{recipientName}, '%')
</if> </if>
<if test="settlementStatus != null "> <if test="settlementStatus != null ">
and SETTLEMENT_STATUS = #{settlementStatus} and bdo.SETTLEMENT_STATUS = #{settlementStatus}
</if> </if>
<if test="settlementTime != null "> <if test="settlementTime != null ">
and SETTLEMENT_TIME = #{settlementTime} and bdo.SETTLEMENT_TIME = #{settlementTime}
</if> </if>
<if test="paymentTime != null "> <if test="paymentTime != null ">
and PAYMENT_TIME = #{paymentTime} and bdo.PAYMENT_TIME = #{paymentTime}
</if> </if>
<if test="reconciliationInnerNumber != null and reconciliationInnerNumber != ''"> <if test="reconciliationInnerNumber != null and reconciliationInnerNumber != ''">
and RECONCILIATION_INNER_NUMBER = #{reconciliationInnerNumber} and bdo.RECONCILIATION_INNER_NUMBER = #{reconciliationInnerNumber}
</if> </if>
<if test="receivePaymentNumber != null and receivePaymentNumber != ''"> <if test="receivePaymentNumber != null and receivePaymentNumber != ''">
and RECEIVE_PAYMENT_NUMBER = #{receivePaymentNumber} and bdo.RECEIVE_PAYMENT_NUMBER = #{receivePaymentNumber}
</if> </if>
<if test="invoiceId != null and invoiceId != ''"> <if test="invoiceId != null and invoiceId != ''">
and INVOICE_ID = #{invoiceId} and bdo.INVOICE_ID = #{invoiceId}
</if> </if>
<if test="isInvoice != null "> <if test="isInvoice != null ">
and IS_INVOICE = #{isInvoice} and bdo.IS_INVOICE = #{isInvoice}
</if> </if>
<if test="vehicleTypeId != null and vehicleTypeId != ''"> <if test="vehicleTypeId != null and vehicleTypeId != ''">
and VEHICLE_TYPE_ID = #{vehicleTypeId} and bdo.VEHICLE_TYPE_ID = #{vehicleTypeId}
</if> </if>
<if test="vehicleTypeName != null and vehicleTypeName != ''"> <if test="vehicleTypeName != null and vehicleTypeName != ''">
and VEHICLE_TYPE_NAME like concat('%', #{vehicleTypeName}, '%') and bdo.VEHICLE_TYPE_NAME like concat('%', #{vehicleTypeName}, '%')
</if> </if>
<if test="carrier != null and carrier != ''"> <if test="carrier != null and carrier != ''">
and CARRIER = #{carrier} and bdo.CARRIER = #{carrier}
</if> </if>
<if test="carrierName != null and carrierName != ''"> <if test="carrierName != null and carrierName != ''">
and CARRIER_NAME like concat('%', #{carrierName}, '%') and bdo.CARRIER_NAME like concat('%', #{carrierName}, '%')
</if> </if>
<if test="szwlUserId != null "> <if test="szwlUserId != null ">
and SZWL_USER_ID = #{szwlUserId} and bdo.SZWL_USER_ID = #{szwlUserId}
</if> </if>
<if test="freightUnitPrice != null "> <if test="freightUnitPrice != null ">
and FREIGHT_UNIT_PRICE = #{freightUnitPrice} and bdo.FREIGHT_UNIT_PRICE = #{freightUnitPrice}
</if> </if>
<if test="biddingStatus != null "> <if test="biddingStatus != null ">
and BIDDING_STATUS = #{biddingStatus} and bdo.BIDDING_STATUS = #{biddingStatus}
</if> </if>
<if test="biddingRemarks != null and biddingRemarks != ''"> <if test="biddingRemarks != null and biddingRemarks != ''">
and BIDDING_REMARKS = #{biddingRemarks} and bdo.BIDDING_REMARKS = #{biddingRemarks}
</if> </if>
<if test="cargoInsuranceAmount != null "> <if test="cargoInsuranceAmount != null ">
and CARGO_INSURANCE_AMOUNT = #{cargoInsuranceAmount} and bdo.CARGO_INSURANCE_AMOUNT = #{cargoInsuranceAmount}
</if> </if>
<if test="destination != null and destination != ''"> <if test="destination != null and destination != ''">
and DESTINATION = #{destination} and bdo.DESTINATION = #{destination}
</if> </if>
<if test="freightCharges != null "> <if test="freightCharges != null ">
and FREIGHT_CHARGES = #{freightCharges} and bdo.FREIGHT_CHARGES = #{freightCharges}
</if> </if>
<if test="payer != null and payer != ''"> <if test="payer != null and payer != ''">
and PAYER = #{payer} and bdo.PAYER = #{payer}
</if> </if>
<if test="salesmanId != null and salesmanId != ''"> <if test="salesmanId != null and salesmanId != ''">
and SALESMAN_ID = #{salesmanId} and bdo.SALESMAN_ID = #{salesmanId}
</if> </if>
<if test="isDeclare != null "> <if test="isDeclare != null ">
and IS_DECLARE = #{isDeclare} and bdo.IS_DECLARE = #{isDeclare}
</if> </if>
<if test="route != null and route != ''"> <if test="route != null and route != ''">
and ROUTE = #{route} and bdo.ROUTE = #{route}
</if> </if>
<if test="containerType != null and containerType != ''"> <if test="containerType != null and containerType != ''">
and CONTAINER_TYPE = #{containerType} and bdo.CONTAINER_TYPE = #{containerType}
</if> </if>
<if test="containerTypeName != null and containerTypeName != ''"> <if test="containerTypeName != null and containerTypeName != ''">
and CONTAINER_TYPE_NAME like concat('%', #{containerTypeName}, '%') and bdo.CONTAINER_TYPE_NAME like concat('%', #{containerTypeName}, '%')
</if> </if>
<if test="cardType != null and cardType != ''"> <if test="cardType != null and cardType != ''">
and CARD_TYPE = #{cardType} and bdo.CARD_TYPE = #{cardType}
</if> </if>
<if test="cardTypeName != null and cardTypeName != ''"> <if test="cardTypeName != null and cardTypeName != ''">
and CARD_TYPE_NAME like concat('%', #{cardTypeName}, '%') and bdo.CARD_TYPE_NAME like concat('%', #{cardTypeName}, '%')
</if> </if>
<if test="externalContainerNo != null and externalContainerNo != ''"> <if test="externalContainerNo != null and externalContainerNo != ''">
and EXTERNAL_CONTAINER_NO = #{externalContainerNo} and bdo.EXTERNAL_CONTAINER_NO = #{externalContainerNo}
</if> </if>
<if test="transitPlace != null and transitPlace != ''"> <if test="transitPlace != null and transitPlace != ''">
and TRANSIT_PLACE = #{transitPlace} and bdo.TRANSIT_PLACE = #{transitPlace}
</if> </if>
<if test="shipper != null and shipper != ''"> <if test="shipper != null and shipper != ''">
and SHIPPER = #{shipper} and bdo.SHIPPER = #{shipper}
</if> </if>
<if test="customsShipper != null and customsShipper != ''"> <if test="customsShipper != null and customsShipper != ''">
and CUSTOMS_SHIPPER = #{customsShipper} and bdo.CUSTOMS_SHIPPER = #{customsShipper}
</if> </if>
<if test="customsShipperTel != null and customsShipperTel != ''"> <if test="customsShipperTel != null and customsShipperTel != ''">
and CUSTOMS_SHIPPER_TEL = #{customsShipperTel} and bdo.CUSTOMS_SHIPPER_TEL = #{customsShipperTel}
</if> </if>
<if test="unloadingCompany != null and unloadingCompany != ''"> <if test="unloadingCompany != null and unloadingCompany != ''">
and UNLOADING_COMPANY = #{unloadingCompany} and bdo.UNLOADING_COMPANY = #{unloadingCompany}
</if> </if>
<if test="contractNo != null and contractNo != ''"> <if test="contractNo != null and contractNo != ''">
and CONTRACT_NO = #{contractNo} and bdo.CONTRACT_NO = #{contractNo}
</if> </if>
<if test="freightFee != null "> <if test="freightFee != null ">
and FREIGHT_FEE = #{freightFee} and bdo.FREIGHT_FEE = #{freightFee}
</if> </if>
<if test="unloadingFee != null "> <if test="unloadingFee != null ">
and UNLOADING_FEE = #{unloadingFee} and bdo.UNLOADING_FEE = #{unloadingFee}
</if> </if>
<if test="customsFee != null "> <if test="customsFee != null ">
and CUSTOMS_FEE = #{customsFee} and bdo.CUSTOMS_FEE = #{customsFee}
</if> </if>
<if test="shortageFee != null "> <if test="shortageFee != null ">
and SHORTAGE_FEE = #{shortageFee} and bdo.SHORTAGE_FEE = #{shortageFee}
</if> </if>
<if test="miscellaneousFee != null "> <if test="miscellaneousFee != null ">
and MISCELLANEOUS_FEE = #{miscellaneousFee} and bdo.MISCELLANEOUS_FEE = #{miscellaneousFee}
</if> </if>
<if test="otherFee != null "> <if test="otherFee != null ">
and OTHER_FEE = #{otherFee} and bdo.OTHER_FEE = #{otherFee}
</if> </if>
<if test="detentionFee != null "> <if test="detentionFee != null ">
and DETENTION_FEE = #{detentionFee} and bdo.DETENTION_FEE = #{detentionFee}
</if> </if>
<if test="taxRate != null "> <if test="taxRate != null ">
and TAX_RATE = #{taxRate} and bdo.TAX_RATE = #{taxRate}
</if> </if>
<if test="settlementCurrency != null and settlementCurrency != ''"> <if test="settlementCurrency != null and settlementCurrency != ''">
and SETTLEMENT_CURRENCY = #{settlementCurrency} and bdo.SETTLEMENT_CURRENCY = #{settlementCurrency}
</if> </if>
<if test="volume != null "> <if test="volume != null ">
and VOLUME = #{volume} and bdo.VOLUME = #{volume}
</if> </if>
<if test="detailContent != null and detailContent != ''"> <if test="detailContent != null and detailContent != ''">
and DETAIL_CONTENT = #{detailContent} and bdo.DETAIL_CONTENT = #{detailContent}
</if> </if>
<if test="customsRoute != null and customsRoute != ''"> <if test="customsRoute != null and customsRoute != ''">
and CUSTOMS_ROUTE = #{customsRoute} and bdo.CUSTOMS_ROUTE = #{customsRoute}
</if> </if>
<if test="customsPort != null and customsPort != ''"> <if test="customsPort != null and customsPort != ''">
and CUSTOMS_PORT = #{customsPort} and bdo.CUSTOMS_PORT = #{customsPort}
</if> </if>
<if test="customsContact != null and customsContact != ''"> <if test="customsContact != null and customsContact != ''">
and CUSTOMS_CONTACT = #{customsContact} and bdo.CUSTOMS_CONTACT = #{customsContact}
</if> </if>
<if test="customsContactPhone != null and customsContactPhone != ''"> <if test="customsContactPhone != null and customsContactPhone != ''">
and CUSTOMS_CONTACT_PHONE = #{customsContactPhone} and bdo.CUSTOMS_CONTACT_PHONE = #{customsContactPhone}
</if> </if>
<if test="customsRemark != null and customsRemark != ''"> <if test="customsRemark != null and customsRemark != ''">
and CUSTOMS_REMARK = #{customsRemark} and bdo.CUSTOMS_REMARK = #{customsRemark}
</if> </if>
<if test="orgId != null and orgId != ''"> <if test="orgId != null and orgId != ''">
and ORG_ID = #{orgId} and bdo.ORG_ID = #{orgId}
</if> </if>
<if test="goodsCategory != null and goodsCategory != ''"> <if test="goodsCategory != null and goodsCategory != ''">
and GOODS_CATEGORY = #{goodsCategory} and bdo.GOODS_CATEGORY = #{goodsCategory}
</if> </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 "> <if test="organizationId != null ">
and ORGANIZATION_ID = #{organizationId} and bdo.ORGANIZATION_ID = #{organizationId}
</if> </if>
<!-- <if test="organizationName != null and organizationName != ''">-->
<!-- and ORGANIZATION_NAME like concat('%', #{organizationName}, '%')-->
<!-- </if>-->
<if test="documentDate != null "> <if test="documentDate != null ">
and DOCUMENT_DATE = #{documentDate} and bdo.DOCUMENT_DATE = #{documentDate}
</if> </if>
<if test="documentDateStart != null"> <if test="documentDateStart != null">
and DOCUMENT_DATE <![CDATA[>=]]> #{documentDateStart} and bdo.DOCUMENT_DATE <![CDATA[>=]]> #{documentDateStart}
</if> </if>
<if test="documentDateEnd != null"> <if test="documentDateEnd != null">
and DOCUMENT_DATE <![CDATA[<=]]> #{documentDateEnd} and bdo.DOCUMENT_DATE <![CDATA[<=]]> #{documentDateEnd}
</if> </if>
<if test="pushTimeStart != null"> <if test="pushTimeStart != null">
and PUSH_TIME <![CDATA[>=]]> #{pushTimeStart} and bdo.PUSH_TIME <![CDATA[>=]]> #{pushTimeStart}
</if> </if>
<if test="pushTimeEnd != null"> <if test="pushTimeEnd != null">
and PUSH_TIME <![CDATA[<=]]> #{pushTimeEnd} and bdo.PUSH_TIME <![CDATA[<=]]> #{pushTimeEnd}
</if> </if>
<if test="ieType != null "> <if test="ieType != null ">
and IE_TYPE = #{ieType} and bdo.IE_TYPE = #{ieType}
</if> </if>
</where> </where>
</sql> </sql>