Explorar el Código

发起判定修改

anderx hace 1 año
padre
commit
4e28adb08f

+ 44 - 42
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1032,35 +1032,36 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
   	</if>
     <if test="specially == 3">
-      and  a.order_status=2 and dep.approval_aid= #{aid,jdbcType=VARCHAR}
-
-      <if test="approval ==0">
-        and a.process_status in(4)
-        and a.approval = 0
-      </if>
-      <if test="approval ==1">
-        and a.process_status in(4)
-        and a.approval in(1)
-      </if>
-      <if test="approval ==2">
-        and a.approval in (2,3)
-      </if>
-    </if>
-    <if test="specially == 11">
       and  a.order_status=2
+  	<if test="manageType ==0">
+      and dep.approval_aid= #{aid,jdbcType=VARCHAR}
+    </if>
       <if test="approval ==0">
         and a.process_status in(4)
         and a.approval = 0
       </if>
       <if test="approval ==1">
         and a.process_status in(4)
-        and a.approval in (4)
+        and a.approval in
+            <if test="manageType ==0">
+            (1)
+            </if>
+        <if test="manageType ==1">
+          (4)
+        </if>
       </if>
       <if test="approval ==2">
-        and a.approval in (5,6)
+        and a.approval in
+        <if test="manageType ==0">
+          (2,3)
+        </if>
+        <if test="manageType ==1">
+          (5,6)
+        </if>
+
       </if>
     </if>
-  	<if test="specially !=3 and specially !=11">
+  	  <if test="specially !=3 ">
         <if test="approval ==0">
           and a.approval = 0
         </if>
@@ -1199,29 +1200,17 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
        and a.process_status = 1  and a.order_status in (0,1,2)
        and mg.manager_id= #{aid}
      </if>
-     <if test="specially == 1">
-       and a.process_status = 2  and a.order_status in (0,1,2)
-     </if>
-     <if test="specially == 2">
-       and a.order_status in(3,5)
-       and a.salesman_id = #{aid,jdbcType=VARCHAR}
-     </if>
+  	<if test="specially == 1">
+  	and a.process_status = 2  and a.order_status in (0,1,2)
+  	</if>
+  	<if test="specially == 2">
+  	and a.order_status in(3,5)
+  	and a.salesman_id = #{aid,jdbcType=VARCHAR}
+  	</if>
      <if test="specially == 3">
-       and  a.order_status=2 and dep.approval_aid= #{aid,jdbcType=VARCHAR}
-
-       <if test="approval ==0">
-         and a.process_status in(4)
-         and a.approval = 0
-       </if>
-       <if test="approval ==1">
-         and a.process_status in(4)
-         and a.approval in(1)
+       <if test="manageType ==0">
+         and dep.approval_aid= #{aid,jdbcType=VARCHAR}
        </if>
-       <if test="approval ==2">
-         and a.approval in (2,3)
-       </if>
-     </if>
-     <if test="specially == 11">
        and  a.order_status=2
        <if test="approval ==0">
          and a.process_status in(4)
@@ -1229,13 +1218,26 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
        </if>
        <if test="approval ==1">
          and a.process_status in(4)
-         and a.approval in (4)
+         and a.approval in
+         <if test="manageType ==0">
+           (1)
+         </if>
+         <if test="manageType ==1">
+           (4)
+         </if>
        </if>
        <if test="approval ==2">
-         and a.approval in (5,6)
+         and a.approval in
+         <if test="manageType ==0">
+           (2,3)
+         </if>
+         <if test="manageType ==1">
+           (5,6)
+         </if>
+
        </if>
      </if>
-     <if test="specially !=3 and specially !=11">
+     <if test="specially !=3 ">
        <if test="approval ==0">
          and a.approval = 0
        </if>

+ 5 - 5
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -945,11 +945,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}
 		}else if (in.getSpecially()==3){
 			params.put("aid", TokenManager.getAdminId());
-			params.put("manageType",0);
-		}else if (in.getSpecially()==11){
-			params.put("aid", TokenManager.getAdminId());
-			params.put("manageType",1);
-			if (in.getApproval()==null)params.put("approval",1);
+			if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_ASSISTANT)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)){
+				params.put("manageType",1);
+			}else  {
+				params.put("manageType",0);
+			}
 		}
 		params.put("specially", in.getSpecially());
 		if (StringUtils.isNotBlank(in.getName())) {