|
@@ -28,6 +28,7 @@ import com.diagbot.client.UserServiceClient;
|
|
|
import com.diagbot.dto.GetMedicalInfoDetailDTO;
|
|
|
import com.diagbot.dto.GetMedicalInfoListDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.entity.Bodypart;
|
|
|
import com.diagbot.entity.Concept;
|
|
|
import com.diagbot.entity.LibraryInfo;
|
|
|
import com.diagbot.entity.Medical;
|
|
@@ -61,6 +62,8 @@ public class MedicalFacade extends MedicalServiceImpl {
|
|
|
private MedicalService medicalService;
|
|
|
@Autowired
|
|
|
private UserServiceClient userServiceClient;
|
|
|
+ @Autowired
|
|
|
+ private BodypartFacade bodypartFacade;
|
|
|
|
|
|
/**
|
|
|
* 获取医学术语命名列表
|
|
@@ -69,6 +72,9 @@ public class MedicalFacade extends MedicalServiceImpl {
|
|
|
*/
|
|
|
public IPage<GetMedicalInfoListDTO> getMedicalInfoList(GetMedicalInfoListVO getMedicalInfoListVO) {
|
|
|
IPage<GetMedicalInfoListDTO> ipage = this.baseMapper.getMedicalInfoList(getMedicalInfoListVO);
|
|
|
+ if(ipage.getRecords().size()==0){
|
|
|
+ return ipage;
|
|
|
+ }
|
|
|
List<String> ids = ipage.getRecords().stream().map(i->i.getOperName()).distinct().collect(Collectors.toList());
|
|
|
RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
|
|
|
if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
|
|
@@ -193,6 +199,19 @@ public class MedicalFacade extends MedicalServiceImpl {
|
|
|
return retMap;
|
|
|
}
|
|
|
|
|
|
+ QueryWrapper<Bodypart> bodypartQe = new QueryWrapper<>();
|
|
|
+ bodypartQe.eq("is_deleted", "N");
|
|
|
+ bodypartQe.eq("bodypart", addMedicalInfoVO.getBodypart());
|
|
|
+ if(bodypartFacade.list(bodypartQe).size()==0){
|
|
|
+ retMap.put("message", "一级部位不存在");
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+ bodypartQe.eq("sub_bodypart", addMedicalInfoVO.getSubBodypart());
|
|
|
+ if(bodypartFacade.list(bodypartQe).size()==0){
|
|
|
+ retMap.put("message", "二级部位不存在");
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
String currentUser = UserUtils.getCurrentPrincipleID();
|
|
|
Date now = DateUtil.now();
|
|
|
QueryWrapper<Medical> medicalQe = new QueryWrapper<>();
|