| | |
| | | } |
| | | } |
| | | |
| | | public static String getUserId(){ |
| | | return Optional.ofNullable(getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前用户名称 |
| | | * |
| | |
| | | @ExcelField(value = "员工编号") |
| | | @TableField(exist = false) |
| | | private String empNumb=""; |
| | | |
| | | @ExcelField(value = "身份证号码") |
| | | @TableField(exist = false) |
| | | private String certificateNumb=""; |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cc.mrbird.febs.server.hr.mapper.EmpDimissionLogMapper"> |
| | | <select id="selectPageVo" resultType="java.util.Map"> |
| | | select a.*,b.empNumb,b.certificateNumb, (select dept_Name from t_dept as dept where dept.dept_Id= a.deptId) as newDeptName,a.newJobName from t_emp_dimissionlog a inner join t_emp_baseinfo b on a.empId = b.empId ${ew.customSqlSegment} |
| | | select a.*,b.empNumb,b.certificateNumb,,b.empName (select dept_Name from t_dept as dept where dept.dept_Id= b.deptId) as newDeptName,b.jobName as newJobName from t_emp_dimissionlog a inner join t_emp_baseinfo b on a.empId = b.empId ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | 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 cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpAccidentCases(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | empAccidentcases.setDeptName(list.get(1).toString()); |
| | | empAccidentcases.setDeptId(deptId); |
| | | empAccidentcases.setDeptId(dept.getDeptId()); |
| | | empAccidentcases.setJobName(list.get(2).toString()); |
| | | empAccidentcases.setEmpName(list.get(3).toString()); |
| | | empAccidentcases.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.service.IEmpBadRecordService; |
| | | 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; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpBadRecord(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | empBadrecord.setDeptName(list.get(1).toString()); |
| | | empBadrecord.setDeptId(deptId); |
| | | empBadrecord.setDeptId(dept.getDeptId()); |
| | | empBadrecord.setJobName(list.get(2).toString()); |
| | | empBadrecord.setEmpName(list.get(3).toString()); |
| | | empBadrecord.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import java.util.*; |
| | | import java.util.function.Consumer; |
| | | |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.SysConfig; |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | | import cc.mrbird.febs.common.core.utils.MyUtil; |
| | |
| | | } |
| | | }); |
| | | } |
| | | queryWrapper.in("c.deptId", remoteDeptService.userRightDepts()); |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | return queryWrapper; |
| | | } |
| | | |
| | |
| | | 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 cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpContractInfo(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | contractInfo.setDeptName(list.get(1).toString()); |
| | | contractInfo.setDeptId(deptId); |
| | | contractInfo.setDeptId(dept.getDeptId()); |
| | | contractInfo.setJobName(list.get(2).toString()); |
| | | contractInfo.setEmpName(list.get(3).toString()); |
| | | contractInfo.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.mapper.EmpDimissionAttendMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpDimissionAttendService; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpDimissionAttend(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | dimissionAttend.setDeptName(list.get(1).toString()); |
| | | dimissionAttend.setDeptId(deptId); |
| | | dimissionAttend.setDeptId(dept.getDeptId()); |
| | | dimissionAttend.setJobName(list.get(2).toString()); |
| | | dimissionAttend.setEmpName(list.get(3).toString()); |
| | | dimissionAttend.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.mapper.EmpDimissionLogMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpDimissionLogService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> findEmpDimissionLogs(QueryRequest request, EmpDimissionLog empDimissionlog) { |
| | | LambdaQueryWrapper<EmpDimissionLog> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpDimissionLog::getDelFlag, 0); |
| | | QueryWrapper<EmpDimissionLog> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.delFlag", 0); |
| | | |
| | | if (StringUtils.isNotBlank(empDimissionlog.getEntryDateStr())) { |
| | | queryWrapper.between(EmpDimissionLog::getEntryDate, empDimissionlog.getEntryDateStr().split(",")[0], empDimissionlog.getEntryDateStr().split(",")[1]); |
| | | queryWrapper.between("a.entryDate", empDimissionlog.getEntryDateStr().split(",")[0], empDimissionlog.getEntryDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionlog.getDimissionDateStr())) { |
| | | queryWrapper.between(EmpDimissionLog::getDimissionDate, empDimissionlog.getDimissionDateStr().split(",")[0], empDimissionlog.getDimissionDateStr().split(",")[1]); |
| | | queryWrapper.between("a.dimissionDate", empDimissionlog.getDimissionDateStr().split(",")[0], empDimissionlog.getDimissionDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionlog.getDimissionType())) { |
| | | queryWrapper.eq(EmpDimissionLog::getDimissionType, empDimissionlog.getDimissionType()); |
| | | queryWrapper.eq("a.dimissionType", empDimissionlog.getDimissionType()); |
| | | } |
| | | Page<Map<String, Object>> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | |
| | |
| | | import cc.mrbird.febs.server.hr.service.IEmpInsuranceService; |
| | | 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; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpInsurance(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | empInsurance.setDeptName(list.get(1).toString()); |
| | | empInsurance.setDeptId(deptId); |
| | | empInsurance.setDeptId(dept.getDeptId()); |
| | | empInsurance.setJobName(list.get(2).toString()); |
| | | empInsurance.setEmpName(list.get(3).toString()); |
| | | empInsurance.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.service.IEmpLaborTroubleService; |
| | | 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; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpLaborTrouble(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | empLabortrouble.setDeptName(list.get(1).toString()); |
| | | empLabortrouble.setDeptId(deptId); |
| | | empLabortrouble.setDeptId(dept.getDeptId()); |
| | | empLabortrouble.setJobName(list.get(2).toString()); |
| | | empLabortrouble.setEmpName(list.get(3).toString()); |
| | | empLabortrouble.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLeaveInfoMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLeaveInfoService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpLeaveInfo(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | leaveInfo.setDeptName(list.get(1).toString()); |
| | | leaveInfo.setDeptId(deptId); |
| | | leaveInfo.setDeptId(dept.getDeptId()); |
| | | leaveInfo.setJobName(list.get(2).toString()); |
| | | leaveInfo.setEmpName(list.get(3).toString()); |
| | | leaveInfo.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpOccupational(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | empOccupational.setDeptName(list.get(1).toString()); |
| | | empOccupational.setDeptId(deptId); |
| | | empOccupational.setDeptId(dept.getDeptId()); |
| | | empOccupational.setJobName(list.get(2).toString()); |
| | | empOccupational.setEmpName(list.get(3).toString()); |
| | | empOccupational.setCertificateNumb(list.get(4).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 cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpPhysicalExam(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | 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); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | physicalExam.setDeptId(deptId); |
| | | 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())); |
| | | continue; |
| | | } |
| | | physicalExam.setDeptId(dept.getDeptId()); |
| | | physicalExam.setJobName(list.get(2).toString()); |
| | | physicalExam.setEmpName(list.get(3).toString()); |
| | | physicalExam.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.service.IEmpRemarkinfoService; |
| | | 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; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpRemarkInfo(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | empRemarkinfo.setDeptName(list.get(1).toString()); |
| | | empRemarkinfo.setDeptId(deptId); |
| | | empRemarkinfo.setDeptId(dept.getDeptId()); |
| | | empRemarkinfo.setJobName(list.get(2).toString()); |
| | | empRemarkinfo.setEmpName(list.get(3).toString()); |
| | | empRemarkinfo.setCertificateNumb(list.get(4).toString()); |
| | |
| | | import cc.mrbird.febs.server.hr.service.IEmpResignService; |
| | | 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; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpResign(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | resign.setDeptName(list.get(1).toString()); |
| | | resign.setDeptId(deptId); |
| | | resign.setDeptId(dept.getDeptId()); |
| | | resign.setJobName(list.get(2).toString()); |
| | | resign.setEmpName(list.get(3).toString()); |
| | | resign.setCertificateNumb(list.get(4).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 cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpUnemployment(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | 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(); |
| | | 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())); |
| | | continue; |
| | | } |
| | | empUnemployment.setDeptName(list.get(1).toString()); |
| | | empUnemployment.setDeptId(deptId); |
| | | empUnemployment.setDeptId(dept.getDeptId()); |
| | | empUnemployment.setJobName(list.get(2).toString()); |
| | | empUnemployment.setEmpName(list.get(3).toString()); |
| | | empUnemployment.setCertificateNumb(list.get(4).toString()); |
| | |
| | | |
| | | @GetMapping("userRightDepts") |
| | | public String userRightDepts(){ |
| | | log.info("当前用户Id"+operatorId); |
| | | String userRightDepts=userDataPermissionService.findByUserId(operatorId); |
| | | String userRightDepts=userDataPermissionService.findByUserId(FebsUtil.getUserId()); |
| | | log.info("当前用户权限"+userRightDepts); |
| | | return userRightDepts; |
| | | } |