Commit 2691febe authored by 332784038@qq.com's avatar 332784038@qq.com

补充部分sql的空运备货状态查询值

parent 769d94cf
......@@ -513,6 +513,94 @@
<if test="query.isNeat == false ">
AND o.sum_num <![CDATA[ < ]]> o.cost->>'$.totalNum'
</if>
<if test="query.airShipmentList != null and query.airShipmentList.size() > 0">
<if test="query.airShipmentList.size() == 0">
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
</if>
<if test="query.airShipmentList.size() > 1">
AND (1!=1
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
or o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
or o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
or o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
or o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
or o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
or o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
or o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
or o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
)
</if>
</if>
<if test="query.airShipment != null and query.airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</if>
<if test="query.airShipment != null and query.airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</if>
<if test="query.airShipment != null and query.airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</if>
<if test="query.airShipment != null and query.airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</if>
<if test="query.airShipment != null and query.airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.isNeat == true ">
AND o.sum_num = o.cost->>'$.totalNum'
</if>
......@@ -1047,6 +1135,94 @@
<if test="query.isNeat == false ">
AND o.sum_num <![CDATA[ < ]]> o.cost->>'$.totalNum'
</if>
<if test="query.airShipmentList != null and query.airShipmentList.size() > 0">
<if test="query.airShipmentList.size() == 0">
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
</if>
<if test="query.airShipmentList.size() > 1">
AND (1!=1
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
or o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
or o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
or o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
or o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
or o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
or o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
or o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
or o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
)
</if>
</if>
<if test="query.airShipment != null and query.airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</if>
<if test="query.airShipment != null and query.airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</if>
<if test="query.airShipment != null and query.airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</if>
<if test="query.airShipment != null and query.airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</if>
<if test="query.airShipment != null and query.airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.isNeat == true ">
AND o.sum_num = o.cost->>'$.totalNum'
</if>
......@@ -1438,6 +1614,94 @@
<if test="query.isNeat == false ">
AND o.sum_num <![CDATA[ < ]]> o.cost->>'$.totalNum'
</if>
<if test="query.airShipmentList != null and query.airShipmentList.size() > 0">
<if test="query.airShipmentList.size() == 0">
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
</if>
<if test="query.airShipmentList.size() > 1">
AND (1!=1
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
or o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
or o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
or o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
or o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
or o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
or o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
or o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
or o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
)
</if>
</if>
<if test="query.airShipment != null and query.airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</if>
<if test="query.airShipment != null and query.airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</if>
<if test="query.airShipment != null and query.airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</if>
<if test="query.airShipment != null and query.airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</if>
<if test="query.airShipment != null and query.airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.isNeat == true ">
AND o.sum_num = o.cost->>'$.totalNum'
</if>
......@@ -4419,6 +4683,70 @@
<if test="query.isNeat == false ">
AND o.sum_num <![CDATA[ < ]]> o.cost->>'$.totalNum'
</if>
<if test="query.airShipmentList != null and query.airShipmentList.size() > 0">
<if test="query.airShipmentList.size() == 0">
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
</if>
<if test="query.airShipmentList.size() > 1">
AND (1!=1
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
or o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
or o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
or o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
or o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
or o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
or o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
or o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
or o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
)
</if>
</if>
<if test="query.airShipment != null and query.airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</if>
......@@ -5931,6 +6259,94 @@
<if test="query.isNeat == false ">
AND o.sum_num <![CDATA[ < ]]> o.cost->>'$.totalNum'
</if>
<if test="query.airShipmentList != null and query.airShipmentList.size() > 0">
<if test="query.airShipmentList.size() == 0">
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
</if>
<if test="query.airShipmentList.size() > 1">
AND (1!=1
<foreach item='airShipment' index="index" collection='query.airShipmentList'>
<choose>
<when test="airShipment == 1">
or o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 2">
or o.`status` = 5 AND o.air_shipment = 2
</when>
<when test="airShipment == 3">
or o.`status` = 5 AND o.air_shipment = 3
</when>
<when test="airShipment == 4">
or o.`status` = 5 AND o.air_shipment = 4
</when>
<when test="airShipment == 10">
or o.`status` = 5 AND o.air_shipment in(2,3,4)
</when>
<when test="airShipment == 11">
or o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 12">
or o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</when>
<when test="airShipment == 20">
or o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</when>
</choose>
</foreach>
)
</if>
</if>
<if test="query.airShipment != null and query.airShipment == 1">
AND o.`status` = 5 AND o.air_shipment = 1 and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 2">
AND o.`status` = 5 AND o.air_shipment = 2
</if>
<if test="query.airShipment != null and query.airShipment == 3">
AND o.`status` = 5 AND o.air_shipment = 3
</if>
<if test="query.airShipment != null and query.airShipment == 4">
AND o.`status` = 5 AND o.air_shipment = 4
</if>
<if test="query.airShipment != null and query.airShipment == 10">
AND o.`status` = 5 AND o.air_shipment in(2,3,4)
</if>
<if test="query.airShipment != null and query.airShipment == 11">
AND o.`status` = 5 AND o.air_shipment in(1,2,3,4) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 12">
AND o.`status` = 5 AND o.air_shipment in(2,3) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.airShipment != null and query.airShipment == 20">
AND o.`status` = 5 AND o.air_shipment in(0,2,3,4) and abnormal_state = 0 and audit_type = 0
</if>
<if test="query.type != null and query.type != '' and query.type == 0 ">
AND (o.type is null or o.type = '' or o.type = '0')
</if>
......
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