Browse Source

离职技术员、经理转交修改开发

anderx 3 years ago
parent
commit
0b17cce329
1 changed files with 12 additions and 7 deletions
  1. 12 7
      src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

+ 12 - 7
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -813,12 +813,17 @@ select
   </select>
     <select id="selectProcess" resultType="java.lang.Integer">
       select t0.id from (select x.id
-                         from (select a.id
-                               from new_order_change a left join t_order_task c on a.order_no =c.order_no
-                               where a.process_state= #{type}
-                                 and c.consultant_id = #{aid} group by a.id)x
-                                left join new_order_change z on x.id=z.id
-                                left join order_examine y on z.order_no=y.order_no
-                         where y.`type` =0 group by x.id)t0
+            from (select a.id from new_order_change a left join t_order_task c on a.order_no =c.order_no
+             where a.process_state= #{type}
+             <if test="type==3">
+             and c.consultant_id = #{aid}
+             </if>
+             <if test="type==4">
+             and c.manager_id = #{aid}
+             </if>
+             group by a.id)x
+                    left join new_order_change z on x.id=z.id
+                    left join order_examine y on z.order_no=y.order_no
+             where y.`type` =0 group by x.id)t0
     </select>
 </mapper>