Merge remote-tracking branch 'origin/master'
| | |
| | | /** |
| | | * 返回值提示 |
| | | */ |
| | | public final static String MESSAGE="NATION"; |
| | | public final static String MESSAGE="当日数据已存在"; |
| | | |
| | | } |
| | |
| | | this.empAccidentCasesService.createEmpAccidentcases(empAccidentcases); |
| | | } catch (Exception e) { |
| | | String message = "新增员工意外险案件失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | this.empAccidentCasesService.updateEmpAccidentcases(empAccidentcases); |
| | | } catch (Exception e) { |
| | | String message = "修改员工意外险案件失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | this.empBadrecordService.createEmpBadrecord(empBadrecord); |
| | | } catch (Exception e) { |
| | | String message = "新增员工不良记录信息失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | this.empBadrecordService.updateEmpBadrecord(empBadrecord); |
| | | } catch (Exception e) { |
| | | String message = "修改员工不良记录信息失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | package cc.mrbird.febs.server.hr.controller; |
| | | |
| | | import cc.mrbird.febs.server.hr.annotation.ControllerEndpoint; |
| | | import cc.mrbird.febs.server.hr.constant.MyConstant; |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionLog; |
| | | import cc.mrbird.febs.server.hr.entity.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.service.IEmpInsuranceService; |
| | |
| | | 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.util.StrUtil; |
| | | import com.wuwenze.poi.ExcelKit; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | this.empInsuranceService.createEmpInsurance(empInsurance); |
| | | } catch (Exception e) { |
| | | String message = "新增员工社保申请失败"; |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | |
| | | this.empInsuranceService.updateEmpInsurance(empInsurance); |
| | | } catch (Exception e) { |
| | | String message = "修改员工社保申请失败"; |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | |
| | | this.empLabortroubleService.createEmpLabortrouble(empLabortrouble); |
| | | } catch (Exception e) { |
| | | String message = "新增员工劳资案件失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | this.empLabortroubleService.updateEmpLabortrouble(empLabortrouble); |
| | | } catch (Exception e) { |
| | | String message = "修改员工劳资案件失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | this.empResignService.createEmpResign(empResign); |
| | | } catch (Exception e) { |
| | | String message = "新增员工辞职申请失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | this.empResignService.updateEmpResign(empResign); |
| | | } catch (Exception e) { |
| | | String message = "修改员工辞职申请失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | this.empUnemploymentService.createEmpUnemployment(empUnemployment); |
| | | } catch (Exception e) { |
| | | String message = "新增失业金领取表失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | this.empUnemploymentService.updateEmpUnemployment(empUnemployment); |
| | | } catch (Exception e) { |
| | | String message = "修改失业金领取表失败"; |
| | | if (!StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | |
| | | queryWrapper.like("a.empNumb", vo.getBasic()).or().like("a.deptName", vo.getBasic()).or().like("a.certificateNumb", vo.getBasic()).or().like("a.certificateNumb", vo.getBasic()).or().like("a.jobName", vo.getBasic()); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getEmpName())) { |
| | | queryWrapper.like("a.empName", vo.getEmpName()); |
| | | queryWrapper.like("a.empName", vo.getEmpName().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getEmpNumb())) { |
| | | queryWrapper.like("a.empNumb", vo.getEmpNumb()); |
| | | queryWrapper.like("a.empNumb", vo.getEmpNumb().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getCertificateNumb())) { |
| | | queryWrapper.like("a.certificateNumb", vo.getCertificateNumb()); |
| | | queryWrapper.like("a.certificateNumb", vo.getCertificateNumb().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getDeptName())) { |
| | | queryWrapper.like("a.deptName", vo.getDeptName()); |
| | | queryWrapper.like("a.deptName", vo.getDeptName().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getEntryDate())) { |
| | | queryWrapper.between("a.entryDate", vo.getEntryDate().split(",")[0], vo.getEntryDate().split(",")[1]); |
| | |
| | | if (StrUtil.isNotBlank(vo.getAge())) { |
| | | String[] arr = vo.getAge().split(","); |
| | | for (String s : arr) { |
| | | if (StrUtil.equals(s, "1")) { |
| | | queryWrapper.between("a.age", 18, 29); |
| | | } if (StrUtil.equals(s, "2")) { |
| | | queryWrapper.between("a.age", 30, 39); |
| | | } if (StrUtil.equals(s, "3")) { |
| | | queryWrapper.between("a.age", 40, 49); |
| | | } if (StrUtil.equals(s, "4")) { |
| | | queryWrapper.between("a.age", 50, 59); |
| | | } if (StrUtil.equals(s, "5")) { |
| | | queryWrapper.between("a.age", 60, 69); |
| | | } if (StrUtil.equals(s, "6")) { |
| | | queryWrapper.ge("a.age", 69); |
| | | if (StrUtil.equals(s, "18-29")) { |
| | | queryWrapper.or().between("a.age", 18, 29); |
| | | } |
| | | if (StrUtil.equals(s, "30-39")) { |
| | | queryWrapper.or().between("a.age", 30, 39); |
| | | } |
| | | if (StrUtil.equals(s, "40-49")) { |
| | | queryWrapper.or().between("a.age", 40, 49); |
| | | } |
| | | if (StrUtil.equals(s, "50-59")) { |
| | | queryWrapper.or().between("a.age", 50, 59); |
| | | } |
| | | if (StrUtil.equals(s, "60-69")) { |
| | | queryWrapper.or().between("a.age", 60, 69); |
| | | } |
| | | if (StrUtil.equals(s, "69-999")) { |
| | | queryWrapper.or().ge("a.age", 69); |
| | | } |
| | | } |
| | | |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getArchivesStatus())) { |
| | | queryWrapper.in("a.archivesStatus", vo.getArchivesStatus()); |
| | | queryWrapper.in("a.archivesStatus", vo.getArchivesStatus().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getEducation())) { |
| | | queryWrapper.in("a.education", vo.getEducation()); |
| | | queryWrapper.in("a.education", vo.getEducation().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getSex())) { |
| | | queryWrapper.in("a.sex", vo.getSex()); |
| | | queryWrapper.in("a.sex", vo.getSex().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getInsuranceType())) { |
| | | queryWrapper.in("a.insuranceType", vo.getInsuranceType()); |
| | | queryWrapper.in("a.insuranceType", vo.getInsuranceType().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getPolitics())) { |
| | | queryWrapper.in("a.politics", vo.getPolitics()); |
| | | queryWrapper.in("a.politics", vo.getPolitics().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getEmpStatus())) { |
| | | queryWrapper.in("a.empStatus", vo.getEmpStatus()); |
| | | queryWrapper.in("a.empStatus", vo.getEmpStatus().split(",")); |
| | | } |
| | | if (StrUtil.isNotBlank(vo.getPolitics())) { |
| | | queryWrapper.in("a.politics", vo.getPolitics()); |
| | | queryWrapper.in("a.politics", vo.getPolitics().split(",")); |
| | | } |
| | | queryWrapper.eq("a.delFlag", 0); |
| | | queryWrapper.orderByAsc("a.deptName,a.empName,a.certificateNumb"); |
| | | Page<EmpAccessory> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | String querySql = empAccessoryMapper.getQuerySql(); |
| | | IPage<Map<String, Object>> mapIPage = empAccessoryMapper.selectPageVo(page, queryWrapper, querySql); |
| | |
| | | if (StringUtils.isNotBlank(empBaseInfo.getInsuranceType())) { |
| | | p.or().in(EmpBaseInfo::getInsuranceType, empBaseInfo.getInsuranceType().split(",")); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getHandbookStatus())) { |
| | | p.or().in(EmpBaseInfo::getHandbookStatus, empBaseInfo.getHandbookStatus().split(",")); |
| | | } |
| | | if (StringUtils.isNotBlank(empBaseInfo.getEmpCardStatus())) { |
| | | p.or().in(EmpBaseInfo::getEmpCardStatus, empBaseInfo.getEmpCardStatus().split(",")); |
| | | } |
| | | }); |
| | | } |
| | | return queryWrapper; |
| | |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | 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.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | |
| | | LambdaQueryWrapper<EmpInsurance> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(EmpInsurance::getEmpId, empInsurance.getEmpId()); |
| | | lambdaQueryWrapper.eq(EmpInsurance::getApplayDate, empInsurance.getApplayDate()); |
| | | lambdaQueryWrapper.eq(EmpInsurance::getDelFlag, 0); |
| | | lambdaQueryWrapper.ne(EmpInsurance::getDelFlag, 1); |
| | | if (this.count(lambdaQueryWrapper) > 0) { |
| | | throw new FebsException("此人已在本日期申请过社保"); |
| | | throw new FebsException(MyConstant.MESSAGE); |
| | | } |
| | | empInsurance.setInsuranceId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | empInsurance.setCreator(operatorId); |
| | |
| | | LambdaQueryWrapper<EmpInsurance> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(EmpInsurance::getEmpId, empInsurance.getEmpId()); |
| | | lambdaQueryWrapper.eq(EmpInsurance::getApplayDate, empInsurance.getApplayDate()); |
| | | lambdaQueryWrapper.eq(EmpInsurance::getDelFlag, 0); |
| | | lambdaQueryWrapper.ne(EmpInsurance::getDelFlag, 1); |
| | | lambdaQueryWrapper.ne(EmpInsurance::getInsuranceId,empInsurance.getInsuranceId()); |
| | | if (this.count(lambdaQueryWrapper) > 0) { |
| | | throw new FebsException("此人已在本日期申请过社保"); |
| | | throw new FebsException(MyConstant.MESSAGE); |
| | | } |
| | | EmpInsurance dbData = this.getById(empInsurance.getInsuranceId()); |
| | | empInsurance.setCreateTime(dbData.getCreateTime()); |
| | |
| | | import java.util.Optional; |
| | | |
| | | 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 org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |