浏览代码

代码整理优化

gaodm 6 年之前
父节点
当前提交
2d4e3bbdd7
共有 18 个文件被更改,包括 272 次插入687 次删除
  1. 0 29
      knowledgeman-service/src/main/java/com/diagbot/client/DeptInfoServiceClient.java
  2. 0 36
      knowledgeman-service/src/main/java/com/diagbot/client/hystrix/DeptInfoServiceHystrix.java
  3. 0 158
      knowledgeman-service/src/main/java/com/diagbot/entity/Bodypart.java
  4. 0 58
      knowledgeman-service/src/main/java/com/diagbot/facade/BodypartFacade.java
  5. 216 229
      knowledgeman-service/src/main/java/com/diagbot/facade/MedicalFacade.java
  6. 0 16
      knowledgeman-service/src/main/java/com/diagbot/mapper/BodypartMapper.java
  7. 0 16
      knowledgeman-service/src/main/java/com/diagbot/service/BodypartService.java
  8. 0 20
      knowledgeman-service/src/main/java/com/diagbot/service/impl/BodypartServiceImpl.java
  9. 0 45
      knowledgeman-service/src/main/java/com/diagbot/web/BodypartController.java
  10. 9 9
      knowledgeman-service/src/main/java/com/diagbot/web/ConceptController.java
  11. 3 0
      knowledgeman-service/src/main/java/com/diagbot/web/LexiconController.java
  12. 3 0
      knowledgeman-service/src/main/java/com/diagbot/web/LexiconRelationshipController.java
  13. 5 5
      knowledgeman-service/src/main/java/com/diagbot/web/LisSonContactController.java
  14. 22 33
      knowledgeman-service/src/main/java/com/diagbot/web/MedicalController.java
  15. 5 5
      knowledgeman-service/src/main/java/com/diagbot/web/MultContactController.java
  16. 4 4
      knowledgeman-service/src/main/java/com/diagbot/web/RelationContactController.java
  17. 5 5
      knowledgeman-service/src/main/java/com/diagbot/web/RelationController.java
  18. 0 19
      knowledgeman-service/src/main/resources/mapper/BodypartMapper.xml

+ 0 - 29
knowledgeman-service/src/main/java/com/diagbot/client/DeptInfoServiceClient.java

@@ -1,29 +0,0 @@
-package com.diagbot.client;
-
-import java.util.List;
-
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-
-import com.diagbot.client.hystrix.DeptInfoServiceHystrix;
-import com.diagbot.dto.GetAllDeptsDTO;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.vo.GetAllDeptsVO;
-
-
-/**
- * @Description: 调用科室服务
- * @author: gaodm
- * @time: 2018/8/6 9:52
- */
-@FeignClient(value = "icssman-service", fallback = DeptInfoServiceHystrix.class)
-public interface DeptInfoServiceClient {
-	
-	@PostMapping(value = "/deptInfo/getAllDepts")
-	RespDTO<List<GetAllDeptsDTO>> getAllDepts(@RequestBody GetAllDeptsVO getAllDeptsVO);
-    
-}
-
-
-

+ 0 - 36
knowledgeman-service/src/main/java/com/diagbot/client/hystrix/DeptInfoServiceHystrix.java

@@ -1,36 +0,0 @@
-package com.diagbot.client.hystrix;
-
-import java.util.List;
-
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestBody;
-
-import com.diagbot.client.DeptInfoServiceClient;
-import com.diagbot.dto.GetAllDeptsDTO;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.vo.GetAllDeptsVO;
-
-import lombok.extern.slf4j.Slf4j;
-
-
-/**
- * @Description: 调用科室服务
- * @author: gaodm
- * @time: 2018/8/6 9:52
- */
-@Component
-@Slf4j
-public class DeptInfoServiceHystrix implements DeptInfoServiceClient {
-	
-	@Override
-	public RespDTO<List<GetAllDeptsDTO>> getAllDepts(@RequestBody GetAllDeptsVO getAllDeptsVO) {
-		log.error("【hystrix】调用{}异常", "getAllDepts");
-        return null;
-	}
-
-	
-	
-	
-	
-	
-}

+ 0 - 158
knowledgeman-service/src/main/java/com/diagbot/entity/Bodypart.java

@@ -1,158 +0,0 @@
-package com.diagbot.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author gaodm
- * @since 2019-04-01
- */
-public class Bodypart implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 主键
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreated;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 二级部位
-     */
-    private String subBodypart;
-
-    /**
-     * 二级部位排序号
-     */
-    private Integer subOrder;
-
-    /**
-     * 一级部位
-     */
-    private String bodypart;
-
-    /**
-     * 一级部位排序号
-     */
-    private Integer orderNo;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-    public Date getGmtCreated() {
-        return gmtCreated;
-    }
-
-    public void setGmtCreated(Date gmtCreated) {
-        this.gmtCreated = gmtCreated;
-    }
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-    public String getSubBodypart() {
-        return subBodypart;
-    }
-
-    public void setSubBodypart(String subBodypart) {
-        this.subBodypart = subBodypart;
-    }
-    public Integer getSubOrder() {
-        return subOrder;
-    }
-
-    public void setSubOrder(Integer subOrder) {
-        this.subOrder = subOrder;
-    }
-    public String getBodypart() {
-        return bodypart;
-    }
-
-    public void setBodypart(String bodypart) {
-        this.bodypart = bodypart;
-    }
-    public Integer getOrderNo() {
-        return orderNo;
-    }
-
-    public void setOrderNo(Integer orderNo) {
-        this.orderNo = orderNo;
-    }
-
-    @Override
-    public String toString() {
-        return "Bodypart{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreated=" + gmtCreated +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", subBodypart=" + subBodypart +
-        ", subOrder=" + subOrder +
-        ", bodypart=" + bodypart +
-        ", orderNo=" + orderNo +
-        "}";
-    }
-}

+ 0 - 58
knowledgeman-service/src/main/java/com/diagbot/facade/BodypartFacade.java

@@ -1,58 +0,0 @@
-package com.diagbot.facade;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import org.springframework.stereotype.Component;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.diagbot.dto.GetAllBodypartDTO;
-import com.diagbot.entity.Bodypart;
-import com.diagbot.service.impl.BodypartServiceImpl;
-import com.diagbot.util.StringUtil;
-import com.diagbot.vo.GetAllBodypartVO;
-
-/**
- * @Description: 部位业务层
- * @author: Weixuan Huang
- * @time: 2019/1/16 14:17
- */
-@Component
-public class BodypartFacade extends BodypartServiceImpl {
-
-	/**
-     * 获取所有部位
-     * @param getAllBodypartVO
-     * @return
-     */
-    public List<GetAllBodypartDTO> getAllBodypart(GetAllBodypartVO getAllBodypartVO){
-    	QueryWrapper<Bodypart> bodypartQe = new QueryWrapper<>();
-    	bodypartQe.eq("is_deleted", "N");
-    	if(StringUtil.isNotBlank(getAllBodypartVO.getBodypart())){
-    		bodypartQe.like("bodypart", getAllBodypartVO.getBodypart());
-    	}
-    	if(StringUtil.isNotBlank(getAllBodypartVO.getSubBodypart())){
-    		bodypartQe.like("sub_bodypart", getAllBodypartVO.getSubBodypart());
-    	}
-    	
-    	List<GetAllBodypartDTO> getAllBodypartDTOList = new ArrayList<>();
-    	list(bodypartQe).forEach(i->{
-    		GetAllBodypartDTO getAllBodypartDTO = new GetAllBodypartDTO();
-    		if(getAllBodypartVO.getLevel()==1){
-    			getAllBodypartDTO.setName(i.getBodypart());
-    			getAllBodypartDTO.setOrderNo(i.getOrderNo());
-    		}else{
-    			getAllBodypartDTO.setName(i.getSubBodypart());
-    			getAllBodypartDTO.setOrderNo(i.getSubOrder());
-    		}
-    		getAllBodypartDTOList.add(getAllBodypartDTO);
-    	});
-    	
-    	return getAllBodypartDTOList.stream().distinct().sorted((a,b)->{
-    		return a.getOrderNo()-b.getOrderNo();
-    	}).collect(Collectors.toList());
-    }
-    
-
-}

+ 216 - 229
knowledgeman-service/src/main/java/com/diagbot/facade/MedicalFacade.java

@@ -1,36 +1,11 @@
 package com.diagbot.facade;
 
-import java.io.InputStream;
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-import org.apache.commons.lang.time.DateFormatUtils;
-import org.apache.poi.hssf.usermodel.HSSFDateUtil;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Component;
-import org.springframework.web.multipart.MultipartFile;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.diagbot.client.DeptInfoServiceClient;
 import com.diagbot.client.UserServiceClient;
-import com.diagbot.dto.GetAllDeptsDTO;
 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;
@@ -44,10 +19,30 @@ import com.diagbot.util.DateUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.UserUtils;
 import com.diagbot.vo.AddMedicalInfoVO;
-import com.diagbot.vo.GetAllDeptsVO;
 import com.diagbot.vo.GetMedicalInfoDetailVO;
 import com.diagbot.vo.GetMedicalInfoListVO;
 import com.diagbot.vo.RemoveMedicalInfoVO;
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.InputStream;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @Description: 术语临床信息查询业务层
@@ -66,185 +61,187 @@ public class MedicalFacade extends MedicalServiceImpl {
     private MedicalService medicalService;
     @Autowired
     private UserServiceClient userServiceClient;
-    @Autowired
-    private DeptInfoServiceClient deptInfoServiceClient;
-    @Autowired
-    private BodypartFacade bodypartFacade;
-    
+
     /**
      * 获取医学术语命名列表
+     *
      * @param getMedicalInfoListVO
      * @return
      */
     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)) {
+        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)) {
             throw new CommonException(CommonErrorCode.RPC_ERROR,
                     "获取用户信息失败");
         }
-    	ipage.getRecords().forEach(i->{
-    		i.setOperName(respDTO.data.get(i.getOperName()));
-    	});
+        ipage.getRecords().forEach(i -> {
+            i.setOperName(respDTO.data.get(i.getOperName()));
+        });
         return ipage;
     }
-    
+
     /**
      * 医学术语命名删除
+     *
      * @param removeMedicalInfoVO
      * @return
      */
     public Boolean removeMedicalInfo(RemoveMedicalInfoVO removeMedicalInfoVO) {
-    	Medical medical = this.getById(removeMedicalInfoVO.getMedicalId());
-    	if(medical==null||medical.getIsDeleted().equals("Y")){
-    		throw new CommonException(CommonErrorCode.NOT_EXISTS);
-    	}
-    	
-    	medical.setIsDeleted("Y");
-    	medical.setModifier(UserUtils.getCurrentPrincipleID());
-    	medical.setGmtModified(DateUtil.now());
+        Medical medical = this.getById(removeMedicalInfoVO.getMedicalId());
+        if (medical == null || medical.getIsDeleted().equals("Y")) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS);
+        }
+
+        medical.setIsDeleted("Y");
+        medical.setModifier(UserUtils.getCurrentPrincipleID());
+        medical.setGmtModified(DateUtil.now());
         return updateById(medical);
     }
-    
+
     /**
      * 获取术语医学属性详情
+     *
      * @param getMedicalInfoDetailVO
      * @return
      */
-    public GetMedicalInfoDetailDTO getMedicalInfoDetail(GetMedicalInfoDetailVO getMedicalInfoDetailVO){
-    	Medical medical = this.getById(getMedicalInfoDetailVO.getMedicalId());
-    	if(medical==null||medical.getIsDeleted().equals("Y")){
-    		throw new CommonException(CommonErrorCode.NOT_EXISTS);
-    	}
-    	
-    	QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<LibraryInfo>();
-		libraryInfoQe.eq("is_deleted", "N");
-		libraryInfoQe.eq("is_concept", "1");
-		libraryInfoQe.eq("concept_id", medical.getConceptId());
-		LibraryInfo libraryInfo = libraryInfoFacade.getOne(libraryInfoQe);
-		if(libraryInfo==null){
-			throw new CommonException(CommonErrorCode.RPC_ERROR,"术语医学属性所属概念不存在!");
-		}
-    	
-    	GetMedicalInfoDetailDTO getMedicalInfoDetailDTO = new GetMedicalInfoDetailDTO();
-    	BeanUtil.copyProperties(medical, getMedicalInfoDetailDTO);
-    	getMedicalInfoDetailDTO.setConceptName(libraryInfo.getName());
-    	getMedicalInfoDetailDTO.setConceptType(LexiconTypeEnum.getName(libraryInfo.getTypeId().intValue()));
-    	
-    	return getMedicalInfoDetailDTO;
+    public GetMedicalInfoDetailDTO getMedicalInfoDetail(GetMedicalInfoDetailVO getMedicalInfoDetailVO) {
+        Medical medical = this.getById(getMedicalInfoDetailVO.getMedicalId());
+        if (medical == null || medical.getIsDeleted().equals("Y")) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS);
+        }
+
+        QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<LibraryInfo>();
+        libraryInfoQe.eq("is_deleted", "N");
+        libraryInfoQe.eq("is_concept", "1");
+        libraryInfoQe.eq("concept_id", medical.getConceptId());
+        LibraryInfo libraryInfo = libraryInfoFacade.getOne(libraryInfoQe);
+        if (libraryInfo == null) {
+            throw new CommonException(CommonErrorCode.RPC_ERROR, "术语医学属性所属概念不存在!");
+        }
+
+        GetMedicalInfoDetailDTO getMedicalInfoDetailDTO = new GetMedicalInfoDetailDTO();
+        BeanUtil.copyProperties(medical, getMedicalInfoDetailDTO);
+        getMedicalInfoDetailDTO.setConceptName(libraryInfo.getName());
+        getMedicalInfoDetailDTO.setConceptType(LexiconTypeEnum.getName(libraryInfo.getTypeId().intValue()));
+
+        return getMedicalInfoDetailDTO;
     }
-    
+
     /**
      * 术语医学属性添加或者编辑
+     *
      * @param addMedicalInfoVO
      * @return
      */
-	public Boolean addMedicalInfo(AddMedicalInfoVO addMedicalInfoVO){
-		Map<String,Object> ckMap = checkAddMedicalInfoVO(addMedicalInfoVO);
-		Object message = ckMap.get("message");
-		if(message!=null){
-			throw new CommonException(CommonErrorCode.RPC_ERROR,message.toString());
-		}
-		return saveOrUpdate((Medical)(ckMap.get("medical")));
+    public Boolean addMedicalInfo(AddMedicalInfoVO addMedicalInfoVO) {
+        Map<String, Object> ckMap = checkAddMedicalInfoVO(addMedicalInfoVO);
+        Object message = ckMap.get("message");
+        if (message != null) {
+            throw new CommonException(CommonErrorCode.RPC_ERROR, message.toString());
+        }
+        return saveOrUpdate((Medical) (ckMap.get("medical")));
     }
-	
-	/**
-	 * 校验即将添加的数据
-	 * @param addMedicalInfoVO
-	 * @return 返回map中,包含2个字段:message和medical,message-为空时,表示正常,取medical
-	 */
-	private Map<String,Object> checkAddMedicalInfoVO(AddMedicalInfoVO addMedicalInfoVO){
-		Map<String,Object> retMap = new HashMap<>();
-		
-		QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<LibraryInfo>();
-		libraryInfoQe.eq("is_deleted", "N");
-		libraryInfoQe.eq("is_concept", "1");
-		libraryInfoQe.eq("name", addMedicalInfoVO.getConceptName());
-		libraryInfoQe.eq("type", addMedicalInfoVO.getConceptType());
-		
-		LibraryInfo libraryInfo = libraryInfoFacade.getOne(libraryInfoQe);
-		if(libraryInfo==null){
-			retMap.put("message", "术语概念名称不存在");
-			return retMap;
-		}
-		
-		Concept concept = conceptFacade.getById(libraryInfo.getConceptId());
-		if(concept==null||concept.getIsDeleted().equals("Y")){
-			retMap.put("message", "术语概念名称不存在");
-			return retMap;
-		}
-		
-		List<String> infoNames = new ArrayList<>();
-		infoNames.add(addMedicalInfoVO.getName());
-		infoNames.add(addMedicalInfoVO.getStdName());
-		infoNames.add(addMedicalInfoVO.getCateName());
-		infoNames.add(addMedicalInfoVO.getGrp());
-		QueryWrapper<LibraryInfo> libraryInfoQe1 = new QueryWrapper<LibraryInfo>();
-		libraryInfoQe1.in("name", infoNames);
-		libraryInfoQe1.eq("is_concept", "1");
-		libraryInfoQe1.eq("is_deleted", "N");
-		Map<String,List<LibraryInfo>> libraryInfoListMap = libraryInfoFacade.list(libraryInfoQe1).stream().collect(Collectors.groupingBy(LibraryInfo::getName));
-		if(libraryInfoListMap.get(addMedicalInfoVO.getName()).size()==0){
-			retMap.put("message", "术语名称不存在");
-			return retMap;
-		}
-		if(libraryInfoListMap.get(addMedicalInfoVO.getStdName()).size()==0){
-			retMap.put("message", "术语标准名不存在");
-			return retMap;
-		}
-		if(libraryInfoListMap.get(addMedicalInfoVO.getCateName()).size()==0){
-			retMap.put("message", "术语小类名称不存在");
-			return retMap;
-		}
-		if(libraryInfoListMap.get(addMedicalInfoVO.getGrp()).size()==0){
-			retMap.put("message", "术语类组不存在");
-			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<>();
-		medicalQe.eq("concept_id", libraryInfo.getConceptId());
-		Medical medical = this.getOne(medicalQe);
-		if(medical==null){
-			medical = new Medical();
-			medical.setCreator(currentUser);
-			medical.setGmtCreated(now);
-		}
-		medical.setIsDeleted("N");
-		medical.setModifier(currentUser);
-		medical.setGmtModified(now);
-		medical.setConceptId(libraryInfo.getConceptId());
-		BeanUtil.copyProperties(addMedicalInfoVO, medical);
-		
-		retMap.put("medical", medical);
-		
-		return retMap;
-	}
-    
-	/**
+
+    /**
+     * 校验即将添加的数据
+     *
+     * @param addMedicalInfoVO
+     * @return 返回map中,包含2个字段:message和medical,message-为空时,表示正常,取medical
+     */
+    private Map<String, Object> checkAddMedicalInfoVO(AddMedicalInfoVO addMedicalInfoVO) {
+        Map<String, Object> retMap = new HashMap<>();
+
+        QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<LibraryInfo>();
+        libraryInfoQe.eq("is_deleted", "N");
+        libraryInfoQe.eq("is_concept", "1");
+        libraryInfoQe.eq("name", addMedicalInfoVO.getConceptName());
+        libraryInfoQe.eq("type", addMedicalInfoVO.getConceptType());
+
+        LibraryInfo libraryInfo = libraryInfoFacade.getOne(libraryInfoQe);
+        if (libraryInfo == null) {
+            retMap.put("message", "术语概念名称不存在");
+            return retMap;
+        }
+
+        Concept concept = conceptFacade.getById(libraryInfo.getConceptId());
+        if (concept == null || concept.getIsDeleted().equals("Y")) {
+            retMap.put("message", "术语概念名称不存在");
+            return retMap;
+        }
+
+        List<String> infoNames = new ArrayList<>();
+        infoNames.add(addMedicalInfoVO.getName());
+        infoNames.add(addMedicalInfoVO.getStdName());
+        infoNames.add(addMedicalInfoVO.getCateName());
+        infoNames.add(addMedicalInfoVO.getGrp());
+        QueryWrapper<LibraryInfo> libraryInfoQe1 = new QueryWrapper<LibraryInfo>();
+        libraryInfoQe1.in("name", infoNames);
+        libraryInfoQe1.eq("is_concept", "1");
+        libraryInfoQe1.eq("is_deleted", "N");
+        Map<String, List<LibraryInfo>> libraryInfoListMap = libraryInfoFacade.list(libraryInfoQe1).stream().collect(Collectors.groupingBy(LibraryInfo::getName));
+        if (libraryInfoListMap.get(addMedicalInfoVO.getName()).size() == 0) {
+            retMap.put("message", "术语名称不存在");
+            return retMap;
+        }
+        if (libraryInfoListMap.get(addMedicalInfoVO.getStdName()).size() == 0) {
+            retMap.put("message", "术语标准名不存在");
+            return retMap;
+        }
+        if (libraryInfoListMap.get(addMedicalInfoVO.getCateName()).size() == 0) {
+            retMap.put("message", "术语小类名称不存在");
+            return retMap;
+        }
+        if (libraryInfoListMap.get(addMedicalInfoVO.getGrp()).size() == 0) {
+            retMap.put("message", "术语类组不存在");
+            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<>();
+        medicalQe.eq("concept_id", libraryInfo.getConceptId());
+        Medical medical = this.getOne(medicalQe);
+        if (medical == null) {
+            medical = new Medical();
+            medical.setCreator(currentUser);
+            medical.setGmtCreated(now);
+        }
+        medical.setIsDeleted("N");
+        medical.setModifier(currentUser);
+        medical.setGmtModified(now);
+        medical.setConceptId(libraryInfo.getConceptId());
+        BeanUtil.copyProperties(addMedicalInfoVO, medical);
+
+        retMap.put("medical", medical);
+
+        return retMap;
+    }
+
+    /**
      * 术语医学属性excel文件导入
+     *
      * @param file
      * @return
      */
-	public Boolean medicalInfoExcelIm(MultipartFile file) {
+    public Boolean medicalInfoExcelIm(MultipartFile file) {
         List<AddMedicalInfoVO> addMedicalInfoVOList = new ArrayList<>();
         StringBuffer sbf = new StringBuffer();
         InputStream inputStream = null;
@@ -264,7 +261,7 @@ public class MedicalFacade extends MedicalServiceImpl {
                             wb = new XSSFWorkbook(inputStream);
                         }
                         if (wb != null) {
-                            
+
                             Sheet sheet = wb.getSheetAt(0);
                             int count = 0;
                             String conceptName, conceptType, name, stdName, cateName, grp, gender, minAge, maxAge, bodypart, subBodypart, displayOrder, dept, code, note;
@@ -289,15 +286,15 @@ public class MedicalFacade extends MedicalServiceImpl {
                                 dept = getValue(row.getCell(12)).trim().replace(" ", "");
                                 code = getValue(row.getCell(13)).trim().replace(" ", "");
                                 note = getValue(row.getCell(14)).trim().replace(" ", "");
-                                if(StringUtil.isEmpty(conceptName) && StringUtil.isEmpty(name)
+                                if (StringUtil.isEmpty(conceptName) && StringUtil.isEmpty(name)
                                         && StringUtil.isEmpty(stdName) && StringUtil.isEmpty(cateName)
                                         && StringUtil.isEmpty(grp) && StringUtil.isEmpty(gender)
                                         && StringUtil.isEmpty(minAge) && StringUtil.isEmpty(maxAge)
                                         && StringUtil.isEmpty(bodypart) && StringUtil.isEmpty(subBodypart)
-                                        && StringUtil.isEmpty(displayOrder)&& StringUtil.isEmpty(dept) 
-                                        && StringUtil.isEmpty(code)&& StringUtil.isEmpty(note) 
-                                        && StringUtil.isEmpty(conceptType)){
-                                	continue;
+                                        && StringUtil.isEmpty(displayOrder) && StringUtil.isEmpty(dept)
+                                        && StringUtil.isEmpty(code) && StringUtil.isEmpty(note)
+                                        && StringUtil.isEmpty(conceptType)) {
+                                    continue;
                                 }
                                 if (StringUtil.isEmpty(conceptName) || StringUtil.isEmpty(name)
                                         || StringUtil.isEmpty(stdName) || StringUtil.isEmpty(cateName)
@@ -308,12 +305,12 @@ public class MedicalFacade extends MedicalServiceImpl {
                                     sbf.append("第" + count + "行数据不完整;").append("<br/>");
                                     continue;
                                 }
-                                
-                                if(!gender.equals("1")&&!gender.equals("2")&&!gender.equals("3")){
-                                	sbf.append("第" + count + "行数据中性别非1、2、3;").append("<br/>");
-                                	continue;
+
+                                if (!gender.equals("1") && !gender.equals("2") && !gender.equals("3")) {
+                                    sbf.append("第" + count + "行数据中性别非1、2、3;").append("<br/>");
+                                    continue;
                                 }
-                                
+
                                 AddMedicalInfoVO addMedicalInfoVO = new AddMedicalInfoVO();
                                 addMedicalInfoVO.setConceptName(conceptName);
                                 addMedicalInfoVO.setConceptType(conceptType);
@@ -328,19 +325,19 @@ public class MedicalFacade extends MedicalServiceImpl {
                                 addMedicalInfoVO.setDept(dept);
                                 addMedicalInfoVO.setCode(code);
                                 addMedicalInfoVO.setNote(note);
-                                try{
-                                	minAge_ = Integer.parseInt(minAge);
-                                	maxAge_ = Integer.parseInt(maxAge);
-                                }catch(Exception e){
-                                	minAge_ = null;
-                                	maxAge_ = null;
+                                try {
+                                    minAge_ = Integer.parseInt(minAge);
+                                    maxAge_ = Integer.parseInt(maxAge);
+                                } catch (Exception e) {
+                                    minAge_ = null;
+                                    maxAge_ = null;
                                 }
-                                if(minAge_==null||maxAge_==null){
-                                	sbf.append("第" + count + "行数据中年龄非整数;").append("<br/>");
-                                	continue;
+                                if (minAge_ == null || maxAge_ == null) {
+                                    sbf.append("第" + count + "行数据中年龄非整数;").append("<br/>");
+                                    continue;
                                 }
                                 addMedicalInfoVO.setMinAge(minAge_);
-                            	addMedicalInfoVO.setMaxAge(maxAge_);
+                                addMedicalInfoVO.setMaxAge(maxAge_);
                                 addMedicalInfoVOList.add(addMedicalInfoVO);
                             }
                         } else {
@@ -366,44 +363,44 @@ public class MedicalFacade extends MedicalServiceImpl {
             } catch (Exception e) {
             }
         }
-        
+
         /*****************excel文件本身问题提醒************************/
-        if(sbf.length()>0){
-        	throw new CommonException(CommonErrorCode.RPC_ERROR,sbf.toString());
+        if (sbf.length() > 0) {
+            throw new CommonException(CommonErrorCode.RPC_ERROR, sbf.toString());
         }
-        
+
         /****************excel文件中所有术语概念存在重复提示---术语概念名称和类型一样即重复***********************/
-        Map<String,List<AddMedicalInfoVO>> addMedicalInfoVOListMap = addMedicalInfoVOList.stream().collect(Collectors.groupingBy(AddMedicalInfoVO::getConceptName));
-        for(String key : addMedicalInfoVOListMap.keySet()){
-        	if(addMedicalInfoVOListMap.get(key).size()>1&&addMedicalInfoVOListMap.get(key).stream().map(i->i.getConceptType()).distinct().count()==1){
-        		sbf.append(key).append(" ");
-        	}
+        Map<String, List<AddMedicalInfoVO>> addMedicalInfoVOListMap = addMedicalInfoVOList.stream().collect(Collectors.groupingBy(AddMedicalInfoVO::getConceptName));
+        for (String key : addMedicalInfoVOListMap.keySet()) {
+            if (addMedicalInfoVOListMap.get(key).size() > 1 && addMedicalInfoVOListMap.get(key).stream().map(i -> i.getConceptType()).distinct().count() == 1) {
+                sbf.append(key).append(" ");
+            }
         }
-        if(sbf.length()>0){
-        	sbf.append("(术语概念名称存在重复)");
-        	throw new CommonException(CommonErrorCode.RPC_ERROR,sbf.toString());
+        if (sbf.length() > 0) {
+            sbf.append("(术语概念名称存在重复)");
+            throw new CommonException(CommonErrorCode.RPC_ERROR, sbf.toString());
         }
-        
+
         /**************校验每一组数据,同时组装*************************/
         List<Medical> saveOrUpdateMedicalList = new ArrayList<>();
-        Map<String,Object> ckMap = null;
-    	Object message = null;
-    	for(AddMedicalInfoVO i : addMedicalInfoVOList){
-    		ckMap = checkAddMedicalInfoVO(i); 
-    		message = ckMap.get("message");
-    		if(message!=null){
-    			sbf.append(message.toString()).append("(").append(i.getConceptName()).append(")").append("<br/>");
-    		}else{
-    			saveOrUpdateMedicalList.add((Medical)(ckMap.get("medical")));
-    		}
-    	}
-        if(sbf.length()>0){
-        	throw new CommonException(CommonErrorCode.RPC_ERROR,sbf.toString());
+        Map<String, Object> ckMap = null;
+        Object message = null;
+        for (AddMedicalInfoVO i : addMedicalInfoVOList) {
+            ckMap = checkAddMedicalInfoVO(i);
+            message = ckMap.get("message");
+            if (message != null) {
+                sbf.append(message.toString()).append("(").append(i.getConceptName()).append(")").append("<br/>");
+            } else {
+                saveOrUpdateMedicalList.add((Medical) (ckMap.get("medical")));
+            }
+        }
+        if (sbf.length() > 0) {
+            throw new CommonException(CommonErrorCode.RPC_ERROR, sbf.toString());
         }
-        
+
         return medicalService.saveOrUpdateBatch(saveOrUpdateMedicalList);
     }
-    
+
     @SuppressWarnings("deprecation")
     private String getValue(Cell cell) {
         try {
@@ -437,14 +434,4 @@ public class MedicalFacade extends MedicalServiceImpl {
             return "";
         }
     }
-    
-    /**
-     * 获取术语医学属性所需全部科室
-     * @param getAllDeptsVO
-     * @return
-     */
-    public List<GetAllDeptsDTO> getAllDepts(GetAllDeptsVO getAllDeptsVO){
-    	 return deptInfoServiceClient.getAllDepts(getAllDeptsVO).data;
-    }
-    
 }

+ 0 - 16
knowledgeman-service/src/main/java/com/diagbot/mapper/BodypartMapper.java

@@ -1,16 +0,0 @@
-package com.diagbot.mapper;
-
-import com.diagbot.entity.Bodypart;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * <p>
- *  Mapper 接口
- * </p>
- *
- * @author Weixuan Huang
- * @since 2019-01-14
- */
-public interface BodypartMapper extends BaseMapper<Bodypart> {
-
-}

+ 0 - 16
knowledgeman-service/src/main/java/com/diagbot/service/BodypartService.java

@@ -1,16 +0,0 @@
-package com.diagbot.service;
-
-import com.diagbot.entity.Bodypart;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
- * <p>
- *  服务类
- * </p>
- *
- * @author Weixuan Huang
- * @since 2019-01-14
- */
-public interface BodypartService extends IService<Bodypart> {
-
-}

+ 0 - 20
knowledgeman-service/src/main/java/com/diagbot/service/impl/BodypartServiceImpl.java

@@ -1,20 +0,0 @@
-package com.diagbot.service.impl;
-
-import com.diagbot.entity.Bodypart;
-import com.diagbot.mapper.BodypartMapper;
-import com.diagbot.service.BodypartService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- *  服务实现类
- * </p>
- *
- * @author Weixuan Huang
- * @since 2019-01-14
- */
-@Service
-public class BodypartServiceImpl extends ServiceImpl<BodypartMapper, Bodypart> implements BodypartService {
-
-}

+ 0 - 45
knowledgeman-service/src/main/java/com/diagbot/web/BodypartController.java

@@ -1,45 +0,0 @@
-package com.diagbot.web;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.diagbot.annotation.SysLogger;
-import com.diagbot.dto.GetAllBodypartDTO;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.facade.BodypartFacade;
-import com.diagbot.vo.GetAllBodypartVO;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author Weixuan Huang
- * @since 2019-01-30
- */
-@RestController
-@RequestMapping("/bodypart")
-@SuppressWarnings("unchecked")
-@Api(value = "部位维护相关API", tags = { "部位维护相关API" })
-public class BodypartController {
-	
-    @Autowired
-    private BodypartFacade bodypartFacade;
-    
-    @ApiOperation(value = "获取所有部位[by:rengb]")
-    @PostMapping("/getAllBodypart")
-    @SysLogger("getAllBodypart")
-    public RespDTO<List<GetAllBodypartDTO>> getAllBodypart(@RequestBody GetAllBodypartVO getAllBodypartVO) {
-        return RespDTO.onSuc(bodypartFacade.getAllBodypart(getAllBodypartVO));
-    }
-    
-    
-}

+ 9 - 9
knowledgeman-service/src/main/java/com/diagbot/web/ConceptController.java

@@ -50,41 +50,41 @@ import springfox.documentation.annotations.ApiIgnore;
 @RestController
 @RequestMapping("/concept")
 @SuppressWarnings("unchecked")
-@Api(value = "医学术语命名维护相关API", tags = { "医学术语命名维护相关API" })
+@Api(value = "医学术语命名维护相关API", tags = { "知识库标准化-医学术语命名维护相关API" })
 public class ConceptController {
 
     @Autowired
     private ConceptFacade conceptFacade;
 
-    @ApiOperation(value = "获取所有化验公表项[by:rengb]")
+    @ApiOperation(value = "知识库标准化-获取所有化验公表项[by:rengb]")
     @PostMapping("/getAllLisConcept")
     @SysLogger("getAllLisConcept")
     public RespDTO<List<GetAllLisConceptDTO>> getAllLisConcept(@RequestBody GetAllLisConceptVO getAllLisConceptVO) {
         return RespDTO.onSuc(conceptFacade.getAllLisConcept(getAllLisConceptVO));
     }
 
-    @ApiOperation(value = "获取所有医学术语命名[by:rengb]")
+    @ApiOperation(value = "知识库标准化-获取所有医学术语命名[by:rengb]")
     @PostMapping("/getAllConcept")
     @SysLogger("getAllConcept")
     public RespDTO<List<GetAllConceptDTO>> getAllConcept(@RequestBody GetAllConceptVO getAllConceptVO) {
         return RespDTO.onSuc(conceptFacade.getAllConcept(getAllConceptVO));
     }
     
-    @ApiOperation(value = "获取所有概念(术语关系维护时筛选使用)[by:rengb]")
+    @ApiOperation(value = "知识库标准化-获取所有概念(术语关系维护时筛选使用)[by:rengb]")
     @PostMapping("/getAllForRelation")
     @SysLogger("getAllForRelation")
     public RespDTO<List<GetAllForRelationDTO>> getAllForRelation(@RequestBody GetAllForRelationVO getAllForRelationVO) {
         return RespDTO.onSuc(conceptFacade.getAllForRelation(getAllForRelationVO));
     }
 
-    @ApiOperation(value = "获取医学术语命名列表[by:rengb]")
+    @ApiOperation(value = "知识库标准化-获取医学术语命名列表[by:rengb]")
     @PostMapping("/getAllInformation")
     @SysLogger("getAllInformation")
     public RespDTO<IPage<GetAllInformationDTO>> getAllInformation(@RequestBody GetAllInformationVO getAllInformationVO) {
         return RespDTO.onSuc(conceptFacade.getAllInformation(getAllInformationVO));
     }
 
-    @ApiOperation(value = "医学术语命名删除或者恢复[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语命名删除或者恢复[by:rengb]")
     @PostMapping("/removeConceptInfo")
     @SysLogger("removeConceptInfo")
     @Transactional
@@ -92,14 +92,14 @@ public class ConceptController {
         return RespDTO.onSuc(conceptFacade.removeConceptInfo(removeConceptInfoVO));
     }
 
-    @ApiOperation(value = "获取医学术语命名详情[by:rengb]")
+    @ApiOperation(value = "知识库标准化-获取医学术语命名详情[by:rengb]")
     @PostMapping("/getConceptInfoDetail")
     @SysLogger("getConceptInfoDetail")
     public RespDTO<GetConceptInfoDTO> getConceptInfoDetail(@Valid @RequestBody GetConceptInfoDetailVO getConceptInfoDetailVO) {
         return RespDTO.onSuc(conceptFacade.getConceptInfoDetail(getConceptInfoDetailVO));
     }
 
-    @ApiOperation(value = "医学术语命名添加或者编辑[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语命名添加或者编辑[by:rengb]")
     @PostMapping("/addConceptInfo")
     @SysLogger("addConceptInfo")
     @Transactional
@@ -107,7 +107,7 @@ public class ConceptController {
         return RespDTO.onSuc(conceptFacade.addConceptInfo(addConceptInfoVO));
     }
 
-    @ApiOperation(value = "医学术语命名excel文件导入[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语命名excel文件导入[by:rengb]")
     @PostMapping("/conceptInfoExcelIm")
     @Transactional
     public RespDTO<Boolean> conceptInfoExcelIm(@RequestParam("uploadfile") MultipartFile file, HttpServletRequest request) {

+ 3 - 0
knowledgeman-service/src/main/java/com/diagbot/web/LexiconController.java

@@ -23,6 +23,7 @@ import com.diagbot.vo.GetLexiconListVO;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import springfox.documentation.annotations.ApiIgnore;
 
 /**
  * <p>
@@ -36,6 +37,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping("/lexicon")
 @SuppressWarnings("unchecked")
 @Api(value = "术语类型维护相关API", tags = { "术语类型维护相关API" })
+@ApiIgnore
+@Deprecated
 public class LexiconController {
 	
     @Autowired

+ 3 - 0
knowledgeman-service/src/main/java/com/diagbot/web/LexiconRelationshipController.java

@@ -16,6 +16,7 @@ import com.diagbot.vo.GetAllLexiconRelationshipVO;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import springfox.documentation.annotations.ApiIgnore;
 
 /**
  * <p>
@@ -29,6 +30,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping("/lexiconRelationship")
 @SuppressWarnings("unchecked")
 @Api(value = "关系类型维护相关API", tags = { "关系类型维护相关API" })
+@ApiIgnore
+@Deprecated
 public class LexiconRelationshipController {
 	
     @Autowired

+ 5 - 5
knowledgeman-service/src/main/java/com/diagbot/web/LisSonContactController.java

@@ -35,7 +35,7 @@ import io.swagger.annotations.ApiOperation;
 @RestController
 @RequestMapping("/lisSonContact")
 @SuppressWarnings("unchecked")
-@Api(value = "化验子项维护相关API", tags = { "化验子项维护相关API" })
+@Api(value = "化验子项维护相关API", tags = { "知识库标准化-化验子项维护相关API" })
 public class LisSonContactController {
 	
     @Autowired
@@ -43,14 +43,14 @@ public class LisSonContactController {
     @Autowired
     private LisSonContactFacade lisSonContactFacade;
     
-    @ApiOperation(value = "化验子项维护-列表[by:rengb]")
+    @ApiOperation(value = "知识库标准化-化验子项维护-列表[by:rengb]")
     @PostMapping("/lisSonContactList")
     @SysLogger("lisSonContactList")
     public RespDTO<IPage<LisSonContactListDTO>> lisSonContactList(@RequestBody LisSonContactListVO lisSonContactListVO) {
         return RespDTO.onSuc(lisSonContactFacade.lisSonContactList(lisSonContactListVO));
     }
     
-    @ApiOperation(value = "化验子项维护-添加或者编辑[by:rengb]")
+    @ApiOperation(value = "知识库标准化-化验子项维护-添加或者编辑[by:rengb]")
     @PostMapping("/addRelation")
     @SysLogger("addRelation")
     @Transactional
@@ -58,14 +58,14 @@ public class LisSonContactController {
         return RespDTO.onSuc(relationContactFacade.addRelation(relationNodeVO));
     }
     
-    @ApiOperation(value = "化验子项维护-详情[by:rengb]")
+    @ApiOperation(value = "知识库标准化-化验子项维护-详情[by:rengb]")
     @PostMapping("/relationContactDetail")
     @SysLogger("relationContactDetail")
     public RespDTO<RelationNodeDTO> relationContactDetail(@Valid @RequestBody RelationContactDetailVO relationContactDetailVO) {
         return RespDTO.onSuc(relationContactFacade.relationContactDetail(relationContactDetailVO));
     }
     
-    @ApiOperation(value = "化验子项维护-删除或者恢复[by:rengb]")
+    @ApiOperation(value = "知识库标准化-化验子项维护-删除或者恢复[by:rengb]")
     @PostMapping("/removeRelationContact")
     @SysLogger("removeRelationContact")
     @Transactional

+ 22 - 33
knowledgeman-service/src/main/java/com/diagbot/web/MedicalController.java

@@ -1,39 +1,34 @@
 package com.diagbot.web;
 
 
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.Valid;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
-import com.diagbot.dto.GetAllDeptsDTO;
 import com.diagbot.dto.GetMedicalInfoDetailDTO;
 import com.diagbot.dto.GetMedicalInfoListDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.MedicalFacade;
 import com.diagbot.vo.AddMedicalInfoVO;
-import com.diagbot.vo.GetAllDeptsVO;
 import com.diagbot.vo.GetMedicalInfoDetailVO;
 import com.diagbot.vo.GetMedicalInfoListVO;
 import com.diagbot.vo.RemoveMedicalInfoVO;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
 
 /**
  * <p>
- *  前端控制器
+ * 前端控制器
  * </p>
  *
  * @author Weixuan Huang
@@ -43,18 +38,20 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping("/medical")
 @SuppressWarnings("unchecked")
 @Api(value = "术语医学属性维护相关API", tags = { "术语医学属性维护相关API" })
+@ApiIgnore
+@Deprecated
 public class MedicalController {
-	
+
     @Autowired
     private MedicalFacade medicalFacade;
-    
+
     @ApiOperation(value = "获取术语医学属性列表[by:rengb]")
     @PostMapping("/getMedicalInfoList")
     @SysLogger("getMedicalInfoList")
     public RespDTO<IPage<GetMedicalInfoListDTO>> getMedicalInfoList(@RequestBody GetMedicalInfoListVO getMedicalInfoListVO) {
         return RespDTO.onSuc(medicalFacade.getMedicalInfoList(getMedicalInfoListVO));
     }
-    
+
     @ApiOperation(value = "术语医学属性删除[by:rengb]")
     @PostMapping("/removeMedicalInfo")
     @SysLogger("removeMedicalInfo")
@@ -62,14 +59,14 @@ public class MedicalController {
     public RespDTO<Boolean> removeMedicalInfo(@Valid @RequestBody RemoveMedicalInfoVO removeMedicalInfoVO) {
         return RespDTO.onSuc(medicalFacade.removeMedicalInfo(removeMedicalInfoVO));
     }
-    
+
     @ApiOperation(value = "获取术语医学属性详情[by:rengb]")
     @PostMapping("/getMedicalInfoDetail")
     @SysLogger("getMedicalInfoDetail")
     public RespDTO<GetMedicalInfoDetailDTO> getMedicalInfoDetail(@Valid @RequestBody GetMedicalInfoDetailVO getMedicalInfoDetailVO) {
         return RespDTO.onSuc(medicalFacade.getMedicalInfoDetail(getMedicalInfoDetailVO));
     }
-    
+
     @ApiOperation(value = "术语医学属性添加或者编辑[by:rengb]")
     @PostMapping("/addMedicalInfo")
     @SysLogger("addMedicalInfo")
@@ -77,19 +74,11 @@ public class MedicalController {
     public RespDTO<Boolean> addMedicalInfo(@Valid @RequestBody AddMedicalInfoVO addMedicalInfoVO) {
         return RespDTO.onSuc(medicalFacade.addMedicalInfo(addMedicalInfoVO));
     }
-    
+
     @ApiOperation(value = "术语医学属性excel文件导入[by:rengb]")
     @PostMapping("/medicalInfoExcelIm")
     @Transactional
-    public RespDTO<Boolean> medicalInfoExcelIm(@RequestParam("uploadfile") MultipartFile file,HttpServletRequest request) {
+    public RespDTO<Boolean> medicalInfoExcelIm(@RequestParam("uploadfile") MultipartFile file, HttpServletRequest request) {
         return RespDTO.onSuc(medicalFacade.medicalInfoExcelIm(file));
     }
-    
-    @ApiOperation(value = "获取术语医学属性所需全部科室[by:rengb]")
-    @PostMapping("/getAllDepts")
-    @SysLogger("getAllDepts")
-    public RespDTO<List<GetAllDeptsDTO>> getAllDepts(@RequestBody GetAllDeptsVO getAllDeptsVO) {
-        return RespDTO.onSuc(medicalFacade.getAllDepts(getAllDeptsVO));
-    }
-    
 }

+ 5 - 5
knowledgeman-service/src/main/java/com/diagbot/web/MultContactController.java

@@ -35,7 +35,7 @@ import io.swagger.annotations.ApiOperation;
 @RestController
 @RequestMapping("/multContact")
 @SuppressWarnings("unchecked")
-@Api(value = "医学术语多层关联维护相关API", tags = { "医学术语多层关联维护相关API" })
+@Api(value = "医学术语多层关联维护相关API", tags = { "知识库标准化-医学术语多层关联维护相关API" })
 public class MultContactController {
 	
     @Autowired
@@ -43,14 +43,14 @@ public class MultContactController {
     @Autowired
     private MultContactFacade multContactFacade;
     
-    @ApiOperation(value = "医学术语多层关联维护-列表[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语多层关联维护-列表[by:rengb]")
     @PostMapping("/multContactList")
     @SysLogger("multContactList")
     public RespDTO<IPage<MultContactListDTO>> multContactList(@RequestBody MultContactListVO multContactListVO) {
         return RespDTO.onSuc(multContactFacade.multContactList(multContactListVO));
     }
     
-    @ApiOperation(value = "医学术语多层关联维护-添加或者编辑[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语多层关联维护-添加或者编辑[by:rengb]")
     @PostMapping("/addRelation")
     @SysLogger("addRelation")
     @Transactional
@@ -58,14 +58,14 @@ public class MultContactController {
         return RespDTO.onSuc(relationContactFacade.addRelation(relationNodeVO));
     }
     
-    @ApiOperation(value = "医学术语多层关联维护-详情[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语多层关联维护-详情[by:rengb]")
     @PostMapping("/relationContactDetail")
     @SysLogger("relationContactDetail")
     public RespDTO<RelationNodeDTO> relationContactDetail(@Valid @RequestBody RelationContactDetailVO relationContactDetailVO) {
         return RespDTO.onSuc(relationContactFacade.relationContactDetail(relationContactDetailVO));
     }
     
-    @ApiOperation(value = "医学术语多层关联维护-删除或者恢复[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语多层关联维护-删除或者恢复[by:rengb]")
     @PostMapping("/removeRelationContact")
     @SysLogger("removeRelationContact")
     @Transactional

+ 4 - 4
knowledgeman-service/src/main/java/com/diagbot/web/RelationContactController.java

@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
 @RestController
 @RequestMapping("/relationContact")
 @SuppressWarnings("unchecked")
-@Api(value = "医学术语关联维护相关API", tags = { "医学术语关联维护相关API" })
+@Api(value = "医学术语关联维护相关API", tags = { "知识库标准化-医学术语关联维护相关API" })
 public class RelationContactController {
 	
     @Autowired
@@ -47,7 +47,7 @@ public class RelationContactController {
         return RespDTO.onSuc(relationContactFacade.relationContactList(relationContactListVO));
     }
     
-    @ApiOperation(value = "医学术语关联维护-添加或者编辑[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语关联维护-添加或者编辑[by:rengb]")
     @PostMapping("/addRelation")
     @SysLogger("addRelation")
     @Transactional
@@ -55,14 +55,14 @@ public class RelationContactController {
         return RespDTO.onSuc(relationContactFacade.addRelation(relationNodeVO));
     }
     
-    @ApiOperation(value = "医学术语关联维护-详情[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语关联维护-详情[by:rengb]")
     @PostMapping("/relationContactDetail")
     @SysLogger("relationContactDetail")
     public RespDTO<RelationNodeDTO> relationContactDetail(@Valid @RequestBody RelationContactDetailVO relationContactDetailVO) {
         return RespDTO.onSuc(relationContactFacade.relationContactDetail(relationContactDetailVO));
     }
     
-    @ApiOperation(value = "医学术语关联维护-删除或者恢复[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语关联维护-删除或者恢复[by:rengb]")
     @PostMapping("/removeRelationContact")
     @SysLogger("removeRelationContact")
     @Transactional

+ 5 - 5
knowledgeman-service/src/main/java/com/diagbot/web/RelationController.java

@@ -37,20 +37,20 @@ import io.swagger.annotations.ApiOperation;
 @RestController
 @RequestMapping("/relation")
 @SuppressWarnings("unchecked")
-@Api(value = "医学术语关系维护相关API", tags = { "医学术语关系维护相关API" })
+@Api(value = "医学术语关系维护相关API", tags = { "知识库标准化-医学术语关系维护相关API" })
 public class RelationController {
 	
     @Autowired
     private RelationFacade relationFacade;
     
-    @ApiOperation(value = "获取医学术语关系列表[by:rengb]")
+    @ApiOperation(value = "知识库标准化-获取医学术语关系列表[by:rengb]")
     @PostMapping("/getRelationInfoList")
     @SysLogger("getRelationInfoList")
     public RespDTO<IPage<GetRelationInfoListDTO>> getRelationInfoList(@RequestBody GetRelationInfoListVO getRelationInfoListVO) {
         return RespDTO.onSuc(relationFacade.getRelationInfoList(getRelationInfoListVO));
     }
     
-    @ApiOperation(value = "医学术语关系删除或者恢复[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语关系删除或者恢复[by:rengb]")
     @PostMapping("/removeRelationInfo")
     @SysLogger("removeRelationInfo")
     @Transactional
@@ -58,14 +58,14 @@ public class RelationController {
         return RespDTO.onSuc(relationFacade.removeRelationInfo(removeRelationInfoVO));
     }
     
-    @ApiOperation(value = "获取医学术语关系详情[by:rengb]")
+    @ApiOperation(value = "知识库标准化-获取医学术语关系详情[by:rengb]")
     @PostMapping("/getRelationInfoDetail")
     @SysLogger("getRelationInfoDetail")
     public RespDTO<GetRelationInfoDetailDTO> getRelationInfoDetail(@Valid @RequestBody GetRelationInfoDetailVO getRelationInfoDetailVO) {
         return RespDTO.onSuc(relationFacade.getRelationInfoDetail(getRelationInfoDetailVO));
     }
     
-    @ApiOperation(value = "医学术语关系添加或者编辑[by:rengb]")
+    @ApiOperation(value = "知识库标准化-医学术语关系添加或者编辑[by:rengb]")
     @PostMapping("/addRelationInfo")
     @SysLogger("addRelationInfo")
     @Transactional

+ 0 - 19
knowledgeman-service/src/main/resources/mapper/BodypartMapper.xml

@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.diagbot.mapper.BodypartMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.diagbot.entity.Bodypart">
-        <id column="id" property="id" />
-        <result column="is_deleted" property="isDeleted" />
-        <result column="gmt_created" property="gmtCreated" />
-        <result column="gmt_modified" property="gmtModified" />
-        <result column="creator" property="creator" />
-        <result column="modifier" property="modifier" />
-        <result column="sub_bodypart" property="subBodypart" />
-        <result column="sub_order" property="subOrder" />
-        <result column="bodypart" property="bodypart" />
-        <result column="order_no" property="orderNo" />
-    </resultMap>
-
-</mapper>