Explorar el Código

修改限定项目列表

anderx hace 1 año
padre
commit
37611c69c7

+ 9 - 6
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -637,6 +637,9 @@ from new_order_change a where 1 = 1 and status in (0,1,2,3)
         #{id}
         #{id}
       </foreach>
       </foreach>
     </if>
     </if>
+    <if test="processState==8 and aid !=null">
+      and e.operation_guarantee_id=#{aid}
+    </if>
     <if test="processState==9 and aid !=null">
     <if test="processState==9 and aid !=null">
       and e.approval_aid =#{aid}
       and e.approval_aid =#{aid}
     </if>
     </if>
@@ -667,7 +670,7 @@ from new_order_change a where 1 = 1 and status in (0,1,2,3)
     <if test="salesmanName !=null">
     <if test="salesmanName !=null">
       and d.name like concat('%',#{salesmanName},'%')
       and d.name like concat('%',#{salesmanName},'%')
     </if>
     </if>
-    <if test="complete ==0 and  processState != 5  and processState &lt; 7">
+    <if test="complete ==0 and  processState != 5  and processState &lt;= 8">
       and ((a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState}))
       and ((a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState}))
     </if>
     </if>
     <if test="complete ==0 and (processState == 5 or processState == 7)">
     <if test="complete ==0 and (processState == 5 or processState == 7)">
@@ -688,11 +691,8 @@ from new_order_change a where 1 = 1 and status in (0,1,2,3)
     <if test="complete ==1 and processState > 6 and processState &lt; 8">
     <if test="complete ==1 and processState > 6 and processState &lt; 8">
       and (a.process_state = #{processState}  and a.status =1)
       and (a.process_state = #{processState}  and a.status =1)
     </if>
     </if>
-    <if test="complete ==1  and processState == 9">
-      and a.process_state = 9  and a.status =1
-    </if>
-    <if test="complete ==1 and processState == 10">
-      and a.process_state = 10  and a.status =1
+    <if test="complete ==1  and processState > 7">
+      and a.process_state =  #{processState}   and a.status =1
     </if>
     </if>
     <if test="complete ==2 and processState != 6 and processState != 9 and processState != 10 and processState !=3 and processState !=4">
     <if test="complete ==2 and processState != 6 and processState != 9 and processState != 10 and processState !=3 and processState !=4">
       and a.process_state &gt; #{processState}
       and a.process_state &gt; #{processState}
@@ -700,6 +700,9 @@ from new_order_change a where 1 = 1 and status in (0,1,2,3)
     <if test="complete ==2 and processState == 6">
     <if test="complete ==2 and processState == 6">
       and((a.process_state &gt; 6 and a.process_state &lt; 10) or (a.process_state =6 and a.status=4))
       and((a.process_state &gt; 6 and a.process_state &lt; 10) or (a.process_state =6 and a.status=4))
     </if>
     </if>
+    <if test="complete ==2 and processState == 8">
+      and  a.process_state > 7 and a.status in (2,4)
+    </if>
     <if test="complete ==2 and processState == 9">
     <if test="complete ==2 and processState == 9">
       and ((a.process_state = 9  and  a.status in(2,4))or a.process_state &gt; 9)
       and ((a.process_state = 9  and  a.status in(2,4))or a.process_state &gt; 9)
     </if>
     </if>