|
@@ -105,17 +105,17 @@
|
|
|
<if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">
|
|
|
<choose>
|
|
|
<when test="dpr.hasBusiness">
|
|
|
- AND tbs.service_lead_id = #{dpr.requestUserId}
|
|
|
+ AND (tbs.service_lead_id = #{dpr.requestUserId} or EXISTS(SELECT 1 FROM t_f_flow_log tffl where tffl.flow_id = tfcfe.flow_id and tffl.approve_id = #{dpr.requestUserId}))
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
<when test="dpr.hasRegionManager">
|
|
|
- AND tbc.lead_id = #{dpr.requestUserId}
|
|
|
+ AND (tbc.lead_id = #{dpr.requestUserId} or EXISTS(SELECT 1 FROM t_f_flow_log tffl where tffl.flow_id = tfcfe.flow_id and tffl.approve_id = #{dpr.requestUserId}))
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
<when test="dpr.hasRegionCoordinator">
|
|
|
- AND tbc.region_coordinator_id = #{dpr.requestUserId}
|
|
|
+ AND (tbc.region_coordinator_id = #{dpr.requestUserId} or EXISTS(SELECT 1 FROM t_f_flow_log tffl where tffl.flow_id = tfcfe.flow_id and tffl.approve_id = #{dpr.requestUserId}))
|
|
|
</when>
|
|
|
</choose>
|
|
|
</otherwise>
|
|
@@ -238,17 +238,17 @@
|
|
|
<if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">
|
|
|
<choose>
|
|
|
<when test="dpr.hasBusiness">
|
|
|
- AND tbs.service_lead_id = #{dpr.requestUserId}
|
|
|
+ AND (tbs.service_lead_id = #{dpr.requestUserId} or EXISTS(SELECT 1 FROM t_f_flow_log tffl where tffl.flow_id = tfcfe.flow_id and tffl.approve_id = #{dpr.requestUserId}))
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
<when test="dpr.hasRegionManager">
|
|
|
- AND tbc.lead_id = #{dpr.requestUserId}
|
|
|
+ AND (tbc.lead_id = #{dpr.requestUserId} or EXISTS(SELECT 1 FROM t_f_flow_log tffl where tffl.flow_id = tfcfe.flow_id and tffl.approve_id = #{dpr.requestUserId}))
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
<when test="dpr.hasRegionCoordinator">
|
|
|
- AND tbc.region_coordinator_id = #{dpr.requestUserId}
|
|
|
+ AND (tbc.region_coordinator_id = #{dpr.requestUserId} or EXISTS(SELECT 1 FROM t_f_flow_log tffl where tffl.flow_id = tfcfe.flow_id and tffl.approve_id = #{dpr.requestUserId}))
|
|
|
</when>
|
|
|
</choose>
|
|
|
</otherwise>
|