|
@@ -218,7 +218,7 @@
|
|
|
<if test="userId != null and userId != ''">
|
|
|
and tbuaa.user_id = #{userId}
|
|
|
</if>
|
|
|
- and tbuaa.sop_role_type = 'ENGINEER' and (tffa.status in ('START', 'DRAFT', 'AUDITING', 'REJECT', 'CANCEL') or (tffa.status = 'FINISH' and (t.datediff <![CDATA[ >= ]]> -1 and t.datediff <![CDATA[ <= ]]> 0)))
|
|
|
+ and tbuaa.sop_role_type in ('ENGINEER','PROJECT_MANAGER') and (tffa.status in ('START', 'DRAFT', 'AUDITING', 'REJECT', 'CANCEL') or (tffa.status = 'FINISH' and (t.datediff <![CDATA[ >= ]]> -1 and t.datediff <![CDATA[ <= ]]> 0)))
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -248,7 +248,7 @@
|
|
|
<if test="userId != null and userId != ''">
|
|
|
and tbuaa.user_id = #{userId}
|
|
|
</if>
|
|
|
- and tbuaa.sop_role_type = 'ENGINEER'
|
|
|
+ and tbuaa.sop_role_type in ('ENGINEER','PROJECT_MANAGER')
|
|
|
and tffa.status not in('END')
|
|
|
</where>
|
|
|
union
|
|
@@ -281,7 +281,7 @@
|
|
|
<if test="userId != null and userId != ''">
|
|
|
and tbuaa.user_id = #{userId}
|
|
|
</if>
|
|
|
- and tbuaa.sop_role_type = 'ENGINEER'
|
|
|
+ and tbuaa.sop_role_type in ('ENGINEER','PROJECT_MANAGER')
|
|
|
and tffa.status not in('END')
|
|
|
and tbuaal.crm_detail_id = tbuaa.crm_detail_id
|
|
|
</where>
|
|
@@ -292,16 +292,11 @@
|
|
|
SELECT * FROM sys_user WHERE
|
|
|
id IN (
|
|
|
select tbc.lead_id from t_b_sop_info tbsi join t_b_crm tbc on tbc.crm_no = tbsi.crm_no where tbsi.id = #{id}
|
|
|
- UNION ALL
|
|
|
+ UNION
|
|
|
select tbuaa.user_id from t_b_sop_info tbsi
|
|
|
join t_b_crm_detail tbcd on tbcd.sop_no = tbsi.sop_no
|
|
|
join t_b_user_archives_allocation tbuaa on tbuaa.crm_detail_id = tbcd.id
|
|
|
- where tbsi.id = #{id} and tbuaa.sop_role_type = 'REGION_COORDINATOR'
|
|
|
- UNION ALL
|
|
|
- select tbuaa.user_id from t_b_sop_info tbsi
|
|
|
- join t_b_crm_detail tbcd on tbcd.sop_no = tbsi.sop_no
|
|
|
- join t_b_user_archives_allocation tbuaa on tbuaa.crm_detail_id = tbcd.id
|
|
|
- where tbsi.id = #{id} and tbuaa.sop_role_type = 'ENGINEER'
|
|
|
+ where tbsi.id = #{id} and tbuaa.sop_role_type in ('REGION_COORDINATOR','ENGINEER','PROJECT_MANAGER')
|
|
|
)
|
|
|
</select>
|
|
|
</mapper>
|