| | |
| | | @Order(-2) |
| | | public PaginationInterceptor paginationInterceptor() { |
| | | PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); |
| | | // 设置最大单页限制数量,默认 500 条,-1 不受限制 |
| | | paginationInterceptor.setLimit(-1); |
| | | List<ISqlParser> sqlParserList = new ArrayList<>(); |
| | | sqlParserList.add(new BlockAttackSqlParser()); |
| | | paginationInterceptor.setSqlParserList(sqlParserList); |
| | |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.empBaseInfoService.findEmpBaseInfos(request, empBaseinfo)); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "智搜人员基本信息翻页列表") |
| | | @GetMapping("zslist") |
| | | @PreAuthorize("hasAuthority('empBaseinfo:list')") |
| | |
| | | List<EmpBaseInfo> allRoles = empBaseInfoService.list(wrapper); |
| | | return new FebsResponse().data(allRoles); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "export",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | |
| | | List<EmpBaseInfo> records = this.empBaseInfoService.findZsEmpBaseInfos(request, empBaseinfo).getRecords(); |
| | | ExcelKit.$Export(EmpBaseInfo.class, response).downXlsx(records, false); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "exportWithField",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | |
| | | |
| | | @ApiOperation(value = "导入员工") |
| | | @PostMapping("importEmp") |
| | | public void importEmp(MultipartFile file) throws IOException { |
| | | InputStream in = null; |
| | | List<List<List<Object>>> listObject = null; |
| | | public FebsResponse importEmp(MultipartFile file) { |
| | | InputStream in; |
| | | List<List<List<Object>>> listObject; |
| | | List<String> returnList = new ArrayList<>(); |
| | | try { |
| | | if (!file.isEmpty()) { |
| | | in = file.getInputStream(); |
| | | listObject = PoiImportExcel.getMulitListByExcel(in, file.getOriginalFilename()); |
| | | in.close(); |
| | | 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.importEmpRemarkInfo(listObject.get(13)); |
| | | empBaseInfoService.importEmpBaseInfo(listObject.get(0),returnList); |
| | | empWorkExperienceService.importEmpWorkExperience(listObject.get(1),returnList); |
| | | empPhysicalExamService.importEmpPhysicalExam(listObject.get(2),returnList); |
| | | empContractInfoService.importEmpContractInfo(listObject.get(3),returnList); |
| | | empDimissionAttendService.importEmpDimissionAttend(listObject.get(4),returnList); |
| | | empLeaveInfoService.importEmpLeaveInfo(listObject.get(5),returnList); |
| | | empResignService.importEmpResign(listObject.get(6),returnList); |
| | | empUnemploymentService.importEmpUnemployment(listObject.get(7),returnList); |
| | | empInsuranceService.importEmpInsurance(listObject.get(8),returnList); |
| | | empAccidentCasesService.importEmpAccidentCases(listObject.get(9),returnList); |
| | | empOccupationalService.importEmpOccupational(listObject.get(10),returnList); |
| | | empLaborTroubleService.importEmpLaborTrouble(listObject.get(11),returnList); |
| | | empBadRecordService.importEmpBadRecord(listObject.get(12),returnList); |
| | | empRemarkinfoService.importEmpRemarkInfo(listObject.get(13),returnList); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("导入员工", e); |
| | | } |
| | | return new FebsResponse().data(returnList); |
| | | } |
| | | |
| | | @ApiOperation(value = "关闭员工档案") |
| | |
| | | import cc.mrbird.febs.server.hr.annotation.ControllerEndpoint; |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionAttend; |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionLog; |
| | | import cc.mrbird.febs.server.hr.entity.EmpJobChange; |
| | | import cc.mrbird.febs.server.hr.service.IEmpDimissionLogService; |
| | | import cc.mrbird.febs.common.core.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.wuwenze.poi.ExcelKit; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * name:EmpDimissionlog |
| | |
| | | @ApiOperation(value = "员工离职记录翻页列表") |
| | | @GetMapping("list") |
| | | public FebsResponse empDimissionlogList(QueryRequest request, EmpDimissionLog empDimissionlog) { |
| | | Map |
| | | <String, Object> dataTable = FebsUtil.getDataTable(this.empDimissionlogService.findEmpDimissionLogs(request, empDimissionlog)); |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.empDimissionlogService.findEmpDimissionLogs(request, empDimissionlog)); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "export",method= RequestMethod.POST) |
| | | @RequestMapping(value = "export", method = RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | | public void export(QueryRequest request, EmpDimissionLog empBaseinfo, HttpServletResponse response) { |
| | | request.setPageSize(this.empDimissionlogService.count()); |
| | | List<EmpDimissionLog> records = this.empDimissionlogService.findEmpDimissionLogs(request, empBaseinfo).getRecords(); |
| | | ExcelKit.$Export(EmpDimissionLog.class, response).downXlsx(records, false); |
| | | List<Map<String,Object>> records = this.empDimissionlogService.findEmpDimissionLogs(request, empBaseinfo).getRecords(); |
| | | List<EmpDimissionLog> list = records.parallelStream().map(i->{ |
| | | i.put("entryDate", DateUtil.parse(i.get("entryDate").toString())); |
| | | i.put("dimissionDate", DateUtil.parse(i.get("dimissionDate").toString())); |
| | | return BeanUtil.toBean(i,EmpDimissionLog.class); |
| | | }).collect(Collectors.toList()); |
| | | ExcelKit.$Export(EmpDimissionLog.class, response).downXlsx(list, false); |
| | | } |
| | | |
| | | @ApiOperation(value = "员工离职记录增加") |
| | | @PostMapping |
| | | @PreAuthorize("hasAuthority('empDimissionlog:add')") |
| | |
| | | @FieldInfo(name = "entryDates", explain = "关闭档案人员入职日期") |
| | | @TableField(exist = false) |
| | | private String entryDates; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private String entryDateStr= ""; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private String dimissionDateStr= ""; |
| | | |
| | |
| | | private String afterOperation= ""; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelField(value = "身份证号码") |
| | | private String certificateNumb= ""; |
| | | } |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelField(value = "员工编号") |
| | | private String empNumb= ""; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelField(value = "新部门") |
| | | private String newDeptName= ""; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelField(value = "新岗位") |
| | | private String newJobName= ""; |
| | | |
| | | |
| | | } |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionLog; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * name:EmpDimissionlog |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | void logicDeleteByIds(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | } |
| | | |
| | | IPage<Map<String,Object>> selectPageVo(Page<?> page, @Param(Constants.WRAPPER) Wrapper wrapper); |
| | | |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!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> |
| | | </mapper> |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpAccidentCases(List<List<Object>> listObject); |
| | | void importEmpAccidentCases(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpBadRecord(List<List<Object>> listObject); |
| | | void importEmpBadRecord(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | package cc.mrbird.febs.server.hr.service; |
| | | |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | | import cc.mrbird.febs.server.hr.entity.*; |
| | | |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | |
| | | * 导入员工 |
| | | * @param listObject |
| | | */ |
| | | void importEmpBaseInfo(List<List<Object>> listObject); |
| | | void importEmpBaseInfo(List<List<Object>> listObject,List<String> returnList) throws FebsException; |
| | | |
| | | void getImage(String empId, HttpServletResponse response) throws Exception; |
| | | |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpContractInfo(List<List<Object>> listObject); |
| | | void importEmpContractInfo(List<List<Object>> listObject,List<String> returnList); |
| | | |
| | | void terminateContract(String empIds, String operatorId); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpDimissionAttend(List<List<Object>> listObject); |
| | | void importEmpDimissionAttend(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * name:EmpDimissionlog |
| | |
| | | * @param empDimissionlog empDimissionlog |
| | | * @return IPage<EmpDimissionlog> |
| | | */ |
| | | IPage<EmpDimissionLog> findEmpDimissionLogs(QueryRequest request, EmpDimissionLog empDimissionlog); |
| | | IPage<Map<String, Object>> findEmpDimissionLogs(QueryRequest request, EmpDimissionLog empDimissionlog); |
| | | |
| | | /** |
| | | * 查询(所有) |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpInsurance(List<List<Object>> listObject); |
| | | void importEmpInsurance(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpLaborTrouble(List<List<Object>> listObject); |
| | | void importEmpLaborTrouble(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpLeaveInfo(List<List<Object>> listObject); |
| | | void importEmpLeaveInfo(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpOccupational(List<List<Object>> listObject); |
| | | void importEmpOccupational(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpPhysicalExam(List<List<Object>> listObject); |
| | | void importEmpPhysicalExam(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpRemarkInfo(List<List<Object>> listObject); |
| | | void importEmpRemarkInfo(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpResign(List<List<Object>> listObject); |
| | | void importEmpResign(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpUnemployment(List<List<Object>> listObject); |
| | | void importEmpUnemployment(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | */ |
| | | boolean momentToNormal(String ids); |
| | | |
| | | void importEmpWorkExperience(List<List<Object>> listObject); |
| | | void importEmpWorkExperience(List<List<Object>> listObject,List<String> returnList); |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpAccidentCases(List<List<Object>> listObject) { |
| | | public void importEmpAccidentCases(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpAccidentCases empAccidentcases=new EmpAccidentCases(); |
| | | empAccidentcases.setAccidentId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpBadRecord(List<List<Object>> listObject) { |
| | | public void importEmpBadRecord(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpBadRecord empBadrecord=new EmpBadRecord(); |
| | | empBadrecord.setBadId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | import java.util.function.Consumer; |
| | | |
| | | 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; |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionLog; |
| | | import cc.mrbird.febs.server.hr.entity.EmpJobChange; |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpBaseInfo(List<List<Object>> listObject) { |
| | | public void importEmpBaseInfo(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | 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())); |
| | | continue; |
| | | } |
| | | EmpBaseInfo empBaseInfo = new EmpBaseInfo(); |
| | | empBaseInfo.setEmpId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empBaseInfo.setArchivesNumb(list.get(0).toString()); |
| | |
| | | empBaseInfo.setEmpName(list.get(2).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | 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); |
| | | 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; |
| | | } |
| | | empBaseInfo.setDeptId(dept.getDeptId()); |
| | | empBaseInfo.setJobName(list.get(4).toString()); |
| | | empBaseInfo.setEmpType(list.get(5).toString()); |
| | | empBaseInfo.setSex("男".equals(list.get(6).toString()) ? "1" : "2"); |
| | |
| | | empBaseInfo.setHandbookStatus(list.get(28).toString()); |
| | | empBaseInfo.setEmpCardStatus(list.get(29).toString()); |
| | | empBaseInfo.setCertificateList(list.get(30).toString()); |
| | | empBaseInfo.setDelFlag(2); |
| | | empBaseInfo.setEmpStatus("0"); |
| | | this.save(empBaseInfo); |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpContractInfo(List<List<Object>> listObject) { |
| | | public void importEmpContractInfo(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpContractInfo contractInfo = new EmpContractInfo(); |
| | | contractInfo.setContractId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | empContractinfoMapper.terminateContract(list, operatorId); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpDimissionAttend(List<List<Object>> listObject) { |
| | | public void importEmpDimissionAttend(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpDimissionAttend dimissionAttend = new EmpDimissionAttend(); |
| | | dimissionAttend.setDimissionAttendId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | this.save(dimissionAttend); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpDimissionLog> findEmpDimissionLogs(QueryRequest request, EmpDimissionLog empDimissionlog) { |
| | | public IPage<Map<String, Object>> findEmpDimissionLogs(QueryRequest request, EmpDimissionLog empDimissionlog) { |
| | | LambdaQueryWrapper<EmpDimissionLog> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpDimissionLog::getDelFlag, 0); |
| | | // if (StringUtils.isNotBlank(empDimissionlog.getEmpNumb())) { |
| | | // queryWrapper.like(EmpDimissionLog::getEmpNumb, empDimissionlog.getEmpNumb()); |
| | | // } |
| | | // if (StringUtils.isNotBlank(empDimissionlog.getEmpName())) { |
| | | // queryWrapper.like(EmpDimissionLog::getEmpName, empDimissionlog.getEmpName()); |
| | | // } |
| | | // if (StringUtils.isNotBlank(empDimissionlog.getCertificateNumb())) { |
| | | // queryWrapper.like(EmpDimissionLog::getCertificateNumb, empDimissionlog.getCertificateNumb()); |
| | | // } |
| | | // if (StringUtils.isNotBlank(empDimissionlog.getDeptName())) { |
| | | // queryWrapper.like(EmpDimissionLog::getDeptName, empDimissionlog.getDeptName()); |
| | | // } |
| | | |
| | | if (StringUtils.isNotBlank(empDimissionlog.getEntryDateStr())) { |
| | | queryWrapper.between(EmpDimissionLog::getEntryDate, empDimissionlog.getEntryDateStr().split(",")[0], empDimissionlog.getEntryDateStr().split(",")[1]); |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(empDimissionlog.getDimissionType())) { |
| | | queryWrapper.eq(EmpDimissionLog::getDimissionType, empDimissionlog.getDimissionType()); |
| | | } |
| | | Page<EmpDimissionLog> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | Page<Map<String, Object>> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | |
| | | return this.baseMapper.selectPageVo(page,queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | empDimissionlogMapper.logicDeleteByIds(list, operatorId); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpInsurance(List<List<Object>> listObject) { |
| | | public void importEmpInsurance(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpInsurance empInsurance = new EmpInsurance(); |
| | | empInsurance.setInsuranceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpLaborTrouble(List<List<Object>> listObject) { |
| | | public void importEmpLaborTrouble(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpLaborTrouble empLabortrouble = new EmpLaborTrouble(); |
| | | empLabortrouble.setArbitrationId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpLeaveInfo(List<List<Object>> listObject) { |
| | | public void importEmpLeaveInfo(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpLeaveInfo leaveInfo = new EmpLeaveInfo(); |
| | | leaveInfo.setLeaveId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | |
| | | return list; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpOccupational(List<List<Object>> listObject) { |
| | | public void importEmpOccupational(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpOccupational empOccupational=new EmpOccupational(); |
| | | empOccupational.setOccupationalId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | this.save(empOccupational); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpPhysicalExam(List<List<Object>> listObject) { |
| | | public void importEmpPhysicalExam(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpPhysicalExam physicalExam = new EmpPhysicalExam(); |
| | | physicalExam.setPhysicalExamId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | this.save(physicalExam); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpRemarkInfo(List<List<Object>> listObject) { |
| | | public void importEmpRemarkInfo(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpRemarkInfo empRemarkinfo=new EmpRemarkInfo(); |
| | | empRemarkinfo.setRemarkId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | this.save(empRemarkinfo); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpResign(List<List<Object>> listObject) { |
| | | public void importEmpResign(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpResign resign = new EmpResign(); |
| | | resign.setResignId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpUnemployment(List<List<Object>> listObject) { |
| | | public void importEmpUnemployment(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | EmpUnemployment empUnemployment=new EmpUnemployment(); |
| | | empUnemployment.setUnemploymentId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpWorkExperience(List<List<Object>> listObject) { |
| | | public void importEmpWorkExperience(List<List<Object>> listObject,List<String> returnList) { |
| | | for (List<Object> list : listObject) { |
| | | if (list.size()==0){ |
| | | continue; |
| | | } |
| | | EmpWorkExperience workExperience = new EmpWorkExperience(); |
| | | workExperience.setWorkExperienceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | workExperience.setEmpNumb(list.get(0).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.setEndDate(DateUtil.parseDate(list.get(6).toString())); |
| | | } |
| | | workExperience.setJobContent(list.get(7).toString()); |
| | | this.save(workExperience); |
| | | } |
| | | } |
| | | } |
| | | } |