Selaa lähdekoodia

政策-审核

yangzian 3 vuotta sitten
vanhempi
commit
97a26b7249

+ 4 - 2
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/controller/CwjsPolicyInfoController.java

@@ -355,8 +355,8 @@ public class CwjsPolicyInfoController {
 		}else if("CompanyManager".equalsIgnoreCase(roleCode)){
 			//自己所属区域
 			//查询 用户 所属区域 公司主题id
-			Integer subjectId = cwjsPolicyInfoService.getCompanySubjectByUserId(userId);
-			cwjsPolicyInfo.setCompanySubjectId(subjectId);
+			List<Integer> subjectId = cwjsPolicyInfoService.getCompanySubjectByUserId(userId);
+			cwjsPolicyInfo.setCompanySubjectIds(subjectId);
 
 			//法务
 		}else if("legalAffairs".equalsIgnoreCase(roleCode)){
@@ -439,6 +439,8 @@ public class CwjsPolicyInfoController {
 								if (Check.isNull(autoConveryList)){
 									cwjsPolicy.setTheBossRight("yes");
 								}
+							}else {
+								cwjsPolicy.setTheBossRight("yes");
 							}
 						}
 					}

+ 1 - 1
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/mapper/CwjsPolicyInfoMapper.java

@@ -66,7 +66,7 @@ public interface CwjsPolicyInfoMapper extends BaseMapper<CwjsPolicyInfo> {
      List<JSONObject> getPolicyApprovalLogByPolicyId(@Param("policyId") Integer policyId);
 
      //查询 用户所属公司主题id
-     Integer getCompanySubjectByUserId(@Param("userId") String userId);
+     List<Integer> getCompanySubjectByUserId(@Param("userId") String userId);
 
      //查询 法务人员
      List<JSONObject> getLegalAffairsUsers();

+ 6 - 3
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/mapper/xml/CwjsPolicyInfoMapper.xml

@@ -39,8 +39,12 @@
           and t2.approved_progress = #{approvedProgress}
         </if>
 
-        <if test="companySubjectId != null and companySubjectId != ''">
-          and t2.company_subject_id = #{companySubjectId}
+        <if test="companySubjectIds != null and companySubjectIds.size() > 0">
+            and (t2.company_subject_id in
+            <foreach item="item" index="index" collection="companySubjectIds" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+                )
         </if>
 
 
@@ -401,7 +405,6 @@
                 AND s.del_flag = 0
         WHERE
             user_id = #{userId}
-            LIMIT 1
 
     </select>
 

+ 1 - 1
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/service/ICwjsPolicyInfoService.java

@@ -41,7 +41,7 @@ public interface ICwjsPolicyInfoService extends IService<CwjsPolicyInfo> {
 
     Result getPolicyApprovalLogByPolicyId(Integer policyId);
 
-    Integer getCompanySubjectByUserId(String userId);
+    List<Integer> getCompanySubjectByUserId(String userId);
 
     List<JSONObject> getLegalAffairsUsers();
 

+ 1 - 1
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/service/impl/CwjsPolicyInfoServiceImpl.java

@@ -206,7 +206,7 @@ public class CwjsPolicyInfoServiceImpl extends ServiceImpl<CwjsPolicyInfoMapper,
     }
 
     @Override
-    public Integer getCompanySubjectByUserId(String userId) {
+    public List<Integer> getCompanySubjectByUserId(String userId) {
         return policyInfoMapper.getCompanySubjectByUserId(userId);
     }