Browse Source

验收单 权限

zhangc 6 months ago
parent
commit
76efcd2173

+ 3 - 0
src/main/java/com/sunxung/factoring/service/sys/impl/AuthorityServiceImpl.java

@@ -73,6 +73,9 @@ public class AuthorityServiceImpl implements AuthorityService {
     @Transactional(rollbackFor = Exception.class)
     public LoginResultDto login(String loginName, String password) {
         User entiy = userService.getByLoginName(loginName);
+        if(entiy==null){
+            throw new ValidatorException(CodeUtil.FAIL, "该用户不存在");
+        }
         // 判断是否给分配了角色以及设置管理员角色
         if (null != entiy) {
             List<UserRoleRel> roleIdList = roleService.getUserRoleByUserId(entiy.getId());

+ 3 - 1
src/main/resources/mapper/acceptancesheet/AcceptanceBasicInfoMapper.xml

@@ -129,10 +129,12 @@
         LEFT JOIN t_dictionary t6 ON t2.acceptance_status = t6.code
         LEFT JOIN trading_platform t7 on t7.id = t2.trading_platform_id
         LEFT JOIN c_project_information t8 on t2.business_number = t8.business_number
+        LEFT JOIN c_supplier_info t9 on t2.c_supplier_info_id = t9.c_enterprise_id
+        LEFT JOIN c_sys_user t10 on t9.sys_user_id = t10.id
         <where>
             t1.business_type  like "AcceptanceSheet%" and t2.id is not null
             <if test="userIds != null and userIds.size()>0">
-                AND t1.assignee_id in
+                AND t10.project_manager in
                 <foreach collection="userIds" index="index" item="item"  open="(" separator="," close=")">
                     #{item}
                 </foreach>