|
@@ -88,17 +88,29 @@ public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
lisMapping.setGmtCreate(now);
|
|
|
|
|
|
//验证医学术语是否存在
|
|
|
- Concept mealConcept = conceptFacade.getById(lisMappingVO.getMealId());
|
|
|
+ QueryWrapper<Concept> conceptQueryWrapper = new QueryWrapper<>();
|
|
|
+ conceptQueryWrapper
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("id", lisMappingVO.getMealId());
|
|
|
+ Concept mealConcept = conceptFacade.getOne(conceptQueryWrapper);
|
|
|
if (mealConcept == null) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验套餐项术语不存在");
|
|
|
}
|
|
|
if (lisMappingVO.getItemId() != null && !lisMappingVO.getItemId().equals(0L)) {
|
|
|
- Concept itemConcept = conceptFacade.getById(lisMappingVO.getItemId());
|
|
|
+ conceptQueryWrapper = new QueryWrapper<>();
|
|
|
+ conceptQueryWrapper
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("id", lisMappingVO.getItemId());
|
|
|
+ Concept itemConcept = conceptFacade.getOne(conceptQueryWrapper);
|
|
|
if (itemConcept == null) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验明细项术语不存在");
|
|
|
}
|
|
|
}
|
|
|
- Concept uniqueConcept = conceptFacade.getById(lisMappingVO.getUniqueId());
|
|
|
+ conceptQueryWrapper = new QueryWrapper<>();
|
|
|
+ conceptQueryWrapper
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("id", lisMappingVO.getUniqueId());
|
|
|
+ Concept uniqueConcept = conceptFacade.getOne(conceptQueryWrapper);
|
|
|
if (uniqueConcept == null) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验公表项项术语不存在");
|
|
|
}
|