Merge remote-tracking branch 'origin/master'
| | |
| | | EmpBaseInfo addInEmpBaseInfo(EmpBaseInfo empBaseInfo); |
| | | |
| | | Long getEmpIdByEmpNumb(String empNumb); |
| | | |
| | | EmpBaseInfo getEmpBaseInfoByEmpNumb(String empNumb); |
| | | } |
| | |
| | | EmpBaseInfo empBaseInfo = empBaseInfoService.getById(accessory.getEmpid()); |
| | | String nameAndCertificateNumb = empBaseInfo.getEmpName()+"_"+empBaseInfo.getCertificateNumb()+"/"; |
| | | files.add(new File(properties.getUploadSinglePath() + nameAndCertificateNumb + accessory.getFilesaddress())); |
| | | if ( fileName.parallelStream().filter(filter->StrUtil.equals(accessory.getFilesname(),filter)).count()==0){ |
| | | fileName.add(accessory.getFilesname()); |
| | | }else{ |
| | | fileName.add(accessory.getFilesname()+fileName.parallelStream().filter(filter->StrUtil.equals(accessory.getFilesname(),filter)).count()+1); |
| | | } |
| | | }); |
| | | MyUtil.download(request, response, files, fileName); |
| | | |
| | |
| | | import cc.mrbird.febs.common.core.entity.system.SystemUser; |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | | import cc.mrbird.febs.server.hr.constant.MyConstant; |
| | | import cc.mrbird.febs.server.hr.entity.EmpBaseInfo; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | |
| | | returnList.add(StrUtil.format("导入员工意外险案件异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | continue; |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | EmpBaseInfo empBaseInfo = empBaseInfoService.getEmpBaseInfoByEmpNumb(list.get(0).toString()); |
| | | if (null == empBaseInfo){ |
| | | returnList.add(StrUtil.format("导入员工意外险案件异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | continue; |
| | | } |
| | | empAccidentcases.setDelFlag(2); |
| | | empAccidentcases.setEmpId(empId); |
| | | empAccidentcases.setEmpId(empBaseInfo.getEmpId()); |
| | | empAccidentcases.setDeptName(list.get(1).toString()); |
| | | empAccidentcases.setDeptId(dept.getDeptId()); |
| | | empAccidentcases.setJobName(list.get(2).toString()); |
| | |
| | | empAccidentcases.setHospitalizatioFlag("未住院".equals(list.get(12).toString()) ? 0 : 1); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(13).toString())) { |
| | | empAccidentcases.setBedNumb(list.get(14).toString()); |
| | | empAccidentcases.setBedNumb(list.get(13).toString()); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(14).toString())) { |
| | | empAccidentcases.setReprotTime(DateUtil.parseDate(list.get(14).toString())); |
| | |
| | | if (StringUtils.isNotBlank(list.get(22).toString())) { |
| | | empAccidentcases.setSettleDate(DateUtil.parseDate(list.get(22).toString())); |
| | | } |
| | | empAccidentcases.setEmpStatus(empBaseInfo.getEmpStatus()); |
| | | this.save(empAccidentcases); |
| | | } |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEmpCardStatus())) { |
| | | p.or().in("a.EmpCardStatus", empBaseInfo.getEmpCardStatus().split(",")); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEmpType())) { |
| | | p.or().in("a.empType", empBaseInfo.getEmpType().split(",")); |
| | | } |
| | | }); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public EmpBaseInfo getEmpBaseInfoByEmpNumb(String empNumb) { |
| | | try { |
| | | return this.getOne(new LambdaQueryWrapper<EmpBaseInfo>().eq(EmpBaseInfo::getEmpNumb,empNumb).ne(EmpBaseInfo::getDelFlag,1)); |
| | | }catch (Exception e){ |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | returnList.add(StrUtil.format("导入离职当月考勤异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | continue; |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | EmpBaseInfo empBaseInfo = empBaseInfoService.getEmpBaseInfoByEmpNumb(list.get(0).toString()); |
| | | if (null == empBaseInfo){ |
| | | returnList.add(StrUtil.format("导入离职当月考勤异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | continue; |
| | | } |
| | | dimissionAttend.setDelFlag(2); |
| | | dimissionAttend.setEmpId(empId); |
| | | dimissionAttend.setEmpId(empBaseInfo.getEmpId()); |
| | | dimissionAttend.setDeptName(list.get(1).toString()); |
| | | dimissionAttend.setDeptId(dept.getDeptId()); |
| | | dimissionAttend.setJobName(list.get(2).toString()); |
| | |
| | | dimissionAttend.setAbsenteeism(new BigDecimal(list.get(11).toString())); |
| | | } |
| | | dimissionAttend.setRemark(list.get(12).toString()); |
| | | dimissionAttend.setEmpStatus(empBaseInfo.getEmpStatus()); |
| | | this.save(dimissionAttend); |
| | | } |
| | | } |
| | |
| | | returnList.add(StrUtil.format("导入社保申请服务异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | continue; |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | EmpBaseInfo empBaseInfo = empBaseInfoService.getEmpBaseInfoByEmpNumb(list.get(0).toString()); |
| | | if (null == empBaseInfo){ |
| | | returnList.add(StrUtil.format("导入社保申请服务异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | continue; |
| | | } |
| | | empInsurance.setDelFlag(2); |
| | | empInsurance.setEmpId(empId); |
| | | empInsurance.setEmpId(empBaseInfo.getEmpId()); |
| | | empInsurance.setDeptName(list.get(1).toString()); |
| | | empInsurance.setDeptId(dept.getDeptId()); |
| | | empInsurance.setJobName(list.get(2).toString()); |
| | |
| | | } |
| | | empInsurance.setAuditor(list.get(9).toString()); |
| | | empInsurance.setRemark(list.get(10).toString()); |
| | | empInsurance.setEmpStatus(empBaseInfo.getEmpStatus()); |
| | | this.save(empInsurance); |
| | | } |
| | | } |
| | |
| | | returnList.add(StrUtil.format("导入员工劳资案件异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | continue; |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | EmpBaseInfo empBaseInfo = empBaseInfoService.getEmpBaseInfoByEmpNumb(list.get(0).toString()); |
| | | if (null == empBaseInfo){ |
| | | returnList.add(StrUtil.format("导入员工劳资案件异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | continue; |
| | | } |
| | | empLabortrouble.setDelFlag(2); |
| | | empLabortrouble.setEmpId(empId); |
| | | empLabortrouble.setEmpId(empBaseInfo.getEmpId()); |
| | | empLabortrouble.setDeptName(list.get(1).toString()); |
| | | empLabortrouble.setDeptId(dept.getDeptId()); |
| | | empLabortrouble.setJobName(list.get(2).toString()); |
| | |
| | | if (StringUtils.isNotBlank(list.get(12).toString())) { |
| | | empLabortrouble.setSettleDate(DateUtil.parseDate(list.get(12).toString())); |
| | | } |
| | | empLabortrouble.setEmpStatus(empBaseInfo.getEmpStatus()); |
| | | this.save(empLabortrouble); |
| | | } |
| | | } |
| | |
| | | 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.EmpLeaveInfo; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLeaveInfoMapper; |
| | |
| | | returnList.add(StrUtil.format("导入员工请假记录异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | continue; |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | EmpBaseInfo empBaseInfo = empBaseInfoService.getEmpBaseInfoByEmpNumb(list.get(0).toString()); |
| | | if (null == empBaseInfo){ |
| | | returnList.add(StrUtil.format("导入员工请假记录异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | continue; |
| | | } |
| | | leaveInfo.setDelFlag(2); |
| | | leaveInfo.setEmpId(empId); |
| | | leaveInfo.setEmpId(empBaseInfo.getEmpId()); |
| | | leaveInfo.setDeptName(list.get(1).toString()); |
| | | leaveInfo.setDeptId(dept.getDeptId()); |
| | | leaveInfo.setJobName(list.get(2).toString()); |
| | |
| | | } |
| | | leaveInfo.setReporter(list.get(10).toString()); |
| | | leaveInfo.setRemark(list.get(11).toString()); |
| | | leaveInfo.setEmpStatus(empBaseInfo.getEmpStatus()); |
| | | this.save(leaveInfo); |
| | | } |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | 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; |
| | |
| | | returnList.add(StrUtil.format("导入员工工伤案件异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | continue; |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | EmpBaseInfo empBaseInfo = empBaseInfoService.getEmpBaseInfoByEmpNumb(list.get(0).toString()); |
| | | if (null == empBaseInfo){ |
| | | returnList.add(StrUtil.format("导入员工工伤案件异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | continue; |
| | | } |
| | | empOccupational.setDelFlag(2); |
| | | empOccupational.setEmpId(empId); |
| | | empOccupational.setEmpId(empBaseInfo.getEmpId()); |
| | | empOccupational.setDeptName(list.get(1).toString()); |
| | | empOccupational.setDeptId(dept.getDeptId()); |
| | | empOccupational.setJobName(list.get(2).toString()); |
| | |
| | | empOccupational.setHospitalizatioFlag("未住院".equals(list.get(12).toString()) ? 0 : 1); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(13).toString())) { |
| | | empOccupational.setBedNumb(list.get(14).toString()); |
| | | empOccupational.setBedNumb(list.get(13).toString()); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(14).toString())) { |
| | | empOccupational.setReportTime(DateUtil.parseDate(list.get(14).toString())); |
| | |
| | | if (StringUtils.isNotBlank(list.get(22).toString())) { |
| | | empOccupational.setSettleDate(DateUtil.parseDate(list.get(22).toString())); |
| | | } |
| | | empOccupational.setEmpStatus(empBaseInfo.getEmpStatus()); |
| | | this.save(empOccupational); |
| | | } |
| | | } |
| | |
| | | } |
| | | Long empId = empBaseInfoService.getEmpIdByEmpNumb(list.get(0).toString()); |
| | | if (null == empId){ |
| | | returnList.add(StrUtil.format("导入失业金领取表异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | 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); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(4).toString())).findFirst().orElse(null); |
| | | if (null == dept) { |
| | | returnList.add(StrUtil.format("导入失业金领取表异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | | returnList.add(StrUtil.format("员工工作经历: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(4).toString())); |
| | | continue; |
| | | } |
| | | EmpWorkExperience workExperience = new EmpWorkExperience(); |
| | | workExperience.setDeptName(list.get(1).toString()); |
| | | workExperience.setDeptName(list.get(4).toString()); |
| | | workExperience.setDeptId(dept.getDeptId()); |
| | | workExperience.setWorkExperienceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | workExperience.setEmpNumb(list.get(0).toString()); |
| | |
| | | |
| | | import java.io.*; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | |
| | | String[] arr = fileids.split(","); |
| | | List<File> files = new ArrayList<>(); |
| | | List<String> fileName = new ArrayList<>(); |
| | | |
| | | Arrays.stream(arr).forEach(i -> { |
| | | FilesUpload filesUpload = this.getById(i); |
| | | Folder folder = iFolderService.getById(filesUpload.getFolderid()); |
| | | files.add(new File(properties.getUploadCommonPath() + folder.getFoldername() + "/" + filesUpload.getFilesaddress())); |
| | | if ( fileName.parallelStream().filter(filter->StrUtil.equals(filesUpload.getFilesname(),filter)).count()==0){ |
| | | fileName.add(filesUpload.getFilesname()); |
| | | }else{ |
| | | fileName.add(filesUpload.getFilesname()+fileName.parallelStream().filter(filter->StrUtil.equals(filesUpload.getFilesname(),filter)).count()+1); |
| | | } |
| | | |
| | | }); |
| | | MyUtil.download(request, response, files, fileName); |
| | | |
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | | * name:Dicitem |
| | | * package:cc.mrbird.febs.server.system.controller |
| | | * description:数据字典项控制器 |
| | |
| | | public FebsResponse getAllDicitems(DicItem dicitem) { |
| | | return new FebsResponse().data(dicitemService.findDicItems(dicitem)); |
| | | } |
| | | |
| | | @GetMapping(value = "/type/{dictType}") |
| | | public FebsResponse dictType(@PathVariable String dictType) |
| | | { |
| | | public FebsResponse dictType(@PathVariable String dictType) { |
| | | DicItem dicItem=new DicItem(); |
| | | dicItem.setDicCode(dictType); |
| | | return new FebsResponse().data(dicitemService.findDicItems(dicItem)); |
| | | } |
| | | |
| | | @GetMapping("list") |
| | | public FebsResponse dicitemList(QueryRequest request, DicItem dicitem) { |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.dicitemService.findDicItems(request, dicitem)); |