Browse Source

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

# Conflicts:
#	icss-service/src/main/java/com/diagbot/client/AiptServiceClient.java
#	icss-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java
gaodm 6 years ago
parent
commit
0dd09ce673
53 changed files with 1183 additions and 1040 deletions
  1. 12 0
      aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java
  2. 9 0
      aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java
  3. 156 0
      aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java
  4. 29 15
      aipt-service/src/main/java/com/diagbot/enums/DisTypeEnum.java
  5. 2 2
      aipt-service/src/main/java/com/diagbot/facade/DisTypeFacade.java
  6. 50 0
      aipt-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java
  7. 56 0
      aipt-service/src/main/java/com/diagbot/vo/GetTopPatientInfoVO.java
  8. 49 0
      aipt-service/src/main/java/com/diagbot/web/PatientInfoController.java
  9. 1 1
      config-server/src/main/resources/shared/knowledgeman-service-dev.yml
  10. 1 1
      config-server/src/main/resources/shared/knowledgeman-service-local.yml
  11. 32 0
      icss-service/src/main/java/com/diagbot/client/AiptServiceClient.java
  12. 7 17
      icss-service/src/main/java/com/diagbot/client/TranServiceClient.java
  13. 33 8
      icss-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java
  14. 9 14
      icss-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java
  15. 22 0
      icss-service/src/main/java/com/diagbot/dto/EvaluationDTO.java
  16. 5 5
      icss-service/src/main/java/com/diagbot/dto/PushDTO.java
  17. 0 164
      icss-service/src/main/java/com/diagbot/entity/EvaluationModuleMapping.java
  18. 0 166
      icss-service/src/main/java/com/diagbot/entity/IndexConfig.java
  19. 0 203
      icss-service/src/main/java/com/diagbot/entity/IndexData.java
  20. 30 23
      icss-service/src/main/java/com/diagbot/facade/EvaluationModuleMappingFacade.java
  21. 13 20
      icss-service/src/main/java/com/diagbot/facade/IndexConfigFacade.java
  22. 13 33
      icss-service/src/main/java/com/diagbot/facade/IndexDataFacade.java
  23. 5 22
      icss-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java
  24. 14 13
      icss-service/src/main/java/com/diagbot/facade/PushFacade.java
  25. 0 16
      icss-service/src/main/java/com/diagbot/mapper/EvaluationModuleMappingMapper.java
  26. 0 16
      icss-service/src/main/java/com/diagbot/mapper/IndexConfigMapper.java
  27. 0 26
      icss-service/src/main/java/com/diagbot/mapper/IndexDataMapper.java
  28. 0 16
      icss-service/src/main/java/com/diagbot/service/EvaluationModuleMappingService.java
  29. 0 16
      icss-service/src/main/java/com/diagbot/service/IndexConfigService.java
  30. 0 24
      icss-service/src/main/java/com/diagbot/service/IndexDataService.java
  31. 0 20
      icss-service/src/main/java/com/diagbot/service/impl/EvaluationModuleMappingServiceImpl.java
  32. 0 20
      icss-service/src/main/java/com/diagbot/service/impl/IndexConfigServiceImpl.java
  33. 0 35
      icss-service/src/main/java/com/diagbot/service/impl/IndexDataServiceImpl.java
  34. 18 0
      icss-service/src/main/java/com/diagbot/vo/EvaluationdiseaseNameVO.java
  35. 16 0
      icss-service/src/main/java/com/diagbot/vo/IndexConfigdiseaseNameVO.java
  36. 16 13
      icss-service/src/main/java/com/diagbot/web/EvaluationModuleMappingController.java
  37. 14 13
      icss-service/src/main/java/com/diagbot/web/IndexConfigController.java
  38. 0 20
      icss-service/src/main/resources/mapper/EvaluationModuleMappingMapper.xml
  39. 0 20
      icss-service/src/main/resources/mapper/IndexConfigMapper.xml
  40. 0 75
      icss-service/src/main/resources/mapper/IndexDataMapper.xml
  41. 3 3
      knowledgeman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  42. 43 0
      knowledgeman-service/src/main/java/com/diagbot/dto/ScaleContentPageDTO.java
  43. 83 0
      knowledgeman-service/src/main/java/com/diagbot/entity/ScaleContent.java
  44. 134 0
      knowledgeman-service/src/main/java/com/diagbot/facade/ScaleContentFacade.java
  45. 35 0
      knowledgeman-service/src/main/java/com/diagbot/mapper/ScaleContentMapper.java
  46. 35 0
      knowledgeman-service/src/main/java/com/diagbot/service/ScaleContentService.java
  47. 33 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/ScaleContentServiceImpl.java
  48. 22 0
      knowledgeman-service/src/main/java/com/diagbot/vo/DeleteScaleVO.java
  49. 17 0
      knowledgeman-service/src/main/java/com/diagbot/vo/ScaleContentPageVO.java
  50. 27 0
      knowledgeman-service/src/main/java/com/diagbot/vo/ScaleContentSaveVO.java
  51. 43 0
      knowledgeman-service/src/main/java/com/diagbot/vo/ScaleContentVO.java
  52. 69 0
      knowledgeman-service/src/main/java/com/diagbot/web/ScaleContentController.java
  53. 27 0
      knowledgeman-service/src/main/resources/mapper/ScaleContentMapper.xml

+ 12 - 0
aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -2,10 +2,13 @@ package com.diagbot.client;
 
 import com.diagbot.client.hystrix.TranServiceHystrix;
 import com.diagbot.dto.GetDiseaseIcdDTO;
+import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.HospitalDeptInfoDTO;
 import com.diagbot.dto.HospitalDeptInfoVO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -36,4 +39,13 @@ public interface TranServiceClient {
      */
     @PostMapping("/diseaseIcd/getDiseaseIcds")
     RespDTO<List<GetDiseaseIcdDTO>> getDiseaseIcds(@RequestBody GetDiseaseIcdVO getDiseaseIcdVO);
+    
+    /**
+     * 获取页面顶部病人医生科室信息
+     *
+     * @param getTopPatientInfoVO
+     * @return
+     */
+    @PostMapping("/patientInfo/getTopPatientInfo")
+    RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
 }

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

@@ -2,10 +2,13 @@ package com.diagbot.client.hystrix;
 
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.GetDiseaseIcdDTO;
+import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.HospitalDeptInfoDTO;
 import com.diagbot.dto.HospitalDeptInfoVO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
@@ -30,4 +33,10 @@ public class TranServiceHystrix implements TranServiceClient {
         log.error("【hystrix】调用{}异常", "getDiseaseIcds");
         return null;
     }
+    
+    @Override
+    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(GetTopPatientInfoVO getTopPatientInfoVO) {
+        log.error("【hystrix】调用{}异常", "getTopPatientInfo");
+        return null;
+    }
 }

+ 156 - 0
aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java

@@ -0,0 +1,156 @@
+package com.diagbot.dto;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description
+ * @author rgb
+ * @time 2018年11月19日下午4:57:43
+ */
+@ApiModel(value="页面顶部病人医生科室信息查询接口出参")
+@Getter
+@Setter
+public class GetTopPatientInfoDTO {
+	
+	/**
+	 * 医院id
+	 */
+	@ApiModelProperty(value="医院id")
+	private Long hospitalId;
+	
+	/**
+     * 医院编码
+     */
+	@ApiModelProperty(value="医院编码")
+    private String hospitalCode;
+
+    /**
+     * 医院名称
+     */
+	@ApiModelProperty(value="医院名称")
+    private String hospitalName;
+    
+    /**
+	 * 医院科室id
+	 */
+	@ApiModelProperty(value="医院科室id")
+	private Long hospitalDeptId;
+	
+    /**
+	 * 自己科室id
+	 */
+	@ApiModelProperty(value="自己科室id")
+	private Long selfDeptId;
+	
+	/**
+	 * 自己科室名称
+	 */
+	@ApiModelProperty(value="自己科室名称")
+	private String selfDeptName;
+    
+    /**
+     * 医院科室编码
+     */
+	@ApiModelProperty(value="医院科室编码")
+    private String hospitalDeptCode;
+
+    /**
+     * 医院科室名称
+     */
+	@ApiModelProperty(value="医院科室名称")
+    private String hospitalDeptName;
+    
+    /**
+	 * 医生id
+	 */
+	@ApiModelProperty(value="医生id")
+	private Long doctorId;
+	
+	/**
+     * 医生编码
+     */
+	@ApiModelProperty(value="医生编码")
+    private String doctorCode;
+
+    /**
+     * 医生姓名
+     */
+	@ApiModelProperty(value="医生姓名")
+    private String doctorName;
+    
+    /**
+   	 * 病人id
+   	 */
+	@ApiModelProperty(value="病人id")
+   	private Long patientId;
+   	
+   	/**
+     * 病人编号
+     */
+	@ApiModelProperty(value="病人编号")
+    private String patientCode;
+
+    /**
+     * 病人姓名
+     */
+	@ApiModelProperty(value="病人姓名")
+    private String patientName;
+
+    /**
+     * 病人性别
+     */
+	@ApiModelProperty(value="病人性别")
+    private String patientSex;
+    
+    /**
+     * 病人年龄
+     */
+	@ApiModelProperty(value="病人年龄")
+    private Integer patientAge;
+    
+    /**
+     * 病人证件号码
+     */
+	@ApiModelProperty(value="病人证件号码")
+    private String patientIdNo;
+
+	/**
+	 * 系统时间
+	 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value="系统时间")
+	private Date systemTime;
+	
+	/**
+     * 出生日期
+     */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value="出生日期")
+    private Date birthday;
+	
+	/**
+     * 门诊号
+     */
+	@ApiModelProperty(value="门诊号")
+	private String recordId;
+	
+    /**
+     * 模式分类
+     */
+	@ApiModelProperty(value="模式分类")
+    private Integer modeClassify;
+
+    /**
+     * 模式值
+     */
+	@ApiModelProperty(value="模式值")
+    private Integer modeValue;
+	
+}

+ 29 - 15
aipt-service/src/main/java/com/diagbot/enums/DisTypeEnum.java

@@ -1,35 +1,49 @@
 package com.diagbot.enums;
 
+import com.diagbot.core.KeyedNamed;
 import lombok.Setter;
 
 /**
- * 
- * @author zhoutg
- * @Description: 诊断类型
- * @date 2018年11月21日 下午2:31:42
+ * @Description: 推送类型
+ * @Author:zhaops
+ * @time: 2019/3/14 11:28
  */
-public enum DisTypeEnum  {
-    CHRONIC("慢病"),
-    EMERGENCY("急诊");
+public enum DisTypeEnum implements KeyedNamed {
+    CHRONIC(1, "慢病"),
+    EMERGENCY(2, "急诊");
 
     @Setter
-    private String typeName;
+    private Integer key;
 
-    DisTypeEnum(String typeName) {
-        this.typeName = typeName;
+    @Setter
+    private String name;
+
+    DisTypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
     }
 
-    public static DisTypeEnum getEnum(String typeName) {
+    public static DisTypeEnum getEnum(Integer key) {
         for (DisTypeEnum item : DisTypeEnum.values()) {
-            if (item.typeName.equals(typeName)) {
+            if (item.key == key) {
                 return item;
             }
         }
         return null;
     }
 
-    public String getTypeName() {
-        return this.typeName;
+    public static String getName(Integer key) {
+        DisTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
     }
-}
 
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 2 - 2
aipt-service/src/main/java/com/diagbot/facade/DisTypeFacade.java

@@ -54,11 +54,11 @@ public class DisTypeFacade extends DisTypeServiceImpl {
         }
         Map<String, List<DisDTO>> map = EntityUtil.makeEntityListMap(data, "typeName");
         if (map != null) {
-            List<DisDTO> chr = map.get(DisTypeEnum.CHRONIC.getTypeName()); //放入慢病列表
+            List<DisDTO> chr = map.get(DisTypeEnum.CHRONIC.getName()); //放入慢病列表
             if (ListUtil.isNotEmpty(chr)) {
                 res.setChronic(chr);
             }
-            List<DisDTO> eme = map.get(DisTypeEnum.EMERGENCY.getTypeName()); //放入急诊列表
+            List<DisDTO> eme = map.get(DisTypeEnum.EMERGENCY.getName()); //放入急诊列表
             if (ListUtil.isNotEmpty(eme)) {
                 res.setEmergency(eme);
             }

+ 50 - 0
aipt-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -0,0 +1,50 @@
+package com.diagbot.facade;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import com.diagbot.client.TranServiceClient;
+import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.Concept;
+import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.ConceptBaseVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
+/**
+ * @Description: 患者业务逻辑
+ * @author: wangyu
+ * @time: 2018/11/19 13:19
+ */
+@Component
+public class PatientInfoFacade {
+
+	@Autowired
+    private ConceptFacade conceptFacade;
+    @Autowired
+    TranServiceClient tranServiceClient;
+
+    /**
+     * 页面顶部病人医生科室信息查询
+     *
+     * @param getTopPatientInfoVO
+     * @return
+     */
+    public GetTopPatientInfoDTO getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO) {
+        RespDTO<GetTopPatientInfoDTO> respDTO = tranServiceClient.getTopPatientInfo(getTopPatientInfoVO);
+        RespDTOUtil.respNGDealCover(respDTO, "获取页面顶部病人医生科室信息失败");
+
+        GetTopPatientInfoDTO getTopPatientInfoDTO = respDTO.data;
+        
+        ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
+        conceptBaseVO.setLibType(LexiconTypeEnum.DEPARTMENT.getKey());
+        conceptBaseVO.setName(getTopPatientInfoDTO.getSelfDeptName());
+        Concept concept = conceptFacade.exist(conceptBaseVO);
+        getTopPatientInfoDTO.setSelfDeptId(concept.getId());
+        
+        return getTopPatientInfoDTO;
+    }
+
+}

+ 56 - 0
aipt-service/src/main/java/com/diagbot/vo/GetTopPatientInfoVO.java

@@ -0,0 +1,56 @@
+package com.diagbot.vo;
+
+import javax.validation.constraints.NotBlank;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description
+ * @author rgb
+ * @time 2018年11月19日下午4:58:37
+ */
+@ApiModel(value="页面顶部病人医生科室信息查询接口传参")
+@Getter
+@Setter
+public class GetTopPatientInfoVO {
+	
+	/**
+	 * 医院编号
+	 */
+	@ApiModelProperty(value="医院编号",required=true)
+	@NotBlank(message="医院编号必填")
+	private String hospitalCode;
+	
+	/**
+	 * 医院科室编号
+	 */
+	@ApiModelProperty(value="医院科室编号",required=true)
+	@NotBlank(message="医院科室编号必填")
+	private String hospitalDeptCode;
+	
+	/**
+	 * 医院医生编号
+	 */
+	@ApiModelProperty(value="医院医生编号",required=true)
+	@NotBlank(message="医院医生编号必填")
+	private String doctorCode;
+	
+	/**
+	 * 医院患者编号
+	 */
+	@ApiModelProperty(value="医院患者编号",required=true)
+	@NotBlank(message="医院患者编号必填")
+	private String patientCode;
+	
+	/**
+	 * 门诊号
+	 */
+	@ApiModelProperty(value="门诊号",required=true)
+	@NotBlank(message="门诊号必填")
+	private String recordId;
+	
+
+}

+ 49 - 0
aipt-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -0,0 +1,49 @@
+package com.diagbot.web;
+
+import javax.validation.Valid;
+
+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.GetTopPatientInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.PatientInfoFacade;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import springfox.documentation.annotations.ApiIgnore;
+
+/**
+ * <p>
+ * 患者信息表 前端控制器
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-19
+ */
+@RestController
+@RequestMapping("/patientInfo")
+@Api(value = "患者信息API", tags = { "知识库标准化-患者信息API" })
+@SuppressWarnings("unchecked")
+@ApiIgnore
+public class PatientInfoController {
+    @Autowired
+    private PatientInfoFacade patientInfoFacade;
+
+    @ApiOperation(value = "知识库标准化-页面顶部病人医生科室信息——查询[by:rengb]",
+            notes = "hospitalCode:医院编号,必填<br>" +
+                    "hospitalDeptCode:医院科室编号,必填<br>" +
+                    "doctorCode:医院医生编号,必填<br>" +
+                    "patientCode:医院患者编号,必填<br>")
+    @PostMapping("/getTopPatientInfo")
+    @SysLogger("getTopPatientInfo")
+    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@Valid @RequestBody GetTopPatientInfoVO getTopPatientInfoVO) {
+        return RespDTO.onSuc(patientInfoFacade.getTopPatientInfo(getTopPatientInfoVO));
+    }
+
+}

+ 1 - 1
config-server/src/main/resources/shared/knowledgeman-service-dev.yml

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.235:3306/diagbot-med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.235:3306/med-dev?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: diagbot@20180822
       # 连接池的配置信息

+ 1 - 1
config-server/src/main/resources/shared/knowledgeman-service-local.yml

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.235:3306/diagbot-med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.235:3306/med-dev?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: diagbot@20180822
       # 连接池的配置信息

+ 32 - 0
icss-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -11,6 +11,9 @@ import com.diagbot.dto.DeptInfoDTO;
 import com.diagbot.dto.DisScaleDTO;
 import com.diagbot.dto.DisTypeDTO;
 import com.diagbot.dto.DiseaseIcdDTO;
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.IndexConfigDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.ScaleContent;
 import com.diagbot.vo.ConceptIntroduceVO;
@@ -18,7 +21,11 @@ import com.diagbot.vo.ConceptSearchVO;
 import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.DeptInfoVO;
 import com.diagbot.vo.DisScaleVO;
+import com.diagbot.vo.EvaluationdiseaseNameVO;
 import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+import com.diagbot.vo.IndexConfigdiseaseNameVO;
+
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -77,6 +84,31 @@ public interface AiptServiceClient {
     @PostMapping("/diseaseIcd/getDiseaseIcds")
     RespDTO<List<DiseaseIcdDTO>> getDiseaseIcds(@RequestBody GetDiseaseIcdVO getDiseaseIcdVO);
 
+    /**
+     * 获取页面顶部病人医生科室信息
+     *
+     * @param getTopPatientInfoVO
+     * @return
+     */
+    @PostMapping("/patientInfo/getTopPatientInfo")
+    RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
+
+    /**
+	 * 获取管理评估模板
+	 * @param evaluationdiseaseNameVO
+	 * @return
+	 */
+	@PostMapping("/evaluation/getEvaluationModules")
+	public RespDTO<List<EvaluationDTO>> getEvaluationModules(@RequestBody EvaluationdiseaseNameVO evaluationdiseaseNameVO);
+
+	/**
+	 * 获取指标配置
+	 * @param indexConfigdiseaseNameVO
+	 * @return
+	 */
+	@PostMapping("/indexConfig/getindexConfigs")
+	public RespDTO<List<IndexConfigDTO>> getindexConfigs(@RequestBody IndexConfigdiseaseNameVO indexConfigdiseaseNameVO);
+
     /**
      * 根据名称和词性获取概念Map
      *

+ 7 - 17
icss-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -1,8 +1,14 @@
 package com.diagbot.client;
 
+import java.util.List;
+import java.util.Map;
+
+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.TranServiceHystrix;
 import com.diagbot.dto.DoctorInfoDTO;
-import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.HospitalInfoDTO;
 import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.dto.PatientInfoDTO;
@@ -12,19 +18,12 @@ import com.diagbot.entity.DoctorInfo;
 import com.diagbot.entity.HospitalDept;
 import com.diagbot.entity.PatientInfo;
 import com.diagbot.vo.DoctorInfoVO;
-import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.HosCodeVO;
 import com.diagbot.vo.HospitalInfoVO;
 import com.diagbot.vo.LisHospitalCodeVO;
 import com.diagbot.vo.PatientInfoVO;
 import com.diagbot.vo.SaveInquiryToHisVO;
 import com.diagbot.vo.TranFieldInfoVO;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-
-import java.util.List;
-import java.util.Map;
 
 /**
  * @Description: 调用信息对接层服务
@@ -88,15 +87,6 @@ public interface TranServiceClient {
     @PostMapping("/patientInfo/getPatientInfo")
     RespDTO<PatientInfoDTO> getPatientInfo(@RequestBody PatientInfoVO patientInfoVO);
 
-    /**
-     * 获取页面顶部病人医生科室信息
-     *
-     * @param getTopPatientInfoVO
-     * @return
-     */
-    @PostMapping("/patientInfo/getTopPatientInfo")
-    RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
-
     /**
      * 根据ids获取病人信息
      *

+ 33 - 8
icss-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -1,5 +1,14 @@
 package com.diagbot.client.hystrix;
 
+import java.util.List;
+import java.util.Map;
+
+import javax.validation.Valid;
+
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
 import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.GdbResponse;
@@ -11,6 +20,9 @@ import com.diagbot.dto.DeptInfoDTO;
 import com.diagbot.dto.DisScaleDTO;
 import com.diagbot.dto.DisTypeDTO;
 import com.diagbot.dto.DiseaseIcdDTO;
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.IndexConfigDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.ScaleContent;
 import com.diagbot.vo.ConceptIntroduceVO;
@@ -18,16 +30,12 @@ import com.diagbot.vo.ConceptSearchVO;
 import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.DeptInfoVO;
 import com.diagbot.vo.DisScaleVO;
+import com.diagbot.vo.EvaluationdiseaseNameVO;
 import com.diagbot.vo.GetDiseaseIcdVO;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
+import com.diagbot.vo.GetTopPatientInfoVO;
+import com.diagbot.vo.IndexConfigdiseaseNameVO;
 
-import javax.validation.Valid;
-import java.util.List;
-import java.util.Map;
+import lombok.extern.slf4j.Slf4j;
 
 /**
  * @Description:调用中间层服务
@@ -115,6 +123,23 @@ public class AiptServiceHystrix implements AiptServiceClient {
         return null;
     }
 
+    @Override
+    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(GetTopPatientInfoVO getTopPatientInfoVO) {
+        log.error("【hystrix】调用{}异常", "getTopPatientInfo");
+        return null;
+    }
+    @Override
+	public RespDTO<List<EvaluationDTO>> getEvaluationModules(@Valid EvaluationdiseaseNameVO evaluationdiseaseNameVO) {
+		log.error("【hystrix】调用{}异常", "getEvaluationModules");
+		return null;
+	}
+
+	@Override
+	public RespDTO<List<IndexConfigDTO>> getindexConfigs(IndexConfigdiseaseNameVO indexConfigdiseaseNameVO) {
+		log.error("【hystrix】调用{}异常", "getindexConfigs");
+		return null;
+	}
+
     /**
      * 根据名称和词性获取概念Map
      *

+ 9 - 14
icss-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -1,8 +1,15 @@
 package com.diagbot.client.hystrix;
 
+import java.util.List;
+import java.util.Map;
+
+import javax.validation.Valid;
+
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.DoctorInfoDTO;
-import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.HospitalInfoDTO;
 import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.dto.PatientInfoDTO;
@@ -12,20 +19,14 @@ import com.diagbot.entity.DoctorInfo;
 import com.diagbot.entity.HospitalDept;
 import com.diagbot.entity.PatientInfo;
 import com.diagbot.vo.DoctorInfoVO;
-import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.HosCodeVO;
 import com.diagbot.vo.HospitalInfoVO;
 import com.diagbot.vo.LisHospitalCodeVO;
 import com.diagbot.vo.PatientInfoVO;
 import com.diagbot.vo.SaveInquiryToHisVO;
 import com.diagbot.vo.TranFieldInfoVO;
-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;
+import lombok.extern.slf4j.Slf4j;
 
 /**
  * @Description: 调用信息对接层服务
@@ -71,12 +72,6 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
-    @Override
-    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(GetTopPatientInfoVO getTopPatientInfoVO) {
-        log.error("【hystrix】调用{}异常", "getTopPatientInfo");
-        return null;
-    }
-
     @Override
     public RespDTO<Map<Long, PatientInfo>> patientInfoMapByIds(List<Long> ids) {
         log.error("【hystrix】调用{}异常", "patientInfoMapByIds");

+ 22 - 0
icss-service/src/main/java/com/diagbot/dto/EvaluationDTO.java

@@ -0,0 +1,22 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午5:14:02
+ */
+@Getter
+@Setter
+public class EvaluationDTO {
+
+	private String diseaseName;// 对应术语疾病名
+	private Long conceptId;// 术语概念id
+	private String regionName; // 区域名
+	private String regionType; // 区域类型
+	private Integer orderNo; // 区域顺序
+	private Object data;
+}

+ 5 - 5
icss-service/src/main/java/com/diagbot/dto/PushDTO.java

@@ -1,13 +1,13 @@
 package com.diagbot.dto;
 
-import com.diagbot.client.bean.CalcResult;
+import java.util.List;
+import java.util.Map;
+
 import com.diagbot.entity.ScaleContent;
+
 import lombok.Getter;
 import lombok.Setter;
 
-import java.util.List;
-import java.util.Map;
-
 /**
  * @Description:
  * @Author:zhaops
@@ -26,5 +26,5 @@ public class PushDTO {
     private Map<String, Object> treat;
     private List<MedicalIndicationDTO> medicalIndications;
     private List<ScaleContent> scale;
-    private List<EvaluationModuleMappingDTO> evaluationModule;
+    private List<EvaluationDTO> evaluationModule;
 }

+ 0 - 164
icss-service/src/main/java/com/diagbot/entity/EvaluationModuleMapping.java

@@ -1,164 +0,0 @@
-package com.diagbot.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-
-/**
- * <p>
- * 管理与评估模板表
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-@TableName("icss_evaluation_module_mapping")
-public class EvaluationModuleMapping implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 区域名
-     */
-    private String regionName;
-
-    /**
-     * 区域类型
-     */
-    private String regionType;
-
-    /**
-     * 区域顺序
-     */
-    private Integer orderNo;
-
-    /**
-     * 疾病id
-     */
-    private Long diseaseId;
-
-    private String remark;
-
-    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 getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-    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 getRegionName() {
-        return regionName;
-    }
-
-    public void setRegionName(String regionName) {
-        this.regionName = regionName;
-    }
-    public String getRegionType() {
-        return regionType;
-    }
-
-    public void setRegionType(String regionType) {
-        this.regionType = regionType;
-    }
-    public Integer getOrderNo() {
-        return orderNo;
-    }
-
-    public void setOrderNo(Integer orderNo) {
-        this.orderNo = orderNo;
-    }
-    public Long getDiseaseId() {
-        return diseaseId;
-    }
-
-    public void setDiseaseId(Long diseaseId) {
-        this.diseaseId = diseaseId;
-    }
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String toString() {
-        return "EvaluationModuleMapping{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", regionName=" + regionName +
-        ", regionType=" + regionType +
-        ", orderNo=" + orderNo +
-        ", diseaseId=" + diseaseId +
-        ", remark=" + remark +
-        "}";
-    }
-}

+ 0 - 166
icss-service/src/main/java/com/diagbot/entity/IndexConfig.java

@@ -1,166 +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;
-import com.baomidou.mybatisplus.annotation.TableName;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-@TableName("icss_index_config")
-public class IndexConfig implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 指标公表名
-     */
-    private String indexUnique;
-
-    /**
-     * 疾病id
-     */
-    private Long diseaseId;
-    
-    private Long indexDesc;
-    /**
-     * 显示顺序
-     */
-    private Integer orderNo;
-
-    /**
-     * 备注
-     */
-    private String remark;
-
-    public Long getIndexDesc() {
-		return indexDesc;
-	}
-
-	public void setIndexDesc(Long indexDesc) {
-		this.indexDesc = indexDesc;
-	}
-
-	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 getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-    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 getIndexUnique() {
-        return indexUnique;
-    }
-
-    public void setIndexUnique(String indexUnique) {
-        this.indexUnique = indexUnique;
-    }
-    public Long getDiseaseId() {
-        return diseaseId;
-    }
-
-    public void setDiseaseId(Long diseaseId) {
-        this.diseaseId = diseaseId;
-    }
-    public Integer getOrderNo() {
-        return orderNo;
-    }
-
-    public void setOrderNo(Integer orderNo) {
-        this.orderNo = orderNo;
-    }
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String toString() {
-        return "IndexConfig{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", indexUnique=" + indexUnique +
-        ", diseaseId=" + diseaseId +
-        ", orderNo=" + orderNo +
-        ", remark=" + remark +
-        "}";
-    }
-}

+ 0 - 203
icss-service/src/main/java/com/diagbot/entity/IndexData.java

@@ -1,203 +0,0 @@
-package com.diagbot.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-
-/**
- * <p>
- * 指标数据表
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-@TableName("icss_index_data")
-public class IndexData implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 指标公表名
-     */
-    private String indexUnique;
-
-    /**
-     * 指标值
-     */
-    private String indexValue;
-
-    /**
-     * 指标单位
-     */
-    private String indexUnit;
-
-    /**
-     * 是否异常
-     */
-    private Integer isAbnormal;
-
-    /**
-     * 化验时间
-     */
-    private Date creatTime;
-
-    /**
-     * 患者id
-     */
-    private Long patientId;
-
-    /**
-     * 就诊号
-     */
-    private String inquiryCode;
-
-    private String remark;
-
-    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 getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-    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 getIndexUnique() {
-        return indexUnique;
-    }
-
-    public void setIndexUnique(String indexUnique) {
-        this.indexUnique = indexUnique;
-    }
-    public String getIndexValue() {
-        return indexValue;
-    }
-
-    public void setIndexValue(String indexValue) {
-        this.indexValue = indexValue;
-    }
-    public String getIndexUnit() {
-        return indexUnit;
-    }
-
-    public void setIndexUnit(String indexUnit) {
-        this.indexUnit = indexUnit;
-    }
-    public Integer getIsAbnormal() {
-        return isAbnormal;
-    }
-
-    public void setIsAbnormal(Integer isAbnormal) {
-        this.isAbnormal = isAbnormal;
-    }
-    public Date getCreatTime() {
-        return creatTime;
-    }
-
-    public void setCreatTime(Date creatTime) {
-        this.creatTime = creatTime;
-    }
-    public Long getPatientId() {
-        return patientId;
-    }
-
-    public void setPatientId(Long patientId) {
-        this.patientId = patientId;
-    }
-    public String getInquiryCode() {
-        return inquiryCode;
-    }
-
-    public void setInquiryCode(String inquiryCode) {
-        this.inquiryCode = inquiryCode;
-    }
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String toString() {
-        return "IndexData{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", indexUnique=" + indexUnique +
-        ", indexValue=" + indexValue +
-        ", indexUnit=" + indexUnit +
-        ", isAbnormal=" + isAbnormal +
-        ", creatTime=" + creatTime +
-        ", patientId=" + patientId +
-        ", inquiryCode=" + inquiryCode +
-        ", remark=" + remark +
-        "}";
-    }
-}

+ 30 - 23
icss-service/src/main/java/com/diagbot/facade/EvaluationModuleMappingFacade.java

@@ -7,13 +7,15 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.diagbot.dto.EvaluationModuleMappingDTO;
-import com.diagbot.entity.EvaluationModuleMapping;
-import com.diagbot.enums.IsDeleteEnum;
-import com.diagbot.service.impl.EvaluationModuleMappingServiceImpl;
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
 import com.diagbot.util.BeanUtil;
+import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.EvaluationDiseaseIdVO;
+import com.diagbot.vo.EvaluationdiseaseNameVO;
 
 /**
  * 
@@ -23,33 +25,40 @@ import com.diagbot.vo.EvaluationDiseaseIdVO;
  * @date 2019年3月11日 下午4:19:09
  */
 @Component
-public class EvaluationModuleMappingFacade extends EvaluationModuleMappingServiceImpl {
+public class EvaluationModuleMappingFacade  {
 
 	/*@Autowired
 	IndexConfigFacade indexConfigFacade;
 	*/
 	@Autowired
 	PushFacade pushFacade;
-
+	@Autowired 
+	AiptServiceClient aiptServiceClient;
 	/**
 	 * 获取管理与评估模板接口
 	 *
 	 * @param evaluationDiseaseIdVO
 	 * @return
 	 */
-	public List<EvaluationModuleMappingDTO> getEvaluationModule(EvaluationDiseaseIdVO evaluationDiseaseIdVO) {
-		//根据慢病id获取模板信息
+	public List<EvaluationDTO> getEvaluationModule(EvaluationDiseaseIdVO evaluationDiseaseIdVO) {
+/*		//根据慢病id获取模板信息
 		QueryWrapper<EvaluationModuleMapping> evaluationModuleQuery = new QueryWrapper<>();
 		evaluationModuleQuery.eq("disease_id", evaluationDiseaseIdVO.getDiseaseId()).eq("is_deleted",
 				IsDeleteEnum.N.getKey());
 
-		List<EvaluationModuleMapping> datas = list(evaluationModuleQuery);
+		List<EvaluationModuleMapping> datas = list(evaluationModuleQuery);*/
+		EvaluationdiseaseNameVO evaluationdiseaseNameVO =new EvaluationdiseaseNameVO();
+		//TODO 联调需修改
+		evaluationdiseaseNameVO.setDiseaseName("糖尿病");
+		RespDTO<List<EvaluationDTO>> evaluationList = aiptServiceClient.getEvaluationModules(evaluationdiseaseNameVO);
+		RespDTOUtil.respNGDeal(evaluationList, "获取管理与评估模板数据失败!");
+		List<EvaluationDTO> datas= evaluationList.data;
 		// 过滤
-		List<EvaluationModuleMappingDTO> data = BeanUtil.listCopyTo(datas, EvaluationModuleMappingDTO.class);
+		List<EvaluationDTO> data = BeanUtil.listCopyTo(datas, EvaluationDTO.class);
 		//获取大数据知识图谱推送数据
 		Map<String, JSONObject> jsonobject = pushFacade.getManagementEvaluationContent(evaluationDiseaseIdVO, null);
 		for (String key : jsonobject.keySet()) {
-			for (EvaluationModuleMappingDTO evaluadata : data) {
+			for (EvaluationDTO evaluadata : data) {
 				if (key.equals(evaluadata.getRegionName())) {
 					evaluadata.setData(jsonobject.get(key));
 
@@ -59,26 +68,24 @@ public class EvaluationModuleMappingFacade extends EvaluationModuleMappingServic
 		}
 		return data;
 	}
-
-	/**
+/*
+	*//**
 	 * 获取管理与评估模板接口
 	 *
 	 * @param diseaseId
 	 * @param contentMap
 	 * @return
 	 */
-	public List<EvaluationModuleMappingDTO> getEvaluationModule(Long diseaseId, Map<String, JSONObject> contentMap) {
-		//根据慢病id获取模板信息
-		QueryWrapper<EvaluationModuleMapping> evaluationModuleQuery = new QueryWrapper<>();
-		evaluationModuleQuery.eq("disease_id", diseaseId).eq("is_deleted",
-				IsDeleteEnum.N.getKey());
-
-		List<EvaluationModuleMapping> datas = list(evaluationModuleQuery);
+	public List<EvaluationDTO> getEvaluationModule(Long diseaseId, Map<String, JSONObject> contentMap) {
+		EvaluationdiseaseNameVO evaluationdiseaseNameVO =new EvaluationdiseaseNameVO();
+		evaluationdiseaseNameVO.setDiseaseName("糖尿病");
+		RespDTO<List<EvaluationDTO>> evaluationList = aiptServiceClient.getEvaluationModules(evaluationdiseaseNameVO);
+		List<EvaluationDTO> datas= evaluationList.data;
 		// 过滤
-		List<EvaluationModuleMappingDTO> data = BeanUtil.listCopyTo(datas, EvaluationModuleMappingDTO.class);
+		List<EvaluationDTO> data = BeanUtil.listCopyTo(datas, EvaluationDTO.class);
 		if (contentMap != null && contentMap.size() > 0) {
 			for (String key : contentMap.keySet()) {
-				for (EvaluationModuleMappingDTO evaluadata : data) {
+				for (EvaluationDTO evaluadata : data) {
 					if (key.equals(evaluadata.getRegionName())) {
 						evaluadata.setData(contentMap.get(key));
 					}

+ 13 - 20
icss-service/src/main/java/com/diagbot/facade/IndexConfigFacade.java

@@ -1,14 +1,14 @@
 package com.diagbot.facade;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.diagbot.dto.IndexConfigDTO;
-import com.diagbot.entity.IndexConfig;
-import com.diagbot.enums.IsDeleteEnum;
-import com.diagbot.service.impl.IndexConfigServiceImpl;
-import com.diagbot.util.BeanUtil;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.util.List;
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.IndexConfigdiseaseNameVO;
 
 /**
  * @author wangfeng
@@ -16,26 +16,19 @@ import java.util.List;
  * @date 2019年3月11日 下午4:20:09
  */
 @Component
-public class IndexConfigFacade extends IndexConfigServiceImpl {
+public class IndexConfigFacade {
 
+	@Autowired 
+	AiptServiceClient aiptServiceClient;
     /**
      * 根据疾病Id获取指标配置
      *
      * @param diseaseId 疾病标签id
      * @return
      */
-    public List<IndexConfigDTO> getindexConfig(Long diseaseId) {
-        QueryWrapper<IndexConfig> IndexConfigQuery = new QueryWrapper<>();
-        if (null != diseaseId) {
-            IndexConfigQuery.eq("disease_id", diseaseId);
-        }
-
-        IndexConfigQuery.eq("is_deleted", IsDeleteEnum.N.getKey());
-        List<IndexConfig> datas = list(IndexConfigQuery);
-
-        //过滤
-        List<IndexConfigDTO> data = BeanUtil.listCopyTo(datas, IndexConfigDTO.class);
-        return data;
+    public RespDTO<List<IndexConfigDTO>> getindexConfig(IndexConfigdiseaseNameVO indexConfigdiseaseNameVO) {
+    	RespDTO<List<IndexConfigDTO>> indexConfigList = aiptServiceClient.getindexConfigs(indexConfigdiseaseNameVO);
+        return indexConfigList;
     }
 
 

+ 13 - 33
icss-service/src/main/java/com/diagbot/facade/IndexDataFacade.java

@@ -1,31 +1,11 @@
 package com.diagbot.facade;
 
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.diagbot.dto.IndexConfigAndDataDTO;
-import com.diagbot.dto.IndexConfigDTO;
-import com.diagbot.dto.IndexDataDTO;
-import com.diagbot.dto.ItemIndexDTO;
-import com.diagbot.entity.IndexData;
-import com.diagbot.enums.IsDeleteEnum;
-import com.diagbot.exception.CommonErrorCode;
-import com.diagbot.exception.CommonException;
-import com.diagbot.service.impl.IndexDataServiceImpl;
-import com.diagbot.util.DateUtil;
-import com.diagbot.util.ListUtil;
-import com.diagbot.vo.IndexDataFindVO;
-import com.diagbot.vo.IndexDataSaveVO;
-import com.diagbot.vo.IndexDataVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-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 com.diagbot.dto.IndexConfigAndDataDTO;
+import com.diagbot.vo.IndexDataFindVO;
+import com.diagbot.vo.IndexDataSaveVO;
 
 /**
  * @author wangfeng
@@ -33,7 +13,7 @@ import java.util.stream.Collectors;
  * @date 2019年3月11日 下午4:20:33
  */
 @Component
-public class IndexDataFacade extends IndexDataServiceImpl {
+public class IndexDataFacade {
 
     @Autowired
     private IndexConfigFacade indexConfigFacade;
@@ -46,7 +26,7 @@ public class IndexDataFacade extends IndexDataServiceImpl {
      */
     public IndexConfigAndDataDTO getIndexDataAll(IndexDataFindVO indexDataFindVO) {
 
-        Map<String, Object> indexDataMap = new HashMap<>();
+      /*  Map<String, Object> indexDataMap = new HashMap<>();
         indexDataMap.put("diseaseId", indexDataFindVO.getDiseaseId());
         indexDataMap.put("patientId", indexDataFindVO.getPatientId());
         indexDataMap.put("startTime", indexDataFindVO.getStartTime());
@@ -81,8 +61,8 @@ public class IndexDataFacade extends IndexDataServiceImpl {
         }
         IndexConfigAndDataDTO indexsData = new IndexConfigAndDataDTO();
         indexsData.setIndexConfigData(indexConfigFacade.getindexConfig(indexDataFindVO.getDiseaseId()));
-        indexsData.setItemIndexData(list);
-        return indexsData;
+        indexsData.setItemIndexData(list);*/
+        return null;
     }
 
     /**
@@ -92,10 +72,11 @@ public class IndexDataFacade extends IndexDataServiceImpl {
      * @return
      */
     public boolean saveIndexDatas(IndexDataSaveVO indexDataSaveVO) {
-        boolean res = false;
+      /*  boolean res = false;
         if (null != indexDataSaveVO && ListUtil.isNotEmpty(indexDataSaveVO.getIndexData())) {
+        	IndexConfigdiseaseNameVO IndexConfigdiseaseNameVO = new IndexConfigdiseaseNameVO();
             //获取所有需要记录的指标项
-            List<IndexConfigDTO> data = indexConfigFacade.getindexConfig(null);
+           List<IndexConfigDTO> data = indexConfigFacade.getindexConfig(IndexConfigdiseaseNameVO);
             List<String> indexUniquelist
                     = data.stream().map(i -> i.getIndexUnique()).collect(Collectors.toList());
 
@@ -137,8 +118,7 @@ public class IndexDataFacade extends IndexDataServiceImpl {
                 res = insertIndexDataList(IndexDataList);
             }
 
-        }
-        return res;
+        }*/
+        return false;
+    }
     }
-
-}

+ 5 - 22
icss-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -8,8 +8,8 @@ import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.TranServiceClient;
-import com.diagbot.dto.DeptInfoDTO;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PatientInfoDTO;
 import com.diagbot.dto.RespDTO;
@@ -17,7 +17,6 @@ import com.diagbot.entity.DoctorPageMode;
 import com.diagbot.entity.PatientInfo;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.util.RespDTOUtil;
-import com.diagbot.vo.DeptInfoVO;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.PatientInfoVO;
 
@@ -32,9 +31,9 @@ public class PatientInfoFacade {
     @Autowired
     private DoctorPageModeFacade doctorPageModeFacade;
     @Autowired
-    private DeptInfoFacade deptInfoFacade;
-    @Autowired
     TranServiceClient tranServiceClient;
+    @Autowired
+    private AiptServiceClient aiptServiceClient;
 
     /**
      * 获取患者信息
@@ -55,27 +54,11 @@ public class PatientInfoFacade {
      * @return
      */
     public GetTopPatientInfoDTO getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO) {
-        RespDTO<GetTopPatientInfoDTO> respDTO = tranServiceClient.getTopPatientInfo(getTopPatientInfoVO);
-        RespDTOUtil.respNGDealCover(respDTO, "页面顶部病人医生科室信息");
+        RespDTO<GetTopPatientInfoDTO> respDTO = aiptServiceClient.getTopPatientInfo(getTopPatientInfoVO);
+        RespDTOUtil.respNGDealCover(respDTO, "获取页面顶部病人医生科室信息失败");
 
         GetTopPatientInfoDTO getTopPatientInfoDTO = respDTO.data;
 
-//        QueryWrapper<DeptInfo> deptInfoQ = new QueryWrapper<>();
-//        deptInfoQ.eq("is_deleted", IsDeleteEnum.N.getKey())
-//                .eq("name", getTopPatientInfoDTO.getSelfDeptName());
-//        DeptInfo deptInfo = deptInfoFacade.getOne(deptInfoQ);
-//        if (null != deptInfo) {
-//            getTopPatientInfoDTO.setSelfDeptName(deptInfo.getName());
-//            getTopPatientInfoDTO.setSelfDeptId(deptInfo.getId());
-//        }
-        
-        DeptInfoVO deptInfoVO = new DeptInfoVO();
-        deptInfoVO.setHospitalCode(getTopPatientInfoVO.getHospitalCode());
-        deptInfoVO.setDeptCode(getTopPatientInfoVO.getHospitalDeptCode());
-        DeptInfoDTO deptInfoDTO = deptInfoFacade.getDeptInfo(deptInfoVO);
-        getTopPatientInfoDTO.setSelfDeptId(deptInfoDTO.getConceptId());
-        getTopPatientInfoDTO.setSelfDeptName(deptInfoDTO.getName());
-
         QueryWrapper<DoctorPageMode> doctorPageModeQe = new QueryWrapper<>();
         doctorPageModeQe.eq("is_deleted", IsDeleteEnum.N.getKey());
         doctorPageModeQe.eq("doctor_id", getTopPatientInfoDTO.getDoctorId());

+ 14 - 13
icss-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,5 +1,17 @@
 package com.diagbot.facade;
 
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -12,7 +24,7 @@ import com.diagbot.client.bean.MedicalIndicationDetail;
 import com.diagbot.client.bean.ResponseData;
 import com.diagbot.client.bean.SearchData;
 import com.diagbot.dto.EMRQuestionDTO;
-import com.diagbot.dto.EvaluationModuleMappingDTO;
+import com.diagbot.dto.EvaluationDTO;
 import com.diagbot.dto.MedicalIndicationDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.PushEMRDTO;
@@ -47,17 +59,6 @@ import com.diagbot.vo.PushKYJVO;
 import com.diagbot.vo.PushVO;
 import com.diagbot.vo.QuestionVO;
 import com.google.common.collect.Lists;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
 
 /**
  * @Description:
@@ -353,7 +354,7 @@ public class PushFacade {
                     managementEvaluation.put("糖尿病分级管理", JSONObject.parseObject("{ \"rows\":[ { \"name\":\"血压控制情况\", \"controltype\":0, \"details\":[ { \"detailName\":\"常规管理\", \"state\":1 }, { \"detailName\":\"强化管理\", \"state\":0 } ] } ] }"));
                 }*/
                 /***********************正式流程********************************/
-                List<EvaluationModuleMappingDTO> evaluationModule = evaluationModuleMappingFacade.getEvaluationModule(pushVO.getDiseaseId(), managementEvaluation);
+                List<EvaluationDTO> evaluationModule = evaluationModuleMappingFacade.getEvaluationModule(pushVO.getDiseaseId(), managementEvaluation);
                 pushDTO.setEvaluationModule(evaluationModule);
             }
         }

+ 0 - 16
icss-service/src/main/java/com/diagbot/mapper/EvaluationModuleMappingMapper.java

@@ -1,16 +0,0 @@
-package com.diagbot.mapper;
-
-import com.diagbot.entity.EvaluationModuleMapping;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * <p>
- * 管理与评估模板表 Mapper 接口
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-public interface EvaluationModuleMappingMapper extends BaseMapper<EvaluationModuleMapping> {
-
-}

+ 0 - 16
icss-service/src/main/java/com/diagbot/mapper/IndexConfigMapper.java

@@ -1,16 +0,0 @@
-package com.diagbot.mapper;
-
-import com.diagbot.entity.IndexConfig;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * <p>
- *  Mapper 接口
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-public interface IndexConfigMapper extends BaseMapper<IndexConfig> {
-
-}

+ 0 - 26
icss-service/src/main/java/com/diagbot/mapper/IndexDataMapper.java

@@ -1,26 +0,0 @@
-package com.diagbot.mapper;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.ibatis.annotations.Param;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.diagbot.dto.IndexDataDTO;
-import com.diagbot.entity.IndexData;
-
-/**
- * <p>
- * 指标数据表 Mapper 接口
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-public interface IndexDataMapper extends BaseMapper<IndexData> {
-
-	List<IndexDataDTO> getIndexDataAll( @Param("indexDataMap") Map<String, Object> indexDataMap);
-
-	boolean insertIndexDataList(List<IndexData> indexDataList);
-
-}

+ 0 - 16
icss-service/src/main/java/com/diagbot/service/EvaluationModuleMappingService.java

@@ -1,16 +0,0 @@
-package com.diagbot.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.diagbot.entity.EvaluationModuleMapping;
-
-/**
- * <p>
- * 管理与评估模板表 服务类
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-public interface EvaluationModuleMappingService extends IService<EvaluationModuleMapping> {
-
-}

+ 0 - 16
icss-service/src/main/java/com/diagbot/service/IndexConfigService.java

@@ -1,16 +0,0 @@
-package com.diagbot.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.diagbot.entity.IndexConfig;
-
-/**
- * <p>
- *  服务类
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-public interface IndexConfigService extends IService<IndexConfig> {
-
-}

+ 0 - 24
icss-service/src/main/java/com/diagbot/service/IndexDataService.java

@@ -1,24 +0,0 @@
-package com.diagbot.service;
-
-import java.util.List;
-import java.util.Map;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.diagbot.dto.IndexDataDTO;
-import com.diagbot.entity.IndexData;
-
-/**
- * <p>
- * 指标数据表 服务类
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-public interface IndexDataService extends IService<IndexData> {
-
-	List<IndexDataDTO> getIndexDataAll(Map<String, Object> indexDataMap);
-
-	boolean insertIndexDataList(List<IndexData> IndexDataList);
-
-}

+ 0 - 20
icss-service/src/main/java/com/diagbot/service/impl/EvaluationModuleMappingServiceImpl.java

@@ -1,20 +0,0 @@
-package com.diagbot.service.impl;
-
-import com.diagbot.entity.EvaluationModuleMapping;
-import com.diagbot.mapper.EvaluationModuleMappingMapper;
-import com.diagbot.service.EvaluationModuleMappingService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 管理与评估模板表 服务实现类
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-@Service
-public class EvaluationModuleMappingServiceImpl extends ServiceImpl<EvaluationModuleMappingMapper, EvaluationModuleMapping> implements EvaluationModuleMappingService {
-
-}

+ 0 - 20
icss-service/src/main/java/com/diagbot/service/impl/IndexConfigServiceImpl.java

@@ -1,20 +0,0 @@
-package com.diagbot.service.impl;
-
-import com.diagbot.entity.IndexConfig;
-import com.diagbot.mapper.IndexConfigMapper;
-import com.diagbot.service.IndexConfigService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- *  服务实现类
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-@Service
-public class IndexConfigServiceImpl extends ServiceImpl<IndexConfigMapper, IndexConfig> implements IndexConfigService {
-
-}

+ 0 - 35
icss-service/src/main/java/com/diagbot/service/impl/IndexDataServiceImpl.java

@@ -1,35 +0,0 @@
-package com.diagbot.service.impl;
-
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.stereotype.Service;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.diagbot.dto.IndexDataDTO;
-import com.diagbot.entity.IndexData;
-import com.diagbot.mapper.IndexDataMapper;
-import com.diagbot.service.IndexDataService;
-
-/**
- * <p>
- * 指标数据表 服务实现类
- * </p>
- *
- * @author wangfeng
- * @since 2019-03-11
- */
-@Service
-public class IndexDataServiceImpl extends ServiceImpl<IndexDataMapper, IndexData> implements IndexDataService {
-
-	@Override
-	public List<IndexDataDTO> getIndexDataAll(Map<String, Object> indexDataMap) {
-		return baseMapper.getIndexDataAll(indexDataMap);
-	}
-	
-	@Override
-	public boolean insertIndexDataList(List<IndexData> IndexDataList){
-		return baseMapper.insertIndexDataList(IndexDataList);
-	}
-
-}

+ 18 - 0
icss-service/src/main/java/com/diagbot/vo/EvaluationdiseaseNameVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午5:11:54
+ */
+@Setter
+@Getter
+public class EvaluationdiseaseNameVO {
+
+	private String diseaseName;
+	
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/vo/IndexConfigdiseaseNameVO.java

@@ -0,0 +1,16 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午6:41:38
+ */
+@Setter
+@Getter
+public class IndexConfigdiseaseNameVO {
+	private String diseaseName;
+}

+ 16 - 13
icss-service/src/main/java/com/diagbot/web/EvaluationModuleMappingController.java

@@ -1,20 +1,23 @@
 package com.diagbot.web;
 
-import com.diagbot.annotation.SysLogger;
-import com.diagbot.dto.EvaluationModuleMappingDTO;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.facade.EvaluationModuleMappingFacade;
-import com.diagbot.vo.EvaluationDiseaseIdVO;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import java.util.List;
+
+import javax.validation.Valid;
+
 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;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.EvaluationModuleMappingFacade;
+import com.diagbot.vo.EvaluationDiseaseIdVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 
 /**
  * <p>
@@ -26,18 +29,18 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/evaluationModuleMapping")
-@Api(value = "管理与评估模板API[by:wangfeng]", tags = { "WF-2期-管理与评估模板API" })
+@Api(value = "知识库标准化-管理与评估模板API[by:wangfeng]", tags = { "知识库标准化-管理与评估模板API" })
 @SuppressWarnings("unchecked")
 public class EvaluationModuleMappingController {
 
     @Autowired
     EvaluationModuleMappingFacade evaluationModuleMappingFacade;
 
-    @ApiOperation(value = "2期-获取管理与评估模板[by:wangfeng]", notes = "获取管理与评估模板")
+    @ApiOperation(value = "知识库标准化-获取管理与评估模板[by:wangfeng]", notes = "获取管理与评估模板")
     @PostMapping("/getEvaluationModules")
     @SysLogger("getEvaluationModules")
-    public RespDTO<List<EvaluationModuleMappingDTO>> getEvaluationModules(@Valid @RequestBody EvaluationDiseaseIdVO evaluationDiseaseIdVO) {
-        List<EvaluationModuleMappingDTO> data = evaluationModuleMappingFacade.getEvaluationModule(evaluationDiseaseIdVO);
+    public RespDTO<List<EvaluationDTO>> getEvaluationModules(@Valid @RequestBody EvaluationDiseaseIdVO evaluationDiseaseIdVO) {
+        List<EvaluationDTO> data = evaluationModuleMappingFacade.getEvaluationModule(evaluationDiseaseIdVO);
         return RespDTO.onSuc(data);
     }
 

+ 14 - 13
icss-service/src/main/java/com/diagbot/web/IndexConfigController.java

@@ -1,22 +1,24 @@
 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.IndexConfigDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.IndexConfigFacade;
-import com.diagbot.vo.IndexConfigDiseaseIdVO;
+import com.diagbot.vo.IndexConfigdiseaseNameVO;
+
 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 springfox.documentation.annotations.ApiIgnore;
 
-import java.util.List;
-
 /**
  * <p>
  * 前端控制器
@@ -29,17 +31,16 @@ import java.util.List;
 @RequestMapping("/indexConfig")
 @Api(value = "指标配置API[by:wangfeng]", tags = { "知识库标准化-指标配置API" })
 @SuppressWarnings("unchecked")
-@ApiIgnore
 public class IndexConfigController {
 
     @Autowired
     IndexConfigFacade indexConfigFacade;
 
-    @ApiOperation(value = "知识库标准化-根据疾病Id获取指标配置[by:wangfeng]", notes = "根据疾病Id获取指标配置")
+    @ApiOperation(value = "知识库标准化-根据疾病获取指标配置[by:wangfeng]", notes = "根据疾病获取指标配置")
     @PostMapping("/getindexConfigs")
     @SysLogger("getindexConfigs")
-    public RespDTO<List<IndexConfigDTO>> getindexConfigs(@RequestBody IndexConfigDiseaseIdVO indexConfigDiseaseIdVO) {
-        List<IndexConfigDTO> data = indexConfigFacade.getindexConfig(indexConfigDiseaseIdVO.getDiseaseId());
-        return RespDTO.onSuc(data);
+    public RespDTO<List<IndexConfigDTO>> getindexConfigs(@RequestBody IndexConfigdiseaseNameVO indexConfigdiseaseNameVO) {
+    	return indexConfigFacade.getindexConfig(indexConfigdiseaseNameVO);
+         
     }
 }

+ 0 - 20
icss-service/src/main/resources/mapper/EvaluationModuleMappingMapper.xml

@@ -1,20 +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.EvaluationModuleMappingMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.diagbot.entity.EvaluationModuleMapping">
-        <id column="id" property="id" />
-        <result column="is_deleted" property="isDeleted" />
-        <result column="gmt_create" property="gmtCreate" />
-        <result column="gmt_modified" property="gmtModified" />
-        <result column="creator" property="creator" />
-        <result column="modifier" property="modifier" />
-        <result column="region_name" property="regionName" />
-        <result column="region_type" property="regionType" />
-        <result column="order_no" property="orderNo" />
-        <result column="disease_id" property="diseaseId" />
-        <result column="remark" property="remark" />
-    </resultMap>
-
-</mapper>

+ 0 - 20
icss-service/src/main/resources/mapper/IndexConfigMapper.xml

@@ -1,20 +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.IndexConfigMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.diagbot.entity.IndexConfig">
-        <id column="id" property="id" />
-        <result column="is_deleted" property="isDeleted" />
-        <result column="gmt_create" property="gmtCreate" />
-        <result column="gmt_modified" property="gmtModified" />
-        <result column="creator" property="creator" />
-        <result column="modifier" property="modifier" />
-        <result column="index_unique" property="indexUnique" />
-        <result column="disease_id" property="diseaseId" />
-        <result column="index_desc" property="indexDesc" />
-        <result column="order_no" property="orderNo" />
-        <result column="remark" property="remark" />
-    </resultMap>
-
-</mapper>

+ 0 - 75
icss-service/src/main/resources/mapper/IndexDataMapper.xml

@@ -1,75 +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.IndexDataMapper">
-
-	<!-- 通用查询映射结果 -->
-	<resultMap id="BaseResultMap" type="com.diagbot.entity.IndexData">
-		<id column="id" property="id" />
-		<result column="is_deleted" property="isDeleted" />
-		<result column="gmt_create" property="gmtCreate" />
-		<result column="gmt_modified" property="gmtModified" />
-		<result column="creator" property="creator" />
-		<result column="modifier" property="modifier" />
-		<result column="index_unique" property="indexUnique" />
-		<result column="index_value" property="indexValue" />
-		<result column="index_unit" property="indexUnit" />
-		<result column="is_abnormal" property="isAbnormal" />
-		<result column="creat_time" property="creatTime" />
-		<result column="patient_id" property="patientId" />
-		<result column="inquiry_code" property="inquiryCode" />
-		<result column="remark" property="remark" />
-	</resultMap>
-
-	<select id="getIndexDataAll" resultType="com.diagbot.dto.IndexDataDTO">
-		SELECT
-		a.id as id,
-		a.index_unique as indexUnique,
-		a.index_value as
-		indexValue,
-		a.index_unit as indexUnit,
-		b.index_desc as indexDesc,
-		a.is_abnormal as isAbnormal,
-		a.creat_time as creatTime,
-		a.patient_id as patientId,
-		a.inquiry_code as
-		inquiryCode
-		FROM
-		icss_index_data a
-		JOIN icss_index_config b
-		WHERE
-		a.is_deleted = "N"
-		AND b.is_deleted = "N"
-		AND b.index_unique =
-		a.index_unique
-		<if test="indexDataMap.diseaseId != null">
-			AND b.disease_id = #{indexDataMap.diseaseId}
-		</if>
-		<if test="indexDataMap.startTime != null and indexDataMap.endTime != null">
-			AND a.creat_time BETWEEN #{indexDataMap.startTime} AND
-			#{indexDataMap.endTime}
-		</if>
-		AND a.patient_id = #{indexDataMap.patientId}
-
-	</select>
-	<insert id="insertIndexDataList" parameterType="java.util.List">
-		insert into icss_index_data
-		(gmt_create , creator ,
-		index_unique,index_value,index_unit,is_abnormal,creat_time,patient_id,inquiry_code
-		)
-		values
-		<foreach collection="list" item="IndexDataList" index="index"
-			separator=",">
-			(
-			#{IndexDataList.gmtCreate},
-			#{IndexDataList.creator},
-			#{IndexDataList.indexUnique},
-			#{IndexDataList.indexValue},
-			#{IndexDataList.indexUnit},
-			#{IndexDataList.isAbnormal},
-			#{IndexDataList.creatTime},
-			#{IndexDataList.patientId},
-			#{IndexDataList.inquiryCode}
-			)
-		</foreach>
-	</insert>
-</mapper>

+ 3 - 3
knowledgeman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -25,9 +25,9 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
         http
                 .csrf().disable()
                 .authorizeRequests()
-                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
-                .antMatchers("/**").authenticated();
-//                .antMatchers("/**").permitAll();
+//                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
+//                .antMatchers("/**").authenticated();
+                .antMatchers("/**").permitAll();
     }
 
 

+ 43 - 0
knowledgeman-service/src/main/java/com/diagbot/dto/ScaleContentPageDTO.java

@@ -0,0 +1,43 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2019/5/6 15:59
+ */
+@Getter
+@Setter
+public class ScaleContentPageDTO {
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 量表概念id
+     */
+    private Long conceptId;
+
+}

+ 83 - 0
knowledgeman-service/src/main/java/com/diagbot/entity/ScaleContent.java

@@ -0,0 +1,83 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 量表内容表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2019-04-08
+ */
+@TableName("kl_scale")
+@Getter
+@Setter
+public class ScaleContent implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 量表概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 0:文本,1:大数据接口填充
+     */
+    private Integer type;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 134 - 0
knowledgeman-service/src/main/java/com/diagbot/facade/ScaleContentFacade.java

@@ -0,0 +1,134 @@
+/**
+ *
+ */
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.client.UserServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.ScaleContentPageDTO;
+import com.diagbot.entity.ScaleContent;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.ScaleContentService;
+import com.diagbot.service.impl.ScaleContentServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.DeleteScaleVO;
+import com.diagbot.vo.ScaleContentPageVO;
+import com.diagbot.vo.ScaleContentSaveVO;
+import com.diagbot.vo.ScaleContentVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author zhoutg
+ * @Description
+ * @time 2018年12月5日下午4:53:59
+ */
+@Component
+public class ScaleContentFacade extends ScaleContentServiceImpl {
+
+    @Autowired
+    @Qualifier("scaleContentServiceImpl")
+    ScaleContentService scaleContentService;
+    @Autowired
+    UserServiceClient userServiceClient;
+
+    /**
+     * 量表内容新增或更新
+     *
+     * @param scaleContentSaveVO
+     */
+    public void insertOrUpdate(ScaleContentSaveVO scaleContentSaveVO) {
+        Long conceptId = scaleContentSaveVO.getConceptId();
+        Date now = DateUtil.now();
+        String userId = UserUtils.getCurrentPrincipleID();
+
+        // 删除原关联内容(物理删除)
+        if (conceptId != null) {
+            this.remove(new QueryWrapper<ScaleContent>()
+                    .eq("concept_id", conceptId));
+        }
+        // 新增关联内容
+        List<ScaleContent> list = new ArrayList<>();
+        List<ScaleContentVO> scaleContentVOS = scaleContentSaveVO.getContent();
+        for (ScaleContentVO scaleContentVO : scaleContentVOS) {
+            ScaleContent bean = new ScaleContent();
+            BeanUtil.copyProperties(scaleContentVO, bean);
+            bean.setConceptId(conceptId);
+            bean.setModifier(userId);
+            bean.setCreator(userId);
+            bean.setGmtCreate(now);
+            bean.setGmtModified(now);
+            list.add(bean);
+        }
+        scaleContentService.saveBatch(list);
+    }
+
+
+    /**
+     * 量表分页
+     *
+     * @param scaleContentPageVO
+     * @return
+     */
+    public IPage<ScaleContentPageDTO> getListFac(ScaleContentPageVO scaleContentPageVO) {
+        IPage<ScaleContentPageDTO> res = this.getList(scaleContentPageVO);
+        if (res.getTotal() <= 0) {
+            return res;
+        }
+        List<String> personIds = res.getRecords().stream().map(row -> row.getModifier()).collect(Collectors.toList());
+        RespDTO<Map<String, String>> mapRespDTO = userServiceClient.getUserInfoByIds(personIds);
+        RespDTOUtil.respNGDeal(mapRespDTO, "远程调用获取操作人失败");
+        for (ScaleContentPageDTO bean : res.getRecords()) {
+            bean.setModifier(mapRespDTO.data.get(bean.getModifier()));
+        }
+        return res;
+    }
+//
+//
+//    /**
+//     * 量表列表
+//     *
+//     * @param scaleId
+//     * @return
+//     */
+//    public List<ScaleContentDTO> getByParamFac(Long scaleId) {
+//        return this.getByParam(scaleId);
+//    }
+
+
+    /**
+     * 量表删除
+     *
+     * @param deleteScaleVO
+     * @return
+     */
+    public void delete(DeleteScaleVO deleteScaleVO) {
+        if (!(IsDeleteEnum.N.getKey().equals(deleteScaleVO.getStatus())
+                || IsDeleteEnum.Y.getKey().equals(deleteScaleVO.getStatus()))) {
+            throw new CommonException(CommonErrorCode.STATUS_IS_ERROR, "状态值错误【Y】或【N】");
+        }
+        String person = UserUtils.getCurrentPrincipleID();
+        List<Long> ids = deleteScaleVO.getIds();
+        Date now = DateUtil.now();
+        this.update(new ScaleContent(), new UpdateWrapper<ScaleContent>()
+                .in("concept_id", ids)
+                .set("gmt_modified", now)
+                .set("modifier", person)
+                .set("is_deleted", deleteScaleVO.getStatus()));
+    }
+}

+ 35 - 0
knowledgeman-service/src/main/java/com/diagbot/mapper/ScaleContentMapper.java

@@ -0,0 +1,35 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.ScaleContentPageDTO;
+import com.diagbot.entity.ScaleContent;
+import com.diagbot.vo.ScaleContentPageVO;
+
+/**
+ * <p>
+ * 量表内容表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2019-04-08
+ */
+public interface ScaleContentMapper extends BaseMapper<ScaleContent> {
+
+    /**
+     * 获取量表分页
+     *
+     * @param scaleContentPageVO
+     * @return
+     */
+    public IPage<ScaleContentPageDTO> getList(ScaleContentPageVO scaleContentPageVO);
+//
+//
+//    /**
+//     * 返回量表内容
+//     *
+//     * @param scaleId
+//     * @return
+//     */
+//    public List<ScaleContentDTO> getByParam(Long scaleId);
+}

+ 35 - 0
knowledgeman-service/src/main/java/com/diagbot/service/ScaleContentService.java

@@ -0,0 +1,35 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.ScaleContentPageDTO;
+import com.diagbot.entity.ScaleContent;
+import com.diagbot.vo.ScaleContentPageVO;
+
+/**
+ * <p>
+ * 量表内容表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2019-04-08
+ */
+public interface ScaleContentService extends IService<ScaleContent> {
+
+    /**
+     * 获取量表分页
+     *
+     * @param scaleContentPageVO
+     * @return
+     */
+    IPage<ScaleContentPageDTO> getList(ScaleContentPageVO scaleContentPageVO);
+//
+//
+//    /**
+//     * 返回量表内容
+//     *
+//     * @param scaleId
+//     * @return
+//     */
+//    public List<ScaleContentDTO> getByParam(Long scaleId);
+}

+ 33 - 0
knowledgeman-service/src/main/java/com/diagbot/service/impl/ScaleContentServiceImpl.java

@@ -0,0 +1,33 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.ScaleContentPageDTO;
+import com.diagbot.entity.ScaleContent;
+import com.diagbot.mapper.ScaleContentMapper;
+import com.diagbot.service.ScaleContentService;
+import com.diagbot.vo.ScaleContentPageVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 量表内容表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2019-04-08
+ */
+@Service
+public class ScaleContentServiceImpl extends ServiceImpl<ScaleContentMapper, ScaleContent> implements ScaleContentService {
+
+    @Override
+    public IPage<ScaleContentPageDTO> getList(ScaleContentPageVO scaleContentPageVO) {
+        return baseMapper.getList(scaleContentPageVO);
+    }
+
+//
+//    @Override
+//    public List<ScaleContentDTO> getByParam(Long scaleId) {
+//        return baseMapper.getByParam(scaleId);
+//    }
+}

+ 22 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/DeleteScaleVO.java

@@ -0,0 +1,22 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: ztg
+ * @time: 2019/1/28 15:45
+ */
+@Getter
+@Setter
+public class DeleteScaleVO {
+    @NotNull(message="量表概念id不能为空")
+    private List<Long> ids;
+    @NotBlank(message="状态值不能为空")
+    private String status;
+}

+ 17 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/ScaleContentPageVO.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @description:
+ * @author: ztg
+ * @date: 2019/5/9 11:27
+ */
+@Getter
+@Setter
+public class ScaleContentPageVO extends Page {
+    private String status; //状态值
+    private String name;   //量表名称
+}

+ 27 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/ScaleContentSaveVO.java

@@ -0,0 +1,27 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>
+ * 量表内容表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2019-04-08
+ */
+@Getter
+@Setter
+public class ScaleContentSaveVO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private Long conceptId; //量表概念id
+    private List<ScaleContentVO> content = new ArrayList<>();
+
+}

+ 43 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/ScaleContentVO.java

@@ -0,0 +1,43 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 量表内容表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2019-04-08
+ */
+@Getter
+@Setter
+public class ScaleContentVO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 0:文本,1:大数据接口填充
+     */
+    private Integer type;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 69 - 0
knowledgeman-service/src/main/java/com/diagbot/web/ScaleContentController.java

@@ -0,0 +1,69 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.ScaleContentPageDTO;
+import com.diagbot.facade.ScaleContentFacade;
+import com.diagbot.vo.DeleteScaleVO;
+import com.diagbot.vo.ScaleContentPageVO;
+import com.diagbot.vo.ScaleContentSaveVO;
+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.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 量表内容表 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2019-04-08
+ */
+@RestController
+@RequestMapping("/scaleContent")
+@Api(value = "量表内容相关API", tags = { "知识库标准化-量表内容相关API" })
+public class ScaleContentController {
+
+    @Autowired
+    ScaleContentFacade scaleContentFacade;
+
+    @ApiOperation(value = "知识库标准化-量表内容新增或更新[by:zhoutg]")
+    @PostMapping("/insertOrUpdate")
+    @SysLogger("insertOrUpdate")
+    @Transactional
+    public RespDTO<Boolean> insertOrUpdate(@RequestBody ScaleContentSaveVO scaleContentSaveVO) {
+        scaleContentFacade.insertOrUpdate(scaleContentSaveVO);
+        return RespDTO.onSuc(true);
+    }
+
+
+    @ApiOperation(value = "知识库标准化-量表内容分页[by:zhoutg]",
+            notes = "")
+    @PostMapping("/list")
+    @SysLogger("list")
+    public RespDTO<IPage<ScaleContentPageDTO>> list(@RequestBody ScaleContentPageVO questionPageVO) {
+        IPage<ScaleContentPageDTO> data = scaleContentFacade.getListFac(questionPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+
+    @ApiOperation(value = "知识库标准化-量表内容删除|恢复[by:zhoutg]",
+            notes = "ids:量表概念id<br>" +
+                    "status: 删除传值'Y'<br>" +
+                    "        恢复传值'N'")
+    @PostMapping("/delete")
+    @SysLogger("delete")
+    public  RespDTO<Boolean> delete(@Valid @RequestBody DeleteScaleVO deleteScaleVO) {
+        scaleContentFacade.delete(deleteScaleVO);
+        return RespDTO.onSuc(true);
+    }
+}

+ 27 - 0
knowledgeman-service/src/main/resources/mapper/ScaleContentMapper.xml

@@ -0,0 +1,27 @@
+<?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.ScaleContentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.ScaleContent">
+        <result column="content" property="content" />
+        <result column="type" property="type" />
+    </resultMap>
+
+    <select id="getList" resultType="com.diagbot.dto.ScaleContentPageDTO">
+        SELECT DISTINCT b.lib_name name, b.id concept_id, a.gmt_modified, a.modifier, a.is_deleted
+        FROM `kl_scale` a, kl_concept b
+        where a.concept_id = b.id
+        and b.is_deleted = 'N'
+        <if test="status != null and status != ''">
+            and a.is_deleted = #{status}
+        </if>
+        <if test="name != null and name != ''">
+            and b.lib_name like concat('%',#{name} ,'%' )
+        </if>
+        and b.lib_type = 48
+        ORDER BY a.is_deleted, a.gmt_modified
+    </select>
+
+
+</mapper>