Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Map; |
| | |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | @GetMapping("{labelid}") |
| | | @PreAuthorize("hasAuthority('empAccessory:delete')") |
| | | public FebsResponse getLabelCount(@PathVariable(value = "labelid") String labelid) throws FebsException { |
| | | try { |
| | | return new FebsResponse().data(empAccessoryService.getLabelCount(Long.valueOf(labelid))); |
| | | } catch (Exception e) { |
| | | String message = "修改Label失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpBaseInfo; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteUserService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpAccidentCasesService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBadRecordService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpContractInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpDimissionAttendService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpInsuranceService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLaborTroubleService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLeaveInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpOccupationalService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpPhysicalExamService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpRemarkinfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpResignService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpUnemploymentService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpWorkExperienceService; |
| | | import cc.mrbird.febs.server.hr.util.PoiExportExcel; |
| | | import cc.mrbird.febs.server.hr.util.PoiImportExcel; |
| | | import cn.hutool.core.date.DateUtil; |
| | |
| | | public class EmpBaseInfoController { |
| | | |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IEmpWorkExperienceService empWorkExperienceService; |
| | | private final IEmpPhysicalExamService empPhysicalExamService; |
| | | private final IEmpContractInfoService empContractInfoService; |
| | | private final IEmpDimissionAttendService empDimissionAttendService; |
| | | private final IEmpLeaveInfoService empLeaveInfoService; |
| | | private final IEmpResignService empResignService; |
| | | private final IEmpUnemploymentService empUnemploymentService; |
| | | private final IEmpInsuranceService empInsuranceService; |
| | | private final IEmpAccidentCasesService empAccidentCasesService; |
| | | private final IEmpOccupationalService empOccupationalService; |
| | | private final IEmpLaborTroubleService empLaborTroubleService; |
| | | private final IEmpBadRecordService empBadRecordService; |
| | | private final IEmpRemarkinfoService empRemarkinfoService; |
| | | private final IRemoteUserService remoteUserService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | |
| | |
| | | ExcelKit.$Export(EmpBaseInfo.class, response).downXlsx(records, false); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入员工") |
| | | @ApiOperation(value = "导入员工") |
| | | @PostMapping("importEmp") |
| | | public void importEmp(MultipartFile file) throws IOException { |
| | | InputStream in = null; |
| | | List<List<Object>> listObject = null; |
| | | List<List<List<Object>>> listObject = null; |
| | | try { |
| | | if (!file.isEmpty()) { |
| | | in = file.getInputStream(); |
| | | listObject = new PoiImportExcel().getListByExcel(in, file.getOriginalFilename()); |
| | | listObject = PoiImportExcel.getMulitListByExcel(in, file.getOriginalFilename()); |
| | | in.close(); |
| | | empBaseInfoService.importEmpBaseInfo(listObject); |
| | | empBaseInfoService.importEmpBaseInfo(listObject.get(0)); |
| | | empWorkExperienceService.importEmpWorkExperience(listObject.get(1)); |
| | | empPhysicalExamService.importEmpPhysicalExam(listObject.get(2)); |
| | | empContractInfoService.importEmpContractInfo(listObject.get(3)); |
| | | empDimissionAttendService.importEmpDimissionAttend(listObject.get(4)); |
| | | empLeaveInfoService.importEmpLeaveInfo(listObject.get(5)); |
| | | empResignService.importEmpResign(listObject.get(6)); |
| | | empUnemploymentService.importEmpUnemployment(listObject.get(7)); |
| | | empInsuranceService.importEmpInsurance(listObject.get(8)); |
| | | empAccidentCasesService.importEmpAccidentCases(listObject.get(9)); |
| | | empOccupationalService.importEmpOccupational(listObject.get(10)); |
| | | empLaborTroubleService.importEmpLaborTrouble(listObject.get(11)); |
| | | empBadRecordService.importEmpBadRecord(listObject.get(12)); |
| | | empRemarkinfoService.importEmpBadRecord(listObject.get(13)); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("导入员工", e); |
| | | } |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "关闭员工档案") |
| | |
| | | @ExcelField(value = "是否住院", writeConverterExp = "0=未住院,1=已住院") |
| | | private Integer hospitalizatioFlag = 0; |
| | | |
| | | @FieldInfo(name = "bedNumb", type = "tinyint", explain = "床号") |
| | | @FieldInfo(name = "bedNumb", type = "varchar", explain = "床号") |
| | | @TableField("bedNumb") |
| | | @ExcelField(value = "床号") |
| | | private Integer bedNumb = 0; |
| | | private String bedNumb = ""; |
| | | |
| | | @FieldInfo(name = "reprotTime", type = "date", explain = "报案时间") |
| | | @TableField("reprotTime") |
| | |
| | | @ExcelField(value = "是否住院", writeConverterExp = "0=未住院,1=已住院") |
| | | private Integer hospitalizatioFlag = 0; |
| | | |
| | | @FieldInfo(name = "bedNumb", type = "tinyint", explain = "床号") |
| | | @FieldInfo(name = "bedNumb", type = "varchar", explain = "床号") |
| | | @TableField("bedNumb") |
| | | @ExcelField(value = "床号") |
| | | private Integer bedNumb = 0; |
| | | private String bedNumb = ""; |
| | | |
| | | @FieldInfo(name = "reportTime", type = "datetime", explain = "报案时间") |
| | | @TableField("reportTime") |
| | |
| | | @TableField("remark") |
| | | private String remark = ""; |
| | | |
| | | @FieldInfo(name = "expenseReport", type = "varchar", explain = "报单号") |
| | | @TableField("expenseReport") |
| | | @ExcelField(value = "报单号") |
| | | private String expenseReport = ""; |
| | | |
| | | @FieldInfo(name = "settleDate", type = "date", explain = "案结日期") |
| | | @TableField("settleDate") |
| | | @JsonSerialize(using = DateSerializer.class) |
| | | @JsonDeserialize(using = DateDeSerializer.class) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ExcelField(value = "案结日期", writeConverter = TimeConverter.class) |
| | | private Date settleDate; |
| | | |
| | | @TableField(exist = false) |
| | | private String hrDoDateStr= ""; |
| | | |
| | |
| | | void mvFiles(String accessoryids,Long labelid,Long empId); |
| | | |
| | | void singledownload(String empIds, Long labelid, HttpServletRequest request, HttpServletResponse response) throws Exception; |
| | | |
| | | |
| | | Integer getLabelCount(Long labelId); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpAccidentCases(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpBadRecord(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpContractInfo(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpDimissionAttend(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpInsurance(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpLaborTrouble(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpLeaveInfo(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpOccupational(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpPhysicalExam(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpBadRecord(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpResign(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpUnemployment(List<List<Object>> listObject); |
| | | } |
| | |
| | | * @author: luoyibo |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpWorkExperience(List<List<Object>> listObject); |
| | | } |
| | |
| | | FileUtil.del(new StringBuilder().append(mianFileStr, 0, mianFileStr.length() - 1).append(".zip").toString()); |
| | | FileUtil.del(mianFileStr); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Integer getLabelCount(Long labelId) { |
| | | LambdaQueryWrapper<EmpAccessory> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(EmpAccessory::getDelFlag,0); |
| | | wrapper.eq(EmpAccessory::getLabelid,labelId); |
| | | return this.count(wrapper); |
| | | } |
| | | } |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpAccidentCases; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpAccidentCasesMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpAccidentCasesService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | |
| | | class EmpAccidentCasesServiceImpl extends ServiceImpl<EmpAccidentCasesMapper, EmpAccidentCases> |
| | | implements IEmpAccidentCasesService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpAccidentCasesMapper empAccidentcasesMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()).map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empAccidentcasesMapper.momentToNormal(list, operatorId) > 0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpAccidentCases(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpAccidentCases empAccidentcases=new EmpAccidentCases(); |
| | | empAccidentcases.setAccidentId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empAccidentcases.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | empAccidentcases.setDeptName(list.get(1).toString()); |
| | | empAccidentcases.setDeptId(deptId); |
| | | empAccidentcases.setJobName(list.get(2).toString()); |
| | | empAccidentcases.setEmpName(list.get(3).toString()); |
| | | empAccidentcases.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | empAccidentcases.setInjuredTime(DateUtil.parseDateTime(list.get(5).toString())); |
| | | } |
| | | empAccidentcases.setInjuredAddress(list.get(6).toString()); |
| | | empAccidentcases.setInjuredPart(list.get(7).toString()); |
| | | empAccidentcases.setInjuredDescribe(list.get(8).toString()); |
| | | empAccidentcases.setInjuredDiacrisis(list.get(9).toString()); |
| | | empAccidentcases.setHospitalName(list.get(10).toString()); |
| | | empAccidentcases.setTreatmentName(list.get(11).toString()); |
| | | if (StringUtils.isNotBlank(list.get(12).toString())) { |
| | | empAccidentcases.setHospitalizatioFlag("未住院".equals(list.get(12).toString()) ? 0 : 1); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(13).toString())) { |
| | | empAccidentcases.setBedNumb(list.get(14).toString()); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(14).toString())) { |
| | | empAccidentcases.setReprotTime(DateUtil.parseDate(list.get(14).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(15).toString())) { |
| | | empAccidentcases.setSubmitTime(DateUtil.parseDate(list.get(15).toString())); |
| | | } |
| | | empAccidentcases.setSbumitBy(list.get(16).toString()); |
| | | if (StringUtils.isNotBlank(list.get(17).toString())) { |
| | | empAccidentcases.setExpensesFee(new BigDecimal(list.get(17).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(18).toString())) { |
| | | empAccidentcases.setInnsureFee(new BigDecimal(list.get(18).toString())); |
| | | } |
| | | empAccidentcases.setExpenseReport(list.get(19).toString()); |
| | | if (StringUtils.isNotBlank(list.get(20).toString())) { |
| | | empAccidentcases.setHrDoDate(DateUtil.parseDate(list.get(20).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(21).toString())) { |
| | | empAccidentcases.setSettleStatus("未结案".equals(list.get(21).toString()) ? 0 : 1); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(22).toString())) { |
| | | empAccidentcases.setSettleDate(DateUtil.parseDate(list.get(22).toString())); |
| | | } |
| | | this.save(empAccidentcases); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpBadRecord; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpBadRecordMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBadRecordService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpBadRecordServiceImpl extends ServiceImpl<EmpBadRecordMapper, EmpBadRecord> implements IEmpBadRecordService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpBadRecordMapper empBadrecordMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empBadrecordMapper.momentToNormal(list, operatorId) > 0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpBadRecord(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpBadRecord empBadrecord=new EmpBadRecord(); |
| | | empBadrecord.setBadId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empBadrecord.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | empBadrecord.setDeptName(list.get(1).toString()); |
| | | empBadrecord.setDeptId(deptId); |
| | | empBadrecord.setJobName(list.get(2).toString()); |
| | | empBadrecord.setEmpName(list.get(3).toString()); |
| | | empBadrecord.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | empBadrecord.setBadDate(DateUtil.parseDateTime(list.get(5).toString())); |
| | | } |
| | | empBadrecord.setBadContent(list.get(6).toString()); |
| | | empBadrecord.setReporter(list.get(7).toString()); |
| | | empBadrecord.setRemark(list.get(8).toString()); |
| | | this.save(empBadrecord); |
| | | } |
| | | } |
| | | } |
| | |
| | | for (List<Object> list : listObject) { |
| | | EmpBaseInfo empBaseInfo = new EmpBaseInfo(); |
| | | empBaseInfo.setEmpId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empBaseInfo.setEmpNumb(list.get(0).toString()); |
| | | empBaseInfo.setArchivesNumb(list.get(0).toString()); |
| | | empBaseInfo.setEmpNumb(list.get(1).toString()); |
| | | empBaseInfo.setEmpName(list.get(2).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | empBaseInfo.setDeptName(list.get(1).toString()); |
| | | Long deptId=depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get().getDeptId(); |
| | | empBaseInfo.setDeptName(list.get(3).toString()); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | empBaseInfo.setDeptId(deptId); |
| | | empBaseInfo.setJobName(list.get(2).toString()); |
| | | empBaseInfo.setEmpName(list.get(3).toString()); |
| | | empBaseInfo.setCertificateNumb(list.get(4).toString()); |
| | | empBaseInfo.setSex("男".equals(list.get(5).toString())?"1":"0"); |
| | | if (StringUtils.isNotBlank(list.get(6).toString())) { |
| | | empBaseInfo.setAge(Integer.valueOf(list.get(6).toString())); |
| | | } |
| | | empBaseInfo.setEducation(list.get(7).toString()); |
| | | empBaseInfo.setNativePlace(list.get(8).toString()); |
| | | empBaseInfo.setTelePhone(list.get(9).toString()); |
| | | empBaseInfo.setJobName(list.get(4).toString()); |
| | | empBaseInfo.setEmpType(list.get(5).toString()); |
| | | empBaseInfo.setSex("男".equals(list.get(6).toString()) ? "1" : "2"); |
| | | empBaseInfo.setNation(list.get(7).toString()); |
| | | empBaseInfo.setCertificateNumb(list.get(8).toString()); |
| | | empBaseInfo.setMarriage(list.get(9).toString()); |
| | | if (StringUtils.isNotBlank(list.get(10).toString())) { |
| | | empBaseInfo.setEntryDate(DateUtil.parseDate(list.get(10).toString())); |
| | | empBaseInfo.setStature(Integer.valueOf(list.get(10).toString())); |
| | | } |
| | | empBaseInfo.setPolitics(list.get(11).toString()); |
| | | if (StringUtils.isNotBlank(list.get(12).toString())) { |
| | | empBaseInfo.setEntryDate(DateUtil.parseDate(list.get(12).toString())); |
| | | } |
| | | empBaseInfo.setEducation(list.get(13).toString()); |
| | | if (StringUtils.isNotBlank(list.get(14).toString())) { |
| | | empBaseInfo.setSeniority(Integer.valueOf(list.get(14).toString())); |
| | | } |
| | | empBaseInfo.setNativePlace(list.get(15).toString()); |
| | | empBaseInfo.setCensusAddress(list.get(16).toString()); |
| | | empBaseInfo.setCurrentAddress(list.get(17).toString()); |
| | | empBaseInfo.setGuardNumb(list.get(18).toString()); |
| | | empBaseInfo.setReturnReceipt(list.get(19).toString()); |
| | | empBaseInfo.setTelePhone(list.get(20).toString()); |
| | | empBaseInfo.setIntroducer(list.get(21).toString()); |
| | | empBaseInfo.setBankName(list.get(22).toString()); |
| | | empBaseInfo.setBankNumb(list.get(23).toString()); |
| | | empBaseInfo.setInsuranceType(list.get(24).toString()); |
| | | empBaseInfo.setSocialNumb(list.get(25).toString()); |
| | | empBaseInfo.setFamily(list.get(26).toString()); |
| | | empBaseInfo.setUrgencyPhone(list.get(27).toString()); |
| | | empBaseInfo.setHandbookStatus(list.get(28).toString()); |
| | | empBaseInfo.setEmpCardStatus(list.get(29).toString()); |
| | | empBaseInfo.setCertificateList(list.get(30).toString()); |
| | | empBaseInfo.setEmpStatus("0"); |
| | | this.save(empBaseInfo); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import java.util.Optional; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.DicCode; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.entity.system.DicItem; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpContractInfo; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpContractInfoMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpContractInfoService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empContractinfoMapper.momentToNormal(list, operatorId) > 0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpContractInfo(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpContractInfo contractInfo = new EmpContractInfo(); |
| | | contractInfo.setContractId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | contractInfo.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | contractInfo.setDeptName(list.get(1).toString()); |
| | | contractInfo.setDeptId(deptId); |
| | | contractInfo.setJobName(list.get(2).toString()); |
| | | contractInfo.setEmpName(list.get(3).toString()); |
| | | contractInfo.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | contractInfo.setSigningDate(DateUtil.parseDate(list.get(5).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(6).toString())) { |
| | | contractInfo.setEndDate(DateUtil.parseDate(list.get(6).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(7).toString())) { |
| | | contractInfo.setContractPeriod(Integer.valueOf(list.get(7).toString())); |
| | | } |
| | | contractInfo.setContractStatus(list.get(8).toString()); |
| | | contractInfo.setTransactor(list.get(9).toString()); |
| | | contractInfo.setRemark(list.get(10).toString()); |
| | | this.save(contractInfo); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpDimissionAttendServiceImpl extends ServiceImpl<EmpDimissionAttendMapper, EmpDimissionAttend> implements IEmpDimissionAttendService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpDimissionAttendMapper empDimissionattendMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empDimissionattendMapper.momentToNormal(list, operatorId)>0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpDimissionAttend(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpDimissionAttend dimissionAttend = new EmpDimissionAttend(); |
| | | dimissionAttend.setDimissionAttendId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | dimissionAttend.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | dimissionAttend.setDeptName(list.get(1).toString()); |
| | | dimissionAttend.setDeptId(deptId); |
| | | dimissionAttend.setJobName(list.get(2).toString()); |
| | | dimissionAttend.setEmpName(list.get(3).toString()); |
| | | dimissionAttend.setCertificateNumb(list.get(4).toString()); |
| | | dimissionAttend.setAttendMonth(list.get(5).toString()); |
| | | if (StringUtils.isNotBlank(list.get(6).toString())) { |
| | | dimissionAttend.setAttendDays(new BigDecimal(list.get(6).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(7).toString())) { |
| | | dimissionAttend.setOvertimeDay(new BigDecimal(list.get(7).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(8).toString())) { |
| | | dimissionAttend.setOvertimeHour(new BigDecimal(list.get(8).toString())); |
| | | } |
| | | dimissionAttend.setDeduct(list.get(9).toString()); |
| | | if (StringUtils.isNotBlank(list.get(10).toString())) { |
| | | dimissionAttend.setLeaveDay(new BigDecimal(list.get(10).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(11).toString())) { |
| | | dimissionAttend.setAbsenteeism(new BigDecimal(list.get(11).toString())); |
| | | } |
| | | dimissionAttend.setRemark(list.get(12).toString()); |
| | | this.save(dimissionAttend); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpInsuranceMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpInsuranceService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpInsuranceServiceImpl extends ServiceImpl<EmpInsuranceMapper, EmpInsurance> implements IEmpInsuranceService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpInsuranceMapper empInsuranceMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()).map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empInsuranceMapper.momentToNormal(list, operatorId) > 0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpInsurance(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpInsurance empInsurance=new EmpInsurance(); |
| | | empInsurance.setInsuranceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empInsurance.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | empInsurance.setDeptName(list.get(1).toString()); |
| | | empInsurance.setDeptId(deptId); |
| | | empInsurance.setJobName(list.get(2).toString()); |
| | | empInsurance.setEmpName(list.get(3).toString()); |
| | | empInsurance.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | empInsurance.setApplayDate(DateUtil.parseDate(list.get(5).toString())); |
| | | } |
| | | empInsurance.setProposer(list.get(6).toString()); |
| | | empInsurance.setInsuranceGaers(list.get(7).toString()); |
| | | if (StringUtils.isNotBlank(list.get(8).toString())) { |
| | | empInsurance.setReportStatus("未报告".equals(list.get(8).toString()) ? 0: 1); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(8).toString())) { |
| | | empInsurance.setApplayStatus("未申请".equals(list.get(8).toString()) ? 0: 1); |
| | | } |
| | | empInsurance.setAuditor(list.get(9).toString()); |
| | | empInsurance.setRemark(list.get(10).toString()); |
| | | this.save(empInsurance); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpLaborTrouble; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLaborTroubleMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLaborTroubleService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpLaborTroubleServiceImpl extends ServiceImpl<EmpLaborTroubleMapper, EmpLaborTrouble> implements IEmpLaborTroubleService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpLaborTroubleMapper empLabortroubleMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empLabortroubleMapper.momentToNormal(list, operatorId)>0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpLaborTrouble(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpLaborTrouble empLabortrouble = new EmpLaborTrouble(); |
| | | empLabortrouble.setArbitrationId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empLabortrouble.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | empLabortrouble.setDeptName(list.get(1).toString()); |
| | | empLabortrouble.setDeptId(deptId); |
| | | empLabortrouble.setJobName(list.get(2).toString()); |
| | | empLabortrouble.setEmpName(list.get(3).toString()); |
| | | empLabortrouble.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | empLabortrouble.setArbitrationDate(DateUtil.parseDateTime(list.get(5).toString())); |
| | | } |
| | | empLabortrouble.setArbitrationType(list.get(6).toString()); |
| | | empLabortrouble.setArbitrationReason(list.get(7).toString()); |
| | | empLabortrouble.setReporter(list.get(8).toString()); |
| | | empLabortrouble.setRemark(list.get(9).toString()); |
| | | if (StringUtils.isNotBlank(list.get(10).toString())) { |
| | | empLabortrouble.setArbitrationPay(new BigDecimal(list.get(10).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(11).toString())) { |
| | | empLabortrouble.setArbitrationStatus("未结案".equals(list.get(11).toString()) ? 0 : 1); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(12).toString())) { |
| | | empLabortrouble.setSettleDate(DateUtil.parseDate(list.get(12).toString())); |
| | | } |
| | | this.save(empLabortrouble); |
| | | } |
| | | } |
| | | } |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionAttend; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLeaveInfo; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLeaveInfoMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLeaveInfoService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpLeaveInfoServiceImpl extends ServiceImpl<EmpLeaveInfoMapper, EmpLeaveInfo> implements IEmpLeaveInfoService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpLeaveInfoMapper empLeaveinfoMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empLeaveinfoMapper.momentToNormal(list, operatorId)>0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpLeaveInfo(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpLeaveInfo leaveInfo = new EmpLeaveInfo(); |
| | | leaveInfo.setLeaveId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | leaveInfo.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | leaveInfo.setDeptName(list.get(1).toString()); |
| | | leaveInfo.setDeptId(deptId); |
| | | leaveInfo.setJobName(list.get(2).toString()); |
| | | leaveInfo.setEmpName(list.get(3).toString()); |
| | | leaveInfo.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | leaveInfo.setBeginTime(DateUtil.parseDate(list.get(5).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(6).toString())) { |
| | | leaveInfo.setEndTime(DateUtil.parseDate(list.get(6).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(7).toString())) { |
| | | leaveInfo.setLeaveDay(new BigDecimal(list.get(7).toString())); |
| | | } |
| | | leaveInfo.setLeaveType(list.get(8).toString()); |
| | | if (StringUtils.isNotBlank(list.get(9).toString())) { |
| | | leaveInfo.setReturnDate(DateUtil.parseDate(list.get(9).toString())); |
| | | } |
| | | leaveInfo.setReporter(list.get(10).toString()); |
| | | leaveInfo.setRemark(list.get(11).toString()); |
| | | this.save(leaveInfo); |
| | | } |
| | | } |
| | | } |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpOccupational; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpOccupationalMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpOccupationalService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpOccupationalServiceImpl extends ServiceImpl<EmpOccupationalMapper, EmpOccupational> implements IEmpOccupationalService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpOccupationalMapper empOccupationalMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empOccupationalMapper.momentToNormal(list, operatorId)>0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpOccupational(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpOccupational empOccupational=new EmpOccupational(); |
| | | empOccupational.setOccupationalId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empOccupational.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | empOccupational.setDeptName(list.get(1).toString()); |
| | | empOccupational.setDeptId(deptId); |
| | | empOccupational.setJobName(list.get(2).toString()); |
| | | empOccupational.setEmpName(list.get(3).toString()); |
| | | empOccupational.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | empOccupational.setInjuredTime(DateUtil.parseDateTime(list.get(5).toString())); |
| | | } |
| | | empOccupational.setInjuredAddress(list.get(6).toString()); |
| | | empOccupational.setInjuredPart(list.get(7).toString()); |
| | | empOccupational.setInjuredDescribe(list.get(8).toString()); |
| | | empOccupational.setInjuredDiacrisis(list.get(9).toString()); |
| | | empOccupational.setHospitalName(list.get(10).toString()); |
| | | empOccupational.setTreatmentName(list.get(11).toString()); |
| | | if (StringUtils.isNotBlank(list.get(12).toString())) { |
| | | empOccupational.setHospitalizatioFlag("未住院".equals(list.get(12).toString()) ? 0 : 1); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(13).toString())) { |
| | | empOccupational.setBedNumb(list.get(14).toString()); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(14).toString())) { |
| | | empOccupational.setReportTime(DateUtil.parseDate(list.get(14).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(15).toString())) { |
| | | empOccupational.setSubmitTime(DateUtil.parseDate(list.get(15).toString())); |
| | | } |
| | | empOccupational.setSbumitBy(list.get(16).toString()); |
| | | if (StringUtils.isNotBlank(list.get(17).toString())) { |
| | | empOccupational.setExpensesFee(new BigDecimal(list.get(17).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(18).toString())) { |
| | | empOccupational.setCompensated(new BigDecimal(list.get(18).toString())); |
| | | } |
| | | empOccupational.setExpenseReport(list.get(19).toString()); |
| | | if (StringUtils.isNotBlank(list.get(20).toString())) { |
| | | empOccupational.setHrDoDate(DateUtil.parseDate(list.get(20).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(21).toString())) { |
| | | empOccupational.setSettleStatus("未结案".equals(list.get(21).toString()) ? 0 : 1); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(22).toString())) { |
| | | empOccupational.setSettleDate(DateUtil.parseDate(list.get(22).toString())); |
| | | } |
| | | this.save(empOccupational); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.util.Optional; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.DicCode; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.entity.system.DicItem; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpPhysicalExam; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpPhysicalExamMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpPhysicalExamService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empPhysicalexamMapper.momentToNormal(list, operatorId) > 0; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpPhysicalExam(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | 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); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | physicalExam.setDeptId(deptId); |
| | | physicalExam.setJobName(list.get(2).toString()); |
| | | physicalExam.setEmpName(list.get(3).toString()); |
| | | physicalExam.setCertificateNumb(list.get(4).toString()); |
| | | physicalExam.setSex("男".equals(list.get(5).toString()) ? "1" : "2"); |
| | | physicalExam.setHospital(list.get(6).toString()); |
| | | if (StringUtils.isNotBlank(list.get(7).toString())) { |
| | | physicalExam.setPhysicalExamDate(DateUtil.parseDate(list.get(7).toString())); |
| | | } |
| | | physicalExam.setPhysicalExamType(list.get(8).toString()); |
| | | physicalExam.setBloodPressure(list.get(9).toString()); |
| | | physicalExam.setTransaminase(list.get(10).toString()); |
| | | physicalExam.setEcg(list.get(11).toString()); |
| | | physicalExam.setConclusion(list.get(12).toString()); |
| | | physicalExam.setReviewRecord(list.get(13).toString()); |
| | | physicalExam.setRemark(list.get(14).toString()); |
| | | this.save(physicalExam); |
| | | } |
| | | } |
| | | } |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpBadRecord; |
| | | import cc.mrbird.febs.server.hr.entity.EmpRemarkInfo; |
| | | import cc.mrbird.febs.server.hr.entity.EmpRemarkInfo; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpRemarkInfoMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpRemarkinfoService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpRemarkInfoServiceImpl extends ServiceImpl<EmpRemarkInfoMapper, EmpRemarkInfo> implements IEmpRemarkinfoService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpRemarkInfoMapper empRemarkinfoMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empRemarkinfoMapper.momentToNormal(list, operatorId)>0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpBadRecord(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpRemarkInfo empRemarkinfo=new EmpRemarkInfo(); |
| | | empRemarkinfo.setRemarkId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empRemarkinfo.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | empRemarkinfo.setDeptName(list.get(1).toString()); |
| | | empRemarkinfo.setDeptId(deptId); |
| | | empRemarkinfo.setJobName(list.get(2).toString()); |
| | | empRemarkinfo.setEmpName(list.get(3).toString()); |
| | | empRemarkinfo.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | empRemarkinfo.setRemarkDate(DateUtil.parseDateTime(list.get(5).toString())); |
| | | } |
| | | empRemarkinfo.setRemarkContent(list.get(6).toString()); |
| | | this.save(empRemarkinfo); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpResign; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpResignMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpResignService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpResignServiceImpl extends ServiceImpl<EmpResignMapper, EmpResign> implements IEmpResignService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpResignMapper empResignMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empResignMapper.momentToNormal(list, operatorId)>0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpResign(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpResign resign = new EmpResign(); |
| | | resign.setResignId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | resign.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | resign.setDeptName(list.get(1).toString()); |
| | | resign.setDeptId(deptId); |
| | | resign.setJobName(list.get(2).toString()); |
| | | resign.setEmpName(list.get(3).toString()); |
| | | resign.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | resign.setApplayDate(DateUtil.parseDate(list.get(5).toString())); |
| | | } |
| | | resign.setReason(list.get(6).toString()); |
| | | resign.setReporter(list.get(7).toString()); |
| | | resign.setRemark(list.get(8).toString()); |
| | | this.save(resign); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpUnemploymentMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpUnemploymentService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | |
| | | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) |
| | | class EmpUnemploymentServiceImpl extends ServiceImpl<EmpUnemploymentMapper, EmpUnemployment> implements IEmpUnemploymentService { |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpUnemploymentMapper empUnemploymentMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empUnemploymentMapper.momentToNormal(list, operatorId)>0; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpUnemployment(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpUnemployment empUnemployment=new EmpUnemployment(); |
| | | empUnemployment.setUnemploymentId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empUnemployment.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | empUnemployment.setDeptName(list.get(1).toString()); |
| | | empUnemployment.setDeptId(deptId); |
| | | empUnemployment.setJobName(list.get(2).toString()); |
| | | empUnemployment.setEmpName(list.get(3).toString()); |
| | | empUnemployment.setCertificateNumb(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | empUnemployment.setApplayDate(DateUtil.parseDate(list.get(5).toString())); |
| | | } |
| | | empUnemployment.setApplayReason(list.get(6).toString()); |
| | | empUnemployment.setReporter(list.get(7).toString()); |
| | | empUnemployment.setAuditor(list.get(8).toString()); |
| | | empUnemployment.setRemark(list.get(9).toString()); |
| | | this.save(empUnemployment); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpWorkExperience; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpWorkExperienceMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpWorkExperienceService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empWorkexperienceMapper.momentToNormal(list, operatorId)>0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpWorkExperience(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpWorkExperience workExperience = new EmpWorkExperience(); |
| | | workExperience.setWorkExperienceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | workExperience.setEmpNumb(list.get(0).toString()); |
| | | workExperience.setEmpName(list.get(1).toString()); |
| | | workExperience.setCertificateNumb(list.get(2).toString()); |
| | | workExperience.setSex("男".equals(list.get(3).toString()) ? "1" : "2"); |
| | | workExperience.setWorkUnit(list.get(4).toString()); |
| | | if (StringUtils.isNotBlank(list.get(5).toString())) { |
| | | workExperience.setBeginDate(DateUtil.parseDate(list.get(5).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(6).toString())) { |
| | | workExperience.setBeginDate(DateUtil.parseDate(list.get(6).toString())); |
| | | } |
| | | workExperience.setJobContent(list.get(7).toString()); |
| | | this.save(workExperience); |
| | | } |
| | | } |
| | | } |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void createLabel(Label label) throws FebsException { |
| | | LambdaQueryWrapper<Label> queryWrapper = new LambdaQueryWrapper(); |
| | | queryWrapper.eq(Label::getLabelname, label.getLabelname()).or().eq(Label::getLabelcode, label.getLabelcode()); |
| | | queryWrapper.eq(Label::getDelFlag,0).and(i->i.eq(Label::getLabelname, label.getLabelname()).or().eq(Label::getLabelcode, label.getLabelcode())); |
| | | Label l = this.getOne(queryWrapper); |
| | | if (null != l && StrUtil.equals(label.getLabelname(), l.getLabelname())) { |
| | | throw new FebsException("标签名字重复"); |
| | |
| | | wapper.set(Label::getModifytime,new Date()); |
| | | this.update(wapper); |
| | | } |
| | | |
| | | } |
| | |
| | | // 遍历当前sheet中的所有行 |
| | | /* |
| | | * int countCellNum = 0; for (int j = sheet.getFirstRowNum(); j <= |
| | | * sheet.getLastRowNum(); j++) { row = sheet.getRow(j); if (row == null |
| | | * || row.getFirstCellNum() == j) { if (row != null) countCellNum = |
| | | * sheet.getLastRowNum(); j++) { row = sheet.getRow(j); if (row == null || |
| | | * row.getFirstCellNum() == j) { if (row != null) countCellNum = |
| | | * row.getLastCellNum(); continue; } |
| | | * |
| | | * // 遍历所有的列 List<Object> li = new ArrayList<Object>(); for (int y = row |
| | |
| | | } |
| | | |
| | | /** |
| | | * 描述:获取IO流中的数据,组装成List<List<List<Object>>>对象,多个sheet |
| | | * |
| | | * @param in,fileName |
| | | * @return |
| | | * @throws IOException |
| | | */ |
| | | public static List<List<List<Object>>> getMulitListByExcel(InputStream in, String fileName) throws Exception { |
| | | List<List<Object>> list = null; |
| | | |
| | | // 创建Excel工作薄 |
| | | Workbook work = getWorkbook(in, fileName); |
| | | if (null == work) { |
| | | throw new Exception("创建Excel工作薄为空!"); |
| | | } |
| | | List<List<List<Object>>> returnList = new ArrayList<List<List<Object>>>(); |
| | | for (Sheet sheet : work) { |
| | | Row row = null; |
| | | Cell cell = null; |
| | | |
| | | list = new ArrayList<List<Object>>(); |
| | | if (sheet == null) { |
| | | continue; |
| | | } |
| | | // 取得Excel的总列数,总行数 |
| | | int columns = 0; |
| | | Row firstRow = sheet.getRow((short) 0); |
| | | if (firstRow != null) { |
| | | columns = firstRow.getPhysicalNumberOfCells(); |
| | | } |
| | | |
| | | int rows = sheet.getPhysicalNumberOfRows(); |
| | | List<Object> dataRow = null; |
| | | |
| | | // 首行为定义标题的行,数据从第2行开始 |
| | | for (int i = 1; i < rows; i++) { |
| | | dataRow = new ArrayList<Object>(); |
| | | // 获取行 |
| | | row = sheet.getRow(i); |
| | | if (row != null) { |
| | | // columns=row.getPhysicalNumberOfCells();//不在这里设置,通过firstRow来获取列数信息。 |
| | | for (int j = 0; j < columns; j++) { |
| | | // 获取某行某列的某一个单元格 |
| | | cell = row.getCell(j); |
| | | // 往dataRow存值 |
| | | dataRow.add(getCellValue(cell)); |
| | | } |
| | | list.add(dataRow); |
| | | } else { |
| | | list.add(new ArrayList<>()); |
| | | } |
| | | } |
| | | |
| | | work.close(); |
| | | returnList.add(list); |
| | | } |
| | | |
| | | return returnList; |
| | | } |
| | | |
| | | /** |
| | | * 描述:根据文件后缀,自适应上传文件的版本 |
| | | * |
| | | * @param inStr,fileName |
| | |
| | | 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 |