|
@@ -2,6 +2,9 @@ package com.diagbot.facade;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.diagbot.client.TranServiceClient;
|
|
|
+import com.diagbot.dto.HospitalDeptInfoAllDTO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.dto.TemplateFolderDTO;
|
|
|
import com.diagbot.dto.TemplateInfoDTO;
|
|
|
import com.diagbot.dto.TemplateInfoNormDTO;
|
|
@@ -20,7 +23,9 @@ import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
|
import com.diagbot.util.GsonUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
|
import com.diagbot.vo.HospitalCodeSetVO;
|
|
|
+import com.diagbot.vo.HospitalCodeVo;
|
|
|
import com.diagbot.vo.TemplateIdVO;
|
|
|
import com.diagbot.vo.TemplateNormUpVO;
|
|
|
import com.diagbot.vo.TemplateNormsFindVO;
|
|
@@ -34,6 +39,7 @@ import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author wangfeng
|
|
@@ -41,7 +47,7 @@ import java.util.Map;
|
|
|
* @date 2020-01-10 14:25
|
|
|
*/
|
|
|
@Component
|
|
|
-public class TemplateNormFacade extends TemplateInfoServiceImpl {
|
|
|
+public class TemplateNormFacade<tranServiceClient> extends TemplateInfoServiceImpl {
|
|
|
|
|
|
@Autowired
|
|
|
TemplateFolderServiceImpl templateFolderServiceImpl;
|
|
@@ -53,7 +59,8 @@ public class TemplateNormFacade extends TemplateInfoServiceImpl {
|
|
|
FolderMappingFacade folderMappingFacade;
|
|
|
@Autowired
|
|
|
FolderMappingServiceImpl folderMappingServiceImpl;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ TranServiceClient tranServiceClient;
|
|
|
/**
|
|
|
* 根据模板id修改模板名称和文件夹名称
|
|
|
*
|
|
@@ -265,6 +272,21 @@ public class TemplateNormFacade extends TemplateInfoServiceImpl {
|
|
|
TemplateNormsParamVO templateNormsParamVO = new TemplateNormsParamVO();
|
|
|
templateNormsParamVO.setHospitalId(-9L);
|
|
|
List<TemplateInfoNormDTO> templateDatas = templateInfoServiceImpl.getStandardTemplates(templateNormsParamVO);
|
|
|
+ HospitalCodeVo hospitalCodeVo = new HospitalCodeVo();
|
|
|
+ hospitalCodeVo.setHospitalCode("LT");
|
|
|
+ RespDTO<List<HospitalDeptInfoAllDTO>> deptInfoDTO = tranServiceClient.getHospitalDeptInfoAll(hospitalCodeVo);
|
|
|
+ RespDTOUtil.respNGDeal(deptInfoDTO, deptInfoDTO.msg);
|
|
|
+ List<HospitalDeptInfoAllDTO> deptInfo = deptInfoDTO.data;
|
|
|
+ Map<Long, HospitalDeptInfoAllDTO> deptMap = deptInfo.stream().collect(Collectors.toMap(HospitalDeptInfoAllDTO::getId, i -> i));
|
|
|
+ if (templateDatas.size() > 0) {
|
|
|
+ templateDatas.forEach(i -> {
|
|
|
+ HospitalDeptInfoAllDTO dataDept = deptMap.get(i.getHospitalDeptId());
|
|
|
+ if (dataDept != null) {
|
|
|
+ i.setHospitalDeptName(dataDept.getConceptDeptName());
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
Map<Long, List<TemplateInfoNormDTO>> map
|
|
|
= EntityUtil.makeEntityListMap(templateDatas, "folderId");
|
|
|
//把模板放进文件夹中
|