|
@@ -2,6 +2,7 @@ package com.diagbot.facade;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.client.CdssCoreClient;
|
|
|
+import com.diagbot.client.UserServiceClient;
|
|
|
import com.diagbot.dto.KlDiagnoseInfoDTO;
|
|
|
import com.diagbot.dto.KlDiagnoseTypeDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
@@ -16,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author wangfeng
|
|
@@ -26,11 +29,21 @@ import java.util.List;
|
|
|
public class KlDiagnoseFacade {
|
|
|
@Autowired
|
|
|
CdssCoreClient cdssCoreClient;
|
|
|
+ @Autowired
|
|
|
+ UserServiceClient userServiceClient;
|
|
|
|
|
|
public Page<KlDiagnoseInfoDTO> getKlDiagnoseInfoPage(KlDiagnoseInfoVO klDiagnoseInfoVO) {
|
|
|
RespDTO<Page<KlDiagnoseInfoDTO>> diagnosePages = cdssCoreClient.getDiagnosePages(klDiagnoseInfoVO);
|
|
|
- RespDTOUtil.respNGDeal(diagnosePages, "获取分页获取规则维护列表数据失败");
|
|
|
- return diagnosePages.data;
|
|
|
+ RespDTOUtil.respNGDeal(diagnosePages, "获取分页获取诊断依据列表数据失败");
|
|
|
+ Page<KlDiagnoseInfoDTO> records = diagnosePages.data;
|
|
|
+ List<String> userIds = records.getRecords().stream()
|
|
|
+ .map(i -> i.getModifier()).distinct().collect(Collectors.toList());
|
|
|
+ RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(userIds);
|
|
|
+ RespDTOUtil.respNGDealCover(respDTO, "获取用户信息失败");
|
|
|
+ records.getRecords().forEach(i -> {
|
|
|
+ i.setModifierName(respDTO.data.get(i.getModifier()));
|
|
|
+ });
|
|
|
+ return records;
|
|
|
|
|
|
}
|
|
|
|