Browse Source

开单与签单BUG修复

anderx 3 years ago
parent
commit
adb170dcf6
1 changed files with 13 additions and 37 deletions
  1. 13 37
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

+ 13 - 37
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1004,19 +1004,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="specially == 4">
   	and a.process_status in (4,5,6,99)
   	and a.order_status  in(1,2,3,4,6)
-      <if test="deps!=null">
-        and a.order_dep in
-        <foreach close=")" collection="deps" item="deps" open="(" separator=",">
-          #{deps.id}
-        </foreach>
-      </if>
-  	</if>
-  	<if test="specially == 5">
-  	and a.order_dep in
-  	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
-	 #{deps.id}
-  	</foreach>
-  	</if>
+    </if>
   	<if test="distribution == 0">
   	and a.process_status &lt; 5
   	</if>
@@ -1059,9 +1047,12 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="amountStatus == 4">
   	and a.total_amount  &gt; 40
   	</if>
-  	<if test="depId != null">
-  	and a.order_dep = #{depId,jdbcType=VARCHAR}
-  	</if>
+    <if test="deps!=null">
+      and a.order_dep in
+      <foreach close=")" collection="deps" item="deps" open="(" separator=",">
+        #{deps.id}
+      </foreach>
+    </if>
     <if test="starTime !=null and endTime !=null">
       and a.create_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
     </if>
@@ -1159,29 +1150,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
        </if>
        <if test="approval ==4">
            and a.approval in (1,2)
-           <if test="deps!=null">
-             and a.order_dep in
-             <foreach close=")" collection="deps" item="deps" open="(" separator=",">
-               #{deps.id}
-             </foreach>
-           </if>
        </if>
      </if>
   	<if test="specially == 4">
   	and a.process_status in (4,5,6,99)
   	and a.order_status  in(1,2,3,4,6)
-      <if test="deps!=null">
-        and a.order_dep in
-        <foreach close=")" collection="deps" item="deps" open="(" separator=",">
-          #{deps.id}
-        </foreach>
-      </if>
-  	</if>
-  	<if test="specially == 5">
-  	and a.order_dep in
-  	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
-	 #{deps.id}
-  	</foreach>
   	</if>
   	<if test="distribution == 0">
   	and a.process_status &lt; 5
@@ -1225,9 +1198,12 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="amountStatus == 4">
   	and a.total_amount  &gt; 40
   	</if>
-  	<if test="depId != null">
-  	and a.order_dep = #{depId,jdbcType=VARCHAR}
-  	</if>
+     <if test="deps!=null">
+       and a.order_dep in
+       <foreach close=")" collection="deps" item="deps" open="(" separator=",">
+         #{deps.id}
+       </foreach>
+     </if>
   	<if test="starTime !=null and endTime !=null">
   	and a.create_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
   	</if>