Переглянути джерело

bug修复,借款bug;员工档案bug

chenjun 5 місяців тому
батько
коміт
87bd520f8c

+ 2 - 3
zjugis-business/src/main/java/com/zjugis/business/flow/loan/event/LoanEvent.java

@@ -284,14 +284,13 @@ public class LoanEvent extends BaseController {
             Loan entity = loanFlowService.findByInstanceId(flowInstanceId);
             CommonResult<AdminUserRespDTO> result = adminUserApi.getUser(entity.getWorkerId());
             Project project = projectService.selectById(entity.getProjectId());
-            String xmjlId = project.getXmjlId();
             String userId = entity.getWorkerId();
             List<PostRespDTO> postList = postApi.getPostByUser(userId).getCheckedData();
             Set<String> postCodes = convertSet(postList, PostRespDTO::getCode);
             List<DeptRespDTO> deptChildList = deptApi.getChildDeptList(result.getData().getDeptId()).getCheckedData();
             Set<String> depts = convertSet(deptChildList, DeptRespDTO::getId);
             depts.add(result.getData().getDeptId());
-            if (entity != null && CollectionUtil.contains(postCodes, "fgslz") && userId.equals(xmjlId) && CollectionUtil.contains(depts, project.getZrbmId()) && userId.equals(xmjlId)) {
+            if (entity != null && CollectionUtil.contains(postCodes, "fgslz") && CollectionUtil.contains(depts, project.getZrbmId())) {
                 return "true";
             }
             return "false";
@@ -355,7 +354,7 @@ public class LoanEvent extends BaseController {
             List<DeptRespDTO> deptChildList = deptApi.getChildDeptList(result.getData().getDeptId()).getCheckedData();
             Set<String> depts = convertSet(deptChildList, DeptRespDTO::getId);
             depts.add(result.getData().getDeptId());
-            if (entity != null && CollectionUtil.contains(postCodes, "fgslz") && !CollectionUtil.contains(depts, project.getZrbmId()) ) {
+            if (entity != null && CollectionUtil.contains(postCodes, "fgslz") && !CollectionUtil.contains(depts, project.getZrbmId())) {
                 return "true";
             }
             return "false";

+ 1 - 13
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/service/staff/RecordsServiceImpl.java

@@ -73,18 +73,6 @@ public class RecordsServiceImpl implements RecordsService {
 
         Page<StaffRecordSDO> page = new Page<>();
 
-        //如果部门id不为空 则先去查当前部门下的所有员工列表 放到档案的查询条件中   这里这么写的原因是为了避免在后台变更用户的部门时同步更新档案
-        List<String> userIds = new ArrayList<>();
-        if (StrUtil.isNotEmpty(reqVO.getDeptId())) {
-            CommonResult<List<AdminUserRespDTO>> commonResult = userApi.getDeptChildUserListByDeptId(reqVO.getDeptId());
-            if (commonResult.getCode() != 0) {
-                throw new RuntimeException(commonResult.getMsg());
-            }
-            userIds = commonResult.getData().stream().map(AdminUserRespDTO::getId).filter(Objects::nonNull).collect(Collectors.toList());
-            if (CollectionUtil.isEmpty(userIds)) {
-                return page;
-            }
-        }
 
         page = recordsMapper.selectPage(new Page<>(reqVO.getPageNo(), reqVO.getPageSize()),
                 new LambdaQueryWrapperX<StaffRecordSDO>()
@@ -95,7 +83,7 @@ public class RecordsServiceImpl implements RecordsService {
                         .eqIfPresent(StaffRecordSDO::getHkxz, reqVO.getHkxz())
                         .likeIfPresent(StaffRecordSDO::getMajor, reqVO.getMajor())
                         .eqIfPresent(StaffRecordSDO::getZgxl, reqVO.getZgxl())
-                        .inIfPresent(StaffRecordSDO::getUserId, userIds)
+                        .eqIfPresent(StaffRecordSDO::getDeptId, reqVO.getDeptId())
                         .ne(StaffRecordSDO::getLoginName, "admin")//过滤掉管理员
                         .orderByDesc(StaffRecordSDO::getLoginName)
         );