Forráskód Böngészése

智能分诊科室显示可配置

gaodm 5 éve
szülő
commit
6ce15db904

+ 4 - 0
docs/027.20191228智能分诊显示方案/init_tran.sql

@@ -0,0 +1,4 @@
+use `sys-tran`;
+
+ALTER TABLE `tran_hospital_dept`
+ADD COLUMN `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序号' AFTER `status`;

+ 3 - 3
tran-service/src/main/java/com/diagbot/facade/HospitalDeptFacade.java

@@ -76,7 +76,8 @@ public class HospitalDeptFacade extends HospitalDeptServiceImpl {
         hospitalDeptQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("hospital_code", hospitalDeptVO.getHospitalCode())
                 .eq("status", StatusEnum.Enable.getKey())
-                .in("concept_dept_name", hospitalDeptVO.getConceptNames());
+                .in("concept_dept_name", hospitalDeptVO.getConceptNames())
+                .orderByAsc("concept_dept_name", "order_no");
         List<HospitalDept> hospitalDeptList = this.list(hospitalDeptQueryWrapper);
         if (ListUtil.isNotEmpty(hospitalDeptList)) {
             Map<String, List<HospitalDept>> hospitalDeptMap
@@ -98,7 +99,6 @@ public class HospitalDeptFacade extends HospitalDeptServiceImpl {
     }
 
     /**
-     *
      * @param hospitalCodeVo
      * @return
      */
@@ -108,7 +108,7 @@ public class HospitalDeptFacade extends HospitalDeptServiceImpl {
                 .eq("hospital_code", hospitalCodeVo.getHospitalCode())
                 .eq("status", StatusEnum.Enable.getKey())
                 .like(StringUtil.isNotBlank(hospitalCodeVo.getThirdpartyName()),
-                        "name",hospitalCodeVo.getThirdpartyName())
+                        "name", hospitalCodeVo.getThirdpartyName())
                 .like(StringUtil.isNotBlank(hospitalCodeVo.getDeptInfoName()),
                         "concept_dept_name", hospitalCodeVo.getDeptInfoName());
         List<HospitalDept> hospitalDeptList = this.list(hospitalDeptQueryWrapper);

+ 6 - 0
triage-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -3,11 +3,14 @@ package com.diagbot.client;
 import com.diagbot.client.hystrix.TranServiceHystrix;
 import com.diagbot.dto.HospitalDeptDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.SysSetInfoDTO;
 import com.diagbot.vo.HospitalDeptVO;
+import com.diagbot.vo.HospitalSetVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
+import javax.validation.Valid;
 import java.util.List;
 import java.util.Map;
 
@@ -20,4 +23,7 @@ import java.util.Map;
 public interface TranServiceClient {
     @PostMapping(value = "/hospitalDeptInfo/hospitalDeptByConceptNames")
     RespDTO<Map<String, List<HospitalDeptDTO>>> hospitalDeptByConceptNames(@RequestBody HospitalDeptVO hospitalDeptVO);
+
+    @PostMapping("/sysSet/getSysSetInfoDatas")
+    RespDTO<List<SysSetInfoDTO>> getSysSetInfoDatas(@Valid @RequestBody HospitalSetVO hospitalSetVO);
 }

+ 9 - 0
triage-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -3,11 +3,14 @@ package com.diagbot.client.hystrix;
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.HospitalDeptDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.SysSetInfoDTO;
 import com.diagbot.vo.HospitalDeptVO;
+import com.diagbot.vo.HospitalSetVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 
+import javax.validation.Valid;
 import java.util.List;
 import java.util.Map;
 
@@ -24,4 +27,10 @@ public class TranServiceHystrix implements TranServiceClient {
         log.error("【hystrix】调用{}异常", "hospitalDeptByConceptNames");
         return null;
     }
+
+    @Override
+    public RespDTO<List<SysSetInfoDTO>> getSysSetInfoDatas(@Valid HospitalSetVO hospitalSetVO) {
+        log.error("【hystrix】调用{}异常", "getSysSetInfoDatas");
+        return null;
+    }
 }

+ 39 - 0
triage-service/src/main/java/com/diagbot/dto/SysSetInfoDTO.java

@@ -0,0 +1,39 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年6月12日 下午3:31:22
+ */
+@Setter
+@Getter
+public class SysSetInfoDTO {
+
+    /**
+     * 医院编码
+     */
+    private String hospitalCode;
+
+    /**
+     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
+     */
+    private Integer sysType;
+
+    /**
+     * 配置名称
+     */
+    private String name;
+    
+    /**
+     * 配置编码
+     */
+    private String code;
+    /**
+     * 配置值
+     */
+    private String value;
+}

+ 35 - 0
triage-service/src/main/java/com/diagbot/facade/SysSetFacade.java

@@ -0,0 +1,35 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.TranServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.SysSetInfoDTO;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.HospitalSetVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年6月18日 上午10:16:47
+ */
+@Component
+public class SysSetFacade {
+
+    @Autowired
+    TranServiceClient tranServiceClient;
+
+    /**
+     * 根据医院code获取配置信息
+     *
+     * @return
+     */
+    public List<SysSetInfoDTO> getSysSetInfoData(HospitalSetVO hospitalSetVO) {
+        RespDTO<List<SysSetInfoDTO>> sysSetInfoLists = tranServiceClient.getSysSetInfoDatas(hospitalSetVO);
+        RespDTOUtil.respNGDeal(sysSetInfoLists, "获取配置数据失败!");
+        return sysSetInfoLists.data;
+    }
+
+}

+ 38 - 0
triage-service/src/main/java/com/diagbot/vo/HospitalSetVO.java

@@ -0,0 +1,38 @@
+package com.diagbot.vo;
+
+import com.diagbot.enums.SysTypeEnum;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年6月12日 下午3:30:26
+ */
+@Setter
+@Getter
+public class HospitalSetVO {
+
+	private String hospitalCode;
+
+	/**
+	 * 访问的系统类型
+	 * (1, "user-service"),(2, "diagbotman-service"),(3, "uaa-service"),(4, "log-service"),
+	 * (5, "bi-service"),(6, "ltapi-service"),(7, "feedback-service"),(8, "icss-old-service"),
+	 * (9, "triage-service"),(10, "appkey"),(11, "icss-service"),(12, "icssman-service"),(13, "knowledgeman-service"),
+	 * (14, "tran-service"),(15, "aipt-service"),(16, "data-service"),(17, "prec-service");
+	 */
+	@ApiModelProperty(hidden = true)
+	private Integer sysType = SysTypeEnum.TRIAGE_SERVICE.getKey();
+
+	/**
+	 * 配置名称
+	 */
+	private String name;
+	/**
+	 * 配置编码
+	 */
+	private String code;
+}

+ 44 - 0
triage-service/src/main/java/com/diagbot/web/SysSetController.java

@@ -0,0 +1,44 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.SysSetInfoDTO;
+import com.diagbot.facade.SysSetFacade;
+import com.diagbot.vo.HospitalSetVO;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * <p>
+ * 医院所有配置信息 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-06-18
+ */
+@RestController
+@RequestMapping("/sysSet")
+@Api(value = "配置信息API", tags = { "配置信息API" })
+@SuppressWarnings("unchecked")
+public class SysSetController {
+
+    @Autowired
+    SysSetFacade sysSetFacade;
+
+    @ApiOperation(value = "根据医院编码获取配置信息[by:wangfeng]", notes = "hospitalCode :医院code  必填<br> ")
+    @PostMapping("/getSysSetInfoDatas")
+    @SysLogger("getSysSetInfoDatas")
+    public RespDTO<List<SysSetInfoDTO>> getSysSetInfoDatas(@Valid @RequestBody HospitalSetVO hospitalSetVO) {
+        List<SysSetInfoDTO> data = sysSetFacade.getSysSetInfoData(hospitalSetVO);
+        return RespDTO.onSuc(data);
+    }
+}