|
@@ -13,6 +13,7 @@ import com.diagbot.entity.QuestionInfo;
|
|
|
import com.diagbot.enums.ConceptTypeEnum;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.QuestionTypeEnum;
|
|
|
+import com.diagbot.enums.TagTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.LisMappingService;
|
|
@@ -24,7 +25,6 @@ import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.util.UserUtils;
|
|
|
import com.diagbot.vo.IdListVO;
|
|
|
import com.diagbot.vo.IdVO;
|
|
|
-import com.diagbot.vo.IndexLexiconVO;
|
|
|
import com.diagbot.vo.IndexVO;
|
|
|
import com.diagbot.vo.LisMappingPageVO;
|
|
|
import com.diagbot.vo.LisMappingVO;
|
|
@@ -99,7 +99,6 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
}
|
|
|
lisMappingQueryWrapper.and(i -> i.isNull("item_name").or(j -> j.eq("item_name", "")));
|
|
|
} else {
|
|
|
-
|
|
|
String uniqueName = lisMappingVO.getMealName() + "--" + lisMappingVO.getItemName();
|
|
|
if (!uniqueName.equals(lisMappingVO.getUniqueName())) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验公表名称不匹配");
|
|
@@ -107,6 +106,28 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
lisMappingQueryWrapper.eq("item_name", lisMappingVO.getItemName());
|
|
|
}
|
|
|
|
|
|
+ //验证化验大小项标签是否存在
|
|
|
+ QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
+ questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
+ eq("type", QuestionTypeEnum.Lis.getKey()).
|
|
|
+ eq("tag_type", TagTypeEnum.T7.getKey()).
|
|
|
+ eq("name", lisMappingVO.getMealName());
|
|
|
+ QuestionInfo lisQuestion = questionFacade.getOne(questionInfoQueryWrapper);
|
|
|
+ if (lisQuestion == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验套餐项【" + lisMappingVO.getMealName() + "】标签不存在");
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(lisMappingVO.getItemName())) {
|
|
|
+ questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
+ questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
+ eq("type", QuestionTypeEnum.Lis.getKey()).
|
|
|
+ eq("tag_type", TagTypeEnum.T1.getKey()).
|
|
|
+ eq("name", lisMappingVO.getItemName());
|
|
|
+ QuestionInfo lisDetailQuestion = questionFacade.getOne(questionInfoQueryWrapper);
|
|
|
+ if (lisDetailQuestion == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验明细项【" + lisMappingVO.getItemName() + "】标签不存在");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//验证医学术语是否存在
|
|
|
IndexVO indexVO = new IndexVO();
|
|
|
indexVO.setName(lisMappingVO.getMealName());
|
|
@@ -148,12 +169,6 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
Boolean state = this.saveOrUpdate(lisMapping);
|
|
|
|
|
|
//清除缓存
|
|
|
- QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
- questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
- eq("type", QuestionTypeEnum.Lis.getKey()).
|
|
|
- eq("tag_type", 7).
|
|
|
- eq("name", lisMappingVO.getMealName());
|
|
|
- QuestionInfo lisQuestion = questionFacade.getOne(questionInfoQueryWrapper);
|
|
|
if (lisQuestion != null) {
|
|
|
cacheFacade.clearCache(lisQuestion.getId());
|
|
|
}
|