Commit 346f8278 authored by maqing's avatar maqing

日常生活活动能力查询

parent 667d3fc7
...@@ -635,9 +635,9 @@ public class TaskController { ...@@ -635,9 +635,9 @@ public class TaskController {
@RequestMapping(value= "/chIpad/taskReportFractionDtlQueryList") @RequestMapping(value= "/chIpad/taskReportFractionDtlQueryList")
@ResponseBody @ResponseBody
public Result taskReportFractionDtlQueryList() throws Exception { public Result taskReportFractionDtlQueryList() throws Exception {
List<ChTaskReportFractionDtl> resultList= taskService.taskReportFractionDtlQueryList(); Map map= taskService.taskReportFractionDtlQueryList();
if (resultList.size() >0) { if (map.size() >0) {
return Result.success(resultList); return Result.success(map);
} }
return Result.failed("没有查到日常生活活动能力数据"); return Result.failed("没有查到日常生活活动能力数据");
} }
......
...@@ -84,5 +84,5 @@ public interface TaskService { ...@@ -84,5 +84,5 @@ public interface TaskService {
IPage<ChAprTask> apprTaskDetailInfo(String appointStartTime, String appointEndTime, String status, String taskGroupNo, Integer pageNo, Integer pageSize) throws TppesApiException; 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; ...@@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author czz * @author czz
...@@ -632,7 +633,17 @@ public class TaskServiceImpl implements TaskService { ...@@ -632,7 +633,17 @@ public class TaskServiceImpl implements TaskService {
} }
@Override @Override
public List<ChTaskReportFractionDtl> taskReportFractionDtlQueryList() { public Map taskReportFractionDtlQueryList() {
return chTaskReportFractionDtlMapper.selectList(null); 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