xzy-在薪资档案以及薪资核算的高级搜索中,增加分部搜索条件

This commit is contained in:
Harryxzy 2022-08-31 15:06:49 +08:00
parent 5ade93de8c
commit 387b6a2897
6 changed files with 55 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import com.engine.salary.util.valid.DataCheck;
import lombok.*;
import java.util.Collection;
import java.util.List;
/**
* 薪资核算人员列表查询条件
@ -33,11 +34,13 @@ public class SalaryAcctEmployeeQueryParam extends BaseQueryParam {
//个税扣缴义务人")
private Long taxAgentId;
//分部
private List<Long> subcompanyIds;
//部门")
private Collection<Long> departmentIds;
//岗位")
private Collection<Long> positionIds;

View File

@ -35,6 +35,9 @@ public class SalaryAcctResultQueryParam extends BaseQueryParam {
//个税扣缴义务人
private Long taxAgentId;
//分部
private Collection<Long> subcompanyIds;
//部门
private Collection<Long> departmentIds;

View File

@ -32,6 +32,9 @@ public class SalaryArchiveQueryParam extends BaseQueryParam {
//个税扣缴义务人id
private Long taxAgentId;
//分部id
private List<Long> subcompanyIds;
//部门id
private List<Long> departmentIds;

View File

@ -118,6 +118,13 @@
<if test="param.username != null and param.username != ''">
AND e.lastname like CONCAT('%',#{param.username},'%')
</if>
<!-- 分部 -->
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND c.id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<!-- 部门 -->
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND d.id IN
@ -169,6 +176,12 @@
<if test="param.username != null and param.username != ''">
AND e.lastname like '%'||#{param.username}||'%'
</if>
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND c.id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND d.id IN
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
@ -220,6 +233,12 @@
<if test="param.username != null and param.username != ''">
AND e.lastname like '%'+#{param.username}+'%'
</if>
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND c.id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND d.id IN
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">

View File

@ -497,6 +497,7 @@
AND tax_agent_id = #{param.taxAgentId}
</if>
<if test="(param.employeeName != null and param.employeeName != '')
or (param.subcompanyIds != null and param.subcompanyIds.size()>0)
or (param.departmentIds != null and param.departmentIds.size()>0)
or (param.positionIds != null and param.positionIds.size()>0)
or (param.status != null and param.status != 'ALL')">
@ -507,6 +508,13 @@
<if test="param.employeeName != null and param.employeeName != ''">
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
</if>
-- 分部
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND em.subcompanyid1 IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND em.departmentid IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
@ -552,6 +560,7 @@
AND tax_agent_id = #{param.taxAgentId}
</if>
<if test="(param.employeeName != null and param.employeeName != '')
or (param.subcompanyIds != null and param.subcompanyIds.size()>0)
or (param.departmentIds != null and param.departmentIds.size()>0)
or (param.positionIds != null and param.positionIds.size()>0)
or (param.status != null and param.status != 'ALL')">
@ -562,6 +571,13 @@
<if test="param.employeeName != null and param.employeeName != ''">
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
</if>
-- 分部
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND em.subcompanyid1 IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND em.departmentid IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
@ -719,6 +735,7 @@
AND tax_agent_id = #{param.taxAgentId}
</if>
<if test="(param.employeeName != null and param.employeeName != '')
or (param.subcompanyIds != null and param.subcompanyIds.size()>0)
or (param.departmentIds != null and param.departmentIds.size()>0)
or (param.positionIds != null and param.positionIds.size()>0)
or (param.status != null and param.status != 'ALL')">
@ -729,6 +746,14 @@
<if test="param.employeeName != null and param.employeeName != ''">
AND em.lastname LIKE CONCAT('%',#{param.employeeName},'%')
</if>
-- 分部
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND em.subcompanyid1 IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
-- 部门
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND em.departmentid IN
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">

View File

@ -131,6 +131,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
return pageInfo;
}
// 获取作为管理员的所有个税扣缴义务人列表
Collection<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin(currentEmployeeId);
Set<Long> taxAgentIds = SalaryEntityUtil.properties(taxAgentPOS, TaxAgentPO::getId);