|
@@ -37,6 +37,7 @@ import com.diagbot.util.RespDTOUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.util.UserUtils;
|
|
|
import com.diagbot.vo.ConceptExistVO;
|
|
|
+import com.diagbot.vo.ConceptSearchVO;
|
|
|
import com.diagbot.vo.DeleteQuestionVO;
|
|
|
import com.diagbot.vo.GetQuestionIdsByTypeVO;
|
|
|
import com.diagbot.vo.GetQuestionInfoVO;
|
|
@@ -95,6 +96,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
KnowledgemanServiceClient knowledgemanServiceClient;
|
|
|
@Autowired
|
|
|
CacheFacade cacheFacade;
|
|
|
+ @Autowired
|
|
|
+ private KnowledgemanServiceClient klmServiceClient;
|
|
|
|
|
|
|
|
|
|
|
@@ -525,6 +528,27 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
getQuestiongAndModuleRelationsDTO.getRelationInfos().toString());
|
|
|
}
|
|
|
+ //查体模板
|
|
|
+ QueryWrapper<DeptVital> deptVitalQueryWrapper = new QueryWrapper<>();
|
|
|
+ deptVitalQueryWrapper.in("vital_id", Arrays.asList(ids.split(","))).
|
|
|
+ eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ List<DeptVital> deptVitals = deptVitalFacade.list(deptVitalQueryWrapper);
|
|
|
+ if (ListUtil.isNotEmpty(deptVitals)) {
|
|
|
+ //科室信息
|
|
|
+ List<Long> deptIds = deptVitals.stream().map(deptVitalDTO -> deptVitalDTO.getDeptId()).collect(Collectors.toList());
|
|
|
+ ConceptSearchVO conceptSearchVO = new ConceptSearchVO();
|
|
|
+ conceptSearchVO.setConceptIds(deptIds);
|
|
|
+ RespDTO<Map<Long, String>> deptMap = klmServiceClient.getConceptMap(conceptSearchVO);
|
|
|
+ Map<Long, String> depts = deptMap.data;
|
|
|
+ //输入内容
|
|
|
+ StringBuffer sb = new StringBuffer();
|
|
|
+ sb.append("请先删除科室查体模板关联中的对应标签:");
|
|
|
+ for (DeptVital deptVital : deptVitals) {
|
|
|
+ sb.append("【" + depts.get(deptVital.getDeptId()) + "】").append("<br/>");
|
|
|
+ }
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ sb.toString());
|
|
|
+ }
|
|
|
//删除自身
|
|
|
this.deleteByIds(paramMap);
|
|
|
//删除明细
|