wangliang 9 月之前
父节点
当前提交
edebd9b83e
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      sop-business/src/main/resources/mapper/TBDingApplyMapper.xml

+ 6 - 6
sop-business/src/main/resources/mapper/TBDingApplyMapper.xml

@@ -105,17 +105,17 @@
             <if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">
             <if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">
                 <choose>
                 <choose>
                     <when test="dpr.hasBusiness">
                     <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>
                     </when>
                     <otherwise>
                     <otherwise>
                         <choose>
                         <choose>
                             <when test="dpr.hasRegionManager">
                             <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>
                             </when>
                             <otherwise>
                             <otherwise>
                                 <choose>
                                 <choose>
                                     <when test="dpr.hasRegionCoordinator">
                                     <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>
                                     </when>
                                 </choose>
                                 </choose>
                             </otherwise>
                             </otherwise>
@@ -238,17 +238,17 @@
             <if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">
             <if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">
                 <choose>
                 <choose>
                     <when test="dpr.hasBusiness">
                     <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>
                     </when>
                     <otherwise>
                     <otherwise>
                         <choose>
                         <choose>
                             <when test="dpr.hasRegionManager">
                             <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>
                             </when>
                             <otherwise>
                             <otherwise>
                                 <choose>
                                 <choose>
                                     <when test="dpr.hasRegionCoordinator">
                                     <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>
                                     </when>
                                 </choose>
                                 </choose>
                             </otherwise>
                             </otherwise>