Browse Source

版本管理移到医学术语维护

gaodm 5 years ago
parent
commit
dd4df551aa

+ 34 - 0
data-service/src/main/java/com/diagbot/facade/VersionInfoFacade.java

@@ -0,0 +1,34 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.enums.ProductTypeEnum;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.VersionVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author wangfeng
+ * @Description: 版本信息
+ * @date 2018年11月21日 上午11:07:01
+ */
+@Component
+public class VersionInfoFacade {
+
+    @Autowired
+    private AiptServiceClient aiptServiceClient;
+    /**
+     * 查询版本信息
+     *
+     * @return
+     */
+    public VersionWrapperDTO getVersionInfoAll() {
+        VersionVO versionVO = new VersionVO();
+        versionVO.setProductType(ProductTypeEnum.DATA.getKey());
+        RespDTO<VersionWrapperDTO> res = aiptServiceClient.getVersionInfoAlls(versionVO);
+        RespDTOUtil.respNGDealCover(res, "获取不到版本信息!");
+        return res.data;
+    }
+}

+ 39 - 0
data-service/src/main/java/com/diagbot/web/VersionInfoController.java

@@ -0,0 +1,39 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.facade.VersionInfoFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 版本信息(关于) 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2018-11-20
+ */
+@RestController
+@RequestMapping("/versionInfo")
+@Api(value = "版本信息(关于)API[by:wangfeng]", tags = { "WF——版本信息(关于)API" })
+@SuppressWarnings("unchecked")
+public class VersionInfoController {
+
+    @Autowired
+    VersionInfoFacade versionInfoFacade;
+
+    @ApiOperation(value = "获取版本信息[by:wangfeng]", notes = "获取版本信息")
+    @PostMapping("/getVersionInfoAlls")
+    @SysLogger("getVersionInfoAlls")
+    public RespDTO<VersionWrapperDTO> getVersionInfoAlls() {
+        VersionWrapperDTO data = versionInfoFacade.getVersionInfoAll();
+        return RespDTO.onSuc(data);
+    }
+
+}

+ 9 - 0
prec-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -7,10 +7,12 @@ import com.diagbot.dto.ConceptRetrievalDTO;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionWrapperDTO;
 import com.diagbot.vo.ConceptSearchVO;
 import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.RetrievalVO;
+import com.diagbot.vo.VersionVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -70,4 +72,11 @@ public interface AiptServiceClient {
      */
     @PostMapping("/concept/getConceptMap")
     RespDTO<Map<Long, String>> getConceptMap(@RequestBody ConceptSearchVO conceptSearchVO);
+
+
+    /**
+     * 获取版本信息
+     */
+    @PostMapping("/versionInfo/getVersionInfoAlls")
+    RespDTO<VersionWrapperDTO> getVersionInfoAlls(@RequestBody VersionVO versionVO);
 }

+ 11 - 0
prec-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -7,11 +7,13 @@ import com.diagbot.dto.ConceptRetrievalDTO;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionWrapperDTO;
 import com.diagbot.vo.ConceptSearchVO;
 import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.GetTopPatientInfoVO;
 
 import com.diagbot.vo.RetrievalVO;
+import com.diagbot.vo.VersionVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -63,4 +65,13 @@ public class AiptServiceHystrix implements AiptServiceClient {
         log.error("【hystrix】调用{}异常", "getConceptMap");
         return null;
     }
+
+    /**
+     * 获取版本信息
+     */
+    @Override
+    public RespDTO<VersionWrapperDTO> getVersionInfoAlls(VersionVO versionVO){
+        log.error("【hystrix】调用{}异常", "getVersionInfoAlls");
+        return null;
+    }
 }

+ 34 - 0
prec-service/src/main/java/com/diagbot/facade/VersionInfoFacade.java

@@ -0,0 +1,34 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.enums.ProductTypeEnum;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.VersionVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author wangfeng
+ * @Description: 版本信息
+ * @date 2018年11月21日 上午11:07:01
+ */
+@Component
+public class VersionInfoFacade {
+
+    @Autowired
+    private AiptServiceClient aiptServiceClient;
+    /**
+     * 查询版本信息
+     *
+     * @return
+     */
+    public VersionWrapperDTO getVersionInfoAll() {
+        VersionVO versionVO = new VersionVO();
+        versionVO.setProductType(ProductTypeEnum.PREC.getKey());
+        RespDTO<VersionWrapperDTO> res = aiptServiceClient.getVersionInfoAlls(versionVO);
+        RespDTOUtil.respNGDealCover(res, "获取不到版本信息!");
+        return res.data;
+    }
+}

+ 39 - 0
prec-service/src/main/java/com/diagbot/web/VersionInfoController.java

@@ -0,0 +1,39 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.facade.VersionInfoFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 版本信息(关于) 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2018-11-20
+ */
+@RestController
+@RequestMapping("/versionInfo")
+@Api(value = "版本信息(关于)API[by:wangfeng]", tags = { "WF——版本信息(关于)API" })
+@SuppressWarnings("unchecked")
+public class VersionInfoController {
+
+    @Autowired
+    VersionInfoFacade versionInfoFacade;
+
+    @ApiOperation(value = "获取版本信息[by:wangfeng]", notes = "获取版本信息")
+    @PostMapping("/getVersionInfoAlls")
+    @SysLogger("getVersionInfoAlls")
+    public RespDTO<VersionWrapperDTO> getVersionInfoAlls() {
+        VersionWrapperDTO data = versionInfoFacade.getVersionInfoAll();
+        return RespDTO.onSuc(data);
+    }
+
+}

+ 34 - 0
triage-service/src/main/java/com/diagbot/facade/VersionInfoFacade.java

@@ -0,0 +1,34 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.enums.ProductTypeEnum;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.VersionVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author wangfeng
+ * @Description: 版本信息
+ * @date 2018年11月21日 上午11:07:01
+ */
+@Component
+public class VersionInfoFacade {
+
+    @Autowired
+    private AiptServiceClient aiptServiceClient;
+    /**
+     * 查询版本信息
+     *
+     * @return
+     */
+    public VersionWrapperDTO getVersionInfoAll() {
+        VersionVO versionVO = new VersionVO();
+        versionVO.setProductType(ProductTypeEnum.TRIAGE.getKey());
+        RespDTO<VersionWrapperDTO> res = aiptServiceClient.getVersionInfoAlls(versionVO);
+        RespDTOUtil.respNGDealCover(res, "获取不到版本信息!");
+        return res.data;
+    }
+}

+ 39 - 0
triage-service/src/main/java/com/diagbot/web/VersionInfoController.java

@@ -0,0 +1,39 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.facade.VersionInfoFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 版本信息(关于) 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2018-11-20
+ */
+@RestController
+@RequestMapping("/versionInfo")
+@Api(value = "版本信息(关于)API[by:wangfeng]", tags = { "WF——版本信息(关于)API" })
+@SuppressWarnings("unchecked")
+public class VersionInfoController {
+
+    @Autowired
+    VersionInfoFacade versionInfoFacade;
+
+    @ApiOperation(value = "获取版本信息[by:wangfeng]", notes = "获取版本信息")
+    @PostMapping("/getVersionInfoAlls")
+    @SysLogger("getVersionInfoAlls")
+    public RespDTO<VersionWrapperDTO> getVersionInfoAlls() {
+        VersionWrapperDTO data = versionInfoFacade.getVersionInfoAll();
+        return RespDTO.onSuc(data);
+    }
+
+}