Merge remote-tracking branch 'origin/master'
| | |
| | | </select> |
| | | <select id="selectPageVo" resultType="java.util.Map"> |
| | | select a.delFlag,a.empName,a.empStatus,a.empId,a.empNumb,a.age,a.archivesStatus,a.sex,a.insuranceType,a.politics,a.education,a.entryDate,a.certificateNumb, |
| | | (select dept_Name from t_dept as dept where dept.dept_Id= a.deptId) as deptName,a.jobName ${sql} from t_emp_baseinfo a ${ew.customSqlSegment} |
| | | (select dept_Name from t_dept as dept where dept.dept_Id= a.deptId) as deptName,a.jobName ${sql} from t_emp_baseinfo a |
| | | inner join t_dept c on a.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpAccidentCases; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | | |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | int momentToNormal(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | |
| | | IPage<EmpAccidentCases> 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.EmpAccidentCasesMapper"> |
| | | |
| | | <select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpAccidentCases"> |
| | | select a.* from t_emp_accidentcases a |
| | | inner join t_emp_baseinfo b on a.empId = b.empId |
| | | inner join t_dept c on b.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpInsurance; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | | |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | int momentToNormal(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | |
| | | IPage<EmpInsurance> 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.EmpInsuranceMapper"> |
| | | |
| | | <select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpInsurance"> |
| | | select a.* from t_emp_insurance a |
| | | inner join t_emp_baseinfo b on a.empId = b.empId |
| | | inner join t_dept c on b.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpLaborTrouble; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | | |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | int momentToNormal(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | |
| | | IPage<EmpLaborTrouble> 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.EmpLaborTroubleMapper"> |
| | | |
| | | <select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpLaborTrouble"> |
| | | select a.* from t_emp_labortrouble a |
| | | inner join t_emp_baseinfo b on a.empId = b.empId |
| | | inner join t_dept c on b.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpLeaveInfo; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | | |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | int momentToNormal(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | |
| | | IPage<EmpLeaveInfo> selectPageVo(Page<?> page, @Param(Constants.WRAPPER) Wrapper wrapper); |
| | | } |
| | |
| | | <!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.EmpLeaveInfoMapper"> |
| | | |
| | | <select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpLeaveInfo"> |
| | | select a.* from t_emp_leaveinfo a |
| | | inner join t_emp_baseinfo b on a.empId = b.empId |
| | | inner join t_dept c on b.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpOccupational; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | | |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | int momentToNormal(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | |
| | | IPage<EmpOccupational> 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.EmpOccupationalMapper"> |
| | | |
| | | <select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpOccupational"> |
| | | select a.* from t_emp_occupational a |
| | | inner join t_emp_baseinfo b on a.empId = b.empId |
| | | inner join t_dept c on b.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpRemarkInfo; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | | |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | int momentToNormal(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | |
| | | IPage<EmpRemarkInfo> 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.EmpRemarkInfoMapper"> |
| | | |
| | | <select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpRemarkInfo"> |
| | | select a.* from t_emp_remarkinfo a |
| | | inner join t_emp_baseinfo b on a.empId = b.empId |
| | | inner join t_dept c on b.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpResign; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | | |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | int momentToNormal(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | |
| | | IPage<EmpResign> selectPageVo(Page<?> page, @Param(Constants.WRAPPER) Wrapper wrapper); |
| | | } |
| | |
| | | <!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.EmpResignMapper"> |
| | | |
| | | <select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpResign"> |
| | | select a.* from t_emp_resign a |
| | | inner join t_emp_baseinfo b on a.empId = b.empId |
| | | inner join t_dept c on b.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package cc.mrbird.febs.server.hr.mapper; |
| | | |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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; |
| | | |
| | |
| | | " </foreach>\n" + |
| | | "</script>") |
| | | int momentToNormal(@Param("list") List<String> list, @Param("operatorId") String operatorId); |
| | | |
| | | IPage<EmpUnemployment> 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.EmpUnemploymentMapper"> |
| | | |
| | | <select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpUnemployment"> |
| | | select a.* from t_emp_unemployment a |
| | | inner join t_emp_baseinfo b on a.empId = b.empId |
| | | inner join t_dept c on b.deptId = c.DEPT_ID |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | import cc.mrbird.febs.common.core.utils.MyUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.server.hr.entity.*; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpAccessoryMapper; |
| | | import cc.mrbird.febs.server.hr.properties.FebsServerHrProperties; |
| | | import cc.mrbird.febs.server.hr.service.IEmpAccessoryService; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | private final ILabelService labelService; |
| | | private final EmpAccessoryMapper empAccessoryMapper; |
| | | private final FebsServerHrProperties properties; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | |
| | | queryWrapper.in("a.politics", vo.getPolitics().split(",")); |
| | | } |
| | | queryWrapper.eq("a.delFlag", 0); |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | queryWrapper.orderByAsc("a.deptName,a.empName,a.certificateNumb"); |
| | | Page<EmpAccessory> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | String querySql = empAccessoryMapper.getQuerySql(); |
| | |
| | | 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 cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | |
| | | private final RedisService redisService; |
| | | private final EmpAccidentCasesMapper empAccidentcasesMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()).map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpAccidentCases> findEmpAccidentcasess(QueryRequest request, EmpAccidentCases empAccidentcases) { |
| | | LambdaQueryWrapper<EmpAccidentCases> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpAccidentCases::getDelFlag, empAccidentcases.getDelFlag()); |
| | | QueryWrapper<EmpAccidentCases> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empAccidentcases.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empAccidentcases.getEmpNumb())) { |
| | | queryWrapper.like(EmpAccidentCases::getEmpNumb, empAccidentcases.getEmpNumb()); |
| | | queryWrapper.like("a.EmpNumb", empAccidentcases.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getEmpName())) { |
| | | queryWrapper.like(EmpAccidentCases::getEmpName, empAccidentcases.getEmpName()); |
| | | queryWrapper.like("a.EmpName", empAccidentcases.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getCertificateNumb())) { |
| | | queryWrapper.like(EmpAccidentCases::getCertificateNumb, empAccidentcases.getCertificateNumb()); |
| | | queryWrapper.like("a.CertificateNumb", empAccidentcases.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getDeptName())) { |
| | | queryWrapper.like(EmpAccidentCases::getDeptName, empAccidentcases.getDeptName()); |
| | | queryWrapper.like("a.DeptName", empAccidentcases.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getInjuredTimeStr())) { |
| | | queryWrapper.between(EmpAccidentCases::getInjuredTime, empAccidentcases.getInjuredTimeStr().split(",")[0], |
| | | queryWrapper.between("a.InjuredTime", empAccidentcases.getInjuredTimeStr().split(",")[0], |
| | | empAccidentcases.getInjuredTimeStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getHrDoDateStr())) { |
| | | queryWrapper.between(EmpAccidentCases::getHrDoDate, empAccidentcases.getHrDoDateStr().split(",")[0], |
| | | queryWrapper.between("a.HrDoDate", empAccidentcases.getHrDoDateStr().split(",")[0], |
| | | empAccidentcases.getHrDoDateStr().split(",")[1]); |
| | | } |
| | | if (empAccidentcases.getHospitalizatioFlag() != null && empAccidentcases.getHospitalizatioFlag() != 0) { |
| | | queryWrapper.eq(EmpAccidentCases::getHospitalizatioFlag, empAccidentcases.getHospitalizatioFlag()); |
| | | queryWrapper.eq("a.HospitalizatioFlag", empAccidentcases.getHospitalizatioFlag()); |
| | | } |
| | | if (empAccidentcases.getSettleStatus() != null && empAccidentcases.getSettleStatus() != 0) { |
| | | queryWrapper.eq(EmpAccidentCases::getSettleStatus, empAccidentcases.getSettleStatus()); |
| | | queryWrapper.eq("a.SettleStatus", empAccidentcases.getSettleStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empAccidentcases.getEmpStatus())) { |
| | | queryWrapper.eq(EmpAccidentCases::getEmpStatus, empAccidentcases.getEmpStatus()); |
| | | queryWrapper.eq("a.EmpStatus", empAccidentcases.getEmpStatus()); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpAccidentCases> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | return empAccidentcasesMapper.selectPageVo(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpBaseInfo; |
| | | import cc.mrbird.febs.server.hr.entity.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpInsuranceMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | |
| | | private final RedisService redisService; |
| | | private final EmpInsuranceMapper empInsuranceMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()).map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpInsurance> findEmpInsurances(QueryRequest request, EmpInsurance empInsurance) { |
| | | LambdaQueryWrapper<EmpInsurance> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpInsurance::getDelFlag, empInsurance.getDelFlag()); |
| | | QueryWrapper<EmpInsurance> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empInsurance.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpNumb())) { |
| | | queryWrapper.like(EmpInsurance::getEmpNumb, empInsurance.getEmpNumb()); |
| | | queryWrapper.like("a.EmpNumb", empInsurance.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpName())) { |
| | | queryWrapper.like(EmpInsurance::getEmpName, empInsurance.getEmpName()); |
| | | queryWrapper.like("a.EmpName", empInsurance.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getCertificateNumb())) { |
| | | queryWrapper.like(EmpInsurance::getCertificateNumb, empInsurance.getCertificateNumb()); |
| | | queryWrapper.like("a.CertificateNumb", empInsurance.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getDeptName())) { |
| | | queryWrapper.like(EmpInsurance::getDeptName, empInsurance.getDeptName()); |
| | | queryWrapper.like("a.DeptName", empInsurance.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getApplayDateStr())) { |
| | | queryWrapper.between(EmpInsurance::getApplayDate, empInsurance.getApplayDateStr().split(",")[0], |
| | | queryWrapper.between("a.ApplayDate", empInsurance.getApplayDateStr().split(",")[0], |
| | | empInsurance.getApplayDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getInsuranceGaers())) { |
| | | queryWrapper.eq(EmpInsurance::getInsuranceGaers, empInsurance.getInsuranceGaers()); |
| | | queryWrapper.eq("a.InsuranceGaers", empInsurance.getInsuranceGaers()); |
| | | } |
| | | if (empInsurance.getReportStatus() != null && empInsurance.getReportStatus() != 0) { |
| | | queryWrapper.eq(EmpInsurance::getReportStatus, empInsurance.getReportStatus()); |
| | | queryWrapper.eq("a.ReportStatus", empInsurance.getReportStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpStatus())) { |
| | | queryWrapper.eq(EmpInsurance::getEmpStatus, empInsurance.getEmpStatus()); |
| | | queryWrapper.eq("a.EmpStatus", empInsurance.getEmpStatus()); |
| | | } |
| | | |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpInsurance> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | return empInsuranceMapper.selectPageVo(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import cc.mrbird.febs.server.hr.constant.MyConstant; |
| | | import cc.mrbird.febs.server.hr.entity.*; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLaborTrouble; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLaborTroubleMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLaborTroubleService; |
| | |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | |
| | | private final RedisService redisService; |
| | | private final EmpLaborTroubleMapper empLabortroubleMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpLaborTrouble> findEmpLabortroubles(QueryRequest request, EmpLaborTrouble empLabortrouble) { |
| | | LambdaQueryWrapper<EmpLaborTrouble> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpLaborTrouble::getDelFlag, empLabortrouble.getDelFlag()); |
| | | QueryWrapper<EmpLaborTrouble> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empLabortrouble.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empLabortrouble.getEmpNumb())) { |
| | | queryWrapper.like(EmpLaborTrouble::getEmpNumb, empLabortrouble.getEmpNumb()); |
| | | queryWrapper.like("a.EmpNumb", empLabortrouble.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getEmpName())) { |
| | | queryWrapper.like(EmpLaborTrouble::getEmpName, empLabortrouble.getEmpName()); |
| | | queryWrapper.like("a.EmpName", empLabortrouble.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getCertificateNumb())) { |
| | | queryWrapper.like(EmpLaborTrouble::getCertificateNumb, empLabortrouble.getCertificateNumb()); |
| | | queryWrapper.like("a.CertificateNumb", empLabortrouble.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getDeptName())) { |
| | | queryWrapper.like(EmpLaborTrouble::getDeptName, empLabortrouble.getDeptName()); |
| | | queryWrapper.like("a.DeptName", empLabortrouble.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getArbitrationDateStr())) { |
| | | queryWrapper.between(EmpLaborTrouble::getArbitrationDate, empLabortrouble.getArbitrationDateStr().split(",")[0], |
| | | queryWrapper.between("a.ArbitrationDate", empLabortrouble.getArbitrationDateStr().split(",")[0], |
| | | empLabortrouble.getArbitrationDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getSettleDateStr())) { |
| | | queryWrapper.between(EmpLaborTrouble::getSettleDate, empLabortrouble.getSettleDateStr().split(",")[0], |
| | | queryWrapper.between("a.SettleDate", empLabortrouble.getSettleDateStr().split(",")[0], |
| | | empLabortrouble.getSettleDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getArbitrationType())) { |
| | | queryWrapper.eq(EmpLaborTrouble::getArbitrationType, empLabortrouble.getArbitrationType()); |
| | | queryWrapper.eq("a.ArbitrationType", empLabortrouble.getArbitrationType()); |
| | | } |
| | | if (empLabortrouble.getArbitrationStatus() != null && empLabortrouble.getArbitrationStatus() != 0) { |
| | | queryWrapper.eq(EmpLaborTrouble::getArbitrationStatus, empLabortrouble.getArbitrationStatus()); |
| | | queryWrapper.eq("a.ArbitrationStatus", empLabortrouble.getArbitrationStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getEmpStatus())) { |
| | | queryWrapper.eq(EmpLaborTrouble::getEmpStatus, empLabortrouble.getEmpStatus()); |
| | | queryWrapper.eq("a.EmpStatus", empLabortrouble.getEmpStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLabortrouble.getArbitrationReason())) { |
| | | queryWrapper.like(EmpLaborTrouble::getArbitrationReason, empLabortrouble.getArbitrationReason()); |
| | | queryWrapper.like("a.ArbitrationReason", empLabortrouble.getArbitrationReason()); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpLaborTrouble> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<EmpLaborTrouble> iPage = this.page(page, queryWrapper); |
| | | IPage<EmpLaborTrouble> iPage = empLabortroubleMapper.selectPageVo(page, queryWrapper); |
| | | iPage.setRecords(this.convertDicItemName(iPage.getRecords())); |
| | | return iPage; |
| | | } |
| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.DicCode; |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.entity.system.DicItem; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLeaveInfo; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpLeaveInfoMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | 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; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * name:EmpLeaveinfo |
| | |
| | | private final RedisService redisService; |
| | | private final EmpLeaveInfoMapper empLeaveinfoMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpLeaveInfo> findEmpLeaveInfos(QueryRequest request, EmpLeaveInfo empLeaveinfo) { |
| | | LambdaQueryWrapper<EmpLeaveInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpLeaveInfo::getDelFlag, empLeaveinfo.getDelFlag()); |
| | | QueryWrapper<EmpLeaveInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empLeaveinfo.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getEmpNumb())) { |
| | | queryWrapper.like(EmpLeaveInfo::getEmpNumb, empLeaveinfo.getEmpNumb()); |
| | | queryWrapper.like("a.EmpNumb", empLeaveinfo.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getEmpName())) { |
| | | queryWrapper.like(EmpLeaveInfo::getEmpName, empLeaveinfo.getEmpName()); |
| | | queryWrapper.like("a.EmpName", empLeaveinfo.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getCertificateNumb())) { |
| | | queryWrapper.like(EmpLeaveInfo::getCertificateNumb, empLeaveinfo.getCertificateNumb()); |
| | | queryWrapper.like("a.CertificateNumb", empLeaveinfo.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getDeptName())) { |
| | | queryWrapper.like(EmpLeaveInfo::getDeptName, empLeaveinfo.getDeptName()); |
| | | queryWrapper.like("a.DeptName", empLeaveinfo.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getEmpStatus())) { |
| | | queryWrapper.eq(EmpLeaveInfo::getEmpStatus, empLeaveinfo.getEmpStatus()); |
| | | queryWrapper.eq("a.EmpStatus", empLeaveinfo.getEmpStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empLeaveinfo.getLeaveDateStr())) { |
| | | queryWrapper.ge(EmpLeaveInfo::getBeginTime, empLeaveinfo.getLeaveDateStr().split(",")[0]); |
| | | queryWrapper.le(EmpLeaveInfo::getEndTime, empLeaveinfo.getLeaveDateStr().split(",")[1]); |
| | | queryWrapper.ge("a.BeginTime", empLeaveinfo.getLeaveDateStr().split(",")[0]); |
| | | queryWrapper.le("a.EndTime", empLeaveinfo.getLeaveDateStr().split(",")[1]); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpLeaveInfo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<EmpLeaveInfo> iPage = this.page(page, queryWrapper); |
| | | IPage<EmpLeaveInfo> iPage = empLeaveinfoMapper.selectPageVo(page, queryWrapper); |
| | | iPage.setRecords(this.convertDicItemName(iPage.getRecords())); |
| | | return iPage; |
| | | } |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | 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.EmpOccupational; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpOccupationalMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpOccupationalService; |
| | | import cn.hutool.core.date.DateUtil; |
| | |
| | | private final RedisService redisService; |
| | | private final EmpOccupationalMapper empOccupationalMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpOccupational> findEmpOccupationals(QueryRequest request, EmpOccupational empOccupational) { |
| | | LambdaQueryWrapper<EmpOccupational> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpOccupational::getDelFlag, empOccupational.getDelFlag()); |
| | | QueryWrapper<EmpOccupational> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empOccupational.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empOccupational.getEmpNumb())) { |
| | | queryWrapper.like(EmpOccupational::getEmpNumb, empOccupational.getEmpNumb()); |
| | | queryWrapper.like("a.EmpNumb", empOccupational.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getEmpName())) { |
| | | queryWrapper.like(EmpOccupational::getEmpName, empOccupational.getEmpName()); |
| | | queryWrapper.like("a.EmpName", empOccupational.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getCertificateNumb())) { |
| | | queryWrapper.like(EmpOccupational::getCertificateNumb, empOccupational.getCertificateNumb()); |
| | | queryWrapper.like("a.CertificateNumb", empOccupational.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getDeptName())) { |
| | | queryWrapper.like(EmpOccupational::getDeptName, empOccupational.getDeptName()); |
| | | queryWrapper.like("a.DeptName", empOccupational.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getInjuredTimeStr())) { |
| | | queryWrapper.between(EmpOccupational::getInjuredTime, empOccupational.getInjuredTimeStr().split(",")[0], |
| | | queryWrapper.between("a.InjuredTime", empOccupational.getInjuredTimeStr().split(",")[0], |
| | | empOccupational.getInjuredTimeStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getHrDoDateStr())) { |
| | | queryWrapper.between(EmpOccupational::getHrDoDate, empOccupational.getHrDoDateStr().split(",")[0], |
| | | queryWrapper.between("a.HrDoDate", empOccupational.getHrDoDateStr().split(",")[0], |
| | | empOccupational.getHrDoDateStr().split(",")[1]); |
| | | } |
| | | if (empOccupational.getHospitalizatioFlag() != null && empOccupational.getHospitalizatioFlag() != 0) { |
| | | queryWrapper.eq(EmpOccupational::getHospitalizatioFlag, empOccupational.getHospitalizatioFlag()); |
| | | queryWrapper.eq("a.HospitalizatioFlag", empOccupational.getHospitalizatioFlag()); |
| | | } |
| | | if (empOccupational.getSettleStatus() != null && empOccupational.getSettleStatus() != 0) { |
| | | queryWrapper.eq(EmpOccupational::getSettleStatus, empOccupational.getSettleStatus()); |
| | | queryWrapper.eq("a.SettleStatus", empOccupational.getSettleStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empOccupational.getEmpStatus())) { |
| | | queryWrapper.eq(EmpOccupational::getEmpStatus, empOccupational.getEmpStatus()); |
| | | queryWrapper.eq("a.EmpStatus", empOccupational.getEmpStatus()); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpOccupational> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | return empOccupationalMapper.selectPageVo(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.server.hr.entity.EmpBadRecord; |
| | | import cc.mrbird.febs.server.hr.entity.EmpRemarkInfo; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.entity.EmpRemarkInfo; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpRemarkInfoMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | |
| | | private final RedisService redisService; |
| | | private final EmpRemarkInfoMapper empRemarkinfoMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpRemarkInfo> findEmpRemarkinfos(QueryRequest request, EmpRemarkInfo empRemarkinfo) { |
| | | LambdaQueryWrapper<EmpRemarkInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpRemarkInfo::getDelFlag, empRemarkinfo.getDelFlag()); |
| | | QueryWrapper<EmpRemarkInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empRemarkinfo.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getEmpNumb())) { |
| | | queryWrapper.like(EmpRemarkInfo::getEmpNumb, empRemarkinfo.getEmpNumb()); |
| | | queryWrapper.like("a.EmpNumb", empRemarkinfo.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getEmpName())) { |
| | | queryWrapper.like(EmpRemarkInfo::getEmpName, empRemarkinfo.getEmpName()); |
| | | queryWrapper.like("a.EmpName", empRemarkinfo.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getCertificateNumb())) { |
| | | queryWrapper.like(EmpRemarkInfo::getCertificateNumb, empRemarkinfo.getCertificateNumb()); |
| | | queryWrapper.like("a.CertificateNumb", empRemarkinfo.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getDeptName())) { |
| | | queryWrapper.like(EmpRemarkInfo::getDeptName, empRemarkinfo.getDeptName()); |
| | | queryWrapper.like("a.DeptName", empRemarkinfo.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getRemarkDateStr())) { |
| | | queryWrapper.between(EmpRemarkInfo::getRemarkDate, empRemarkinfo.getRemarkDateStr().split(",")[0], |
| | | queryWrapper.between("a.RemarkDate", empRemarkinfo.getRemarkDateStr().split(",")[0], |
| | | empRemarkinfo.getRemarkDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empRemarkinfo.getRemarkContent())) { |
| | | queryWrapper.like(EmpRemarkInfo::getRemarkContent, empRemarkinfo.getRemarkContent()); |
| | | queryWrapper.like("a.RemarkContent", empRemarkinfo.getRemarkContent()); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpRemarkInfo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | return empRemarkinfoMapper.selectPageVo(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpResign; |
| | | import cc.mrbird.febs.server.hr.entity.EmpResign; |
| | | import cc.mrbird.febs.server.hr.entity.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpResignMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpBaseInfoService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpResignService; |
| | |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | |
| | | private final RedisService redisService; |
| | | private final EmpResignMapper empResignMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpResign> findEmpResigns(QueryRequest request, EmpResign empResign) { |
| | | LambdaQueryWrapper<EmpResign> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpResign::getDelFlag, empResign.getDelFlag()); |
| | | QueryWrapper<EmpResign> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empResign.getDelFlag()); |
| | | Page<EmpResign> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | if (StringUtils.isNotBlank(empResign.getEmpNumb())) { |
| | | queryWrapper.like(EmpResign::getEmpNumb, empResign.getEmpNumb()); |
| | | queryWrapper.like("a.EmpNumb", empResign.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getEmpName())) { |
| | | queryWrapper.like(EmpResign::getEmpName, empResign.getEmpName()); |
| | | queryWrapper.like("a.EmpName", empResign.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getCertificateNumb())) { |
| | | queryWrapper.like(EmpResign::getCertificateNumb, empResign.getCertificateNumb()); |
| | | queryWrapper.like("a.CertificateNumb", empResign.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getDeptName())) { |
| | | queryWrapper.like(EmpResign::getDeptName, empResign.getDeptName()); |
| | | queryWrapper.like("a.DeptName", empResign.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getApplayDateStr())) { |
| | | queryWrapper.between(EmpResign::getApplayDate, empResign.getApplayDateStr().split(",")[0], empResign.getApplayDateStr().split(",")[1]); |
| | | queryWrapper.between("a.ApplayDate", empResign.getApplayDateStr().split(",")[0], empResign.getApplayDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empResign.getReason())) { |
| | | queryWrapper.like(EmpResign::getReason, empResign.getReason()); |
| | | queryWrapper.like("a.Reason", empResign.getReason()); |
| | | } |
| | | return this.page(page, queryWrapper); |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | return empResignMapper.selectPageVo(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | 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.EmpUnemployment; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDeptService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpUnemploymentMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpUnemploymentService; |
| | | import cn.hutool.core.date.DateUtil; |
| | |
| | | private final RedisService redisService; |
| | | private final EmpUnemploymentMapper empUnemploymentMapper; |
| | | private final IEmpBaseInfoService empBaseInfoService; |
| | | private final IRemoteDeptService remoteDeptService; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | .orElse("1"); |
| | | |
| | | @Override |
| | | public IPage<EmpUnemployment> findEmpUnemployments(QueryRequest request, EmpUnemployment empUnemployment) { |
| | | LambdaQueryWrapper<EmpUnemployment> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EmpUnemployment::getDelFlag, empUnemployment.getDelFlag()); |
| | | QueryWrapper<EmpUnemployment> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("a.DelFlag", empUnemployment.getDelFlag()); |
| | | if (StringUtils.isNotBlank(empUnemployment.getEmpNumb())) { |
| | | queryWrapper.like(EmpUnemployment::getEmpNumb, empUnemployment.getEmpNumb()); |
| | | queryWrapper.like("a.EmpNumb", empUnemployment.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getEmpName())) { |
| | | queryWrapper.like(EmpUnemployment::getEmpName, empUnemployment.getEmpName()); |
| | | queryWrapper.like("a.EmpName", empUnemployment.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getCertificateNumb())) { |
| | | queryWrapper.like(EmpUnemployment::getCertificateNumb, empUnemployment.getCertificateNumb()); |
| | | queryWrapper.like("a.CertificateNumb", empUnemployment.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getDeptName())) { |
| | | queryWrapper.like(EmpUnemployment::getDeptName, empUnemployment.getDeptName()); |
| | | queryWrapper.like("a.DeptName", empUnemployment.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getApplayDateStr())) { |
| | | queryWrapper.between(EmpUnemployment::getApplayDate, empUnemployment.getApplayDateStr().split(",")[0], empUnemployment.getApplayDateStr().split(",")[1]); |
| | | queryWrapper.between("a.ApplayDate", empUnemployment.getApplayDateStr().split(",")[0], empUnemployment.getApplayDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empUnemployment.getApplayReason())) { |
| | | queryWrapper.like(EmpUnemployment::getApplayReason, empUnemployment.getApplayReason()); |
| | | queryWrapper.like("a.ApplayReason", empUnemployment.getApplayReason()); |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpUnemployment> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | return empUnemploymentMapper.selectPageVo(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @GetMapping("userRightDepts") |
| | | public String userRightDepts(){ |
| | | String userRightDepts=userDataPermissionService.findByUserId(FebsUtil.getUserId()); |
| | | log.info("当前用户权限"+userRightDepts); |
| | | return userRightDepts; |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.common.core.entity.Tree; |
| | | import cc.mrbird.febs.common.core.entity.constant.FebsConstant; |
| | | import cc.mrbird.febs.common.core.entity.constant.PageConstant; |
| | | import cc.mrbird.febs.common.core.entity.constant.StringConstant; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.entity.system.DicItem; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.core.utils.SequenceUtil; |
| | | import cc.mrbird.febs.common.core.utils.SortUtil; |
| | | import cc.mrbird.febs.common.core.utils.TreeUtil; |
| | |
| | | .ge(Dept::getCreateTime, dept.getCreateTimeFrom()) |
| | | .le(Dept::getCreateTime, dept.getCreateTimeTo()); |
| | | } |
| | | queryWrapper.lambda().in(Dept::getDeptId, userDataPermissionService.findByUserId(FebsUtil.getUserId()).split(StringConstant.COMMA)); |
| | | SortUtil.handleWrapperSort(request, queryWrapper, "orderNum", FebsConstant.ORDER_ASC, true); |
| | | return this.baseMapper.selectList(queryWrapper); |
| | | } |