|
@@ -61,26 +61,24 @@ public class KlDiagnoseFacade extends KlDiagnoseServiceImpl {
|
|
|
//基础条件
|
|
|
Map<Integer, List<KlDiagnoseByIdDTO>> baseGroupMap = byIdDiagnoses.stream().filter(i -> i.getConditionType().equals(1)).collect(Collectors.groupingBy(KlDiagnoseByIdDTO::getBaseGroup));
|
|
|
//根据ConditionType 和 getConditionGroup两个添加分组
|
|
|
- Map<Integer, Map<Integer, List<KlDiagnoseByIdDTO>>> collect = byIdDiagnoses.stream().filter(i -> !i.getConditionType().equals(1)).collect(Collectors.groupingBy(KlDiagnoseByIdDTO::getConditionType, Collectors.groupingBy(KlDiagnoseByIdDTO::getConditionGroup)));
|
|
|
-
|
|
|
+ Map<Integer, Map<Integer, List<KlDiagnoseByIdDTO>>> collect = byIdDiagnoses.stream().filter(i -> !i.getConditionType().equals(1)).collect(Collectors.groupingBy(KlDiagnoseByIdDTO::getConditionGroup, Collectors.groupingBy(KlDiagnoseByIdDTO::getConditionType)));
|
|
|
List<KlDiagnoseTypeDTO> klDiagnoseTypeList = new ArrayList<>();
|
|
|
for (Map.Entry<Integer, Map<Integer, List<KlDiagnoseByIdDTO>>> entry : collect.entrySet()) {
|
|
|
KlDiagnoseTypeDTO klDiagnoseTypeDTO = new KlDiagnoseTypeDTO();
|
|
|
- klDiagnoseTypeDTO.setConditionType(entry.getKey());
|
|
|
+ klDiagnoseTypeDTO.setConditionGroup(entry.getKey());
|
|
|
Map<Integer, List<KlDiagnoseByIdDTO>> value = entry.getValue();
|
|
|
List<KlDiagnoseGroupDTO> byIdDTO = new ArrayList<>();
|
|
|
for (Map.Entry<Integer, List<KlDiagnoseByIdDTO>> entry2 : value.entrySet()) {
|
|
|
+ klDiagnoseTypeDTO.setConditionType(entry2.getKey());
|
|
|
List<KlDiagnoseByIdDTO> value1 = entry2.getValue();
|
|
|
for (KlDiagnoseByIdDTO data : value1) {
|
|
|
KlDiagnoseGroupDTO klDiagnoseGroupDTO = new KlDiagnoseGroupDTO();
|
|
|
- klDiagnoseGroupDTO.setConditionGroup(entry2.getKey());
|
|
|
+ // klDiagnoseGroupDTO.setConditionGroup(entry2.getKey());
|
|
|
klDiagnoseGroupDTO.setFitNo(data.getFitNo());
|
|
|
klDiagnoseGroupDTO.setBaseGroup(data.getBaseGroup());
|
|
|
klDiagnoseGroupDTO.setKlDiagnoseByIdDTO(baseGroupMap.get(data.getBaseGroup()));
|
|
|
byIdDTO.add(klDiagnoseGroupDTO);
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
klDiagnoseTypeDTO.setByIdDTO(byIdDTO);
|
|
|
}
|
|
|
klDiagnoseTypeList.add(klDiagnoseTypeDTO);
|
|
@@ -228,11 +226,11 @@ public class KlDiagnoseFacade extends KlDiagnoseServiceImpl {
|
|
|
for (KlDiagnoseTypeVO data : klDiagnoseTypeVO) {
|
|
|
KlDiagnoseCondition klDiagnoseCondition = new KlDiagnoseCondition();
|
|
|
klDiagnoseCondition.setConditionType(data.getConditionType());//取出诊断的类型,2拟诊,3 确诊
|
|
|
- sum=sum+1;
|
|
|
+ sum = sum + 1;
|
|
|
klDiagnoseCondition.setConditionGroup(sum);
|
|
|
List<KlDiagnoseGroupVO> groupVO = data.getGroupVO();
|
|
|
for (KlDiagnoseGroupVO data2 : groupVO) {
|
|
|
- baseGroup = baseGroup+1;
|
|
|
+ baseGroup = baseGroup + 1;
|
|
|
klDiagnoseCondition.setDiagnoseId(klDiagnoseSaveVO.getId());
|
|
|
klDiagnoseCondition.setBaseGroup(baseGroup);//
|
|
|
klDiagnoseCondition.setFitNo(data2.getFitNo());
|