|
@@ -7,6 +7,7 @@ import com.diagbot.dto.DiagnosesFindDTO;
|
|
|
import com.diagbot.dto.KlDiagnoseByIdDTO;
|
|
|
import com.diagbot.dto.KlDiagnoseGroupDTO;
|
|
|
import com.diagbot.dto.KlDiagnoseInfoDTO;
|
|
|
+import com.diagbot.dto.KlDiagnoseLibNameDTO;
|
|
|
import com.diagbot.dto.KlDiagnoseTypeDTO;
|
|
|
import com.diagbot.entity.KlDiagnose;
|
|
|
import com.diagbot.entity.KlDiagnoseBase;
|
|
@@ -55,6 +56,8 @@ public class KlDiagnoseFacade extends KlDiagnoseServiceImpl {
|
|
|
@Autowired
|
|
|
@Qualifier("klDiagnoseBaseRelationServiceImpl")
|
|
|
KlDiagnoseBaseRelationService klDiagnoseBaseRelationService;
|
|
|
+ @Autowired
|
|
|
+ KlDiagnoseBaseRelationFacade klDiagnoseBaseRelationFacade;
|
|
|
|
|
|
|
|
|
public IPage<KlDiagnoseInfoDTO> getKlDiagnoseInfoPage(KlDiagnoseInfoVO klDiagnoseInfoVO) {
|
|
@@ -64,6 +67,25 @@ public class KlDiagnoseFacade extends KlDiagnoseServiceImpl {
|
|
|
|
|
|
public List<KlDiagnoseTypeDTO> getByIdDiagnoseAll(KlDiagnoseByIdVO klDiagnoseByIdVO) {
|
|
|
List<KlDiagnoseByIdDTO> byIdDiagnoses = this.getByIdDiagnoses(klDiagnoseByIdVO);
|
|
|
+ //查询明细便准词
|
|
|
+ List<Long> basId = byIdDiagnoses.stream().filter(i -> i.getBasId()!=null).map(ac -> ac.getBasId()).collect(Collectors.toList());
|
|
|
+ if (ListUtil.isNotEmpty(basId)) {
|
|
|
+ List<KlDiagnoseLibNameDTO> libNameList = klDiagnoseBaseRelationFacade.getLibNameLists(basId);
|
|
|
+ if (ListUtil.isNotEmpty(libNameList)) {
|
|
|
+ Map<Long, List<KlDiagnoseLibNameDTO>> lixExMap = libNameList.stream().collect(Collectors.groupingBy(KlDiagnoseLibNameDTO::getBasId));
|
|
|
+ for (KlDiagnoseByIdDTO data : byIdDiagnoses) {
|
|
|
+ List<KlDiagnoseLibNameDTO> klDiagnoseLibName = lixExMap.get(data.getBasId());
|
|
|
+ if (ListUtil.isNotEmpty(klDiagnoseLibName)) {
|
|
|
+ data.setBasLibType(klDiagnoseLibName.get(0).getBasLibType());
|
|
|
+ data.setBasLename(klDiagnoseLibName.get(0).getBasLename());
|
|
|
+ data.setLibNameList(klDiagnoseLibName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//基础条件
|
|
|
Map<Integer, List<KlDiagnoseByIdDTO>> baseGroupMap = byIdDiagnoses.stream().filter(i -> i.getConditionType().equals(1)).collect(Collectors.groupingBy(KlDiagnoseByIdDTO::getBaseGroup));
|
|
|
//根据ConditionType 和 getConditionGroup两个添加分组
|