Browse Source

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

wangyu 6 năm trước cách đây
mục cha
commit
07bbf7f778
51 tập tin đã thay đổi với 1550 bổ sung48 xóa
  1. 28 0
      icss-service/src/main/java/com/diagbot/dto/InquiryDetailDTO.java
  2. 10 0
      icss-service/src/main/java/com/diagbot/dto/SaveInquiryDTO.java
  3. 159 0
      icss-service/src/main/java/com/diagbot/entity/InquiryDetail.java
  4. 250 0
      icss-service/src/main/java/com/diagbot/entity/InquiryInfo.java
  5. 36 12
      icss-service/src/main/java/com/diagbot/entity/IntroduceDetail.java
  6. 49 0
      icss-service/src/main/java/com/diagbot/enums/IntroducePositionEnum.java
  7. 2 2
      icss-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java
  8. 22 0
      icss-service/src/main/java/com/diagbot/facade/InquiryInfoFacade.java
  9. 3 2
      icss-service/src/main/java/com/diagbot/facade/PrintRecordFacade.java
  10. 16 0
      icss-service/src/main/java/com/diagbot/mapper/InquiryDetailMapper.java
  11. 16 0
      icss-service/src/main/java/com/diagbot/mapper/InquiryInfoMapper.java
  12. 16 0
      icss-service/src/main/java/com/diagbot/service/InquiryDetailService.java
  13. 16 0
      icss-service/src/main/java/com/diagbot/service/InquiryInfoService.java
  14. 20 0
      icss-service/src/main/java/com/diagbot/service/impl/InquiryDetailServiceImpl.java
  15. 20 0
      icss-service/src/main/java/com/diagbot/service/impl/InquiryInfoServiceImpl.java
  16. 27 0
      icss-service/src/main/java/com/diagbot/vo/ContentsVO.java
  17. 3 2
      icss-service/src/main/java/com/diagbot/vo/PrintRecordsVO.java
  18. 84 0
      icss-service/src/main/java/com/diagbot/vo/SaveInquiryVO.java
  19. 2 1
      icss-service/src/main/java/com/diagbot/web/DeptInfoController.java
  20. 1 0
      icss-service/src/main/java/com/diagbot/web/DoctorInfoController.java
  21. 1 0
      icss-service/src/main/java/com/diagbot/web/HospitalInfoController.java
  22. 43 0
      icss-service/src/main/java/com/diagbot/web/InquiryInfoController.java
  23. 1 0
      icss-service/src/main/java/com/diagbot/web/IntroduceInfoController.java
  24. 1 0
      icss-service/src/main/java/com/diagbot/web/ModuleInfoController.java
  25. 1 0
      icss-service/src/main/java/com/diagbot/web/PatientInfoController.java
  26. 14 11
      icss-service/src/main/java/com/diagbot/web/PrintRecordController.java
  27. 1 0
      icss-service/src/main/java/com/diagbot/web/PushController.java
  28. 1 0
      icss-service/src/main/java/com/diagbot/web/QuestionInfoController.java
  29. 1 0
      icss-service/src/main/java/com/diagbot/web/QuestionUsualController.java
  30. 1 0
      icss-service/src/main/java/com/diagbot/web/RetrievalController.java
  31. 1 0
      icss-service/src/main/java/com/diagbot/web/TranFieldInfoController.java
  32. 19 0
      icss-service/src/main/resources/mapper/InquiryDetailMapper.xml
  33. 26 0
      icss-service/src/main/resources/mapper/InquiryInfoMapper.xml
  34. 1 0
      icss-service/src/main/resources/mapper/IntroduceDetailMapper.xml
  35. 1 0
      icssman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  36. 1 0
      icssman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  37. 36 12
      icssman-service/src/main/java/com/diagbot/entity/IntroduceDetail.java
  38. 355 0
      icssman-service/src/main/java/com/diagbot/entity/QuestionInfo.java
  39. 49 0
      icssman-service/src/main/java/com/diagbot/enums/IntroducePositionEnum.java
  40. 58 2
      icssman-service/src/main/java/com/diagbot/facade/DeptVitalFacade.java
  41. 13 0
      icssman-service/src/main/java/com/diagbot/facade/QuestionInfoFacade.java
  42. 16 0
      icssman-service/src/main/java/com/diagbot/mapper/QuestionInfoMapper.java
  43. 16 0
      icssman-service/src/main/java/com/diagbot/service/QuestionInfoService.java
  44. 20 0
      icssman-service/src/main/java/com/diagbot/service/impl/QuestionInfoServiceImpl.java
  45. 20 0
      icssman-service/src/main/java/com/diagbot/vo/DeptVitalVO.java
  46. 0 2
      icssman-service/src/main/java/com/diagbot/web/DeptInfoController.java
  47. 17 0
      icssman-service/src/main/java/com/diagbot/web/DeptVitalController.java
  48. 20 0
      icssman-service/src/main/java/com/diagbot/web/QuestionInfoController.java
  49. 1 2
      icssman-service/src/main/java/com/diagbot/web/VitalOrderController.java
  50. 1 0
      icssman-service/src/main/resources/mapper/IntroduceDetailMapper.xml
  51. 34 0
      icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

+ 28 - 0
icss-service/src/main/java/com/diagbot/dto/InquiryDetailDTO.java

@@ -0,0 +1,28 @@
+/**
+ * 
+ */
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description
+ * @author rgb
+ * @time 2018年11月23日下午2:29:43
+ */
+@Getter
+@Setter
+public class InquiryDetailDTO {
+	
+	/**
+     * 类型(1:主诉,2现病史,3其他史,4查体,5化验,6辅检,7诊断,8医嘱)
+     */
+    private Integer type;
+
+    /**
+     * 内容字符串
+     */
+    private String content;
+
+}

+ 10 - 0
icss-service/src/main/java/com/diagbot/dto/SaveInquiryDTO.java

@@ -0,0 +1,10 @@
+package com.diagbot.dto;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2018/11/19 18:56
+ */
+public class SaveInquiryDTO{
+		
+}

+ 159 - 0
icss-service/src/main/java/com/diagbot/entity/InquiryDetail.java

@@ -0,0 +1,159 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 问诊记录明细表
+ * </p>
+ *
+ * @author rengb
+ * @since 2018-11-23
+ */
+@TableName("icss_inquiry_detail")
+public class InquiryDetail implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 问诊记录id
+     */
+    private Long inquiryId;
+
+    /**
+     * 类型(1:主诉,2现病史,3其他史,4查体,5化验,6辅检,7诊断,8医嘱)
+     */
+    private Integer type;
+
+    /**
+     * 内容字符串
+     */
+    private String content;
+
+    /**
+     * 备注
+     */
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime 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 Long getInquiryId() {
+        return inquiryId;
+    }
+
+    public void setInquiryId(Long inquiryId) {
+        this.inquiryId = inquiryId;
+    }
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "InquiryDetail{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", inquiryId=" + inquiryId +
+        ", type=" + type +
+        ", content=" + content +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 250 - 0
icss-service/src/main/java/com/diagbot/entity/InquiryInfo.java

@@ -0,0 +1,250 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 问诊记录表
+ * </p>
+ *
+ * @author rengb
+ * @since 2018-11-23
+ */
+@TableName("icss_inquiry_info")
+public class InquiryInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    private Long hospitalId;
+
+    /**
+     * 科室id
+     */
+    private Long hospitalDeptId;
+
+    /**
+     * 医生id
+     */
+    private Long doctorId;
+
+    /**
+     * 患者id
+     */
+    private Long patientId;
+
+    /**
+     * 就诊序列号
+     */
+    private String inquiryCode;
+
+    /**
+     * 就诊状态(0待接诊,1接诊中,2完成接诊)
+     */
+    private Integer regVisitedState;
+
+    /**
+     * 分类(1:门诊,2:住院)
+     */
+    private Integer type;
+
+    /**
+     * 诊断
+     */
+    private String diagnose;
+
+    /**
+     * 类型:1:结构化 2:文本模式
+     */
+    private Integer sign;
+
+    /**
+     * 内容JSON字符串
+     */
+    private String dataJson;
+
+    /**
+     * 备注
+     */
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime 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 Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public Long getHospitalDeptId() {
+        return hospitalDeptId;
+    }
+
+    public void setHospitalDeptId(Long hospitalDeptId) {
+        this.hospitalDeptId = hospitalDeptId;
+    }
+    public Long getDoctorId() {
+        return doctorId;
+    }
+
+    public void setDoctorId(Long doctorId) {
+        this.doctorId = doctorId;
+    }
+    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 Integer getRegVisitedState() {
+        return regVisitedState;
+    }
+
+    public void setRegVisitedState(Integer regVisitedState) {
+        this.regVisitedState = regVisitedState;
+    }
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+    public String getDiagnose() {
+        return diagnose;
+    }
+
+    public void setDiagnose(String diagnose) {
+        this.diagnose = diagnose;
+    }
+    public Integer getSign() {
+        return sign;
+    }
+
+    public void setSign(Integer sign) {
+        this.sign = sign;
+    }
+    public String getDataJson() {
+        return dataJson;
+    }
+
+    public void setDataJson(String dataJson) {
+        this.dataJson = dataJson;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "InquiryInfo{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", hospitalId=" + hospitalId +
+        ", hospitalDeptId=" + hospitalDeptId +
+        ", doctorId=" + doctorId +
+        ", patientId=" + patientId +
+        ", inquiryCode=" + inquiryCode +
+        ", regVisitedState=" + regVisitedState +
+        ", type=" + type +
+        ", diagnose=" + diagnose +
+        ", sign=" + sign +
+        ", dataJson=" + dataJson +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 36 - 12
icss-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -65,6 +65,11 @@ public class IntroduceDetail implements Serializable {
      */
     private String content;
 
+    /**
+     * 提示明细内容-纯文本
+     */
+    private String text;
+
     /**
      * 提示明细序号
      */
@@ -82,6 +87,7 @@ public class IntroduceDetail implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -89,6 +95,7 @@ public class IntroduceDetail implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
+
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -96,6 +103,7 @@ public class IntroduceDetail implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
+
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -103,6 +111,7 @@ public class IntroduceDetail implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -110,6 +119,7 @@ public class IntroduceDetail implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }
@@ -117,6 +127,7 @@ public class IntroduceDetail implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+
     public Long getIntroduceId() {
         return introduceId;
     }
@@ -124,6 +135,7 @@ public class IntroduceDetail implements Serializable {
     public void setIntroduceId(Long introduceId) {
         this.introduceId = introduceId;
     }
+
     public String getTitle() {
         return title;
     }
@@ -131,6 +143,7 @@ public class IntroduceDetail implements Serializable {
     public void setTitle(String title) {
         this.title = title;
     }
+
     public String getContent() {
         return content;
     }
@@ -138,6 +151,15 @@ public class IntroduceDetail implements Serializable {
     public void setContent(String content) {
         this.content = content;
     }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
     public Integer getOrderNo() {
         return orderNo;
     }
@@ -145,6 +167,7 @@ public class IntroduceDetail implements Serializable {
     public void setOrderNo(Integer orderNo) {
         this.orderNo = orderNo;
     }
+
     public Integer getPosition() {
         return position;
     }
@@ -156,17 +179,18 @@ public class IntroduceDetail implements Serializable {
     @Override
     public String toString() {
         return "IntroduceDetail{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", introduceId=" + introduceId +
-        ", title=" + title +
-        ", content=" + content +
-        ", orderNo=" + orderNo +
-        ", position=" + position +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", introduceId=" + introduceId +
+                ", title=" + title +
+                ", content=" + content +
+                ", text=" + text +
+                ", orderNo=" + orderNo +
+                ", position=" + position +
+                "}";
     }
 }

+ 49 - 0
icss-service/src/main/java/com/diagbot/enums/IntroducePositionEnum.java

@@ -0,0 +1,49 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:提示信息展示位置
+ * @Author:zhaops
+ * @time: 2018/11/23 10:12
+ */
+public enum IntroducePositionEnum implements KeyedNamed {
+    Right(1, "右侧"),
+    All(0, "右侧+全文");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    IntroducePositionEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static IntroducePositionEnum getEnum(Integer key) {
+        for (IntroducePositionEnum item : IntroducePositionEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        IntroducePositionEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 2 - 2
icss-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java

@@ -23,12 +23,12 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
      * @param deptInfoVO
      * @return
      */
-    public RespDTO<List<DeptInfoDTO>> getDeptInfo(DeptInfoVO deptInfoVO) {
+    public List<DeptInfoDTO> getDeptInfo(DeptInfoVO deptInfoVO) {
         List<DeptInfoDTO> deptInfoDTOList = this.getDeptInfos(deptInfoVO.getDeptCode(),deptInfoVO.getHosptialCode());
         if(deptInfoDTOList == null || deptInfoDTOList.size() == 0){
             throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "获取科室信息失败");
         }
-        return RespDTO.onSuc(deptInfoDTOList);
+        return deptInfoDTOList;
     }
 }

+ 22 - 0
icss-service/src/main/java/com/diagbot/facade/InquiryInfoFacade.java

@@ -0,0 +1,22 @@
+/**
+ * 
+ */
+package com.diagbot.facade;
+
+import com.diagbot.dto.SaveInquiryDTO;
+import com.diagbot.service.impl.InquiryInfoServiceImpl;
+import com.diagbot.vo.SaveInquiryVO;
+
+/**
+ * @Description
+ * @author rengb
+ * @time 2018年11月23日下午2:08:08
+ */
+public class InquiryInfoFacade extends InquiryInfoServiceImpl {
+	
+	public SaveInquiryDTO saveInquiry(SaveInquiryVO saveInquiryVO){
+		
+		return null;
+	}
+
+}

+ 3 - 2
icss-service/src/main/java/com/diagbot/facade/PrintRecordFacade.java

@@ -1,10 +1,11 @@
 package com.diagbot.facade;
 
-import com.diagbot.util.DateUtil;
 import org.springframework.stereotype.Component;
 
 import com.diagbot.entity.PrintRecord;
 import com.diagbot.service.impl.PrintRecordServiceImpl;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.GsonUtil;
 import com.diagbot.vo.PrintRecordsVO;
 
 /**
@@ -32,7 +33,7 @@ public class PrintRecordFacade extends PrintRecordServiceImpl{
 		printRecord.setHospitalId(printRecordsVO.getHospitalId());//医院id
 		printRecord.setInquiryCode(printRecordsVO.getInquiryCode());//就诊号
 		printRecord.setPatientId(printRecordsVO.getPatientId());//患者id
-		printRecord.setContent(printRecordsVO.getContent());//文件展现
+		printRecord.setContent(GsonUtil.toJson(printRecordsVO.getContent()));//文件展现
 		printRecord.setDataJson(printRecordsVO.getDataJson());//打印数据json
 		boolean res = save(printRecord);
 		return res;

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.InquiryDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 问诊记录明细表 Mapper 接口
+ * </p>
+ *
+ * @author rengb
+ * @since 2018-11-23
+ */
+public interface InquiryDetailMapper extends BaseMapper<InquiryDetail> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.InquiryInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 问诊记录表 Mapper 接口
+ * </p>
+ *
+ * @author rengb
+ * @since 2018-11-23
+ */
+public interface InquiryInfoMapper extends BaseMapper<InquiryInfo> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.InquiryDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 问诊记录明细表 服务类
+ * </p>
+ *
+ * @author rengb
+ * @since 2018-11-23
+ */
+public interface InquiryDetailService extends IService<InquiryDetail> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.InquiryInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 问诊记录表 服务类
+ * </p>
+ *
+ * @author rengb
+ * @since 2018-11-23
+ */
+public interface InquiryInfoService extends IService<InquiryInfo> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.InquiryDetail;
+import com.diagbot.mapper.InquiryDetailMapper;
+import com.diagbot.service.InquiryDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 问诊记录明细表 服务实现类
+ * </p>
+ *
+ * @author rengb
+ * @since 2018-11-23
+ */
+@Service
+public class InquiryDetailServiceImpl extends ServiceImpl<InquiryDetailMapper, InquiryDetail> implements InquiryDetailService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.InquiryInfo;
+import com.diagbot.mapper.InquiryInfoMapper;
+import com.diagbot.service.InquiryInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 问诊记录表 服务实现类
+ * </p>
+ *
+ * @author rengb
+ * @since 2018-11-23
+ */
+@Service
+public class InquiryInfoServiceImpl extends ServiceImpl<InquiryInfoMapper, InquiryInfo> implements InquiryInfoService {
+
+}

+ 27 - 0
icss-service/src/main/java/com/diagbot/vo/ContentsVO.java

@@ -0,0 +1,27 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: 类型(1:主诉,2现病史,3其他史,4查体,5化验,6辅检,7诊断,8医嘱)
+ * @date 2018年11月23日 下午2:20:02
+ */
+
+@Getter
+@Setter
+public class ContentsVO {
+	 /**
+     * 类型(1:主诉,2现病史,3其他史,4查体,5化验,6辅检,7诊断,8医嘱)
+     */
+    private String chief;//主诉
+    private String present;//现病史
+    private String other;//其他史
+    private String vital;//查体
+    private String lis;//化验
+    private String pacs;//辅检
+    private String diag;//诊断
+    private String advice;//医嘱
+}

+ 3 - 2
icss-service/src/main/java/com/diagbot/vo/PrintRecordsVO.java

@@ -1,5 +1,7 @@
 package com.diagbot.vo;
 
+import java.util.List;
+
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
 
@@ -51,8 +53,7 @@ public class PrintRecordsVO {
     /**
      * 文本内容
      */
-	@NotBlank(message = "请输入文本内容")
-    private String content;
+    private ContentsVO content;
 
     /**
      * 内容JSON字符串(打印页面展示)

+ 84 - 0
icss-service/src/main/java/com/diagbot/vo/SaveInquiryVO.java

@@ -0,0 +1,84 @@
+package com.diagbot.vo;
+
+import java.util.List;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+
+import com.diagbot.dto.InquiryDetailDTO;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2018/11/19 18:58
+ */
+@Getter
+@Setter
+public class SaveInquiryVO {
+	
+	/**
+     * 医院id
+     */
+	@NotBlank(message="医院id必传")
+    private Long hospitalId;
+
+    /**
+     * 科室id
+     */
+	@NotBlank(message="科室id必传")
+    private Long hospitalDeptId;
+
+    /**
+     * 医生id
+     */
+	@NotBlank(message="医生id必传")
+    private Long doctorId;
+
+    /**
+     * 患者id
+     */
+	@NotBlank(message="患者id必传")
+    private Long patientId;
+
+    /**
+     * 就诊序列号
+     */
+	@NotBlank(message="就诊序列号必传")
+    private String inquiryCode;
+
+    /**
+     * 就诊状态(0待接诊,1接诊中,2完成接诊)
+     */
+    private Integer regVisitedState=1;
+
+    /**
+     * 分类(1:门诊,2:住院)
+     */
+    private Integer type=1;
+
+    /**
+     * 诊断
+     */
+    @NotBlank(message="诊断必传")
+    private String diagnose;
+
+    /**
+     * 类型:1:结构化 2:文本模式
+     */
+    private Integer sign=1;
+
+    /**
+     * 内容JSON字符串
+     */
+    @NotBlank(message="内容JSON字符串必传")
+    private String dataJson;
+    
+    @Valid
+    @NotEmpty
+    private List<InquiryDetailDTO> detailList;
+   
+}

+ 2 - 1
icss-service/src/main/java/com/diagbot/web/DeptInfoController.java

@@ -28,6 +28,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/deptInfo")
 @Api(value = "科室信息API", tags = { "科室信息API" })
+@SuppressWarnings("unchecked")
 public class DeptInfoController {
 
     @Autowired
@@ -39,6 +40,6 @@ public class DeptInfoController {
     @PostMapping("/getDeptInfo")
     @SysLogger("getDeptInfo")
     public RespDTO<List<DeptInfoDTO>> getDeptInfo(@Valid @RequestBody DeptInfoVO deptInfoVO) {
-        return deptInfoFacade.getDeptInfo(deptInfoVO);
+        return RespDTO.onSuc(deptInfoFacade.getDeptInfo(deptInfoVO));
     }
 }

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/DoctorInfoController.java

@@ -28,6 +28,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/doctorInfo")
 @Api(value = "医生信息API", tags = { "医生信息API" })
+@SuppressWarnings("unchecked")
 public class DoctorInfoController {
 
     @Autowired

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/HospitalInfoController.java

@@ -24,6 +24,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/hospitalInfo")
 @Api(value = "医院信息API", tags = { "医院信息API" })
+@SuppressWarnings("unchecked")
 public class HospitalInfoController {
 
     @Autowired

+ 43 - 0
icss-service/src/main/java/com/diagbot/web/InquiryInfoController.java

@@ -0,0 +1,43 @@
+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.RespDTO;
+import com.diagbot.dto.SaveInquiryDTO;
+import com.diagbot.facade.InquiryInfoFacade;
+import com.diagbot.vo.SaveInquiryVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * @author rengb
+ * @since 2018-11-23
+ */
+@RestController
+@RequestMapping("/inquiryInfo")
+@Api(value = "问诊记录API", tags = { "问诊记录API" })
+@SuppressWarnings("unchecked")
+public class InquiryInfoController {
+	
+	@Autowired
+    private InquiryInfoFacade inquiryInfoFacade;
+	
+	 @ApiOperation(value = "问诊记录保存[by:rengb]")
+	 @PostMapping("/getTopPatientInfo")
+	 @SysLogger("getTopPatientInfo")
+	 public RespDTO<SaveInquiryDTO> saveInquiry(@Valid @RequestBody SaveInquiryVO saveInquiryVO) {
+		 return RespDTO.onSuc(inquiryInfoFacade.saveInquiry(saveInquiryVO));
+	 }
+	
+	
+
+}

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/IntroduceInfoController.java

@@ -27,6 +27,7 @@ import javax.validation.Valid;
 @RestController
 @RequestMapping("/introduceInfo")
 @Api(value = "提示信息相关API", tags = { "提示信息相关API" })
+@SuppressWarnings("unchecked")
 public class IntroduceInfoController {
 
     @Autowired

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/ModuleInfoController.java

@@ -26,6 +26,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/moduleInfo")
 @Api(value = "模型相关API", tags = { "模型相关API" })
+@SuppressWarnings("unchecked")
 public class ModuleInfoController {
 
     @Autowired

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -30,6 +30,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/patientInfo")
 @Api(value = "患者信息API", tags = { "患者信息API" })
+@SuppressWarnings("unchecked")
 public class PatientInfoController {
     @Autowired
     private PatientInfoFacade patientInfoFacade;

+ 14 - 11
icss-service/src/main/java/com/diagbot/web/PrintRecordController.java

@@ -1,7 +1,8 @@
 package com.diagbot.web;
 
-
 import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.PrintRecordFacade;
+import com.diagbot.vo.ContentsVO;
 import com.diagbot.vo.PrintRecordsVO;
 
 import io.swagger.annotations.Api;
@@ -29,20 +31,21 @@ import io.swagger.annotations.ApiOperation;
 @Api(value = "打印记录API[by:wangfeng]", tags = { "打印记录API" })
 @SuppressWarnings("unchecked")
 public class PrintRecordController {
-	
+
 	@Autowired
 	PrintRecordFacade printRecordFacade;
-	
-	@ApiOperation(value = "保存打印记录",notes = "保存打印记录")
-    @PostMapping("/savePrintRecords")
+
+	@ApiOperation(value = "保存打印记录", notes = "疾病名称 :name</br>医生id:doctorId</br>医院编码 : hospitalId</br>"
+			+ "患者id:patientId</br>"
+			+ "医院部门id:hospitalDeptId</br> 问诊号:inquiryCode</br>文本内容 :content </br>{chief;//主诉present;//现病史other;//其他史vital;//查体lis;//化验pacs;//辅检diag;//诊断advice;//医嘱}</br>dataJson:内容JSON字符串(打印页面展示)")
+	@PostMapping("/savePrintRecords")
 	@SysLogger("savePrintRecords")
 	@Transactional
-    public RespDTO<Boolean> savePrintRecords(@Valid @RequestBody PrintRecordsVO printRecordsVO) {
+	public RespDTO<Boolean> savePrintRecords(@Valid @RequestBody PrintRecordsVO printRecordsVO) {
+
+		boolean res = printRecordFacade.savePrintRecord(printRecordsVO);
 
-        boolean res = printRecordFacade.savePrintRecord(printRecordsVO);
-        
-        return RespDTO.onSuc(res);
-    }
-	
+		return RespDTO.onSuc(res);
+	}
 
 }

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/PushController.java

@@ -24,6 +24,7 @@ import javax.validation.Valid;
 @RestController
 @RequestMapping("/push")
 @Api(value = "推理相关API", tags = { "推理相关API" })
+@SuppressWarnings("unchecked")
 public class PushController {
 
     @Autowired

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/QuestionInfoController.java

@@ -27,6 +27,7 @@ import java.util.Map;
 @RequestMapping("/questionInfo")
 @RestController
 @Api(value = "标签相关API", tags = { "标签相关API" })
+@SuppressWarnings("unchecked")
 public class QuestionInfoController {
 
     @Autowired

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/QuestionUsualController.java

@@ -28,6 +28,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/questionUsual")
 @Api(value = "常用标签检索API", tags = { "常用标签API" })
+@SuppressWarnings("unchecked")
 public class QuestionUsualController {
 
     @Autowired

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/RetrievalController.java

@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("/retrieval")
 @Api(value = "同义词检索API", tags = { "同义词检索API" })
+@SuppressWarnings("unchecked")
 public class RetrievalController {
 
 }

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/TranFieldInfoController.java

@@ -28,6 +28,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/tranFieldInfo")
 @Api(value = "字段对应信息API", tags = { "字段对应信息API" })
+@SuppressWarnings("unchecked")
 public class TranFieldInfoController {
     @Autowired
     TranFieldInfoFacade tranFieldInfoFacade;

+ 19 - 0
icss-service/src/main/resources/mapper/InquiryDetailMapper.xml

@@ -0,0 +1,19 @@
+<?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.InquiryDetailMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.InquiryDetail">
+        <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="inquiry_id" property="inquiryId" />
+        <result column="type" property="type" />
+        <result column="content" property="content" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 26 - 0
icss-service/src/main/resources/mapper/InquiryInfoMapper.xml

@@ -0,0 +1,26 @@
+<?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.InquiryInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.InquiryInfo">
+        <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="hospital_id" property="hospitalId" />
+        <result column="hospital_dept_id" property="hospitalDeptId" />
+        <result column="doctor_id" property="doctorId" />
+        <result column="patient_id" property="patientId" />
+        <result column="inquiry_code" property="inquiryCode" />
+        <result column="reg_visited_state" property="regVisitedState" />
+        <result column="type" property="type" />
+        <result column="diagnose" property="diagnose" />
+        <result column="sign" property="sign" />
+        <result column="data_json" property="dataJson" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 1 - 0
icss-service/src/main/resources/mapper/IntroduceDetailMapper.xml

@@ -13,6 +13,7 @@
         <result column="introduce_id" property="introduceId" />
         <result column="title" property="title" />
         <result column="content" property="content" />
+        <result column="text" property="text" />
         <result column="order_no" property="orderNo" />
         <result column="position" property="position" />
     </resultMap>

+ 1 - 0
icssman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -27,6 +27,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .authorizeRequests()
                 .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
                 .antMatchers("/file/upload").permitAll()
+                .antMatchers("/introduceInfo/saveIntroduce").permitAll()
                 .antMatchers("/**").authenticated();
         //        .antMatchers("/**").permitAll();
     }

+ 1 - 0
icssman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -90,6 +90,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/actuator/**", request)
                 || matchers("/hystrix/**", request)
                 || matchers("/file/upload", request)
+                || matchers("introduceInfo/saveIntroduce", request)
                 || matchers("/", request)) {
             return true;
         }

+ 36 - 12
icssman-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -65,6 +65,11 @@ public class IntroduceDetail implements Serializable {
      */
     private String content;
 
+    /**
+     * 提示明细内容-纯文本
+     */
+    private String text;
+
     /**
      * 提示明细序号
      */
@@ -82,6 +87,7 @@ public class IntroduceDetail implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -89,6 +95,7 @@ public class IntroduceDetail implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
+
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -96,6 +103,7 @@ public class IntroduceDetail implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
+
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -103,6 +111,7 @@ public class IntroduceDetail implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -110,6 +119,7 @@ public class IntroduceDetail implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }
@@ -117,6 +127,7 @@ public class IntroduceDetail implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+
     public Long getIntroduceId() {
         return introduceId;
     }
@@ -124,6 +135,7 @@ public class IntroduceDetail implements Serializable {
     public void setIntroduceId(Long introduceId) {
         this.introduceId = introduceId;
     }
+
     public String getTitle() {
         return title;
     }
@@ -131,6 +143,7 @@ public class IntroduceDetail implements Serializable {
     public void setTitle(String title) {
         this.title = title;
     }
+
     public String getContent() {
         return content;
     }
@@ -138,13 +151,23 @@ public class IntroduceDetail implements Serializable {
     public void setContent(String content) {
         this.content = content;
     }
+
     public Integer getOrderNo() {
         return orderNo;
     }
 
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
     public void setOrderNo(Integer orderNo) {
         this.orderNo = orderNo;
     }
+
     public Integer getPosition() {
         return position;
     }
@@ -156,17 +179,18 @@ public class IntroduceDetail implements Serializable {
     @Override
     public String toString() {
         return "IntroduceDetail{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", introduceId=" + introduceId +
-        ", title=" + title +
-        ", content=" + content +
-        ", orderNo=" + orderNo +
-        ", position=" + position +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", introduceId=" + introduceId +
+                ", title=" + title +
+                ", content=" + content +
+                ", text=" + text +
+                ", orderNo=" + orderNo +
+                ", position=" + position +
+                "}";
     }
 }

+ 355 - 0
icssman-service/src/main/java/com/diagbot/entity/QuestionInfo.java

@@ -0,0 +1,355 @@
+package com.diagbot.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 标签基础表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-23
+ */
+@TableName("icss_question_info")
+public class QuestionInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 标签名
+     */
+    private String tagName;
+
+    /**
+     * 内容
+     */
+    private String name;
+
+    /**
+     * 性别(1:男 2:女 3:通用)
+     */
+    private Integer sexType;
+
+    /**
+     * 最小年龄
+     */
+    private Integer ageBegin;
+
+    /**
+     * 最大年龄
+     */
+    private Integer ageEnd;
+
+    /**
+     * 标签标识(1:单项单问题,例如: 程度,咳出通畅度  2:单项多问题,例如:杂音,添加症状 3:填充项,例如:有前后缀的输入框 4:横铺组合项,例如:咳嗽,发热 5:竖铺组合项,例如:诊疗变化)
+     */
+    private String tagType;
+
+    /**
+     * 控件类型(0:无类型,默认值 1:下拉单选 2:下拉多选 3:联合下拉单选 4:联合下拉多选 5:占位标签 6:文本框 7:数字键盘文本框 99:联合推送)
+     */
+    private Integer controlType;
+
+    /**
+     * 类型(1:症状 3:其他史 4:查体,5:化验 6:辅检 7:诊断)
+     */
+    private Integer type;
+
+    /**
+     * 子类型,(0:本身,1:描述类型 31:既往史 32:家族史 33:个人史 34:月经史 35:婚育史)
+     */
+    private Integer subType;
+
+    /**
+     * 前置内容
+     */
+    private String labelPrefix;
+
+    /**
+     * 后置内容
+     */
+    private String labelSuffix;
+
+    /**
+     * 最小值
+     */
+    private BigDecimal minValue;
+
+    /**
+     * 最大值
+     */
+    private BigDecimal maxValue;
+
+    /**
+     * 判断类型(0:本身异常;1:本身正常;2:数字范围;3:计算公式;9:无需判断)
+     */
+    private String judgeType;
+
+    /**
+     * 文本生成规则(0:点选顺序,例如初为 1:从上到下,从左到右,例如查体杂音 2:从左到右,从上到下,例如伴/无)
+     */
+    private Integer textGenerate;
+
+    /**
+     * 是否复制 (0:不复制,1:复制)
+     */
+    private String copyType;
+
+    /**
+     * 是否显示+ (0:不显示 1:显示),+功能等于复制
+     */
+    private Integer showAdd;
+
+    /**
+     * 提示语
+     */
+    private String placeholder;
+
+    /**
+     * 备注
+     */
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime 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 getTagName() {
+        return tagName;
+    }
+
+    public void setTagName(String tagName) {
+        this.tagName = tagName;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public Integer getSexType() {
+        return sexType;
+    }
+
+    public void setSexType(Integer sexType) {
+        this.sexType = sexType;
+    }
+    public Integer getAgeBegin() {
+        return ageBegin;
+    }
+
+    public void setAgeBegin(Integer ageBegin) {
+        this.ageBegin = ageBegin;
+    }
+    public Integer getAgeEnd() {
+        return ageEnd;
+    }
+
+    public void setAgeEnd(Integer ageEnd) {
+        this.ageEnd = ageEnd;
+    }
+    public String getTagType() {
+        return tagType;
+    }
+
+    public void setTagType(String tagType) {
+        this.tagType = tagType;
+    }
+    public Integer getControlType() {
+        return controlType;
+    }
+
+    public void setControlType(Integer controlType) {
+        this.controlType = controlType;
+    }
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+    public Integer getSubType() {
+        return subType;
+    }
+
+    public void setSubType(Integer subType) {
+        this.subType = subType;
+    }
+    public String getLabelPrefix() {
+        return labelPrefix;
+    }
+
+    public void setLabelPrefix(String labelPrefix) {
+        this.labelPrefix = labelPrefix;
+    }
+    public String getLabelSuffix() {
+        return labelSuffix;
+    }
+
+    public void setLabelSuffix(String labelSuffix) {
+        this.labelSuffix = labelSuffix;
+    }
+    public BigDecimal getMinValue() {
+        return minValue;
+    }
+
+    public void setMinValue(BigDecimal minValue) {
+        this.minValue = minValue;
+    }
+    public BigDecimal getMaxValue() {
+        return maxValue;
+    }
+
+    public void setMaxValue(BigDecimal maxValue) {
+        this.maxValue = maxValue;
+    }
+    public String getJudgeType() {
+        return judgeType;
+    }
+
+    public void setJudgeType(String judgeType) {
+        this.judgeType = judgeType;
+    }
+    public Integer getTextGenerate() {
+        return textGenerate;
+    }
+
+    public void setTextGenerate(Integer textGenerate) {
+        this.textGenerate = textGenerate;
+    }
+    public String getCopyType() {
+        return copyType;
+    }
+
+    public void setCopyType(String copyType) {
+        this.copyType = copyType;
+    }
+    public Integer getShowAdd() {
+        return showAdd;
+    }
+
+    public void setShowAdd(Integer showAdd) {
+        this.showAdd = showAdd;
+    }
+    public String getPlaceholder() {
+        return placeholder;
+    }
+
+    public void setPlaceholder(String placeholder) {
+        this.placeholder = placeholder;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionInfo{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", tagName=" + tagName +
+        ", name=" + name +
+        ", sexType=" + sexType +
+        ", ageBegin=" + ageBegin +
+        ", ageEnd=" + ageEnd +
+        ", tagType=" + tagType +
+        ", controlType=" + controlType +
+        ", type=" + type +
+        ", subType=" + subType +
+        ", labelPrefix=" + labelPrefix +
+        ", labelSuffix=" + labelSuffix +
+        ", minValue=" + minValue +
+        ", maxValue=" + maxValue +
+        ", judgeType=" + judgeType +
+        ", textGenerate=" + textGenerate +
+        ", copyType=" + copyType +
+        ", showAdd=" + showAdd +
+        ", placeholder=" + placeholder +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 49 - 0
icssman-service/src/main/java/com/diagbot/enums/IntroducePositionEnum.java

@@ -0,0 +1,49 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:提示信息展示位置
+ * @Author:zhaops
+ * @time: 2018/11/23 10:12
+ */
+public enum IntroducePositionEnum implements KeyedNamed {
+    Right(1, "右侧"),
+    All(0, "右侧+全文");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    IntroducePositionEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static IntroducePositionEnum getEnum(Integer key) {
+        for (IntroducePositionEnum item : IntroducePositionEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        IntroducePositionEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 58 - 2
icssman-service/src/main/java/com/diagbot/facade/DeptVitalFacade.java

@@ -1,13 +1,69 @@
 package com.diagbot.facade;
 
-import com.diagbot.service.impl.DeptInfoServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.DeptVital;
+import com.diagbot.entity.QuestionInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.QuestionTypeEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.DeptVitalServiceImpl;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.vo.DeptVitalVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @Description:
  * @Author:zhaops
  * @time: 2018/11/22 11:45
  */
 @Component
-public class DeptVitalFacade extends DeptInfoServiceImpl {
+public class DeptVitalFacade extends DeptVitalServiceImpl {
+
+    @Autowired
+    private QuestionInfoFacade questionInfoFacade;
+
+    /**
+     * 保存查体模板
+     *
+     * @param deptVitalVO
+     * @return
+     */
+    public Boolean saveDeptVitals(DeptVitalVO deptVitalVO) {
+        //先删除该科室原有模板
+        QueryWrapper<DeptVital> deptVitalQueryWrapper = new QueryWrapper<DeptVital>();
+        deptVitalQueryWrapper.eq("dept_id", deptVitalVO.getDeptId());
+        this.remove(deptVitalQueryWrapper);
+
+        //查找标签是否存在
+        QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
+        questionInfoQueryWrapper.in("id", deptVitalVO.getVitalIds()).
+                eq("type", QuestionTypeEnum.Vital.getKey()).
+                eq("is_deleted", IsDeleteEnum.N.getKey());
+        List<QuestionInfo> questionInfoList = questionInfoFacade.list(questionInfoQueryWrapper);
+
+        Map<Long, QuestionInfo> questionInfoMap = EntityUtil.makeEntityMap(questionInfoList, "id");
+        for (Long vital : deptVitalVO.getVitalIds()) {
+            if (questionInfoMap.get(vital) == null) {
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "id=" + vital + "的查体标签不存在");
+            }
+        }
+
+        //插入新模板
+        List<DeptVital> deptVitalList = Lists.newArrayList();
+        for (Long vital : deptVitalVO.getVitalIds()) {
+            DeptVital deptVital = new DeptVital();
+            deptVital.setDeptId(deptVitalVO.getDeptId());
+            deptVital.setVitalId(vital);
+            deptVital.setGmtCreate(new Date());
+        }
+        this.saveBatch(deptVitalList);
+        return true;
+    }
 }

+ 13 - 0
icssman-service/src/main/java/com/diagbot/facade/QuestionInfoFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.QuestionInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/23 11:37
+ */
+@Component
+public class QuestionInfoFacade extends QuestionInfoServiceImpl {
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/mapper/QuestionInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QuestionInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 标签基础表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-23
+ */
+public interface QuestionInfoMapper extends BaseMapper<QuestionInfo> {
+
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/service/QuestionInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QuestionInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 标签基础表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-23
+ */
+public interface QuestionInfoService extends IService<QuestionInfo> {
+
+}

+ 20 - 0
icssman-service/src/main/java/com/diagbot/service/impl/QuestionInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.QuestionInfo;
+import com.diagbot.mapper.QuestionInfoMapper;
+import com.diagbot.service.QuestionInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 标签基础表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-23
+ */
+@Service
+public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, QuestionInfo> implements QuestionInfoService {
+
+}

+ 20 - 0
icssman-service/src/main/java/com/diagbot/vo/DeptVitalVO.java

@@ -0,0 +1,20 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:查体模板
+ * @Author:zhaops
+ * @time: 2018/11/23 11:16
+ */
+@Getter
+@Setter
+public class DeptVitalVO {
+    @NotNull(message = "请输入科室ID")
+    private Long deptId;
+    @NotNull(message = "请输入查体标签ID")
+    private Long[] vitalIds;
+}

+ 0 - 2
icssman-service/src/main/java/com/diagbot/web/DeptInfoController.java

@@ -3,8 +3,6 @@ package com.diagbot.web;
 
 import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RestController;
 
 /**

+ 17 - 0
icssman-service/src/main/java/com/diagbot/web/DeptVitalController.java

@@ -1,10 +1,19 @@
 package com.diagbot.web;
 
 
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.DeptVital;
+import com.diagbot.vo.DeptVitalVO;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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 java.util.List;
+
 /**
  * <p>
  * 科室查体对应表 前端控制器
@@ -18,4 +27,12 @@ import org.springframework.web.bind.annotation.RestController;
 @Api(value = "查体模板相关API", tags = { "查体模板相关API" })
 public class DeptVitalController {
 
+    @ApiOperation(value = "保存查体模板",
+            notes = "deptId:科室ID,必填<br>" +
+                    "vitalIds:查体标签ids,必填<br>" )
+    @PostMapping("/saveDeptVitals")
+    @SysLogger("saveDeptVitals")
+    public RespDTO<Boolean> saveDeptVitals(@RequestBody DeptVitalVO deptVitalVO){
+        return RespDTO.onSuc(true);
+    }
 }

+ 20 - 0
icssman-service/src/main/java/com/diagbot/web/QuestionInfoController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 标签基础表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-23
+ */
+@Controller
+@RequestMapping("/questionInfo")
+public class QuestionInfoController {
+
+}

+ 1 - 2
icssman-service/src/main/java/com/diagbot/web/VitalOrderController.java

@@ -3,8 +3,6 @@ package com.diagbot.web;
 
 import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -20,4 +18,5 @@ import org.springframework.web.bind.annotation.RestController;
 @Api(value = "查体排序相关API", tags = { "查体排序相关API" })
 public class VitalOrderController {
 
+
 }

+ 1 - 0
icssman-service/src/main/resources/mapper/IntroduceDetailMapper.xml

@@ -13,6 +13,7 @@
         <result column="introduce_id" property="introduceId" />
         <result column="title" property="title" />
         <result column="content" property="content" />
+        <result column="text" property="text" />
         <result column="order_no" property="orderNo" />
         <result column="position" property="position" />
     </resultMap>

+ 34 - 0
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -0,0 +1,34 @@
+<?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.QuestionInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QuestionInfo">
+        <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="tag_name" property="tagName" />
+        <result column="name" property="name" />
+        <result column="sex_type" property="sexType" />
+        <result column="age_begin" property="ageBegin" />
+        <result column="age_end" property="ageEnd" />
+        <result column="tag_type" property="tagType" />
+        <result column="control_type" property="controlType" />
+        <result column="type" property="type" />
+        <result column="sub_type" property="subType" />
+        <result column="label_prefix" property="labelPrefix" />
+        <result column="label_suffix" property="labelSuffix" />
+        <result column="min_value" property="minValue" />
+        <result column="max_value" property="maxValue" />
+        <result column="judge_type" property="judgeType" />
+        <result column="text_generate" property="textGenerate" />
+        <result column="copy_type" property="copyType" />
+        <result column="show_add" property="showAdd" />
+        <result column="placeholder" property="placeholder" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>