wangqiang před 1 rokem
rodič
revize
1798ea5003

+ 1 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverComputerService.java

@@ -63,6 +63,7 @@ public class HandoverComputerService extends ServiceImpl<HandoverComputerMapper,
 
             HandoverComputer report = computerMapper.getById(computer.getId());
             if (report != null){
+                computer.setCreateById(report.getCreateById());
                 return update(computer);
             }
         }

+ 1 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverDraftService.java

@@ -66,6 +66,7 @@ public class HandoverDraftService extends ServiceImpl<HandoverDraftMapper, Hando
 
             HandoverDraft report = draftMapper.getById(draft.getId());
             if (report != null){
+                draft.setCreateById(report.getCreateById());
                 return update(draft);
             }
         }

+ 1 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverImprestService.java

@@ -62,6 +62,7 @@ public class HandoverImprestService extends ServiceImpl<HandoverImprestMapper, H
 
             HandoverImprest report = imprestMapper.getById(accounts.getId());
             if (report != null){
+                accounts.setCreateById(report.getCreateById());
                 return update(accounts);
             }
         }

+ 2 - 2
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverService.java

@@ -270,8 +270,6 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
 
             allMap.put("备用金",handoverImprestNewMap);
 
-            SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
-
             draft.setType("2");
             draftService.saveOrUpdate(draft);
             computer.setType("2");
@@ -282,6 +280,8 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
             handoverSocialSecurityService.saveOrUpdate(socialSecurity);
             handoverImprest.setType("2");
             handoverImprestService.saveOrUpdate(handoverImprest);
+
+            SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
         }
 
         return report;

+ 1 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverSocialSecurityService.java

@@ -64,6 +64,7 @@ public class HandoverSocialSecurityService extends ServiceImpl<HandoverSocialSec
 
             HandoverSocialSecurity report = socialSecurityMapper.getById(accounts.getId());
             if (report != null){
+                accounts.setCreateById(report.getCreateById());
                 return update(accounts);
             }
         }

+ 20 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/domain/DepartRegistration.java

@@ -89,4 +89,24 @@ public class DepartRegistration extends BaseEntity {
     private String securityProcDefId;
     @TableField(exist = false)
     private String securityType;
+
+    //底稿归档检查表
+    @TableField(exist = false)
+    private String draftId;
+    @TableField(exist = false)
+    private String draftProcInsId;
+    @TableField(exist = false)
+    private String draftProcDefId;
+    @TableField(exist = false)
+    private String draftType;
+
+    //门卡回收表
+    @TableField(exist = false)
+    private String recoveryId;
+    @TableField(exist = false)
+    private String recoveryProcInsId;
+    @TableField(exist = false)
+    private String recoveryProcDefId;
+    @TableField(exist = false)
+    private String recoveryType;
 }

+ 11 - 1
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/mapper/xml/DepartMapper.xml

@@ -50,7 +50,15 @@
         ifnull(sse.type,"0") as "securityType",
         sse.id as securityId,
         sse.proc_ins_id as securityProcInsId,
-        sse.process_definition_id as securityProcDefId
+        sse.process_definition_id as securityProcDefId,
+        ifnull(dhd.type,"0") as "draftType",
+        dhd.id as draftId,
+        dhd.proc_ins_id as draftProcInsId,
+        dhd.process_definition_id as draftProcDefId,
+        ifnull(reco.type,"0") as "recoveryType",
+        reco.id as recoveryId,
+        reco.proc_ins_id as recoveryProcInsId,
+        reco.process_definition_id as recoveryProcDefId
         from human_resources_depart_registration a
         LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
         left join sys_user su on a.project_manager = su.id
@@ -62,6 +70,8 @@
         left join human_resources_depart_handover_computer compu on dh.id = compu.handover_id
         left join human_resources_depart_handover_accounts acco on dh.id = acco.handover_id
         left join human_resources_depart_handover_social_security sse on dh.id = sse.handover_id
+        left join human_resources_depart_handover_draft dhd on dh.id = dhd.handover_id
+        left join human_resources_depart_handover_recovery reco on dh.id = reco.handover_id
         ${ew.customSqlSegment}
         ORDER BY a.create_time DESC
     </select>

+ 21 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/OfficeController.java

@@ -133,6 +133,27 @@ public class OfficeController {
      * @param showAll 是否显示不可用数据 1 显示 0 隐藏
      * @return
      */
+    @ApiLog("获取部门数据")
+    @GetMapping("allTreeData")
+    public ResponseEntity <List <OfficeDTO>> allTreeData(@RequestParam(required = false) String tenantId,
+                                                      @RequestParam(required = false) String parentId,
+                                                      @RequestParam(required = false) String extId,
+                                                      @RequestParam(required = false) String type,
+                                                      @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        List <OfficeDTO> list = officeService.findAllList ( tenantId, parentId );
+        //List <OfficeDTO> rootTree = officeService.getRootTree (list, extId, type, showAll,"1" );
+        List <OfficeDTO> rootTree = officeService.getOldRootTree (parentId,list, extId, type, showAll );
+        return ResponseEntity.ok ( rootTree );
+    }
+
+    /**
+     * 获取机构JSON数据。
+     *
+     * @param extId   排除的ID
+     * @param type    类型(1:公司;2:部门)
+     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @return
+     */
     @ApiLog("获取签字注师2部门数据")
     @GetMapping("qzTreeData")
     public ResponseEntity <List <OfficeDTO>> qzTreeData(@RequestParam(required = false) String tenantId,

+ 133 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -346,6 +346,139 @@ public class UserController {
         return ResponseEntity.ok ( result );
     }
 
+    /**
+     * 查询列表
+     *
+     * @param userDTO
+     * @param page
+     * @return
+     */
+    @ApiLog("用户数据列表")
+    @ApiOperation(value = "用户数据列表")
+    @GetMapping("allUserList")
+    public ResponseEntity allUserList(UserDTO userDTO, Page <UserDTO> page) throws Exception {
+
+        QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
+        // 管理员查询不限制
+//        if (!UserUtils.getCurrentUserDTO().isAdmin()) {
+//            if (ObjectUtil.isNotEmpty(userDTO)){
+//                if (ObjectUtil.isNotEmpty(userDTO.getCompanyDTO()) && ObjectUtil.isNotEmpty(userDTO.getOfficeDTO())) {
+//                    String id = UserUtils.getCurrentUserDTO().getCompanyDTO().getId();
+//                    if (StringUtils.isNotBlank(userDTO.getCertType())) {
+//                        //获取当前登陆人是否事中审公司人员
+//                        /*if(officeDTO.getParentIds().contains("1615171302381182978")){
+//
+//                        }*/
+//                    }else{
+//                        // 当不是精确的部门查询时,再添加下面的筛选条件
+//                        if ((StringUtils.isNotBlank(userDTO.getCompanyDTO().getId()) && StringUtils.isBlank(userDTO.getOfficeDTO().getId()))
+//                                || "true".equals(userDTO.getSelectAll())) {
+//                            // officeDTO.id是空,companyDTO.id不是空的话,说明前端组件点击的集团来进行查询
+//                            // selectAll为‘true’的话,说明前端没有选择集团或者部门查询,这个时候要展示全部人员
+//                            // 根据当前用户的部门id找到此部门的ids
+//                            String ids = officeService.getById(UserUtils.getCurrentUserDTO().getOfficeDTO().getId()).getParentIds();
+//                            // 根据ids分隔后的index[2],找到当前用户的所属公司id
+//                            String companyId = null;
+//                            String[] split = ids.split(",");
+//                            // split.length大于2,说明当前登录人所属部门是普通部门,展示部分人员信息
+//                            // 否则,当前登录人所属公共类部门(忘了叫什么类部门了,就是总经办那种部门),展示全部人员信息
+//                            if(split.length>2){
+//                                companyId = split[2];
+//                                // 根据公司id,找到此公司下的所有部门
+//                                List<Office> officeList = officeService.list(new QueryWrapper<Office>().lambda().eq(Office::getParentId, companyId));
+//                                Set officeIdSet = new HashSet();
+//                                for (Office office : officeList) {
+//                                    if(StringUtils.isNotBlank(office.getId())){
+//                                        officeIdSet.add(office.getId());
+//                                    }
+//                                }
+//                                List<String> officeIdList = Lists.newArrayList(officeIdSet);
+//                                // 拿到这些部门的id
+//                                //List<String> officeIdList = officeList.stream().distinct().map(Office::getId).collect(Collectors.toList());
+//                                // 拿到所有公有部门的id
+//                                List<String> officePublicIdList = officeService.list(new LambdaQueryWrapper<Office>().eq(Office::getIsPublic,"1")).stream().map(Office::getId).collect(Collectors.toList());
+//                                // 拿到直属公司的id
+//                                officeIdList.add(companyId);
+//                                // 最后得到的所有部门的id
+//                                officeIdList.addAll(officePublicIdList);
+//                                List<String> lastIds = officeIdList.stream().distinct().collect(Collectors.toList());
+//                                // 添加筛选条件为这些部门的id
+//                                queryWrapper.in("a.office_id",lastIds);
+//                            }
+//                        } else if(StringUtils.isBlank(userDTO.getCompanyDTO().getId()) && StringUtils.isNotBlank(userDTO.getOfficeDTO().getId())) {
+//                            // officeDTO.id不是空,companyDTO.id是空的话,说明前端组件点击的部门查询
+//                            queryWrapper.eq("a.office_id",userDTO.getOfficeDTO().getId());
+//                        }
+//                    }
+//                }
+//            }
+//        }
+        if (ObjectUtil.isNotEmpty(userDTO)) {
+            // 当certType传值时,获取拥有此资格证类型的人员
+            if (StringUtils.isNotBlank(userDTO.getCertType())) {
+
+                //获取当前登录人信息
+                UserDTO loginUserDTO = UserUtils.getCurrentUserDTO();
+                //如果当前登录人是中审的管理咨询部人员,则注会列表中添加该部门选择项
+                if(null != loginUserDTO && null != loginUserDTO.getOfficeDTO()){
+                    OfficeDTO officeDTO = loginUserDTO.getOfficeDTO();
+                    if(StringUtils.isNotBlank(officeDTO.getId())){
+                        if("1602840084816138241".equals(officeDTO.getId())){
+                            queryWrapper.and(
+                                    wrapper -> wrapper.eq("sc.type",userDTO.getCertType()).or().eq("a.office_id","1602840084816138241")
+                            );
+                            //queryWrapper.eq("sc.type",userDTO.getCertType()).or().eq("a.office_id","1602840084816138241");
+                        }else{
+                            queryWrapper.eq("sc.type",userDTO.getCertType());
+                        }
+                    }else{
+                        queryWrapper.eq("sc.type",userDTO.getCertType());
+                    }
+                }else{
+                    queryWrapper.eq("sc.type",userDTO.getCertType());
+                }
+
+            }
+            if ( userDTO.getTenantDTO ( ) != null && StrUtil.isNotBlank ( userDTO.getTenantDTO ( ).getId ( ) ) ) {
+                queryWrapper.eq ( "a.tenant_id", userDTO.getTenantDTO ( ).getId ( ) );
+            }
+        }
+        IPage <UserDTO> result = userService.findPage ( page, queryWrapper );
+//        IPage<UserDTO> result2 = userService.findPage3(userDTO);
+//        //判断 如果是签字注师筛选,则获取签字注师的被选择次数
+//        if(StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())){
+//            List<UserDTO> userList = result.getRecords();
+//            List<UserDTO> user2List = result2.getRecords();
+//            List<String> idList = Lists.newArrayList();
+//            for (UserDTO dto : user2List) {
+//                idList.add(dto.getId());
+//            }
+//            for (UserDTO info : userList) {
+//                if(idList.size()>0){
+//                    if(idList.contains(info.getId())){
+//                        info.setAccountantUserFlag(0);
+//                    }else{
+//                        info.setAccountantUserFlag(1);
+//                    }
+//                }else{
+//                    if("潘中".equals(info.getName())){
+//                        info.setAccountantUserFlag(0);
+//                    }else{
+//                        info.setAccountantUserFlag(1);
+//                    }
+//                }
+//                /*if("潘中".equals(info.getName())){
+//                    info.setAccountantUserFlag(0);
+//                }else{
+//                    info.setAccountantUserFlag(1);
+//                }*/
+//                Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
+//                info.setAccountantUserCount(accountantUserCount);
+//            }
+//        }
+        return ResponseEntity.ok ( result );
+    }
+
 
     @ApiLog("根据用户id获取被选次数")
     @ApiOperation(value = "根据用户id获取被选次数")

+ 17 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java

@@ -94,6 +94,23 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
      *
      * @return
      */
+    public List <OfficeDTO> findAllList(String tenantId, String parentId) {
+        QueryWrapper queryWrapper = new QueryWrapper ( );
+        //根据当前人的所属部门去查相关数据
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        queryWrapper.like ( StringUtils.isNotBlank ( parentId ), "a.parent_ids", "," + parentId + "," );
+
+        queryWrapper.eq ( "a.del_flag", 0 );
+
+        queryWrapper.orderByAsc ( "a.sort" );
+        return baseMapper.findList ( queryWrapper );
+    }
+
+    /**
+     * 获取列表
+     *
+     * @return
+     */
     public List <OfficeDTO> findList2(String tenantId, String parentId) {
         QueryWrapper queryWrapper = new QueryWrapper ( );
         // 查询岗位用户信息