Commit 6c8930e4 authored by 332784038@qq.com's avatar 332784038@qq.com

补充提货率和提货状态到订单中进行查询(主动跟进提货状态和提货率到订单中需要另行业务处理)

parent f1907a45
......@@ -226,6 +226,15 @@
<if test="query.beginCreateTime != null and query.endCreateTime != null ">
AND o.`create_time` between #{query.beginCreateTime} and #{query.endCreateTime}
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''),IFNULL(o.`parent_number`,''),IFNULL(o.`initial_parent_order_no`,''),
IFNULL(o.`old_numbers`,''),IFNULL(o.`marks`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......@@ -367,7 +376,7 @@
<if test="query.objectiveId != null and query.objectiveId.size() != 0">
<if test="query.objectiveIds != null and query.objectiveIds.size()==1 ">
AND ob.`objective_id` =
<foreach item='objectiveId' index='index' collection='query.objectiveId' open='(' separator=',' close=')'>
<foreach item='objectiveId' index='index' collection='query.objectiveId'>
#{objectiveId}
</foreach>
</if>
......@@ -542,6 +551,15 @@
<if test="query.beginCreateTime != null and query.endCreateTime != null ">
AND o.`create_time` between #{query.beginCreateTime} and #{query.endCreateTime}
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''),IFNULL(o.`parent_number`,''),IFNULL(o.`initial_parent_order_no`,''),
IFNULL(o.`old_numbers`,''),IFNULL(o.`marks`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......@@ -622,19 +640,39 @@
</sql>
<sql id="myOrderQuerySql">
<!-- <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.status != null">
AND o.`status` = #{query.status}
</if>
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()==1 ">
<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 ">
<if test="query.statusList != null and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
......@@ -725,7 +763,7 @@
<if test="query.salesmanIds != null and query.salesmanIds.size()==1 ">
AND (o.`salesman_id` =
<foreach item='salesmanId' index="index" collection='query.salesmanIds' open='(' separator=',' close=')'>
<foreach item='salesmanId' index="index" collection='query.salesmanIds'>
#{salesmanId}
</foreach>
or
......@@ -838,6 +876,15 @@
<if test="query.beginCreateTime != null and query.endCreateTime != null ">
AND o.`create_time` between #{query.beginCreateTime} and #{query.endCreateTime}
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''),IFNULL(o.`parent_number`,''),IFNULL(o.`initial_parent_order_no`,''),
IFNULL(o.`old_numbers`,''),IFNULL(o.`marks`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......@@ -1472,33 +1519,53 @@
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse.size()>0">
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse != '' and query.isExternalWarehouse.size()==1 ">
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse.size()==1 ">
AND o.`is_external_warehouse` =
<foreach item='isExternalWarehouse' index="index" collection='query.isExternalWarehouse' >
#{isExternalWarehouse}
</foreach>
</if>
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse != '' and query.isExternalWarehouse.size()>1 ">
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse.size()>1 ">
AND o.`is_external_warehouse` in
<foreach item='isExternalWarehouse' index="index" collection='query.isExternalWarehouse' open='(' separator=',' close=')'>
#{isExternalWarehouse}
</foreach>
</if>
</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.status != null">
AND o.`status` = #{query.status}
</if>
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()==1 ">
<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 ">
<if test="query.statusList != null and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
......@@ -1747,7 +1814,7 @@
<if test="query.salesmanIds != null and query.salesmanIds.size()==1 ">
AND (o.`salesman_id` =
<foreach item='salesmanId' index="index" collection='query.salesmanIds' open='(' separator=',' close=')'>
<foreach item='salesmanId' index="index" collection='query.salesmanIds'>
#{salesmanId}
</foreach>
or
......@@ -1819,7 +1886,7 @@
<if test="query.objectiveId != null and query.objectiveId.size() != 0">
<if test="query.objectiveIds != null and query.objectiveIds.size()==1 ">
AND ob.`objective_id` =
<foreach item='objectiveId' index='index' collection='query.objectiveId' open='(' separator=',' close=')'>
<foreach item='objectiveId' index='index' collection='query.objectiveId'>
#{objectiveId}
</foreach>
</if>
......@@ -1965,6 +2032,15 @@
<if test = 'query.cargoControlStatus != null and query.cargoControlStatus == 3'>
AND o.`cargo_control_status` = 1 AND (select count(1) from ecw_order_cargo_control_pick ccp2 where ccp2.order_id = o.order_id and ccp2.status = 1) > 0
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(o.`old_numbers`,'')
,IFNULL(o.`marks`,''),IFNULL(o.`tidan_no`,''),IFNULL(o.`container_number`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......@@ -2384,7 +2460,7 @@
<if test="query.objectiveId != null and query.objectiveId.size() != 0">
<if test="query.objectiveIds != null and query.objectiveIds.size()==1 ">
AND ob.`objective_id` =
<foreach item='objectiveId' index='index' collection='query.objectiveId' open='(' separator=',' close=')'>
<foreach item='objectiveId' index='index' collection='query.objectiveId'>
#{objectiveId}
</foreach>
</if>
......@@ -2501,7 +2577,7 @@
<if test="query.salesmanIds != null and query.salesmanIds.size()==1 ">
AND (o.`salesman_id` =
<foreach item='salesmanId' index="index" collection='query.salesmanIds' open='(' separator=',' close=')'>
<foreach item='salesmanId' index="index" collection='query.salesmanIds'>
#{salesmanId}
</foreach>
or
......@@ -2668,6 +2744,15 @@
</foreach>
)
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(o.`old_numbers`,'')
,IFNULL(o.`marks`,''),IFNULL(o.`tidan_no`,''),IFNULL(o.`container_number`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......@@ -2935,10 +3020,28 @@
</if>
<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 != '' and query.statusList.size()==1 ">
<if test="query.statusList != null and query.statusList.size()==1 ">
AND o.`status` =
<foreach item='status' index="index" collection='query.statusList' >
#{status}
......@@ -3072,7 +3175,7 @@
<if test="query.objectiveId != null and query.objectiveId.size() != 0">
<if test="query.objectiveIds != null and query.objectiveIds.size()==1 ">
AND ob.`objective_id` =
<foreach item='objectiveId' index='index' collection='query.objectiveId' open='(' separator=',' close=')'>
<foreach item='objectiveId' index='index' collection='query.objectiveId'>
#{objectiveId}
</foreach>
</if>
......@@ -3189,7 +3292,7 @@
<if test="query.salesmanIds != null and query.salesmanIds.size()==1 ">
AND (o.`salesman_id` =
<foreach item='salesmanId' index="index" collection='query.salesmanIds' open='(' separator=',' close=')'>
<foreach item='salesmanId' index="index" collection='query.salesmanIds'>
#{salesmanId}
</foreach>
or
......@@ -3329,6 +3432,15 @@
<if test = 'query.cargoControlStatus != null and query.cargoControlStatus == 3'>
AND o.`cargo_control_status` = 1 AND (select count(1) from ecw_order_cargo_control_pick ccp2 where ccp2.order_id = o.order_id and ccp2.status = 1) > 0
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(o.`old_numbers`,'')
,IFNULL(o.`marks`,''),IFNULL(o.`tidan_no`,''),IFNULL(o.`container_number`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......@@ -4396,7 +4508,7 @@
<if test="query.salesmanIds != null and query.salesmanIds.size()==1 ">
AND (o.`salesman_id` =
<foreach item='salesmanId' index="index" collection='query.salesmanIds' open='(' separator=',' close=')'>
<foreach item='salesmanId' index="index" collection='query.salesmanIds'>
#{salesmanId}
</foreach>
or
......@@ -4548,6 +4660,15 @@
<if test = 'query.cargoControlStatus != null and query.cargoControlStatus == 3'>
AND o.`cargo_control_status` = 1 AND (select count(1) from ecw_order_cargo_control_pick ccp2 where ccp2.order_id = o.order_id and ccp2.status = 1) > 0
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(o.`old_numbers`,'')
,IFNULL(o.`marks`,''),IFNULL(o.`tidan_no`,''),IFNULL(o.`container_number`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......@@ -4882,6 +5003,15 @@
<if test="query.marks != null and query.marks != '' ">
AND o.`marks` like concat("%",concat(#{query.marks},"%"))
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(o.`old_numbers`,'')
,IFNULL(o.`marks`,''),IFNULL(o.`tidan_no`,''),IFNULL(o.`container_number`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......@@ -5065,6 +5195,15 @@
<if test="query.marks != null and query.marks != '' ">
AND o.`marks` like concat("%",concat(#{query.marks},"%"))
</if>
<if test="query.lePickRatio != null ">
AND o.pick_ratio <![CDATA[ <= ]]> #{query.lePickRatio}
</if>
<if test="query.gePickRatio != null ">
AND o.pick_ratio <![CDATA[ >= ]]> #{query.gePickRatio}
</if>
<if test="query.eqPickRatio != null ">
AND o.pick_ratio = #{query.eqPickRatio}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(o.`old_numbers`,'')
,IFNULL(o.`marks`,''),IFNULL(o.`tidan_no`,''),IFNULL(o.`container_number`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
......
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