Commit 346f8278 authored by maqing's avatar maqing

日常生活活动能力查询

parent 667d3fc7
......@@ -635,9 +635,9 @@ public class TaskController {
@RequestMapping(value= "/chIpad/taskReportFractionDtlQueryList")
@ResponseBody
public Result taskReportFractionDtlQueryList() throws Exception {
List<ChTaskReportFractionDtl> resultList= taskService.taskReportFractionDtlQueryList();
if (resultList.size() >0) {
return Result.success(resultList);
Map map= taskService.taskReportFractionDtlQueryList();
if (map.size() >0) {
return Result.success(map);
}
return Result.failed("没有查到日常生活活动能力数据");
}
......
......@@ -84,5 +84,5 @@ public interface TaskService {
IPage<ChAprTask> apprTaskDetailInfo(String appointStartTime, String appointEndTime, String status, String taskGroupNo, Integer pageNo, Integer pageSize) throws TppesApiException;
List<ChTaskReportFractionDtl> taskReportFractionDtlQueryList();
Map taskReportFractionDtlQueryList();
}
......@@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author czz
......@@ -632,7 +633,17 @@ public class TaskServiceImpl implements TaskService {
}
@Override
public List<ChTaskReportFractionDtl> taskReportFractionDtlQueryList() {
return chTaskReportFractionDtlMapper.selectList(null);
public Map taskReportFractionDtlQueryList() {
List<ChTaskReportFractionDtl> chTaskReportFractionDtls = chTaskReportFractionDtlMapper.selectList(null);
Map<String, List<ChTaskReportFractionDtl>> hashMap = new HashMap<>();
for (ChTaskReportFractionDtl chTaskReportFractionDtl : chTaskReportFractionDtls) {
String taskReportProxy = chTaskReportFractionDtl.getTaskReportProxy();
if(!hashMap.containsKey(taskReportProxy)){
List<ChTaskReportFractionDtl> collect = chTaskReportFractionDtls.stream().filter(c->c.getTaskReportProxy().equals(taskReportProxy)).collect(Collectors.toList());
hashMap.put(taskReportProxy,collect);
}
};
return hashMap;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment