Commit 16ad5b47 authored by 332784038@qq.com's avatar 332784038@qq.com

查询sql条件补充完善

parent 7df3a57a
......@@ -126,6 +126,201 @@
<if test="query.status != null">
AND o.`status` = #{query.status}
</if>
<if test="query.pickState != null">
AND o.`pick_state` = #{query.pickState}
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>0">
<if test="query.pickStateList != null and query.pickStateList.size()==1 ">
AND o.`pick_state` =
<foreach item='pickState' index="index" collection='query.pickStateList' >
#{pickState}
</foreach>
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>1 ">
AND o.`pick_state` in
<foreach item='pickState' index="index" collection='query.pickStateList' open='(' separator=',' close=')'>
#{pickState}
</foreach>
</if>
</if>
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList.size()==1 ">
AND o.`status` =
<foreach item='status' index="index" collection='query.statusList' >
#{status}
</foreach>
</if>
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
</foreach>
</if>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>0">
<if test="query.abnormalStateList != null and query.abnormalStateList.size()==1 ">
<foreach item='abnormalState' index="index" collection='query.abnormalStateList' >
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
AND o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>1 ">
AND (1!=1
<foreach item='abnormalState' index="index" collection='query.abnormalStateList'>
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
OR o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.abnormalState != null">
<choose>
<when test="query.abnormalState != 0">
<choose>
<when test="query.abnormalState != -1">
AND o.`abnormal_state` = #{query.abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
AND o.`in_warehouse_state` =
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' >
#{inWarehouseState}
</foreach>
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>1 ">
AND o.`in_warehouse_state` in
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' open='(' separator=',' close=')'>
#{inWarehouseState}
</foreach>
</if>
</if>
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
<if test="query.shipmentStateList != null and query.shipmentStateList.size()==1 ">
AND o.`shipment_State` =
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' >
#{shipmentState}
</foreach>
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>1 ">
AND o.`shipment_State` in
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' open='(' separator=',' close=')'>
#{shipmentState}
</foreach>
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
<choose>
<when test="query.auditType != -1">
AND o.`audit_type` = #{query.auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>0">
<if test="query.auditTypeList != null and query.auditTypeList.size()==1 ">
<foreach item='auditType' index="index" collection='query.auditTypeList' >
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
AND o.`audit_type` = #{auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>1 ">
AND (1!=1
<foreach item='auditType' index="index" collection='query.auditTypeList'>
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
or o.`audit_type` = #{auditType}
</when>
<otherwise>
or o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
or o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.salesmanId != null and query.creator != null ">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ) or o.`creator` = #{query.creator})
</if>
......@@ -350,56 +545,251 @@
<if test="query.status != null">
AND o.`status` = #{query.status}
</if>
<if test="query.salesmanId != null and query.creator">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ) or o.`creator` = #{query.creator})
</if>
<if test="query.customsType != null">
AND o.`customs_type` = #{query.customsType}
</if>
<if test="query.productRecord != null">
AND o.`product_record` = #{query.productRecord}
</if>
<if test="query.transportId != null">
AND o.`transport_id` = #{query.transportId}
</if>
<if test="query.warehouseType != null">
AND o.`warehouse_type` = #{query.warehouseType}
<if test="query.pickState != null">
AND o.`pick_state` = #{query.pickState}
</if>
<if test="query.warehouseTypes != null and query.warehouseTypes.size()>0">
<if test="query.pickStateList != null and query.pickStateList.size()>0">
<if test="query.warehouseTypes != null and query.warehouseTypes.size()==1 ">
AND o.`warehouse_type` =
<foreach item='warehouseType' index="index" collection='query.warehouseTypes' >
#{warehouseType}
<if test="query.pickStateList != null and query.pickStateList.size()==1 ">
AND o.`pick_state` =
<foreach item='pickState' index="index" collection='query.pickStateList' >
#{pickState}
</foreach>
</if>
<if test="query.warehouseTypes != null and query.warehouseTypes.size()>1 ">
AND o.`warehouse_type` in
<foreach item='warehouseType' index="index" collection='query.warehouseTypes' open='(' separator=',' close=')'>
#{warehouseType}
<if test="query.pickStateList != null and query.pickStateList.size()>1 ">
AND o.`pick_state` in
<foreach item='pickState' index="index" collection='query.pickStateList' open='(' separator=',' close=')'>
#{pickState}
</foreach>
</if>
</if>
<if test="query.objectiveIds != null and query.objectiveIds.size() > 0">
<if test="query.objectiveIds != null and query.objectiveIds.size()==1 ">
AND ob.`objective_id` =
<foreach item='objectiveId' index='index' collection='query.objectiveIds'>
#{objectiveId}
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList.size()==1 ">
AND o.`status` =
<foreach item='status' index="index" collection='query.statusList' >
#{status}
</foreach>
</if>
<if test="query.objectiveIds != null and query.objectiveIds.size()>1 ">
AND ob.`objective_id` in
<foreach item='objectiveId' index='index' collection='query.objectiveIds' open='(' separator=',' close=')'>
#{objectiveId}
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
</foreach>
</if>
</if>
<if test="query.destCountryIds != null and query.destCountryIds.size()>0 ">
AND ob.`objective_country_id` in
<foreach item='destCountryId' index='index' collection='query.destCountryIds' open='(' separator=',' close=')'>
#{destCountryId}
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>0">
<if test="query.abnormalStateList != null and query.abnormalStateList.size()==1 ">
<foreach item='abnormalState' index="index" collection='query.abnormalStateList' >
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
AND o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>1 ">
AND (1!=1
<foreach item='abnormalState' index="index" collection='query.abnormalStateList'>
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
OR o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.abnormalState != null">
<choose>
<when test="query.abnormalState != 0">
<choose>
<when test="query.abnormalState != -1">
AND o.`abnormal_state` = #{query.abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
AND o.`in_warehouse_state` =
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' >
#{inWarehouseState}
</foreach>
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>1 ">
AND o.`in_warehouse_state` in
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' open='(' separator=',' close=')'>
#{inWarehouseState}
</foreach>
</if>
</if>
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
<if test="query.shipmentStateList != null and query.shipmentStateList.size()==1 ">
AND o.`shipment_State` =
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' >
#{shipmentState}
</foreach>
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>1 ">
AND o.`shipment_State` in
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' open='(' separator=',' close=')'>
#{shipmentState}
</foreach>
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
<choose>
<when test="query.auditType != -1">
AND o.`audit_type` = #{query.auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>0">
<if test="query.auditTypeList != null and query.auditTypeList.size()==1 ">
<foreach item='auditType' index="index" collection='query.auditTypeList' >
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
AND o.`audit_type` = #{auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>1 ">
AND (1!=1
<foreach item='auditType' index="index" collection='query.auditTypeList'>
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
or o.`audit_type` = #{auditType}
</when>
<otherwise>
or o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
or o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.salesmanId != null and query.creator">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ) or o.`creator` = #{query.creator})
</if>
<if test="query.customsType != null">
AND o.`customs_type` = #{query.customsType}
</if>
<if test="query.productRecord != null">
AND o.`product_record` = #{query.productRecord}
</if>
<if test="query.transportId != null">
AND o.`transport_id` = #{query.transportId}
</if>
<if test="query.warehouseType != null">
AND o.`warehouse_type` = #{query.warehouseType}
</if>
<if test="query.warehouseTypes != null and query.warehouseTypes.size()>0">
<if test="query.warehouseTypes != null and query.warehouseTypes.size()==1 ">
AND o.`warehouse_type` =
<foreach item='warehouseType' index="index" collection='query.warehouseTypes' >
#{warehouseType}
</foreach>
</if>
<if test="query.warehouseTypes != null and query.warehouseTypes.size()>1 ">
AND o.`warehouse_type` in
<foreach item='warehouseType' index="index" collection='query.warehouseTypes' open='(' separator=',' close=')'>
#{warehouseType}
</foreach>
</if>
</if>
<if test="query.objectiveIds != null and query.objectiveIds.size() > 0">
<if test="query.objectiveIds != null and query.objectiveIds.size()==1 ">
AND ob.`objective_id` =
<foreach item='objectiveId' index='index' collection='query.objectiveIds'>
#{objectiveId}
</foreach>
</if>
<if test="query.objectiveIds != null and query.objectiveIds.size()>1 ">
AND ob.`objective_id` in
<foreach item='objectiveId' index='index' collection='query.objectiveIds' open='(' separator=',' close=')'>
#{objectiveId}
</foreach>
</if>
</if>
<if test="query.destCountryIds != null and query.destCountryIds.size()>0 ">
AND ob.`objective_country_id` in
<foreach item='destCountryId' index='index' collection='query.destCountryIds' open='(' separator=',' close=')'>
#{destCountryId}
</foreach>
</if>
<if test="query.startWarehouseIds !=null and query.startWarehouseIds.size() > 0 and query.destWarehouseIds !=null and query.destWarehouseIds.size() > 0 ">
......@@ -1677,6 +2067,9 @@
</otherwise>
</choose>
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
......@@ -1693,8 +2086,8 @@
</foreach>
</if>
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
......@@ -1712,8 +2105,22 @@
</foreach>
</if>
</if>
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
<choose>
<when test="query.auditType != -1">
AND o.`audit_type` = #{query.auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>0">
......@@ -1760,24 +2167,6 @@
)
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
<choose>
<when test="query.auditType != -1">
AND o.`audit_type` = #{query.auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if>
<if test="query.salesmanId != null ">
AND (o.`salesman_id` = #{query.salesmanId} or
o.`customer_id` in(
......@@ -2374,21 +2763,84 @@
<if test="query.status != null">
AND o.`status` = #{query.status}
</if>
<if test="query.warningOrder != null and query.warningOrder == 1 ">
AND (o.type is null or o.type = '' or NOT FIND_IN_SET(2, o.type))
AND o.`is_cargo_control` = 1
AND o.unload_time is not null
AND ((select IFNULL(sum(p.pick_num), 0) from `ecw_order_cargo_control_pick` p where p.order_id = o.order_id and p.status = 3) &lt; o.`sum_num`
or
DATE_ADD(o.unload_time, INTERVAL (
SELECT
IFNULL(ew_dest.rent_free_days, 0)
FROM
ecw_warehouse_line ewl
JOIN ecw_warehouse ew_dest ON ewl.dest_warehouse_id = ew_dest.id
WHERE ewl.id = o.line_id
) DAY) &lt; now())
<if test="query.pickState != null">
AND o.`pick_state` = #{query.pickState}
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>0">
<if test="query.pickStateList != null and query.pickStateList.size()==1 ">
AND o.`pick_state` =
<foreach item='pickState' index="index" collection='query.pickStateList' >
#{pickState}
</foreach>
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>1 ">
AND o.`pick_state` in
<foreach item='pickState' index="index" collection='query.pickStateList' open='(' separator=',' close=')'>
#{pickState}
</foreach>
</if>
</if>
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList.size()==1 ">
AND o.`status` =
<foreach item='status' index="index" collection='query.statusList' >
#{status}
</foreach>
</if>
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
</foreach>
</if>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>0">
<if test="query.abnormalStateList.size()==1 ">
<foreach item='abnormalState' index="index" collection='query.abnormalStateList' >
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
AND o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.abnormalStateList.size()>1 ">
AND (1!=1
<foreach item='abnormalState' index="index" collection='query.abnormalStateList'>
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
OR o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.abnormalState != null">
<choose>
<when test="query.abnormalState != 0">
......@@ -2406,6 +2858,9 @@
</otherwise>
</choose>
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
......@@ -2422,8 +2877,8 @@
</foreach>
</if>
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
......@@ -2441,9 +2896,77 @@
</foreach>
</if>
</if>
<if test="query.warningOrder != null and query.warningOrder == 1 ">
AND (o.type is null or o.type = '' or NOT FIND_IN_SET(2, o.type))
AND o.`is_cargo_control` = 1
AND o.unload_time is not null
AND ((select IFNULL(sum(p.pick_num), 0) from `ecw_order_cargo_control_pick` p where p.order_id = o.order_id and p.status = 3) &lt; o.`sum_num`
or
DATE_ADD(o.unload_time, INTERVAL (
SELECT
IFNULL(ew_dest.rent_free_days, 0)
FROM
ecw_warehouse_line ewl
JOIN ecw_warehouse ew_dest ON ewl.dest_warehouse_id = ew_dest.id
WHERE ewl.id = o.line_id
) DAY) &lt; now())
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
AND o.`in_warehouse_state` =
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' >
#{inWarehouseState}
</foreach>
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>1 ">
AND o.`in_warehouse_state` in
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' open='(' separator=',' close=')'>
#{inWarehouseState}
</foreach>
</if>
</if>
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
<if test="query.shipmentStateList != null and query.shipmentStateList.size()==1 ">
AND o.`shipment_State` =
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' >
#{shipmentState}
</foreach>
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>1 ">
AND o.`shipment_State` in
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' open='(' separator=',' close=')'>
#{shipmentState}
</foreach>
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
<choose>
<when test="query.auditType != -1">
AND o.`audit_type` = #{query.auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>0">
<if test="query.auditTypeList != null and query.auditTypeList.size()==1 ">
......@@ -2489,23 +3012,6 @@
)
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
<choose>
<when test="query.auditType != -1">
AND o.`audit_type` = #{query.auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if>
<if test="query.salesmanId != null ">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ))
</if>
......@@ -3243,9 +3749,41 @@
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
AND o.`in_warehouse_state` =
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' >
#{inWarehouseState}
</foreach>
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>1 ">
AND o.`in_warehouse_state` in
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' open='(' separator=',' close=')'>
#{inWarehouseState}
</foreach>
</if>
</if>
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
<if test="query.shipmentStateList != null and query.shipmentStateList.size()==1 ">
AND o.`shipment_State` =
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' >
#{shipmentState}
</foreach>
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>1 ">
AND o.`shipment_State` in
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' open='(' separator=',' close=')'>
#{shipmentState}
</foreach>
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
......@@ -3263,6 +3801,51 @@
</otherwise>
</choose>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>0">
<if test="query.auditTypeList != null and query.auditTypeList.size()==1 ">
<foreach item='auditType' index="index" collection='query.auditTypeList' >
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
AND o.`audit_type` = #{auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>1 ">
AND (1!=1
<foreach item='auditType' index="index" collection='query.auditTypeList'>
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
or o.`audit_type` = #{auditType}
</when>
<otherwise>
or o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
or o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.salesmanId != null ">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ))
</if>
......@@ -4589,7 +5172,85 @@
<if test="query.status != null">
AND o.`status` = #{query.status}
</if>
<if test="query.abnormalState != null">
<if test="query.pickState != null">
AND o.`pick_state` = #{query.pickState}
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>0">
<if test="query.pickStateList != null and query.pickStateList.size()==1 ">
AND o.`pick_state` =
<foreach item='pickState' index="index" collection='query.pickStateList' >
#{pickState}
</foreach>
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>1 ">
AND o.`pick_state` in
<foreach item='pickState' index="index" collection='query.pickStateList' open='(' separator=',' close=')'>
#{pickState}
</foreach>
</if>
</if>
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList.size()==1 ">
AND o.`status` =
<foreach item='status' index="index" collection='query.statusList' >
#{status}
</foreach>
</if>
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
</foreach>
</if>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>0">
<if test="query.abnormalStateList != null and query.abnormalStateList.size()==1 ">
<foreach item='abnormalState' index="index" collection='query.abnormalStateList' >
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
AND o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>1 ">
AND (1!=1
<foreach item='abnormalState' index="index" collection='query.abnormalStateList'>
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
OR o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.abnormalState != null">
<choose>
<when test="query.abnormalState != 0">
<choose>
......@@ -4609,9 +5270,41 @@
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
AND o.`in_warehouse_state` =
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' >
#{inWarehouseState}
</foreach>
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>1 ">
AND o.`in_warehouse_state` in
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' open='(' separator=',' close=')'>
#{inWarehouseState}
</foreach>
</if>
</if>
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
<if test="query.shipmentStateList != null and query.shipmentStateList.size()==1 ">
AND o.`shipment_State` =
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' >
#{shipmentState}
</foreach>
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>1 ">
AND o.`shipment_State` in
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' open='(' separator=',' close=')'>
#{shipmentState}
</foreach>
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
......@@ -4629,6 +5322,51 @@
</otherwise>
</choose>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>0">
<if test="query.auditTypeList != null and query.auditTypeList.size()==1 ">
<foreach item='auditType' index="index" collection='query.auditTypeList' >
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
AND o.`audit_type` = #{auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>1 ">
AND (1!=1
<foreach item='auditType' index="index" collection='query.auditTypeList'>
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
or o.`audit_type` = #{auditType}
</when>
<otherwise>
or o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
or o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.salesmanId != null ">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ))
</if>
......@@ -5146,37 +5884,232 @@
<if test="query.status != null">
AND o.`status` = #{query.status}
</if>
<if test="query.beginRucangTime != null and query.endRucangTime != null ">
AND o.order_id in(select distinct wi.order_id from ecw_order_warehouse_in wi where wi.deleted = 0 and
wi.`in_time` between #{query.beginRucangTime} and #{query.endRucangTime})
</if>
<if test="query.beginQingguanTime != null and query.endQingguanTime != null ">
AND o.`qingguan_time` between #{query.beginQingguanTime} and #{query.endQingguanTime}
</if>
<if test="query.beginDaogangTime != null and query.endDaogangTime != null ">
AND o.`daogang_time` between #{query.beginDaogangTime} and #{query.endDaogangTime}
</if>
<if test="query.beginPreLoadTime != null and query.endPreLoadTime != null ">
AND o.`status` > 5 AND o.`pre_load_time` between #{query.beginPreLoadTime} and #{query.endPreLoadTime}
</if>
<if test="query.beginOutboundTime != null and query.endOutboundTime != null ">
AND o.`status` > 5 AND o.container_number in(select distinct b.self_no from ecw_box_air_checkout bc join ecw_box b ON bc.shipment_id = b.id
where b.deleted = 0 and bc.deleted = 0 and bc.`checkout_time` between #{query.beginOutboundTime} and #{query.endOutboundTime})
</if>
<if test="query.beginLoadTime != null and query.endLoadTime != null ">
AND o.`load_time` between #{query.beginLoadTime} and #{query.endLoadTime}
<if test="query.pickState != null">
AND o.`pick_state` = #{query.pickState}
</if>
<if test="query.beginUnloadTime != null and query.endUnloadTime != null ">
AND o.`unload_time` between #{query.beginUnloadTime} and #{query.endUnloadTime}
<if test="query.pickStateList != null and query.pickStateList.size()>0">
<if test="query.pickStateList != null and query.pickStateList.size()==1 ">
AND o.`pick_state` =
<foreach item='pickState' index="index" collection='query.pickStateList' >
#{pickState}
</foreach>
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>1 ">
AND o.`pick_state` in
<foreach item='pickState' index="index" collection='query.pickStateList' open='(' separator=',' close=')'>
#{pickState}
</foreach>
</if>
</if>
<if test="query.beginTakeTime != null and query.endTakeTime != null ">
AND o.`status` > 19 AND o.`take_time` between #{query.beginTakeTime} and #{query.endTakeTime}
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList.size()==1 ">
AND o.`status` =
<foreach item='status' index="index" collection='query.statusList' >
#{status}
</foreach>
</if>
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
</foreach>
</if>
</if>
<if test="query.isLimitUpdateConsignee != null">
AND o.`is_limit_update_consignee` = #{query.isLimitUpdateConsignee,jdbcType=BOOLEAN}
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>0">
<if test="query.abnormalStateList != null and query.abnormalStateList.size()==1 ">
<foreach item='abnormalState' index="index" collection='query.abnormalStateList' >
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
AND o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>1 ">
AND (1!=1
<foreach item='abnormalState' index="index" collection='query.abnormalStateList'>
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
OR o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.beginLockConsigneeTime != null and query.endLockConsigneeTime != null ">
AND o.`lock_consignee_time` between #{query.beginLockConsigneeTime} and #{query.endLockConsigneeTime}
<if test="query.abnormalState != null">
<choose>
<when test="query.abnormalState != 0">
<choose>
<when test="query.abnormalState != -1">
AND o.`abnormal_state` = #{query.abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
AND o.`in_warehouse_state` =
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' >
#{inWarehouseState}
</foreach>
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>1 ">
AND o.`in_warehouse_state` in
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' open='(' separator=',' close=')'>
#{inWarehouseState}
</foreach>
</if>
</if>
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
<if test="query.shipmentStateList != null and query.shipmentStateList.size()==1 ">
AND o.`shipment_State` =
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' >
#{shipmentState}
</foreach>
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>1 ">
AND o.`shipment_State` in
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' open='(' separator=',' close=')'>
#{shipmentState}
</foreach>
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
<choose>
<when test="query.auditType != -1">
AND o.`audit_type` = #{query.auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>0">
<if test="query.auditTypeList != null and query.auditTypeList.size()==1 ">
<foreach item='auditType' index="index" collection='query.auditTypeList' >
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
AND o.`audit_type` = #{auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>1 ">
AND (1!=1
<foreach item='auditType' index="index" collection='query.auditTypeList'>
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
or o.`audit_type` = #{auditType}
</when>
<otherwise>
or o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
or o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.beginRucangTime != null and query.endRucangTime != null ">
AND o.order_id in(select distinct wi.order_id from ecw_order_warehouse_in wi where wi.deleted = 0 and
wi.`in_time` between #{query.beginRucangTime} and #{query.endRucangTime})
</if>
<if test="query.beginQingguanTime != null and query.endQingguanTime != null ">
AND o.`qingguan_time` between #{query.beginQingguanTime} and #{query.endQingguanTime}
</if>
<if test="query.beginDaogangTime != null and query.endDaogangTime != null ">
AND o.`daogang_time` between #{query.beginDaogangTime} and #{query.endDaogangTime}
</if>
<if test="query.beginPreLoadTime != null and query.endPreLoadTime != null ">
AND o.`status` > 5 AND o.`pre_load_time` between #{query.beginPreLoadTime} and #{query.endPreLoadTime}
</if>
<if test="query.beginOutboundTime != null and query.endOutboundTime != null ">
AND o.`status` > 5 AND o.container_number in(select distinct b.self_no from ecw_box_air_checkout bc join ecw_box b ON bc.shipment_id = b.id
where b.deleted = 0 and bc.deleted = 0 and bc.`checkout_time` between #{query.beginOutboundTime} and #{query.endOutboundTime})
</if>
<if test="query.beginLoadTime != null and query.endLoadTime != null ">
AND o.`load_time` between #{query.beginLoadTime} and #{query.endLoadTime}
</if>
<if test="query.beginUnloadTime != null and query.endUnloadTime != null ">
AND o.`unload_time` between #{query.beginUnloadTime} and #{query.endUnloadTime}
</if>
<if test="query.beginTakeTime != null and query.endTakeTime != null ">
AND o.`status` > 19 AND o.`take_time` between #{query.beginTakeTime} and #{query.endTakeTime}
</if>
<if test="query.isLimitUpdateConsignee != null">
AND o.`is_limit_update_consignee` = #{query.isLimitUpdateConsignee,jdbcType=BOOLEAN}
</if>
<if test="query.beginLockConsigneeTime != null and query.endLockConsigneeTime != null ">
AND o.`lock_consignee_time` between #{query.beginLockConsigneeTime} and #{query.endLockConsigneeTime}
</if>
<if test="query.beginSplitTime != null and query.endSplitTime != null ">
AND o.`split_time` between #{query.beginSplitTime} and #{query.endSplitTime}
......@@ -5378,6 +6311,201 @@
<if test="query.status != null">
AND o.`status` = #{query.status}
</if>
<if test="query.pickState != null">
AND o.`pick_state` = #{query.pickState}
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>0">
<if test="query.pickStateList != null and query.pickStateList.size()==1 ">
AND o.`pick_state` =
<foreach item='pickState' index="index" collection='query.pickStateList' >
#{pickState}
</foreach>
</if>
<if test="query.pickStateList != null and query.pickStateList.size()>1 ">
AND o.`pick_state` in
<foreach item='pickState' index="index" collection='query.pickStateList' open='(' separator=',' close=')'>
#{pickState}
</foreach>
</if>
</if>
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList.size()==1 ">
AND o.`status` =
<foreach item='status' index="index" collection='query.statusList' >
#{status}
</foreach>
</if>
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
</foreach>
</if>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>0">
<if test="query.abnormalStateList != null and query.abnormalStateList.size()==1 ">
<foreach item='abnormalState' index="index" collection='query.abnormalStateList' >
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
AND o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.abnormalStateList != null and query.abnormalStateList.size()>1 ">
AND (1!=1
<foreach item='abnormalState' index="index" collection='query.abnormalStateList'>
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
OR o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.abnormalState != null">
<choose>
<when test="query.abnormalState != 0">
<choose>
<when test="query.abnormalState != -1">
AND o.`abnormal_state` = #{query.abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</if>
<if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>0">
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()==1 ">
AND o.`in_warehouse_state` =
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' >
#{inWarehouseState}
</foreach>
</if>
<if test="query.inWarehouseStateList != null and query.inWarehouseStateList.size()>1 ">
AND o.`in_warehouse_state` in
<foreach item='inWarehouseState' index="index" collection='query.inWarehouseStateList' open='(' separator=',' close=')'>
#{inWarehouseState}
</foreach>
</if>
</if>
<if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState}
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>0">
<if test="query.shipmentStateList != null and query.shipmentStateList.size()==1 ">
AND o.`shipment_State` =
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' >
#{shipmentState}
</foreach>
</if>
<if test="query.shipmentStateList != null and query.shipmentStateList.size()>1 ">
AND o.`shipment_State` in
<foreach item='shipmentState' index="index" collection='query.shipmentStateList' open='(' separator=',' close=')'>
#{shipmentState}
</foreach>
</if>
</if>
<if test="query.auditType != null">
<choose>
<when test="query.auditType != 0">
<choose>
<when test="query.auditType != -1">
AND o.`audit_type` = #{query.auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>0">
<if test="query.auditTypeList != null and query.auditTypeList.size()==1 ">
<foreach item='auditType' index="index" collection='query.auditTypeList' >
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
AND o.`audit_type` = #{auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.auditTypeList != null and query.auditTypeList.size()>1 ">
AND (1!=1
<foreach item='auditType' index="index" collection='query.auditTypeList'>
<choose>
<when test="auditType != 0">
<choose>
<when test="auditType != -1">
or o.`audit_type` = #{auditType}
</when>
<otherwise>
or o.`audit_type` != 0
</otherwise>
</choose>
</when>
<otherwise>
or o.`audit_type` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if>
<if test="query.beginRucangTime != null and query.endRucangTime != null ">
AND o.order_id in(select distinct wi.order_id from ecw_order_warehouse_in wi where wi.deleted = 0 and
wi.`in_time` between #{query.beginRucangTime} and #{query.endRucangTime})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment