Quellcode durchsuchen

特批审核列表修改

anderx vor 2 Jahren
Ursprung
Commit
53a332f4fe
1 geänderte Dateien mit 27 neuen und 24 gelöschten Zeilen
  1. 27 24
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

+ 27 - 24
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -783,7 +783,7 @@
       a.other_cost_actual otherCostActual , a.expect_profit expectProfit ,a.actual_profit  actualProfit,a.service_type serviceType,
       a.service_project serviceProject,o.examine_name examineName
     from t_order_new o left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
-    left join (select * from  t_order_outsource where type=0) too on o.order_no=too.order_no where delete_sign in(0,2) and approval in(0,1,2,4,5)
+    left join (select * from  t_order_outsource where type=0) too on o.order_no=too.order_no where delete_sign in(0,2) and approval in(0,1,2,4,5,7,8)
     and outsource=   #{o.outsource,jdbcType=INTEGER}
     <if test="o.processStatus == 3">
       and o.process_status = #{o.processStatus,jdbcType=INTEGER}
@@ -841,13 +841,13 @@
           and a.project_type = #{o.projectType}
         </if>
       <if test="o.approval != null and o.approval ==1">
-        and o.approval in (1,4)
+        and o.approval in (1,4,7)
       </if>
       <if test="o.approval != null and o.approval ==2">
-        and o.approval in (2,5)
+        and o.approval in (2,5,8)
       </if>
         <if test="o.approval != null and o.approval ==4">
-          and o.approval in (1,2,4,5)
+          and o.approval in (1,2,4,5,7,8)
         </if>
 	  	<if test="o.buyerName != null and o.buyerName != &quot;&quot;">
 	  	<bind name="n" value="'%' + o.buyerName + '%'" />
@@ -871,7 +871,7 @@
   <select id="financeCount" parameterType="Map" resultType="java.lang.Integer">
  select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id
 left join department d on o.order_dep = d.id   left join t_order_mid a on o.order_no=a.order_no
- where delete_sign in(0,2) and approval in(0,1,2) and outsource=  #{o.outsource,jdbcType=INTEGER}
+ where delete_sign in(0,2) and approval in(0,1,2,4,5,7,8) and outsource=  #{o.outsource,jdbcType=INTEGER}
     <if test="o.processStatus == 3">
       and o.process_status = #{o.processStatus,jdbcType=INTEGER}
     </if>
@@ -928,13 +928,13 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
       and a.project_type = #{o.projectType}
     </if>
     <if test="o.approval != null and o.approval ==1">
-      and o.approval in (1,4)
+      and o.approval in (1,4,7)
     </if>
     <if test="o.approval != null and o.approval ==2">
-      and o.approval in (2,5)
+      and o.approval in (2,5,8)
     </if>
     <if test="o.approval != null and o.approval ==4">
-      and o.approval in (1,2,4,5)
+      and o.approval in (1,2,4,5,7,8)
     </if>
 	  	<if test="o.buyerName != null and o.buyerName != &quot;&quot;">
 	  	<bind name="n" value="'%' + o.buyerName + '%'" />
@@ -1013,7 +1013,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	</if>
   	<if test="specially == 0">
   	  <if test="approval ==null">
-  	  and a.approval in(0,1,2,4,5)
+  	  and a.approval in(0,1,2,4,5,7,8)
       </if>
   	and a.order_status  in(0,1,2,4)
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
@@ -1044,20 +1044,20 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
         <if test="manageType ==1">
           (4)
         </if>
-        <if test="manageType ==1">
+        <if test="manageType ==2">
           (7)
         </if>
       </if>
       <if test="approval ==2">
         and a.approval in
         <if test="manageType ==0">
-          (2)
+          (2,3)
         </if>
         <if test="manageType ==1">
-          (5)
+          (5,6)
         </if>
-        <if test="manageType ==1">
-          (8)
+        <if test="manageType ==2">
+          (8,9)
         </if>
       </if>
     </if>
@@ -1191,7 +1191,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	</if>
   	<if test="specially == 0">
       <if test="approval ==null">
-        and a.approval in(0,1,2,4,5)
+        and a.approval in(0,1,2,4,5,7,8)
       </if>
       and a.order_status  in(0,1,2,4)
       and a.salesman_id = #{aid,jdbcType=VARCHAR}
@@ -1222,20 +1222,20 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
          <if test="manageType ==1">
            (4)
          </if>
-         <if test="manageType ==1">
+         <if test="manageType ==2">
            (7)
          </if>
        </if>
        <if test="approval ==2">
          and a.approval in
          <if test="manageType ==0">
-           (2)
+           (2,3)
          </if>
          <if test="manageType ==1">
-           (5)
+           (5,6)
          </if>
-         <if test="manageType ==1">
-           (8)
+         <if test="manageType ==2">
+           (8,9)
          </if>
        </if>
      </if>
@@ -1578,7 +1578,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     select IFNULL( sum(o.settlement_amount),0) actuallyTotalAmount,IFNULL(sum(o.total_amount),0)  signTotalAmount
     from t_order_new o
     left join department d   on o.order_dep=d.id left join `user` u on o.buyer_id = u.id  left join t_order_mid a on o.order_no=a.order_no
-    where o.delete_sign in(0,2,3)  and (o.approval = 0 or o.approval = 2) and outsource=  #{o.outsource,jdbcType=INTEGER}
+    where o.delete_sign in(0,2,3)  and o.approval in(0,1,2,4,5,7,8) and outsource=  #{o.outsource,jdbcType=INTEGER}
     <if test="o.processStatus == 3">
       and o.process_status = #{o.processStatus,jdbcType=INTEGER}
     </if>
@@ -1634,11 +1634,14 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     <if test="o.projectType != null and o.projectType != &quot;&quot;">
       and a.project_type = #{o.projectType}
     </if>
-    <if test="o.approval != null and o.approval &lt; 3">
-      and o.approval = #{o.approval}
+    <if test="o.approval != null and o.approval ==1">
+      and o.approval in (1,4,7)
+    </if>
+    <if test="o.approval != null and o.approval ==2">
+      and o.approval in (2,5,8)
     </if>
     <if test="o.approval != null and o.approval ==4">
-      and o.approval in (1,2)
+      and o.approval in (1,2,4,5,7,8)
     </if>
     <if test="o.buyerName != null and o.buyerName != &quot;&quot;">
       <bind name="n" value="'%' + o.buyerName + '%'" />