diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 46d469563..9e74b499e 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -120,12 +120,21 @@ public class SIAccountBiz extends Service { public PageInfo listCommonPage(InsuranceAccountDetailParam queryParam) { queryParam.setPaymentStatus(PaymentStatusEnum.COMMON.getValue()); + //过滤出需要核算的人员,即福利档案基础信息表中runStatus为正在缴纳和待减员的人员 + List baseInfoPOList = getInsuranceBaseInfoMapper().listAll(); + List canAccountIds = baseInfoPOList.stream() + .filter(f->f.getPaymentOrganization().toString().equals(queryParam.getPaymentOrganization()) + && (f.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()) || f.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue()))) + .map(InsuranceArchivesBaseInfoPO::getEmployeeId) + .collect(Collectors.toList()); + queryParam.setEmployeeIds(canAccountIds); //排序配置 OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); queryParam.setOrderRule(orderRule); SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize()); List list = getInsuranceAccountDetailMapper().list(queryParam); + InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list); PageInfo pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class); return pageInfo; @@ -228,6 +237,15 @@ public class SIAccountBiz extends Service { // 需要分权的情况 // if(getTaxAgentService().isOpenDevolution()) { List empIds = getInsuranceAccountDetailMapper().selectEmpByPaymentOrg(param.getPaymentOrganization()); + //过滤出需要核算的人员,即福利档案基础信息表中runStatus为正在缴纳和待减员的人员 + List baseInfoPOList = getInsuranceBaseInfoMapper().listAll(); + List canAccountIds = baseInfoPOList.stream() + .filter(f->f.getPaymentOrganization().equals(param.getPaymentOrganization()) + && (f.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()) || f.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue()))) + .map(InsuranceArchivesBaseInfoPO::getEmployeeId) + .collect(Collectors.toList()); + + empIds = empIds.stream().filter(f->canAccountIds.contains(f)).collect(Collectors.toList()); //过滤不在扣缴义务人下的数据 // Collection employeeIdsInTaxAgent = getTaxAgentService().listEmployeeIdsInTaxAgent(param.getPaymentOrganization()); diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml index 5b045fed8..7f92c2a41 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml @@ -169,6 +169,12 @@ e.lastname like CONCAT('%',#{param.userName},'%') ) + + AND t.employee_id IN + + #{employeeId} + + @@ -177,6 +183,12 @@ e.lastname like '%'||#{param.userName}||'%' ) + + AND t.employee_id IN + + #{employeeId} + + @@ -185,6 +197,12 @@ e.lastname like '%'+#{param.userName}+'%' ) + + AND t.employee_id IN + + #{employeeId} + + diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 1e29e2fd7..89283ead7 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -30,10 +30,7 @@ import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.sischeme.po.InsuranceSchemePO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.UserStatusEnum; -import com.engine.salary.enums.siaccount.BillStatusEnum; -import com.engine.salary.enums.siaccount.InspectStatusEnum; -import com.engine.salary.enums.siaccount.PaymentStatusEnum; -import com.engine.salary.enums.siaccount.ProjectTypeEnum; +import com.engine.salary.enums.siaccount.*; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.siaccount.ExcelInsuranceDetailMapper;