Przeglądaj źródła

变更列表显示BUG修复

anderx 2 lat temu
rodzic
commit
82f049ac5f

+ 57 - 55
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -656,61 +656,61 @@ select
       </if>
       group by order_no,aid)x on a.order_no = x.order_no
     </if>
-	where 1=1
+    where 1=1
     <if test="processState==0">
       and b.salesman_id= #{aid}
     </if>
     <if test="processState==1">
       and d.manager_id= #{aid}
     </if>
-	<if test="processState==3 and complete !=5">
-	and  x.aid=#{aid}  and a.process_state &gt;= #{processState}
-	</if>
-	<if test="processState==4 and complete !=5">
-	and x.aid=#{aid}  and a.process_state &gt;= #{processState}
-	</if>
-	<if test="processState==3 and complete ==5">
-	and  x.aid=#{aid}  and a.back_status &gt;= #{processState}
-	</if>
-	<if test="processState==4 and complete ==5">
-	and x.aid=#{aid}  and a.back_status &gt;= #{processState}
-	</if>
-	<if test="processState==6 and aid !=null">
-	and e.finance_id =#{aid}
-	</if>
-	<if test="processState==6 and aids !=null">
-	and e.finance_id in
-		<foreach close=")" collection="aids" item="id" open="(" separator=",">
-		#{id}
-		</foreach>
-	</if>
-	<if test="userName !=null">
-	and c.nickname like concat('%',#{userName},'%')
-	</if>
-	<if test="orderNo !=null">
-	and a.order_no like concat('%',#{orderNo},'%')
-	</if>
-	<if test="contractNo !=null">
-	and b.contract_no like concat('%',#{contractNo},'%')
-	</if>
-	<if test="type !=null">
-	and a.type = #{type}
-	</if>
-	<if test="timeType == 0 and startTime !=null and endTime !=null">
-	and a.create_time between #{startTime} and #{endTime}
-	</if>
-	<if test="timeType == 1 and startTime !=null and endTime !=null">
-	and b.create_time between #{startTime} and #{endTime}
-	</if>
+    <if test="processState==3 and complete !=5">
+      and  x.aid=#{aid}  and a.process_state &gt;= #{processState}
+    </if>
+    <if test="processState==4 and complete !=5">
+      and x.aid=#{aid}  and a.process_state &gt;= #{processState}
+    </if>
+    <if test="processState==3 and complete ==5">
+      and  x.aid=#{aid}  and a.back_status &gt;= #{processState}
+    </if>
+    <if test="processState==4 and complete ==5">
+      and x.aid=#{aid}  and a.back_status &gt;= #{processState}
+    </if>
+    <if test="processState==6 and aid !=null">
+      and e.finance_id =#{aid}
+    </if>
+    <if test="processState==6 and aids !=null">
+      and e.finance_id in
+      <foreach close=")" collection="aids" item="id" open="(" separator=",">
+        #{id}
+      </foreach>
+    </if>
+    <if test="userName !=null">
+      and c.nickname like concat('%',#{userName},'%')
+    </if>
+    <if test="orderNo !=null">
+      and a.order_no like concat('%',#{orderNo},'%')
+    </if>
+    <if test="contractNo !=null">
+      and b.contract_no like concat('%',#{contractNo},'%')
+    </if>
+    <if test="type !=null">
+      and a.type = #{type}
+    </if>
+    <if test="timeType == 0 and startTime !=null and endTime !=null">
+      and a.create_time between #{startTime} and #{endTime}
+    </if>
+    <if test="timeType == 1 and startTime !=null and endTime !=null">
+      and b.create_time between #{startTime} and #{endTime}
+    </if>
     <if test="deps !=null">
       and b.order_dep in
       <foreach close=")" collection="deps" item="depId" open="(" separator=",">
         #{depId}
       </foreach>
     </if>
-	<if test="salesmanName !=null">
-	and d.name like concat('%',#{salesmanName},'%')
-	</if>
+    <if test="salesmanName !=null">
+      and d.name like concat('%',#{salesmanName},'%')
+    </if>
     <if test="complete ==0 and  processState != 5  and processState &lt; 7">
       and ((a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState}))
     </if>
@@ -735,24 +735,26 @@ select
     <if test="complete ==1 and processState > 7">
       and (a.process_state = #{processState}  and a.status =1)
     </if>
+
     <if test="complete ==2 and processState != 6 and processState != 8 and processState != 9 and processState !=3 and processState !=4">
       and a.process_state &gt; #{processState}
     </if>
     <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))
     </if>
-	<if test="complete ==2 and processState == 8">
-	 and ((a.process_state = 8  and  (a.status = 4 or a.status = 2))or a.process_state &gt; 8)
-	</if>
-	<if test="complete ==2 and processState == 9">
-	 and a.process_state = 9  and   (a.status = 4 or a.status = 2)
-	</if>
-	<if test="complete ==3">
-	 and   a.status = 2
-	</if>
-	<if test="complete ==4">
-	 and   a.status = 4
-	</if>
+    <if test="complete ==2 and processState == 8">
+      and ((a.process_state = 8  and  a.status in(2,4))or a.process_state &gt; 8)
+    </if>
+    <if test="complete ==2 and processState == 9">
+      and a.process_state = 9  and   a.status in (2,4)
+
+    </if>
+    <if test="complete ==3">
+      and   a.status = 2
+    </if>
+    <if test="complete ==4">
+      and   a.status = 4
+    </if>
     <if test="complete ==5 and processState != 3 and processState != 4">
       and a.back_status = #{processState}
     </if>