| | |
| | | * @return cc.mrbird.febs.server.hr.entity.EmpBaseInfo |
| | | */ |
| | | EmpBaseInfo addInEmpBaseInfo(EmpBaseInfo empBaseInfo); |
| | | |
| | | Long getEmpIdByEmpNumb(String empNumb); |
| | | } |
| | |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | | import cc.mrbird.febs.server.hr.constant.MyConstant; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpAccidentCasesMapper empAccidentcasesMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()).map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | |
| | | empAccidentcases.setAccidentId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empAccidentcases.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | empAccidentcases.setDelFlag(2); |
| | | empAccidentcases.setEmpId(empId); |
| | | empAccidentcases.setDeptName(list.get(1).toString()); |
| | | empAccidentcases.setDeptId(dept.getDeptId()); |
| | | empAccidentcases.setJobName(list.get(2).toString()); |
| | |
| | | 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 cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpBadRecordMapper empBadrecordMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | empBadrecord.setBadId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empBadrecord.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | empBadrecord.setDelFlag(2); |
| | | empBadrecord.setEmpId(empId); |
| | | empBadrecord.setDeptName(list.get(1).toString()); |
| | | empBadrecord.setDeptId(dept.getDeptId()); |
| | | empBadrecord.setJobName(list.get(2).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionLog; |
| | | import cc.mrbird.febs.server.hr.entity.EmpJobChange; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteUserService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpContractInfoMapper; |
| | | import cc.mrbird.febs.server.hr.properties.FebsServerHrProperties; |
| | | import cc.mrbird.febs.server.hr.service.IEmpContractInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpDimissionLogService; |
| | |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.FileSystemUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | |
| | | private final EmpBaseInfoMapper empBaseInfoMapper; |
| | | private final IEmpDimissionLogService dimissionLogService; |
| | | private final IEmpJobChangeService jobChangeService; |
| | | private final IEmpContractInfoService empContractInfoService; |
| | | private final EmpContractInfoMapper empContractInfoMapper; |
| | | private final FebsServerHrProperties properties; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | |
| | | switch (flag) { |
| | | case 1: |
| | | //解除合同 |
| | | empContractInfoService.terminateContract(empDimissionLog.getEmpIds(), operatorId); |
| | | |
| | | empContractInfoMapper.terminateContract(new ArrayList<>(Arrays.asList(empDimissionLog.getEmpIds().split(StringConstant.COMMA))), operatorId); |
| | | break; |
| | | case 2: |
| | | //禁用账户 |
| | | iRemoteUserService.updateStatus(empDimissionLog.getCertificateNumb()); |
| | | break; |
| | | case 3: |
| | | empContractInfoService.terminateContract(empDimissionLog.getEmpIds(), operatorId); |
| | | empContractInfoMapper.terminateContract(new ArrayList<>(Arrays.asList(empDimissionLog.getEmpIds().split(StringConstant.COMMA))), operatorId); |
| | | iRemoteUserService.updateStatus(empDimissionLog.getCertificateNumb()); |
| | | break; |
| | | } |
| | |
| | | continue; |
| | | } |
| | | if (this.count(new LambdaQueryWrapper<EmpBaseInfo>().eq(EmpBaseInfo::getEmpNumb,list.get(1).toString()).ne(EmpBaseInfo::getDelFlag,1))>0){ |
| | | returnList.add(StrUtil.format("导入员工基本信息异常: 出现位置第{}行, 原因:{}员工编号重复",listObject.indexOf(list),list.get(1).toString())); |
| | | returnList.add(StrUtil.format("导入员工基本信息异常: 出现位置第{}行, 原因:{}员工编号重复",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | continue; |
| | | } |
| | | EmpBaseInfo empBaseInfo = new EmpBaseInfo(); |
| | |
| | | empBaseInfo.setDeptName(list.get(3).toString()); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | if (null == dept) { |
| | | returnList.add(StrUtil.format("导入员工基本信息异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list),list.get(3).toString())); |
| | | returnList.add(StrUtil.format("导入员工基本信息异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(3).toString())); |
| | | continue; |
| | | } |
| | | empBaseInfo.setDeptId(dept.getDeptId()); |
| | |
| | | return dbEmpInfo; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Long getEmpIdByEmpNumb(String empNumb) { |
| | | try { |
| | | return this.getOne(new LambdaQueryWrapper<EmpBaseInfo>().eq(EmpBaseInfo::getEmpNumb,empNumb).ne(EmpBaseInfo::getDelFlag,1)).getEmpId(); |
| | | }catch (Exception e){ |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | 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.service.IEmpBaseInfoService; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpContractInfoMapper empContractinfoMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | contractInfo.setContractId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | contractInfo.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | contractInfo.setDelFlag(2); |
| | | contractInfo.setEmpId(empId); |
| | | contractInfo.setDeptName(list.get(1).toString()); |
| | | contractInfo.setDeptId(dept.getDeptId()); |
| | | contractInfo.setJobName(list.get(2).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(6).toString())) { |
| | | contractInfo.setBeginDate(DateUtil.parseDate(list.get(6).toString())); |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(list.get(7).toString())) { |
| | | contractInfo.setContractPeriod(Integer.valueOf(list.get(7).toString())); |
| | | contractInfo.setEndDate(DateUtil.parseDate(list.get(7).toString())); |
| | | } |
| | | contractInfo.setContractStatus(list.get(8).toString()); |
| | | contractInfo.setTransactor(list.get(9).toString()); |
| | | contractInfo.setRemark(list.get(10).toString()); |
| | | if (StringUtils.isNotBlank(list.get(8).toString())) { |
| | | contractInfo.setContractPeriod(Integer.valueOf(list.get(8).toString())); |
| | | } |
| | | contractInfo.setContractStatus(list.get(9).toString()); |
| | | contractInfo.setTransactor(list.get(10).toString()); |
| | | contractInfo.setRemark(list.get(11).toString()); |
| | | |
| | | this.save(contractInfo); |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionAttend; |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionAttend; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpDimissionAttendMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpDimissionAttendService; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpDimissionAttendMapper empDimissionattendMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | dimissionAttend.setDimissionAttendId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | dimissionAttend.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | dimissionAttend.setDelFlag(2); |
| | | dimissionAttend.setEmpId(empId); |
| | | dimissionAttend.setDeptName(list.get(1).toString()); |
| | | dimissionAttend.setDeptId(dept.getDeptId()); |
| | | dimissionAttend.setJobName(list.get(2).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.entity.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpInsuranceMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpInsuranceService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpInsuranceMapper empInsuranceMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()).map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | |
| | | empInsurance.setInsuranceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empInsurance.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | empInsurance.setDelFlag(2); |
| | | empInsurance.setEmpId(empId); |
| | | empInsurance.setDeptName(list.get(1).toString()); |
| | | empInsurance.setDeptId(dept.getDeptId()); |
| | | empInsurance.setJobName(list.get(2).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.entity.*; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLaborTrouble; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLaborTroubleMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLaborTroubleService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpLaborTroubleMapper empLabortroubleMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | empLabortrouble.setArbitrationId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empLabortrouble.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | empLabortrouble.setDelFlag(2); |
| | | empLabortrouble.setEmpId(empId); |
| | | empLabortrouble.setDeptName(list.get(1).toString()); |
| | | empLabortrouble.setDeptId(dept.getDeptId()); |
| | | empLabortrouble.setJobName(list.get(2).toString()); |
| | |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLeaveInfo; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLeaveInfoMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLeaveInfoService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpLeaveInfoMapper empLeaveinfoMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | leaveInfo.setLeaveId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | leaveInfo.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | leaveInfo.setDelFlag(2); |
| | | leaveInfo.setEmpId(empId); |
| | | leaveInfo.setDeptName(list.get(1).toString()); |
| | | leaveInfo.setDeptId(dept.getDeptId()); |
| | | leaveInfo.setJobName(list.get(2).toString()); |
| | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpOccupationalMapper empOccupationalMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | empOccupational.setOccupationalId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empOccupational.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | empOccupational.setDelFlag(2); |
| | | empOccupational.setEmpId(empId); |
| | | empOccupational.setDeptName(list.get(1).toString()); |
| | | empOccupational.setDeptId(dept.getDeptId()); |
| | | empOccupational.setJobName(list.get(2).toString()); |
| | |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpBaseInfo; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpPhysicalExamMapper empPhysicalexamMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | physicalExam.setEmpNumb(list.get(0).toString()); |
| | | physicalExam.setDeptName(list.get(1).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | physicalExam.setDelFlag(2); |
| | | 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()); |
| | |
| | | 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.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpRemarkinfoService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpRemarkInfoMapper empRemarkinfoMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | empRemarkinfo.setRemarkId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empRemarkinfo.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | empRemarkinfo.setDelFlag(2); |
| | | empRemarkinfo.setEmpId(empId); |
| | | empRemarkinfo.setDeptName(list.get(1).toString()); |
| | | empRemarkinfo.setDeptId(dept.getDeptId()); |
| | | empRemarkinfo.setJobName(list.get(2).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpResign; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpResignMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpResignService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpResignMapper empResignMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | resign.setResignId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | resign.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | resign.setDelFlag(2); |
| | | resign.setEmpId(empId); |
| | | resign.setDeptName(list.get(1).toString()); |
| | | resign.setDeptId(dept.getDeptId()); |
| | | resign.setJobName(list.get(2).toString()); |
| | |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | | import cc.mrbird.febs.server.hr.constant.MyConstant; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLaborTrouble; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | private final RedisService redisService; |
| | | private final EmpUnemploymentMapper empUnemploymentMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | empUnemployment.setUnemploymentId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empUnemployment.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(3).toString())).findFirst().orElse(null); |
| | | 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),list.get(3).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())); |
| | | continue; |
| | | } |
| | | empUnemployment.setDelFlag(2); |
| | | empUnemployment.setEmpId(empId); |
| | | empUnemployment.setDeptName(list.get(1).toString()); |
| | | empUnemployment.setDeptId(dept.getDeptId()); |
| | | empUnemployment.setJobName(list.get(2).toString()); |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | 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.EmpBaseInfo; |
| | | import cc.mrbird.febs.server.hr.entity.EmpWorkExperience; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpWorkExperienceMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpWorkExperienceService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | private final EmpWorkExperienceMapper empWorkexperienceMapper; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | private final RedisService redisService; |
| | | |
| | | @Override |
| | | public IPage<EmpWorkExperience> findEmpWorkExperiences(QueryRequest request, EmpWorkExperience empWorkexperience) { |
| | |
| | | queryWrapper.like("a.jobContent", empWorkexperience.getJobContent()); |
| | | } |
| | | Page<EmpWorkExperience> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | |
| | | queryWrapper.in("c.deptId", remoteDeptService.userRightDepts()); |
| | | |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts()); |
| | | return this.empWorkexperienceMapper.selectPageVo(page, queryWrapper); |
| | | } |
| | | |
| | |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | returnList.add(StrUtil.format("导入失业金领取表异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | continue; |
| | | } |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | 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())); |
| | | continue; |
| | | } |
| | | EmpWorkExperience workExperience = new EmpWorkExperience(); |
| | | workExperience.setDeptName(list.get(1).toString()); |
| | | workExperience.setDeptId(dept.getDeptId()); |
| | | workExperience.setWorkExperienceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | workExperience.setEmpNumb(list.get(0).toString()); |
| | | workExperience.setEmpName(list.get(1).toString()); |
| | |
| | | workExperience.setEndDate(DateUtil.parseDate(list.get(6).toString())); |
| | | } |
| | | workExperience.setJobContent(list.get(7).toString()); |
| | | workExperience.setCreator(FebsUtil.getUserId()); |
| | | workExperience.setModifier(FebsUtil.getUserId()); |
| | | workExperience.setDelFlag(2); |
| | | this.save(workExperience); |
| | | } |
| | | } |