|
|
@@ -1041,9 +1041,12 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="manageType ==0">
|
|
|
(1)
|
|
|
</if>
|
|
|
- <if test="manageType ==1">
|
|
|
- (4)
|
|
|
- </if>
|
|
|
+ <if test="manageType ==1">
|
|
|
+ (4)
|
|
|
+ </if>
|
|
|
+ <if test="manageType ==1">
|
|
|
+ (7)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="approval ==2">
|
|
|
and a.approval in
|
|
|
@@ -1053,6 +1056,9 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="manageType ==1">
|
|
|
(5)
|
|
|
</if>
|
|
|
+ <if test="manageType ==1">
|
|
|
+ (8)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
</if>
|
|
|
<if test="specially !=3 ">
|
|
|
@@ -1060,13 +1066,13 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and a.approval = 0
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
- and a.approval in (1,4)
|
|
|
+ and a.approval in (1,4,7)
|
|
|
</if>
|
|
|
<if test="approval ==2">
|
|
|
- and a.approval in (2,5)
|
|
|
+ and a.approval in (2,5,8)
|
|
|
</if>
|
|
|
<if test="approval ==4">
|
|
|
- and a.approval in (1,2,4,5)
|
|
|
+ and a.approval in (1,2,4,5,7,8)
|
|
|
</if>
|
|
|
</if>
|
|
|
<if test="specially == 4">
|
|
|
@@ -1216,6 +1222,9 @@ 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">
|
|
|
+ (7)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="approval ==2">
|
|
|
and a.approval in
|
|
|
@@ -1225,20 +1234,23 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="manageType ==1">
|
|
|
(5)
|
|
|
</if>
|
|
|
+ <if test="manageType ==1">
|
|
|
+ (8)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
</if>
|
|
|
- <if test="specially !=3">
|
|
|
+ <if test="specially !=3 ">
|
|
|
<if test="approval ==0">
|
|
|
and a.approval = 0
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
- and a.approval in (1,4)
|
|
|
+ and a.approval in (1,4,7)
|
|
|
</if>
|
|
|
<if test="approval ==2">
|
|
|
- and a.approval in (2,5)
|
|
|
+ and a.approval in (2,5,8)
|
|
|
</if>
|
|
|
<if test="approval ==4">
|
|
|
- and a.approval in (1,2,4,5)
|
|
|
+ and a.approval in (1,2,4,5,7,8)
|
|
|
</if>
|
|
|
</if>
|
|
|
<if test="specially == 4">
|
|
|
@@ -2085,20 +2097,24 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
</select>
|
|
|
<select id="getProcessName" resultType="com.goafanti.order.bo.OrderProcessName">
|
|
|
select a.order_no orderNo,a.approval,a.process_status processStatus ,b.name yxy,mg.name yxjl,
|
|
|
- yxgly.name yxgly,d.name cwzy,tp.name zc, zxsgly.name zxsgly,dsz.name dsz
|
|
|
+ yxgly.name yxgly,d.name cwzy,zc.name zc,fzc.name fzc, zxsgly.name zxsgly,dsz.name dsz
|
|
|
from t_order_new a left join admin b on a.salesman_id =b.id
|
|
|
- left join admin mg on b.manager_id =mg.id left join department c on a.order_dep =c.id
|
|
|
- left join (select a.department_id depId,group_concat(a.name) name
|
|
|
+ left join admin mg on b.manager_id =mg.id left join department c on a.order_dep =c.id
|
|
|
+ left join (select a.department_id depId,group_concat(a.name) name
|
|
|
from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
|
|
|
where c.role_type ='9996' and a.status ='0' group by a.department_id )yxgly on c.id =yxgly.depId
|
|
|
- left join (select order_no ,group_concat(aname)name from t_order_examine WHERE type=0 group by order_no ) d on a.order_no=d.order_no
|
|
|
- left join (select a.id,a.province ,if(a.province=11,b.name,c.name)name from department a left join (select group_concat(a.name) name
|
|
|
- from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id where c.role_type in ('9988')
|
|
|
- and a.status ='0' )b on 1=1 left join (select group_concat(a.name) name from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
|
|
|
- where c.role_type in ('9986') and a.status ='0' )c on 1=1 ) tp on 1=1
|
|
|
- left join (select group_concat(a.name) name from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
|
|
|
+ left join (select order_no ,group_concat(aname)name from t_order_examine WHERE type=0 group by order_no ) d on a.order_no=d.order_no
|
|
|
+ left join (select group_concat(a.name) name
|
|
|
+ from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
|
|
|
+ where c.role_type in ('99998','99988') and a.status ='0' ) zc on 1=1
|
|
|
+ left join (select group_concat(a.name) name
|
|
|
+ from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
|
|
|
+ where c.role_type in ('99996') and a.status ='0' ) fzc on 1=1
|
|
|
+ left join (select group_concat(a.name) name
|
|
|
+ from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
|
|
|
where c.role_type in ('99999','99989') and a.status ='0' ) dsz on 1=1
|
|
|
- left join (select group_concat(a.name) name from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
|
|
|
+ left join (select group_concat(a.name) name
|
|
|
+ from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
|
|
|
where c.role_type in ('9998') and a.status ='0' ) zxsgly on 1=1
|
|
|
where a.order_no = #{orderNo}
|
|
|
</select>
|