fix(bug修复): 汇总bug修改
1、员工智搜那块的所有板块,请检查代码数据导入、信息录入时是否有根据员工身份证号读取员工状态并写入相应的表中?目前看是没有。
2、员工智搜那块的合同结束日期、工作经历开始结束日期、入离职日期,导入时请检查代码时间那块写入数据库的字段是否有错,目前合同结束日期、工作经历结束日期导入后跟开始日期是一个日期,显然不对
3、员工智搜里查询条件合同状态应读取字典表,而不是枚举:
4、员工离职时会选择离职类型,提交后是否将离职类型写入数据库?目前统计的数据不对,例如:自离数据的统计。
5、合同状态查询不正确
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | | * name:EmpContractinfo |
| | | * package:cc.mrbird.febs.server.hr.controller |
| | | * description:员工合同信息控制器 |
| | |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.empContractinfoService.findEmpContractinfos(request, empContractinfo)); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "export",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | |
| | | List<EmpContractInfo> records = this.empContractinfoService.findEmpContractinfos(request, empBaseinfo).getRecords(); |
| | | ExcelKit.$Export(EmpContractInfo.class, response).downXlsx(records, false); |
| | | } |
| | | |
| | | @PostMapping |
| | | @PreAuthorize("hasAuthority('empContractinfo:add')") |
| | | public void addEmpContractinfo(@Valid EmpContractInfo empContractinfo) throws FebsException { |
| | |
| | | <select id="countZcygBaseInfoList" resultType="java.util.Map"> |
| | | SELECT |
| | | count( |
| | | IF (t.dimissionType = '1', 1, NULL) |
| | | IF (t.dimissionType = '6', 1, NULL) |
| | | ) zclz, |
| | | count( |
| | | IF (t.dimissionType = '2', 1, NULL) |
| | | IF (t.dimissionType = '4', 1, NULL) |
| | | ) zdlz, |
| | | count( |
| | | IF (t.dimissionType = '4', 1, NULL) |
| | | IF (t.dimissionType = '3', 1, NULL) |
| | | ) gsct |
| | | FROM |
| | | t_emp_baseinfo t inner join t_dept t1 on t.deptId=t1.DEPT_ID ${ew.customSqlSegment} and t.delFlag=0 and t.empStatus='1' |
| | | <choose> |
| | | <when test="btime!=null and btime!='' and etime!=null and etime!=''"> |
| | | and date_format(t.createTime,'%Y-%m-%d') >= #{btime} and date_format(t.createTime,'%Y-%m-%d') <= #{etime} |
| | | and date_format(t.dimissionDate,'%Y-%m-%d') >= #{btime} and date_format(t.dimissionDate,'%Y-%m-%d') <= #{etime} |
| | | </when> |
| | | <when test="index==0"> |
| | | and TO_DAYS(t.createTime) = TO_DAYS(NOW()) |
| | | and TO_DAYS(t.dimissionDate) = TO_DAYS(NOW()) |
| | | </when> |
| | | <when test="index==1"> |
| | | and YEARWEEK(date_format(t.createTime,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | and YEARWEEK(date_format(t.dimissionDate,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | </when> |
| | | <when test="index==2"> |
| | | and date_format(t.createTime,'%Y-%m') = date_format(now(),'%Y-%m') |
| | | and date_format(t.dimissionDate,'%Y-%m') = date_format(now(),'%Y-%m') |
| | | </when> |
| | | <otherwise> |
| | | and YEAR(t.createTime)=YEAR(NOW()) |
| | | and YEAR(t.dimissionDate)=YEAR(NOW()) |
| | | </otherwise> |
| | | </choose> |
| | | |
| | |
| | | </foreach> |
| | | <choose> |
| | | <when test="number==8"> |
| | | and t1.dimissionType = '1' |
| | | and t1.dimissionType = '6' |
| | | </when> |
| | | <when test="number==9"> |
| | | and t1.dimissionType = '2' |
| | | and t1.dimissionType = '4' |
| | | </when> |
| | | <when test="number==10"> |
| | | and t1.dimissionType = '4' |
| | | and t1.dimissionType = '3' |
| | | </when> |
| | | <otherwise> |
| | | |
| | |
| | | </if> |
| | | <choose> |
| | | <when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''"> |
| | | and date_format(t1.createTime,'%Y-%m-%d') >= #{btime} and date_format(t1.createTime,'%Y-%m-%d') <= #{etime} |
| | | and date_format(t1.dimissionDate,'%Y-%m-%d') >= #{btime} and date_format(t1.dimissionDate,'%Y-%m-%d') <= #{etime} |
| | | </when> |
| | | <when test="index==0"> |
| | | and TO_DAYS(t1.createTime) = TO_DAYS(NOW()) |
| | | and TO_DAYS(t1.dimissionDate) = TO_DAYS(NOW()) |
| | | </when> |
| | | <when test="index==1"> |
| | | and YEARWEEK(date_format(t1.createTime,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | and YEARWEEK(date_format(t1.dimissionDate,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | </when> |
| | | <when test="index==2"> |
| | | and date_format(t1.createTime,'%Y-%m') = date_format(now(),'%Y-%m') |
| | | and date_format(t1.dimissionDate,'%Y-%m') = date_format(now(),'%Y-%m') |
| | | </when> |
| | | <otherwise> |
| | | and YEAR(t1.createTime)=YEAR(NOW()) |
| | | and YEAR(t1.dimissionDate)=YEAR(NOW()) |
| | | </otherwise> |
| | | </choose> |
| | | |
| | |
| | | queryWrapper.eq("a.SettleStatus", empAccidentcases.getSettleStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empAccidentcases.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empAccidentcases.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | |
| | |
| | | p.setEmpTypeName("1".equals(p.getEmpType()) ? "正式工" : "临时工"); |
| | | } |
| | | if (StringUtils.isNotBlank(p.getDimissionType())) { |
| | | if ("1".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("正常离职"); |
| | | } else if ("2".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("自动离职"); |
| | | } else if ("3".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("公司劝退"); |
| | | } else if ("4".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("公司辞退"); |
| | | } else if ("5".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("试用期内"); |
| | | } |
| | | // if ("1".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("正常离职"); |
| | | // } else if ("2".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("自动离职"); |
| | | // } else if ("3".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("公司劝退"); |
| | | // } else if ("4".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("公司辞退"); |
| | | // } else if ("5".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("试用期内"); |
| | | // } |
| | | p.setDimissionTypeName(dicItems.stream() |
| | | .filter(k -> DicCode.IN_OUT_TYPE.equals(k.getDicCode()) && k.getDicItemCode().equals(p.getDimissionType())) |
| | | .findFirst() |
| | | .map(DicItem::getDicItemName) |
| | | .orElse("")); |
| | | } |
| | | p.setInsuranceTypeName("1".equals(p.getInsuranceType()) ? "(深户)五险一档" : "(非深户)五险一档"); |
| | | p.setArchivesStatusName("0".equals(p.getArchivesStatus()) ? "未移交" : "已移交"); |
| | |
| | | queryWrapper.eq("a.ContractStatus", empContractinfo.getContractStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empContractinfo.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empContractinfo.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empContractinfo.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpContractInfo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | |
| | | queryWrapper.like("a.Deduct", empDimissionattend.getDeductStr()); |
| | | } |
| | | if (StringUtils.isNotBlank(empDimissionattend.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empDimissionattend.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empDimissionattend.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpDimissionAttend> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | |
| | | queryWrapper.eq("a.ReportStatus", empInsurance.getReportStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empInsurance.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empInsurance.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpInsurance> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | |
| | | queryWrapper.eq("a.ArbitrationStatus", empLabortrouble.getArbitrationStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empLabortrouble.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empLabortrouble.getEmpStatus().split(",")); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getArbitrationReason())) { |
| | | queryWrapper.like("a.ArbitrationReason", empLabortrouble.getArbitrationReason()); |
| | |
| | | queryWrapper.like("b.allDeptName", empLeaveinfo.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empLeaveinfo.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empLeaveinfo.getEmpStatus().split(",")); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getLeaveDateStr())) { |
| | | queryWrapper.ge("a.BeginTime", empLeaveinfo.getLeaveDateStr().split(",")[0]); |
| | |
| | | queryWrapper.eq("a.SettleStatus", empOccupational.getSettleStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empOccupational.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empOccupational.getEmpStatus().split(",")); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpOccupational> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | |
| | | queryWrapper.like("a.Conclusion", empPhysicalexam.getConclusion()); |
| | | } |
| | | if (StringUtils.isNotBlank(empPhysicalexam.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empPhysicalexam.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empPhysicalexam.getEmpStatus().split(",")); |
| | | } else { |
| | | queryWrapper.in("a.EmpStatus", 0); |
| | | queryWrapper.in("b.EmpStatus", 0); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | |
| | |
| | | queryWrapper.like("a.jobContent", empWorkexperience.getJobContent()); |
| | | } |
| | | if (StringUtils.isNotBlank(empWorkexperience.getEmpStatus())) { |
| | | queryWrapper.in("a.EmpStatus", empWorkexperience.getEmpStatus().split(",")); |
| | | queryWrapper.in("b.EmpStatus", empWorkexperience.getEmpStatus().split(",")); |
| | | } else { |
| | | queryWrapper.in("a.EmpStatus", 0); |
| | | } |