大族富创得薪资报表 搜索条件BUG修复
This commit is contained in:
parent
c805c6a462
commit
8cd53675ba
|
|
@ -18,7 +18,7 @@ public interface DzSalaryReportMapper {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
List<DzSalaryReportDTO> getReportList(@Param("month") String month, @Param("deptIds") Set<String> deptIds);
|
||||
List<DzSalaryReportDTO> getReportList(@Param("month") String month, @Param("productGrouping") String productGrouping, @Param("deptIds") Set<String> deptIds);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10,12 +10,17 @@
|
|||
and record.delete_type = 0
|
||||
inner join hrsa_salary_item item on result.salary_item_id = item.id and item.delete_type = 0
|
||||
inner join hrmresource e on e.id= result.employee_id
|
||||
inner join cus_fielddata cus on cus.id = e.id and cus.SCOPE ='HrmCustomFieldByInfoType' and cus.SCOPEID = -1
|
||||
where 1=1
|
||||
<if test=" month !=null ">
|
||||
and record.salary_month = #{month}
|
||||
</if>
|
||||
<if test=" productGrouping !=null and productGrouping !='' ">
|
||||
and cus.field21 = #{productGrouping}
|
||||
</if>
|
||||
|
||||
<if test=" deptIds !=null and deptIds.size() > 0">
|
||||
and e.id in
|
||||
and e.departmentid in
|
||||
<foreach collection="deptIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
|||
|
|
@ -41,24 +41,43 @@ public class DzSalaryReportServiceImpl extends Service implements DzSalaryReport
|
|||
String firstLevelDepartment = queryParam.getFirstDepartment();
|
||||
String secondaryDepartment = queryParam.getSecondaryDepartment();
|
||||
String thirdDepartment = queryParam.getThirdDepartment();
|
||||
String productGrouping = queryParam.getProductGrouping();
|
||||
String month = queryParam.getMonth();
|
||||
if (StringUtils.isNotBlank(month) && month.length() == 7) {
|
||||
month = month + "-01";
|
||||
}
|
||||
Set<String> departmentIds = new HashSet<>();
|
||||
if (StringUtils.isNotBlank(thirdDepartment)) {
|
||||
departmentIds.add(thirdDepartment);
|
||||
String[] split = thirdDepartment.split(",");
|
||||
if (split.length > 0) {
|
||||
departmentIds.addAll(Arrays.asList(split));
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(secondaryDepartment)) {
|
||||
ArrayList allChildDeptByDepId = departmentComInfo.getAllChildDeptByDepId(new ArrayList<String>(), secondaryDepartment);
|
||||
String[] split = secondaryDepartment.split(",");
|
||||
if (split.length > 0) {
|
||||
for (String s : split) {
|
||||
ArrayList allChildDeptByDepId = departmentComInfo.getAllChildDeptByDepId(new ArrayList<String>(), s);
|
||||
departmentIds.addAll(allChildDeptByDepId);
|
||||
departmentIds.add(s);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(firstLevelDepartment)) {
|
||||
ArrayList allChildDeptByDepId = departmentComInfo.getAllChildDeptByDepId(new ArrayList<String>(), firstLevelDepartment);
|
||||
String[] split = firstLevelDepartment.split(",");
|
||||
if (split.length > 0) {
|
||||
for (String s : split) {
|
||||
ArrayList allChildDeptByDepId = departmentComInfo.getAllChildDeptByDepId(new ArrayList<String>(), s);
|
||||
departmentIds.addAll(allChildDeptByDepId);
|
||||
departmentIds.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<DzSalaryReportDTO> dzSalaryReportDTOS = getDzSalaryReportMapper().getReportList(month, departmentIds);
|
||||
List<DzSalaryReportDTO> dzSalaryReportDTOS = getDzSalaryReportMapper().getReportList(month, productGrouping,departmentIds);
|
||||
PageInfo<DzSalaryReportDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), dzSalaryReportDTOS, DzSalaryReportDTO.class);
|
||||
// 遍历List 填充报表数据
|
||||
List<DzSalaryReportDTO> list = pageInfo.getList();
|
||||
|
|
|
|||
Loading…
Reference in New Issue