时点花名册查询返回调整

This commit is contained in:
Administrator 2025-05-27 11:36:38 +08:00
parent d0d0052496
commit a162f191c6
3 changed files with 22 additions and 10 deletions

View File

@ -336,7 +336,7 @@ public class EmployeeRelationController {
*/
@GetMapping("/getRosterInfoByDateRange")
@WeaPermission(publicPermission = true)
public List<List<Map<String, Object>>> saveQueryCondition(
public List<Map<String, Object>> saveQueryCondition(
@RequestParam("stratDate") String stratDate,
@RequestParam("endDate") String endDate){
log.error("deleteTableInfo.stratDate:{},endDate:{}",stratDate,endDate);

View File

@ -31,5 +31,5 @@ public interface EmployeeRelationService {
Map<String,String> GetTableAlterStatements();
List<List<Map<String, Object>>> getRosterInfoByDateRange(String stratDate,String endDate);
List<Map<String, Object>> getRosterInfoByDateRange(String stratDate,String endDate);
}

View File

@ -794,11 +794,11 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
}
@Override
public List<List<Map<String, Object>>> getRosterInfoByDateRange(String stratDate, String endDate) {
public List<Map<String, Object>> getRosterInfoByDateRange(String stratDate, String endDate) {
/**
* 这里弄一个最终返回结果集
*/
List<List<Map<String, Object>>> resultList = new ArrayList<>();
List<Map<String, Object>> resultList = new ArrayList<>();
/**
* 查询离职记录表是否为空
*/
@ -807,7 +807,9 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
//不存在
List<Map<String, Object>> employeeInformation = queryEmployeeInformationInfo("uf_jcl_employee_information", stratDate, endDate);
log.error("getRosterInfoByDateRange.employeeInformation:{}", employeeInformation);
resultList.add(employeeInformation);
if(employeeInformation.size()>0){
resultList.addAll(employeeInformation);
}
}else {
//存在
//先按日期关联查询出员工信息
@ -825,7 +827,9 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
.map(Optional::get)
.collect(Collectors.toList());
log.error("getRosterInfoByDateRange.resignationInfoNew:{}", resignationInfoNew);
resultList.add(resignationInfoNew);
if(resignationInfoNew.size()>0){
resultList.addAll(resignationInfoNew);
}
}
/**
@ -836,7 +840,9 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
//不存在
List<Map<String, Object>> employeeInformationTx = queryEmployeeInformationInfo("uf_jcl_employee_information", stratDate, endDate);
log.error("getRosterInfoByDateRange.employeeInformationTx:{}", employeeInformationTx);
resultList.add(employeeInformationTx);
if(employeeInformationTx.size()>0){
resultList.addAll(employeeInformationTx);
}
}else {
//存在
//先按日期关联查询出员工信息
@ -853,7 +859,9 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
.map(Optional::get)
.collect(Collectors.toList());
log.error("getRosterInfoByDateRange.retirementInfoNew:{}", retirementInfoNew);
resultList.add(retirementInfoNew);
if(retirementInfoNew.size()>0){
resultList.addAll(retirementInfoNew);
}
}
/**
@ -864,7 +872,9 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
//不存在
List<Map<String, Object>> employeeInformationDd = queryEmployeeInformationInfo("uf_jcl_employee_information", stratDate, endDate);
log.error("getRosterInfoByDateRange.employeeInformationDd:{}", employeeInformationDd);
resultList.add(employeeInformationDd);
if(employeeInformationDd.size()>0){
resultList.addAll(employeeInformationDd);
}
}else {
//存在
//先按日期关联查询出员工信息
@ -882,7 +892,9 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
.map(Optional::get)
.collect(Collectors.toList());
log.error("getRosterInfoByDateRange.transferInfoNew:{}", transferInfoNew);
resultList.add(transferInfoNew);
if(transferInfoNew.size()>0){
resultList.addAll(transferInfoNew);
}
}
return resultList;
}