| | |
| | | package cc.mrbird.febs.server.hr.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.ModuleCode; |
| | | 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.entity.EmpInsurance; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpInsuranceMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpInsuranceService; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * name:EmpInsurance |
| | | * package:cc.mrbird.febs.server.hr.controller |
| | | * name:EmpInsurance package:cc.mrbird.febs.server.hr.controller |
| | | * description:员工社保申请服务接口实现 |
| | | * |
| | | * @author luoyibo |
| | |
| | | class EmpInsuranceServiceImpl extends ServiceImpl<EmpInsuranceMapper, EmpInsurance> implements IEmpInsuranceService { |
| | | |
| | | private final EmpInsuranceMapper empInsuranceMapper; |
| | | private final String operatorId = Optional.ofNullable(FebsUtil.getCurrentUser()) |
| | | .map(u -> u.getUserId().toString()) |
| | | 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()); |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpNumb())) { |
| | | queryWrapper.like(EmpInsurance::getEmpNumb, empInsurance.getEmpNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpName())) { |
| | | queryWrapper.like(EmpInsurance::getEmpName, empInsurance.getEmpName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getCertificateNumb())) { |
| | | queryWrapper.like(EmpInsurance::getCertificateNumb, empInsurance.getCertificateNumb()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getDeptName())) { |
| | | queryWrapper.like(EmpInsurance::getDeptName, empInsurance.getDeptName()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getApplayDateStr())) { |
| | | queryWrapper.between(EmpInsurance::getApplayDate, empInsurance.getApplayDateStr().split(",")[0], |
| | | empInsurance.getApplayDateStr().split(",")[1]); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getInsuranceGaers())) { |
| | | queryWrapper.eq(EmpInsurance::getInsuranceGaers, empInsurance.getInsuranceGaers()); |
| | | } |
| | | if (empInsurance.getReportStatus() != null && empInsurance.getReportStatus() != 0) { |
| | | queryWrapper.eq(EmpInsurance::getReportStatus, empInsurance.getReportStatus()); |
| | | } |
| | | if (StringUtils.isNotBlank(empInsurance.getEmpStatus())) { |
| | | queryWrapper.eq(EmpInsurance::getEmpStatus, empInsurance.getEmpStatus()); |
| | | } |
| | | |
| | | Page<EmpInsurance> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.page(page, queryWrapper); |
| | | } |