多部门多分部筛选
This commit is contained in:
parent
68b4d29c40
commit
0c444acd38
|
|
@ -45,7 +45,12 @@ public class SalarySendDetailListQueryParam extends BaseQueryParam {
|
|||
private Long taxAgent;
|
||||
|
||||
// 部门id")
|
||||
private Long department;
|
||||
private List<Long> departmentIds;
|
||||
private String departmentIdStr;
|
||||
|
||||
// 分部id
|
||||
private List<Long> subCompanyIds;
|
||||
private String subCompanyIdStr;
|
||||
|
||||
// 岗位id")
|
||||
private Long position;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ public class SalarySendInfoQueryParam extends BaseQueryParam {
|
|||
// 部门id")
|
||||
private List<Long> departmentIds;
|
||||
|
||||
// 分部id
|
||||
private List<Long> subCompanyIds;
|
||||
|
||||
// 岗位id")
|
||||
private List<Long> positionIds;
|
||||
|
||||
|
|
@ -77,6 +80,10 @@ public class SalarySendInfoQueryParam extends BaseQueryParam {
|
|||
// @JsonIgnore
|
||||
private List<Integer> sendStatuss;
|
||||
|
||||
private String departmentIdStr;
|
||||
|
||||
private String subCompanyIdStr;
|
||||
|
||||
public static String checkParam(SalarySendInfoQueryParam saveParam) {
|
||||
if (saveParam.getSalarySendId() == null) {
|
||||
throw new SalaryRunTimeException("工资单发放Id必传");
|
||||
|
|
|
|||
|
|
@ -42,4 +42,8 @@ public class InsuranceAccountDetailParam extends BaseQueryParam {
|
|||
private Long creator;
|
||||
|
||||
private String workcode;
|
||||
|
||||
private List<Long> departmentIds;
|
||||
|
||||
private List<Long> subCompanyIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -381,6 +381,13 @@
|
|||
and t1.send_status in (0, 2)
|
||||
</if>
|
||||
</if>
|
||||
<!-- 分部 -->
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -411,6 +418,12 @@
|
|||
<if test="!param.isGranted">
|
||||
and t1.send_status in (0, 2)
|
||||
</if>
|
||||
</if>
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
|
|
@ -441,7 +454,12 @@
|
|||
and t1.send_status in (0, 2)
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -513,6 +531,12 @@
|
|||
</foreach>
|
||||
))
|
||||
</if>
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="paramSql"/>
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
|
|||
|
|
@ -203,6 +203,18 @@
|
|||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND e.departmentid IN
|
||||
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="oracle">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
|
|
@ -232,6 +244,18 @@
|
|||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND e.departmentid IN
|
||||
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="paramSql" databaseId="sqlserver">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
|
|
@ -261,6 +285,18 @@
|
|||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND e.departmentid IN
|
||||
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id="extParamSql">
|
||||
|
|
@ -291,6 +327,18 @@
|
|||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND e.department_id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompany_id IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="extParamSql" databaseId="oracle">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
|
|
@ -320,6 +368,18 @@
|
|||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND e.department_id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompany_id IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="extParamSql" databaseId="sqlserver">
|
||||
<if test="param.userName != null and param.userName != ''">
|
||||
|
|
@ -349,6 +409,18 @@
|
|||
#{taxAgent}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
AND e.department_id IN
|
||||
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||
AND e.subcompany_id IN
|
||||
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -347,6 +347,12 @@ public class SalaryBillController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String infoList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendInfoQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
if (StringUtils.isNotBlank(queryParam.getDepartmentIdStr())) {
|
||||
queryParam.setDepartmentIds(Arrays.stream(StringUtils.split(queryParam.getDepartmentIdStr(), ",")).map(Long::valueOf).collect(Collectors.toList()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(queryParam.getSubCompanyIdStr())) {
|
||||
queryParam.setSubCompanyIds(Arrays.stream(StringUtils.split(queryParam.getSubCompanyIdStr(), ",")).map(Long::valueOf).collect(Collectors.toList()));
|
||||
}
|
||||
return new ResponseResult<SalarySendInfoQueryParam, PageInfo<SalarySendInfoListDTO>>(user).run(getSalarySendWrapper(user)::infoList, queryParam);
|
||||
}
|
||||
|
||||
|
|
@ -487,7 +493,7 @@ public class SalaryBillController {
|
|||
// 处理入参复用方法
|
||||
SalarySendDetailQueryParam detailQueryParam = SalarySendDetailQueryParam.builder()
|
||||
.userId(queryParam.getUserId())
|
||||
.departmentIds(SalaryEntityUtil.isNullOrEmpty(queryParam.getDepartment()) ? null : Collections.singletonList(queryParam.getDepartment()))
|
||||
.departmentIds(CollectionUtils.isEmpty(queryParam.getDepartmentIds()) ? null : queryParam.getDepartmentIds())
|
||||
.salarySendId(queryParam.getSalarySendId())
|
||||
.mergeCountTax(queryParam.getMergeCountTax())
|
||||
.positionIds(SalaryEntityUtil.isNullOrEmpty(queryParam.getPosition()) ? null : Collections.singletonList(queryParam.getPosition()))
|
||||
|
|
@ -497,6 +503,12 @@ public class SalaryBillController {
|
|||
detailQueryParam.setCurrent(queryParam.getCurrent());
|
||||
detailQueryParam.setPageSize(queryParam.getPageSize());
|
||||
|
||||
if (StringUtils.isNotBlank(queryParam.getSubCompanyIdStr())) {
|
||||
detailQueryParam.setSubCompanyIds(Arrays.asList(StringUtils.split(queryParam.getSubCompanyIdStr(), ",")).stream().map(Long::new).collect(Collectors.toList()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(queryParam.getDepartmentIdStr())) {
|
||||
detailQueryParam.setDepartmentIds(Arrays.asList(StringUtils.split(queryParam.getDepartmentIdStr(), ",")).stream().map(Long::new).collect(Collectors.toList()));
|
||||
}
|
||||
return new ResponseResult<SalarySendDetailQueryParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::detailList, detailQueryParam);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue