Browse Source

Merge remote-tracking branch 'origin/dev/prec20191118_new' into dev/prec20191118_new

gaodm 5 years atrás
parent
commit
9ec487e161

+ 8 - 1
docs/022.20191118预问诊新对接/init_tran.sql

@@ -6,11 +6,18 @@ insert into `tran_sys_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator
 insert into `tran_sys_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A011','0','17','杭州城东医院','default_dept','F01','默认科室(F1全科)');
 insert into `tran_sys_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A012','0','17','江干区九堡医院','default_dept','F02','默认科室(F2儿科)');
 insert into `tran_sys_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A013','0','17','杭州市江干区中医院','default_dept','F01','默认科室((F1全科)');
-insert into `tran_sys_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','江干医院','default_dept','F01','默认科室(F1全科)');
+insert into `tran_sys_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','集团医院','default_dept','F01','默认科室(F1全科)');
 insert into `tran_sys_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','无挂号信息','patientinfo','1','是否支持(1是,0否)');
 insert into `tran_sys_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','显示集团下级医院','junior_show','1','是否显示(1是,0否)');
 insert into `tran_sys_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A014','0','17','杭州二院','default_dept','D01',NULL);
 
+insert into `tran_sys_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values( 'N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','儿童体质测试','constitution_show','1','是否显示(1是,0否)');
+insert into `tran_sys_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values( 'N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','症状情况','symptoms_show','1','是否显示(1是,0否)');
+insert into `tran_sys_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values( 'N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','诊疗情况','diagnosis_show','1','是否显示(1是,0否)');
+insert into `tran_sys_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values( 'N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','其他病史','omhistory_show','1','是否显示(1是,0否)');
+insert into `tran_sys_set` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_code`, `plan`, `sys_type`, `name`, `code`, `value`, `remark`) values( 'N','1970-01-01 12:00:00','1970-01-01 12:00:00',NULL,NULL,'A010','0','17','补充内容','replenish_show','1','是否显示(1是,0否)');
+
+
 
 
 insert into `tran_hospital_dept` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `code`, `name`, `hospital_code`, `hospital_name`, `concept_dept_name`, `status`, `remark`) values('N','1970-01-01 12:00:00','1970-01-01 12:00:00','0','0','F01','全科','A010','江干医院','全科','1',NULL);

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

@@ -3,10 +3,12 @@ package com.diagbot.client;
 import com.diagbot.client.hystrix.TranServiceHystrix;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.SignInDTO;
+import com.diagbot.dto.SysHospitalDTO;
 import com.diagbot.dto.SysSetInfoDTO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.InquiryQuoteVO;
 import com.diagbot.vo.SignInVO;
+import com.diagbot.vo.SysHospitalCodeVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -41,4 +43,11 @@ public interface TranServiceClient {
      */
     @PostMapping("/patientInfo/inquiryQuote")
     RespDTO<InquiryQuoteVO> inquiryQuote(@RequestBody InquiryQuoteVO inquiryQuoteVO);
+
+    /**
+     *
+     * @param sysHospitalCodeVO
+     */
+    @PostMapping("/sysSet/getHospitalDatas")
+    RespDTO<SysHospitalDTO> getHospitalDeptInfoData(SysHospitalCodeVO sysHospitalCodeVO);
 }

+ 8 - 0
prec-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -4,7 +4,9 @@ import java.util.List;
 
 import javax.validation.Valid;
 
+import com.diagbot.dto.SysHospitalDTO;
 import com.diagbot.vo.InquiryQuoteVO;
+import com.diagbot.vo.SysHospitalCodeVO;
 import org.springframework.stereotype.Component;
 
 import com.diagbot.client.TranServiceClient;
@@ -41,4 +43,10 @@ public class TranServiceHystrix implements TranServiceClient {
         log.error("【hystrix】调用{}异常", "inquiryQuote");
         return null;
     }
+
+    @Override
+    public RespDTO<SysHospitalDTO> getHospitalDeptInfoData(SysHospitalCodeVO sysHospitalCodeVO) {
+        log.error("【hystrix】调用{}异常", "getHospitalDeptInfoData");
+        return null;
+    }
 }

+ 25 - 0
prec-service/src/main/java/com/diagbot/dto/SysHospitalDTO.java

@@ -0,0 +1,25 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2019-11-18 18:29
+ */
+@Getter
+@Setter
+public class SysHospitalDTO {
+
+    /**
+     * 顶级集团信息
+     */
+    private  SysHospitalDeptInfoDTO superiorsInfo;
+    /**
+     * 下级医院信息
+     */
+    private List<SysHospitalDeptInfoDTO> juniorHospital ;
+}

+ 19 - 0
prec-service/src/main/java/com/diagbot/dto/SysHospitalDeptInfoDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2019-11-18 18:33
+ */
+@Getter
+@Setter
+public class SysHospitalDeptInfoDTO {
+
+    private  String hospitalCode;
+    private  String hospitalName;
+    private  String deptCode;
+    private  String deptName;
+}

+ 46 - 35
prec-service/src/main/java/com/diagbot/facade/SysSetFacade.java

@@ -1,35 +1,46 @@
-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:24:58
- */
-@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;
-    }
-
-}
+package com.diagbot.facade;
+
+import com.diagbot.client.TranServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.SysHospitalDTO;
+import com.diagbot.dto.SysSetInfoDTO;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.HospitalSetVO;
+import com.diagbot.vo.SysHospitalCodeVO;
+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:24:58
+ */
+@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;
+    }
+
+    /**
+     * @param sysHospitalCodeVO
+     * @return
+     */
+    public SysHospitalDTO getHospitalDeptInfoData(SysHospitalCodeVO sysHospitalCodeVO) {
+        RespDTO<SysHospitalDTO> sysHospitalDTO = tranServiceClient.getHospitalDeptInfoData(sysHospitalCodeVO);
+        RespDTOUtil.respNGDeal(sysHospitalDTO, "医院编码获取医院信息及科室信息失败!");
+        return sysHospitalDTO.data;
+    }
+}

+ 18 - 0
prec-service/src/main/java/com/diagbot/vo/SysHospitalCodeVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2019-11-18 19:17
+ */
+@Getter
+@Setter
+public class SysHospitalCodeVO {
+    @NotBlank(message = "请输入医院编码")
+    private  String hospitalCode;
+}

+ 55 - 44
prec-service/src/main/java/com/diagbot/web/SysSetController.java

@@ -1,44 +1,55 @@
-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);
-    }
-}
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.SysHospitalDTO;
+import com.diagbot.dto.SysSetInfoDTO;
+import com.diagbot.facade.SysSetFacade;
+import com.diagbot.vo.HospitalSetVO;
+import com.diagbot.vo.SysHospitalCodeVO;
+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);
+    }
+
+    @ApiOperation(value = "根据医院编码获取医院信息及科室信息[by:wangfeng]", notes = "hospitalCode :医院code  必填<br>" +
+            "juniorHospitalCode:请输入下级编码 必填<br> ;defaultDeptCode:请输入部门编码 必填<br>sysType :请输入系统编号,必填<br>")
+    @PostMapping("/getHospitalDatas")
+    @SysLogger("getHospitalDatas")
+    public RespDTO<SysHospitalDTO> getHospitalDatas(@Valid @RequestBody SysHospitalCodeVO sysHospitalCodeVO) {
+        SysHospitalDTO data = sysSetFacade.getHospitalDeptInfoData(sysHospitalCodeVO);
+        return RespDTO.onSuc(data);
+    }
+}