薪酬系统-福利台账核算和正常缴纳人员列表功能添加基础信息表runStatus字段的筛选逻辑
This commit is contained in:
parent
a371ccc992
commit
2a6d556929
|
|
@ -120,12 +120,21 @@ public class SIAccountBiz extends Service {
|
|||
public PageInfo<InsuranceAccountDetailPO> listCommonPage(InsuranceAccountDetailParam queryParam) {
|
||||
queryParam.setPaymentStatus(PaymentStatusEnum.COMMON.getValue());
|
||||
|
||||
//过滤出需要核算的人员,即福利档案基础信息表中runStatus为正在缴纳和待减员的人员
|
||||
List<InsuranceArchivesBaseInfoPO> baseInfoPOList = getInsuranceBaseInfoMapper().listAll();
|
||||
List<Long> 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<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
|
||||
|
||||
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list);
|
||||
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
|
||||
return pageInfo;
|
||||
|
|
@ -228,6 +237,15 @@ public class SIAccountBiz extends Service {
|
|||
// 需要分权的情况
|
||||
// if(getTaxAgentService().isOpenDevolution()) {
|
||||
List<Long> empIds = getInsuranceAccountDetailMapper().selectEmpByPaymentOrg(param.getPaymentOrganization());
|
||||
//过滤出需要核算的人员,即福利档案基础信息表中runStatus为正在缴纳和待减员的人员
|
||||
List<InsuranceArchivesBaseInfoPO> baseInfoPOList = getInsuranceBaseInfoMapper().listAll();
|
||||
List<Long> 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<Long> employeeIdsInTaxAgent = getTaxAgentService().listEmployeeIdsInTaxAgent(param.getPaymentOrganization());
|
||||
|
|
|
|||
|
|
@ -169,6 +169,12 @@
|
|||
e.lastname like CONCAT('%',#{param.userName},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="param.employeeIds != null and param.employeeIds.size()>0">
|
||||
AND t.employee_id IN
|
||||
<foreach collection="param.employeeIds" open="(" item="employeeId" separator="," close=")">
|
||||
#{employeeId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="oracle">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
|
|
@ -177,6 +183,12 @@
|
|||
e.lastname like '%'||#{param.userName}||'%'
|
||||
)
|
||||
</if>
|
||||
<if test="param.employeeIds != null and param.employeeIds.size()>0">
|
||||
AND t.employee_id IN
|
||||
<foreach collection="param.employeeIds" open="(" item="employeeId" separator="," close=")">
|
||||
#{employeeId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="sqlserver">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
|
|
@ -185,6 +197,12 @@
|
|||
e.lastname like '%'+#{param.userName}+'%'
|
||||
)
|
||||
</if>
|
||||
<if test="param.employeeIds != null and param.employeeIds.size()>0">
|
||||
AND t.employee_id IN
|
||||
<foreach collection="param.employeeIds" open="(" item="employeeId" separator="," close=")">
|
||||
#{employeeId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue