anderx лет назад: 3
Родитель
Сommit
7314a9b7c4
1 измененных файлов с 25 добавлено и 1 удалено
  1. 25 1
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

+ 25 - 1
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -925,6 +925,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="specially == 0">
   	and a.order_status not in(3,5,6,7) and a.approval in(0,1,2)
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
+
   	</if>
   	<if test="specially == 1">
   	and a.process_status = 1  and a.order_status = 1
@@ -932,6 +933,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
 	 #{deps.id}
   	</foreach>
+
   	</if>
   	<if test="specially == 2">
   	and a.order_status in(3,5)
@@ -940,7 +942,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="specially == 3">
   	 and  a.order_status=2 and a.process_status != 99
   	<if test="approval ==0">
-  	and a.approval &gt; 0
+  	and a.approval = 0
   	</if>
   	<if test="approval ==1">
   	and a.process_status = 7
@@ -950,6 +952,14 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.approval &gt; 1
   	</if>
   	</if>
+  	  <if test="specially !=3">
+        <if test="approval ==0">
+          and a.approval = 0
+        </if>
+        <if test="approval ==1">
+          and a.approval in (1,2)
+        </if>
+      </if>
   	<if test="specially == 4">
   	and a.process_status in (4,5,6,99)
   	and a.order_status not in(5,7)
@@ -1061,6 +1071,12 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="specially == 0">
   	and a.order_status not in(3,5,6,7) and a.approval in(0,1,2)
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
+      <if test="approval ==0">
+        and a.approval = 0
+      </if>
+      <if test="approval ==1">
+        and a.approval in (1,2)
+      </if>
   	</if>
   	<if test="specially == 1">
   	and a.process_status = 1  and a.order_status = 1
@@ -1087,6 +1103,14 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.approval &gt; 1
   	</if>
   	</if>
+     <if test="specially !=3">
+       <if test="approval ==0">
+         and a.approval = 0
+       </if>
+       <if test="approval ==1">
+         and a.approval in (1,2)
+       </if>
+     </if>
   	<if test="specially == 4">
   	and a.process_status in (4,5,6,99)
   	and a.order_status not in(5,7)