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:员工合同信息控制器 |
| | | * |
| | | * @author luoyibo |
| | | * @date 2021-01-31 11:28:23 |
| | | * @since JDK1.8 |
| | | */ |
| | | * name:EmpContractinfo |
| | | * package:cc.mrbird.febs.server.hr.controller |
| | | * description:员工合同信息控制器 |
| | | * |
| | | * @author luoyibo |
| | | * @date 2021-01-31 11:28:23 |
| | | * @since JDK1.8 |
| | | */ |
| | | @Api(tags = "人员合同信息录入接口") |
| | | @Slf4j |
| | | @Validated |
| | |
| | | @RequiredArgsConstructor |
| | | public class EmpContractInfoController { |
| | | |
| | | private final IEmpContractInfoService empContractinfoService; |
| | | private final IEmpContractInfoService empContractinfoService; |
| | | |
| | | @GetMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:list')") |
| | | public FebsResponse getAllEmpContractinfos(EmpContractInfo empContractinfo) { |
| | | return new FebsResponse().data(empContractinfoService.findEmpContractinfos(empContractinfo)); |
| | | } |
| | | @GetMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:list')") |
| | | public FebsResponse getAllEmpContractinfos(EmpContractInfo empContractinfo) { |
| | | return new FebsResponse().data(empContractinfoService.findEmpContractinfos(empContractinfo)); |
| | | } |
| | | |
| | | @GetMapping("list") |
| | | @PreAuthorize("hasAuthority('empContractinfo:list')") |
| | | public FebsResponse empContractinfoList(QueryRequest request, EmpContractInfo empContractinfo) { |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.empContractinfoService.findEmpContractinfos(request, empContractinfo)); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | @GetMapping("list") |
| | | @PreAuthorize("hasAuthority('empContractinfo:list')") |
| | | public FebsResponse empContractinfoList(QueryRequest request, EmpContractInfo empContractinfo) { |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.empContractinfoService.findEmpContractinfos(request, empContractinfo)); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "export",method= RequestMethod.POST) |
| | | @RequestMapping(value = "export", method = RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | | public void export(QueryRequest request, EmpContractInfo empBaseinfo, HttpServletResponse response) { |
| | | request.setPageSize(this.empContractinfoService.count()); |
| | | 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 { |
| | | try { |
| | | this.empContractinfoService.createEmpContractinfo(empContractinfo); |
| | | } catch (Exception e) { |
| | | String message = "新增员工合同信息失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:delete')") |
| | | public void deleteEmpContractinfo(EmpContractInfo empContractinfo) throws FebsException { |
| | | try { |
| | | this.empContractinfoService.deleteEmpContractinfo(empContractinfo); |
| | | } catch (Exception e) { |
| | | String message = "删除员工合同信息失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | @PostMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:add')") |
| | | public void addEmpContractinfo(@Valid EmpContractInfo empContractinfo) throws FebsException { |
| | | try { |
| | | this.empContractinfoService.createEmpContractinfo(empContractinfo); |
| | | } catch (Exception e) { |
| | | String message = "新增员工合同信息失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @DeleteMapping("{ids}") |
| | | public void logicDeleteEmpContractinfo(@PathVariable("ids") String ids) throws FebsException { |
| | | try { |
| | | this.empContractinfoService.logicDelEmpContractinfo(ids); |
| | | } catch (Exception e) { |
| | | String message = "逻辑删除员工合同信息失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | @DeleteMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:delete')") |
| | | public void deleteEmpContractinfo(EmpContractInfo empContractinfo) throws FebsException { |
| | | try { |
| | | this.empContractinfoService.deleteEmpContractinfo(empContractinfo); |
| | | } catch (Exception e) { |
| | | String message = "删除员工合同信息失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @PutMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:update')") |
| | | public void updateEmpContractinfo(EmpContractInfo empContractinfo) throws FebsException { |
| | | try { |
| | | this.empContractinfoService.updateEmpContractinfo(empContractinfo); |
| | | } catch (Exception e) { |
| | | String message = "修改员工合同信息失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | @DeleteMapping("{ids}") |
| | | public void logicDeleteEmpContractinfo(@PathVariable("ids") String ids) throws FebsException { |
| | | try { |
| | | this.empContractinfoService.logicDelEmpContractinfo(ids); |
| | | } catch (Exception e) { |
| | | String message = "逻辑删除员工合同信息失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @PutMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:update')") |
| | | public void updateEmpContractinfo(EmpContractInfo empContractinfo) throws FebsException { |
| | | try { |
| | | this.empContractinfoService.updateEmpContractinfo(empContractinfo); |
| | | } catch (Exception e) { |
| | | String message = "修改员工合同信息失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "合同信息提交") |
| | | @DeleteMapping("toNormal/{ids}") |
| | | @PreAuthorize("hasAuthority('empContractinfo:delete')") |
| | | public void momentToNormal(@NotBlank(message = "{required}") @PathVariable("ids") String ids) throws FebsException { |
| | | public void momentToNormal(@NotBlank(message = "{required}") @PathVariable("ids") String ids) throws FebsException { |
| | | try { |
| | | this.empContractinfoService.momentToNormal(ids); |
| | | } catch (Exception e) { |
| | |
| | | |
| | | |
| | | @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()) ? "男" : "女"); |
| | |
| | | .findFirst() |
| | | .map(DicItem::getDicItemName) |
| | | .orElse("")); |
| | | p.setCertificateListName(getCertificateListName(p.getCertificateList(),dicItems)); |
| | | 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); |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | @Override |
| | | public boolean updateSeniority() { |
| | | return empBaseInfoMapper.updateSeniority()>0; |
| | | return empBaseInfoMapper.updateSeniority() > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateDeptName() { |
| | | return empBaseInfoMapper.updateDeptName()>0; |
| | | return empBaseInfoMapper.updateDeptName() > 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()); |
| | |
| | | |
| | | @Override |
| | | public IPage<EmpPhysicalExam> findEmpPhysicalExams(QueryRequest request, EmpPhysicalExam empPhysicalexam) { |
| | | QueryWrapper<EmpPhysicalExam> queryWrapper = new QueryWrapper<>(); |
| | | QueryWrapper<EmpPhysicalExam> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empPhysicalexam.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empPhysicalexam.getEmpNumb())) { |
| | | queryWrapper.like("a.EmpNumb", empPhysicalexam.getEmpNumb()); |
| | |
| | | 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); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpPhysicalExam(List<List<Object>> listObject,List<String> returnList,List<DicItem> dicItems) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0||StrUtil.isBlank(list.get(0).toString())){ |
| | | public void importEmpPhysicalExam(List<List<Object>> listObject, List<String> returnList, List<DicItem> dicItems) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size() == 0 || StrUtil.isBlank(list.get(0).toString())) { |
| | | continue; |
| | | } |
| | | EmpPhysicalExam physicalExam = new EmpPhysicalExam(); |
| | | physicalExam.setPhysicalExamId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | physicalExam.setEmpNumb(list.get(0).toString()); |
| | | physicalExam.setDeptName(list.get(1).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | if(null == depts){ |
| | | depts =remoteDeptService.setDeptRedis(); |
| | | EmpPhysicalExam physicalExam = new EmpPhysicalExam(); |
| | | physicalExam.setPhysicalExamId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | physicalExam.setEmpNumb(list.get(0).toString()); |
| | | physicalExam.setDeptName(list.get(1).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | if (null == depts) { |
| | | depts = remoteDeptService.setDeptRedis(); |
| | | } |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().orElse(null); |
| | | if (null == dept) { |
| | | returnList.add(StrUtil.format("导入员工体检信息异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | returnList.add(StrUtil.format("导入员工体检信息异常: 出现位置第{}行, 原因:{}部门不存在", listObject.indexOf(list) + 1, list.get(1).toString())); |
| | | continue; |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | returnList.add(StrUtil.format("导入员工体检信息异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | if (null == empId) { |
| | | returnList.add(StrUtil.format("导入员工体检信息异常: 出现位置第{}行, 原因:{}员工编号不存在", listObject.indexOf(list) + 1, list.get(0).toString())); |
| | | continue; |
| | | } |
| | | physicalExam.setDelFlag(0); |
| | | physicalExam.setEmpId(empId); |
| | | physicalExam.setDeptName(list.get(1).toString()); |
| | | physicalExam.setDeptId(dept.getDeptId()); |
| | | physicalExam.setJobName(list.get(2).toString()); |
| | | physicalExam.setEmpName(list.get(3).toString()); |
| | | physicalExam.setCertificateNumb(list.get(4).toString()); |
| | | physicalExam.setSex(list.get(5).toString()); |
| | | physicalExam.setHospital(list.get(6).toString()); |
| | | try { |
| | | physicalExam.setDeptId(dept.getDeptId()); |
| | | physicalExam.setJobName(list.get(2).toString()); |
| | | physicalExam.setEmpName(list.get(3).toString()); |
| | | physicalExam.setCertificateNumb(list.get(4).toString()); |
| | | physicalExam.setSex(list.get(5).toString()); |
| | | physicalExam.setHospital(list.get(6).toString()); |
| | | try { |
| | | if (StringUtils.isNotBlank(list.get(7).toString())) { |
| | | physicalExam.setPhysicalExamDate(DateUtil.parse(list.get(7).toString())); |
| | | } |
| | | }catch (Exception e){ |
| | | returnList.add(StrUtil.format("导入员工体检信息异常: 出现位置第{}行, 原因:{}时间格式错误",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | } catch (Exception e) { |
| | | returnList.add(StrUtil.format("导入员工体检信息异常: 出现位置第{}行, 原因:{}时间格式错误", listObject.indexOf(list) + 1, list.get(0).toString())); |
| | | continue; |
| | | } |
| | | |
| | | //体检 |
| | | DicItem dicItem =dicItems.parallelStream().filter(j->StrUtil.equalsIgnoreCase(j.getDicCode(),"physicalExamType")&&StrUtil.equals(j.getDicItemName(),list.get(8).toString())).findFirst().orElse(null); |
| | | if (null!=dicItem){ |
| | | DicItem dicItem = dicItems.parallelStream().filter(j -> StrUtil.equalsIgnoreCase(j.getDicCode(), "physicalExamType") && StrUtil.equals(j.getDicItemName(), list.get(8).toString())).findFirst().orElse(null); |
| | | if (null != dicItem) { |
| | | physicalExam.setPhysicalExamType(dicItem.getDicItemCode()); |
| | | } |
| | | |
| | | physicalExam.setBloodPressure(list.get(9).toString()); |
| | | physicalExam.setTransaminase(list.get(10).toString()); |
| | | //心电图 |
| | | physicalExam.setBloodPressure(list.get(9).toString()); |
| | | physicalExam.setTransaminase(list.get(10).toString()); |
| | | //心电图 |
| | | |
| | | dicItem =dicItems.parallelStream().filter(j->StrUtil.equalsIgnoreCase(j.getDicCode(),"ecg")&&StrUtil.equals(j.getDicItemName(),list.get(11).toString())).findFirst().orElse(null); |
| | | if (null!=dicItem){ |
| | | dicItem = dicItems.parallelStream().filter(j -> StrUtil.equalsIgnoreCase(j.getDicCode(), "ecg") && StrUtil.equals(j.getDicItemName(), list.get(11).toString())).findFirst().orElse(null); |
| | | if (null != dicItem) { |
| | | physicalExam.setEcg(dicItem.getDicItemCode()); |
| | | |
| | | } |
| | | physicalExam.setConclusion(list.get(12).toString()); |
| | | physicalExam.setReviewRecord(list.get(13).toString()); |
| | | physicalExam.setRemark(list.get(14).toString()); |
| | | this.save(physicalExam); |
| | | } |
| | | } |
| | | physicalExam.setConclusion(list.get(12).toString()); |
| | | physicalExam.setReviewRecord(list.get(13).toString()); |
| | | physicalExam.setRemark(list.get(14).toString()); |
| | | this.save(physicalExam); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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 |