大族富创得薪资报表 搜索条件BUG修复
This commit is contained in:
parent
c805c6a462
commit
8cd53675ba
|
|
@ -18,7 +18,7 @@ public interface DzSalaryReportMapper {
|
||||||
*
|
*
|
||||||
* @return
|
* @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
|
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 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 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
|
where 1=1
|
||||||
<if test=" month !=null ">
|
<if test=" month !=null ">
|
||||||
and record.salary_month = #{month}
|
and record.salary_month = #{month}
|
||||||
</if>
|
</if>
|
||||||
|
<if test=" productGrouping !=null and productGrouping !='' ">
|
||||||
|
and cus.field21 = #{productGrouping}
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test=" deptIds !=null and deptIds.size() > 0">
|
<if test=" deptIds !=null and deptIds.size() > 0">
|
||||||
and e.id in
|
and e.departmentid in
|
||||||
<foreach collection="deptIds" open="(" item="id" separator="," close=")">
|
<foreach collection="deptIds" open="(" item="id" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
||||||
|
|
@ -41,24 +41,43 @@ public class DzSalaryReportServiceImpl extends Service implements DzSalaryReport
|
||||||
String firstLevelDepartment = queryParam.getFirstDepartment();
|
String firstLevelDepartment = queryParam.getFirstDepartment();
|
||||||
String secondaryDepartment = queryParam.getSecondaryDepartment();
|
String secondaryDepartment = queryParam.getSecondaryDepartment();
|
||||||
String thirdDepartment = queryParam.getThirdDepartment();
|
String thirdDepartment = queryParam.getThirdDepartment();
|
||||||
|
String productGrouping = queryParam.getProductGrouping();
|
||||||
String month = queryParam.getMonth();
|
String month = queryParam.getMonth();
|
||||||
|
if (StringUtils.isNotBlank(month) && month.length() == 7) {
|
||||||
|
month = month + "-01";
|
||||||
|
}
|
||||||
Set<String> departmentIds = new HashSet<>();
|
Set<String> departmentIds = new HashSet<>();
|
||||||
if (StringUtils.isNotBlank(thirdDepartment)) {
|
if (StringUtils.isNotBlank(thirdDepartment)) {
|
||||||
departmentIds.add(thirdDepartment);
|
String[] split = thirdDepartment.split(",");
|
||||||
|
if (split.length > 0) {
|
||||||
|
departmentIds.addAll(Arrays.asList(split));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (StringUtils.isNotBlank(secondaryDepartment)) {
|
if (StringUtils.isNotBlank(secondaryDepartment)) {
|
||||||
ArrayList allChildDeptByDepId = departmentComInfo.getAllChildDeptByDepId(new ArrayList<String>(), secondaryDepartment);
|
String[] split = secondaryDepartment.split(",");
|
||||||
departmentIds.addAll(allChildDeptByDepId);
|
if (split.length > 0) {
|
||||||
|
for (String s : split) {
|
||||||
|
ArrayList allChildDeptByDepId = departmentComInfo.getAllChildDeptByDepId(new ArrayList<String>(), s);
|
||||||
|
departmentIds.addAll(allChildDeptByDepId);
|
||||||
|
departmentIds.add(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (StringUtils.isNotBlank(firstLevelDepartment)) {
|
if (StringUtils.isNotBlank(firstLevelDepartment)) {
|
||||||
ArrayList allChildDeptByDepId = departmentComInfo.getAllChildDeptByDepId(new ArrayList<String>(), firstLevelDepartment);
|
String[] split = firstLevelDepartment.split(",");
|
||||||
departmentIds.addAll(allChildDeptByDepId);
|
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);
|
PageInfo<DzSalaryReportDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), dzSalaryReportDTOS, DzSalaryReportDTO.class);
|
||||||
// 遍历List 填充报表数据
|
// 遍历List 填充报表数据
|
||||||
List<DzSalaryReportDTO> list = pageInfo.getList();
|
List<DzSalaryReportDTO> list = pageInfo.getList();
|
||||||
|
|
@ -173,7 +192,7 @@ public class DzSalaryReportServiceImpl extends Service implements DzSalaryReport
|
||||||
rs.executeQuery("SELECT MAX(changedate) as dismissdate FROM HrmStatusHistory WHERE resourceid= ? and type_n=5", userId);
|
rs.executeQuery("SELECT MAX(changedate) as dismissdate FROM HrmStatusHistory WHERE resourceid= ? and type_n=5", userId);
|
||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
String dismissDate = rs.getString("dismissdate");
|
String dismissDate = rs.getString("dismissdate");
|
||||||
if(StringUtils.isBlank(dismissDate)){
|
if (StringUtils.isBlank(dismissDate)) {
|
||||||
dismissDate = resourceComInfo.getEndDate(userId);
|
dismissDate = resourceComInfo.getEndDate(userId);
|
||||||
}
|
}
|
||||||
report.setTerminationDate(dismissDate);
|
report.setTerminationDate(dismissDate);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue