Merge remote-tracking branch 'origin/master'
# Conflicts:
# febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | | * name:EmpContractinfo |
| | | * package:cc.mrbird.febs.server.hr.controller |
| | | * description:员工合同信息控制器 |
| | |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.empContractinfoService.findEmpContractinfos(request, empContractinfo)); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "export",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | |
| | | List<EmpContractInfo> records = this.empContractinfoService.findEmpContractinfos(request, empBaseinfo).getRecords(); |
| | | ExcelKit.$Export(EmpContractInfo.class, response).downXlsx(records, false); |
| | | } |
| | | |
| | | @PostMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:add')") |
| | | public void addEmpContractinfo(@Valid EmpContractInfo empContractinfo) throws FebsException { |
| | |
| | | |
| | | |
| | | @FieldInfo(name = "attendYear", type = "varchar", explain = "离职考勤年份") |
| | | @TableField(exist = false) |
| | | @TableField("attendYear") |
| | | // @ExcelField(value = "考勤年份") |
| | | private String attendYear = ""; |
| | | |
| | |
| | | @Override |
| | | public void accept(QueryWrapper<EmpAccessoryVO> wrapper) { |
| | | for (int i = 0; i < certificates.length; i++) { |
| | | String ageBtn = certificates[i]; |
| | | wrapper.or().like("a.certificateList", ageBtn); |
| | | // String ageBtn = certificates[i]; |
| | | // wrapper.or().like("a.certificateList", ageBtn); |
| | | String ageBtn = "|" + certificates[i] + "|"; |
| | | wrapper.gt("LOCATE('"+ageBtn+"',CONCAT('|',replace( certificateList, ',', '|,|'),'|'))",0); |
| | | } |
| | | } |
| | | }; |
| | |
| | | queryWrapper.eq("a.SettleStatus", empAccidentcases.getSettleStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empAccidentcases.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empAccidentcases.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | |
| | |
| | | //设置部门 |
| | | // List<EmpBaseInfo> list = setDeptName(iPage.getRecords()); |
| | | List<EmpBaseInfo> list = iPage.getRecords(); |
| | | List<EmpBaseInfo> newList = new ArrayList<>(); |
| | | List<DicItem> dicItems = CastUtil.castList(redisService.get("dicItems"), DicItem.class); |
| | | list.forEach(p -> { |
| | | p.setSexName("1".equals(p.getSex()) ? "男" : "女"); |
| | |
| | | .orElse("")); |
| | | p.setCertificateListName(getCertificateListName(p.getCertificateList(),dicItems)); |
| | | }); |
| | | // if (StringUtils.isNotBlank(empBaseInfo.getCertificateList())) { |
| | | // String[] certificates = empBaseInfo.getCertificateList().split(","); |
| | | // list.forEach(k -> { |
| | | // String[] dbCertificates = k.getCertificateList().split(","); |
| | | // for (String certificate : certificates) { |
| | | // if (Arrays.asList(dbCertificates).contains(certificate)) { |
| | | // newList.add(k); |
| | | // break; |
| | | // } |
| | | // } |
| | | // }); |
| | | // iPage.setRecords(newList); |
| | | // } else { |
| | | // iPage.setRecords(list); |
| | | // } |
| | | iPage.setRecords(list); |
| | | return iPage; |
| | | } |
| | |
| | | p.setEmpTypeName("1".equals(p.getEmpType()) ? "正式工" : "临时工"); |
| | | } |
| | | if (StringUtils.isNotBlank(p.getDimissionType())) { |
| | | if ("1".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("正常离职"); |
| | | } else if ("2".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("自动离职"); |
| | | } else if ("3".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("公司劝退"); |
| | | } else if ("4".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("公司辞退"); |
| | | } else if ("5".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("试用期内"); |
| | | } |
| | | // if ("1".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("正常离职"); |
| | | // } else if ("2".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("自动离职"); |
| | | // } else if ("3".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("公司劝退"); |
| | | // } else if ("4".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("公司辞退"); |
| | | // } else if ("5".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("试用期内"); |
| | | // } |
| | | p.setDimissionTypeName(dicItems.stream() |
| | | .filter(k -> DicCode.IN_OUT_TYPE.equals(k.getDicCode()) && k.getDicItemCode().equals(p.getDimissionType())) |
| | | .findFirst() |
| | | .map(DicItem::getDicItemName) |
| | | .orElse("")); |
| | | } |
| | | p.setInsuranceTypeName("1".equals(p.getInsuranceType()) ? "(深户)五险一档" : "(非深户)五险一档"); |
| | | p.setArchivesStatusName("0".equals(p.getArchivesStatus()) ? "未移交" : "已移交"); |
| | |
| | | @Override |
| | | public void accept(QueryWrapper<EmpBaseInfo> wrapper) { |
| | | for (int i = 0; i < certificates.length; i++) { |
| | | String ageBtn = certificates[i]; |
| | | wrapper.or().like("a.certificateList", ageBtn); |
| | | String ageBtn = "|" + certificates[i] + "|"; |
| | | wrapper.gt("LOCATE('"+ageBtn+"',CONCAT('|',replace( certificateList, ',', '|,|'),'|'))",0); |
| | | } |
| | | } |
| | | }; |
| | |
| | | queryWrapper.eq("a.ContractStatus", empContractinfo.getContractStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empContractinfo.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empContractinfo.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empContractinfo.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpContractInfo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | |
| | | queryWrapper.like("a.Deduct", empDimissionattend.getDeductStr()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empDimissionattend.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empDimissionattend.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpDimissionAttend> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void createEmpDimissionattend(EmpDimissionAttend empDimissionattend) { |
| | | empDimissionattend.setDimissionAttendId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empDimissionattend.setAttendYear(StringUtils.left(empDimissionattend.getAttendMonth(),4)); |
| | | empDimissionattend.setCreator(operatorId); |
| | | empDimissionattend.setModifier(operatorId); |
| | | this.save(empDimissionattend); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateEmpDimissionattend(EmpDimissionAttend empDimissionattend) { |
| | | EmpDimissionAttend dbData = this.getById(empDimissionattend.getDimissionAttendId()); |
| | | empDimissionattend.setAttendYear(StringUtils.left(empDimissionattend.getAttendMonth(),4)); |
| | | empDimissionattend.setCreateTime(dbData.getCreateTime()); |
| | | empDimissionattend.setCreator(dbData.getCreator()); |
| | | empDimissionattend.setDelFlag(dbData.getDelFlag()); |
| | |
| | | queryWrapper.eq("a.ReportStatus", empInsurance.getReportStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empInsurance.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empInsurance.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpInsurance> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | |
| | | queryWrapper.eq("a.ArbitrationStatus", empLabortrouble.getArbitrationStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empLabortrouble.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empLabortrouble.getEmpStatus().split(",")); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getArbitrationReason())) { |
| | | queryWrapper.like("a.ArbitrationReason", empLabortrouble.getArbitrationReason()); |
| | |
| | | queryWrapper.like("b.allDeptName", empLeaveinfo.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empLeaveinfo.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empLeaveinfo.getEmpStatus().split(",")); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getLeaveDateStr())) { |
| | | queryWrapper.ge("a.BeginTime", empLeaveinfo.getLeaveDateStr().split(",")[0]); |
| | | queryWrapper.le("a.EndTime", empLeaveinfo.getLeaveDateStr().split(",")[1]); |
| | | } |
| | | if(StringUtils.isNotBlank(empLeaveinfo.getLeaveType())){ |
| | | queryWrapper.eq("a.leaveType", empLeaveinfo.getLeaveType()); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpLeaveInfo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | SortUtil.handlePageSort(request, page, "beginTime", FebsConstant.ORDER_ASC, true); |
| | |
| | | queryWrapper.eq("a.SettleStatus", empOccupational.getSettleStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empOccupational.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empOccupational.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpOccupational> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | |
| | | queryWrapper.like("a.Conclusion", empPhysicalexam.getConclusion()); |
| | | } |
| | | if (StringUtils.isNotBlank(empPhysicalexam.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empPhysicalexam.getEmpStatus().split(",")); |
| | | } else { |
| | | queryWrapper.in("a.EmpStatus", 0); |
| | | queryWrapper.in("b.EmpStatus", empPhysicalexam.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void createEmpPhysicalExam(EmpPhysicalExam empPhysicalexam) { |
| | | empPhysicalexam.setPhysicalExamId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | if ("1".equals(empPhysicalexam.getSex())) { |
| | | empPhysicalexam.setSex("男"); |
| | | } else if ("2".equals(empPhysicalexam.getSex())) { |
| | | empPhysicalexam.setSex("女"); |
| | | } |
| | | empPhysicalexam.setCreator(operatorId); |
| | | empPhysicalexam.setModifier(operatorId); |
| | | this.save(empPhysicalexam); |
| | |
| | | queryWrapper.like("a.jobContent", empWorkexperience.getJobContent()); |
| | | } |
| | | if (StringUtils.isNotBlank(empWorkexperience.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empWorkexperience.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empWorkexperience.getEmpStatus().split(",")); |
| | | } else { |
| | | queryWrapper.in("a.EmpStatus", 0); |
| | | } |
| | |
| | | .orElse("1"); |
| | | if(!checkRepetitiveData(empWorkexperience)) { |
| | | empWorkexperience.setWorkExperienceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | if("1".equals(empWorkexperience.getSex())){ |
| | | empWorkexperience.setSex("男"); |
| | | } else if("2".equals(empWorkexperience.getSex())){ |
| | | empWorkexperience.setSex("女"); |
| | | } |
| | | empWorkexperience.setCreator(operatorId); |
| | | empWorkexperience.setModifier(operatorId); |
| | | this.save(empWorkexperience); |
| | |
| | | config: |
| | | server-addr: ${nacos.url}:8848 |
| | | group: DEFAULT_GROUP |
| | | prefix: febs-server-hr |
| | | prefix: febs-server-Hr |
| | | file-extension: yaml |
| | | discovery: |
| | | server-addr: ${nacos.url}:8848 |