Browse Source

增加his业务逻辑代码及数据比对接口

liuqq 3 năm trước cách đây
mục cha
commit
2f6a91d69c
93 tập tin đã thay đổi với 6128 bổ sung647 xóa
  1. 2 5
      external-service/src/main/java/com/lantone/external/client/TranService.java
  2. 12 0
      external-service/src/main/java/com/lantone/external/dto/DataBalanceDTO.java
  3. 0 26
      external-service/src/main/java/com/lantone/external/dto/GetLostBehospitalDTO.java
  4. 9 0
      external-service/src/main/java/com/lantone/external/dto/RecDTO.java
  5. 32 0
      external-service/src/main/java/com/lantone/external/dto/RespDTO.java
  6. 0 27
      external-service/src/main/java/com/lantone/external/dto/client/AddLostBehospitalDTO.java
  7. 0 202
      external-service/src/main/java/com/lantone/external/entity/BehospitalInfo.java
  8. 316 0
      external-service/src/main/java/com/lantone/external/entity/VLtBehospitalInfo.java
  9. 127 0
      external-service/src/main/java/com/lantone/external/entity/VLtDeptInfo.java
  10. 303 0
      external-service/src/main/java/com/lantone/external/entity/VLtDoctorAdvice.java
  11. 128 0
      external-service/src/main/java/com/lantone/external/entity/VLtDoctorInfo.java
  12. 162 0
      external-service/src/main/java/com/lantone/external/entity/VLtHomeDiagnoseInfo.java
  13. 219 0
      external-service/src/main/java/com/lantone/external/entity/VLtHomeOperationInfo.java
  14. 1568 0
      external-service/src/main/java/com/lantone/external/entity/VLtHomePage.java
  15. 129 0
      external-service/src/main/java/com/lantone/external/entity/VLtMedicalRecord.java
  16. 86 0
      external-service/src/main/java/com/lantone/external/entity/VLtMedicalRecordContent.java
  17. 105 0
      external-service/src/main/java/com/lantone/external/entity/VLtRecordType.java
  18. 0 53
      external-service/src/main/java/com/lantone/external/facade/BehospitalManagementFacade.java
  19. 69 0
      external-service/src/main/java/com/lantone/external/facade/DataBalanceFacade.java
  20. 68 0
      external-service/src/main/java/com/lantone/external/facade/VLtBehospitalInfoFacade.java
  21. 45 0
      external-service/src/main/java/com/lantone/external/facade/VLtDeptInfoFacade.java
  22. 51 0
      external-service/src/main/java/com/lantone/external/facade/VLtDoctorAdviceFacade.java
  23. 44 0
      external-service/src/main/java/com/lantone/external/facade/VLtDoctorInfoFacade.java
  24. 61 0
      external-service/src/main/java/com/lantone/external/facade/VLtHomeDiagnoseInfoFacade.java
  25. 48 0
      external-service/src/main/java/com/lantone/external/facade/VLtHomeOperationInfoFacade.java
  26. 79 0
      external-service/src/main/java/com/lantone/external/facade/VLtHomePageFacade.java
  27. 36 0
      external-service/src/main/java/com/lantone/external/facade/VLtMedicalRecordContentFacade.java
  28. 84 0
      external-service/src/main/java/com/lantone/external/facade/VLtMedicalRecordFacade.java
  29. 44 0
      external-service/src/main/java/com/lantone/external/facade/VLtRecordTypeFacade.java
  30. 188 0
      external-service/src/main/java/com/lantone/external/facade/ViewBehospitalInfoFacade.java
  31. 99 0
      external-service/src/main/java/com/lantone/external/facade/ViewDoctorAdviceFacade.java
  32. 43 0
      external-service/src/main/java/com/lantone/external/facade/ViewDoctorInfoFacade.java
  33. 96 0
      external-service/src/main/java/com/lantone/external/facade/ViewHomeDiagnoseInfoFacade.java
  34. 87 0
      external-service/src/main/java/com/lantone/external/facade/ViewHomeOperationFacade.java
  35. 150 0
      external-service/src/main/java/com/lantone/external/facade/ViewHomePageFacade.java
  36. 59 0
      external-service/src/main/java/com/lantone/external/facade/ViewMRecordContentFacade.java
  37. 164 0
      external-service/src/main/java/com/lantone/external/facade/ViewMRecordFacade.java
  38. 37 0
      external-service/src/main/java/com/lantone/external/facade/ViewRecordTypeFacade.java
  39. 0 14
      external-service/src/main/java/com/lantone/external/facade/base/BehospitalInfoFacade.java
  40. 0 13
      external-service/src/main/java/com/lantone/external/mapper/BehospitalInfoMapper.java
  41. 16 0
      external-service/src/main/java/com/lantone/external/mapper/VLtBehospitalInfoMapper.java
  42. 16 0
      external-service/src/main/java/com/lantone/external/mapper/VLtDeptInfoMapper.java
  43. 15 0
      external-service/src/main/java/com/lantone/external/mapper/VLtDoctorAdviceMapper.java
  44. 16 0
      external-service/src/main/java/com/lantone/external/mapper/VLtDoctorInfoMapper.java
  45. 16 0
      external-service/src/main/java/com/lantone/external/mapper/VLtHomeDiagnoseInfoMapper.java
  46. 16 0
      external-service/src/main/java/com/lantone/external/mapper/VLtHomeOperationInfoMapper.java
  47. 15 0
      external-service/src/main/java/com/lantone/external/mapper/VLtHomePageMapper.java
  48. 16 0
      external-service/src/main/java/com/lantone/external/mapper/VLtMedicalRecordContentMapper.java
  49. 16 0
      external-service/src/main/java/com/lantone/external/mapper/VLtMedicalRecordMapper.java
  50. 16 0
      external-service/src/main/java/com/lantone/external/mapper/VLtRecordTypeMapper.java
  51. 0 13
      external-service/src/main/java/com/lantone/external/service/BehospitalInfoService.java
  52. 9 0
      external-service/src/main/java/com/lantone/external/service/VLtBehospitalInfoService.java
  53. 16 0
      external-service/src/main/java/com/lantone/external/service/VLtDeptInfoService.java
  54. 7 0
      external-service/src/main/java/com/lantone/external/service/VLtDoctorAdviceService.java
  55. 16 0
      external-service/src/main/java/com/lantone/external/service/VLtDoctorInfoService.java
  56. 16 0
      external-service/src/main/java/com/lantone/external/service/VLtHomeDiagnoseInfoService.java
  57. 16 0
      external-service/src/main/java/com/lantone/external/service/VLtHomeOperationInfoService.java
  58. 16 0
      external-service/src/main/java/com/lantone/external/service/VLtHomePageService.java
  59. 7 0
      external-service/src/main/java/com/lantone/external/service/VLtMedicalRecordContentService.java
  60. 7 0
      external-service/src/main/java/com/lantone/external/service/VLtMedicalRecordService.java
  61. 16 0
      external-service/src/main/java/com/lantone/external/service/VLtRecordTypeService.java
  62. 0 17
      external-service/src/main/java/com/lantone/external/service/impl/BehospitalInfoServiceImpl.java
  63. 11 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtBehospitalInfoServiceImpl.java
  64. 20 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtDeptInfoServiceImpl.java
  65. 11 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtDoctorAdviceServiceImpl.java
  66. 20 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtDoctorInfoServiceImpl.java
  67. 11 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtHomeDiagnoseInfoServiceImpl.java
  68. 11 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtHomeOperationInfoServiceImpl.java
  69. 20 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtHomePageServiceImpl.java
  70. 11 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtMedicalRecordContentServiceImpl.java
  71. 11 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtMedicalRecordServiceImpl.java
  72. 20 0
      external-service/src/main/java/com/lantone/external/service/impl/VLtRecordTypeServiceImpl.java
  73. 137 0
      external-service/src/main/java/com/lantone/external/task/DataViewTask.java
  74. 306 0
      external-service/src/main/java/com/lantone/external/util/RedisUtil.java
  75. 19 0
      external-service/src/main/java/com/lantone/external/vo/DataBalanceVO.java
  76. 59 0
      external-service/src/main/java/com/lantone/external/vo/DataViewVO.java
  77. 0 32
      external-service/src/main/java/com/lantone/external/vo/GetLostBehospitalVO.java
  78. 0 165
      external-service/src/main/java/com/lantone/external/vo/client/AddLostBehospitalVO.java
  79. 0 36
      external-service/src/main/java/com/lantone/external/web/BehospitalManagementController.java
  80. 29 0
      external-service/src/main/java/com/lantone/external/web/DataBalanceController.java
  81. 55 0
      external-service/src/main/java/com/lantone/external/web/DataViewController.java
  82. 0 5
      external-service/src/main/resources/mapper/BehospitalInfoMapper.xml
  83. 34 0
      external-service/src/main/resources/mapper/VLtBehospitalInfoMapper.xml
  84. 18 0
      external-service/src/main/resources/mapper/VLtDeptInfoMapper.xml
  85. 34 0
      external-service/src/main/resources/mapper/VLtDoctorAdviceMapper.xml
  86. 18 0
      external-service/src/main/resources/mapper/VLtDoctorInfoMapper.xml
  87. 19 0
      external-service/src/main/resources/mapper/VLtHomeDiagnoseInfoMapper.xml
  88. 24 0
      external-service/src/main/resources/mapper/VLtHomeOperationInfoMapper.xml
  89. 149 0
      external-service/src/main/resources/mapper/VLtHomePageMapper.xml
  90. 13 0
      external-service/src/main/resources/mapper/VLtMedicalRecordContentMapper.xml
  91. 18 0
      external-service/src/main/resources/mapper/VLtMedicalRecordMapper.xml
  92. 16 0
      external-service/src/main/resources/mapper/VLtRecordTypeMapper.xml
  93. 0 39
      external-service/src/main/resources/mapper/base/BaseBehospitalInfoMapper.xml

+ 2 - 5
external-service/src/main/java/com/lantone/external/client/TranService.java

@@ -1,8 +1,5 @@
 package com.lantone.external.client;
 
-import com.lantone.common.api.CommonResult;
-import com.lantone.external.dto.client.AddLostBehospitalDTO;
-import com.lantone.external.vo.client.AddLostBehospitalVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 
@@ -16,7 +13,7 @@ import java.util.List;
 @FeignClient("tran-service")
 public interface TranService {
 
-    @PostMapping("/behospitalManage/addLostBehospital")
+    /*@PostMapping("/behospitalManage/addLostBehospital")
     CommonResult<AddLostBehospitalDTO> addLostBehospital(List<AddLostBehospitalVO> addLostBehospitalVOList);
-
+    */
 }

+ 12 - 0
external-service/src/main/java/com/lantone/external/dto/DataBalanceDTO.java

@@ -0,0 +1,12 @@
+package com.lantone.external.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class DataBalanceDTO {
+    private String behospitalCode;
+    private String homePageId;
+    private List<RecDTO> recList;
+}

+ 0 - 26
external-service/src/main/java/com/lantone/external/dto/GetLostBehospitalDTO.java

@@ -1,26 +0,0 @@
-package com.lantone.external.dto;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * @Description: 获取丢失的住院病历信息-接口出参
- * @author: rengb
- * @time: 2022/3/16 16:28
- */
-@ApiModel(value = "获取丢失的住院病历信息-接口出参")
-@Getter
-@Setter
-public class GetLostBehospitalDTO implements Serializable {
-
-    private static final long serialVersionUID = -3423432863909470619L;
-
-    @ApiModelProperty(value = "丢失的住院号列表")
-    private List<String> behospitalCodes;
-
-}

+ 9 - 0
external-service/src/main/java/com/lantone/external/dto/RecDTO.java

@@ -0,0 +1,9 @@
+package com.lantone.external.dto;
+
+import lombok.Data;
+
+@Data
+public class RecDTO {
+    private String recId;
+    private String recTitle;
+}

+ 32 - 0
external-service/src/main/java/com/lantone/external/dto/RespDTO.java

@@ -0,0 +1,32 @@
+package com.lantone.external.dto;
+
+import java.io.Serializable;
+
+public class RespDTO<T> implements Serializable {
+    
+    public String code = "0";
+    public String msg = "";
+    public T data;
+
+    public static RespDTO onSuc(Object data) {
+        RespDTO resp = new RespDTO();
+        resp.data = data;
+        return resp;
+    }
+
+    public static RespDTO onError(String errMsg) {
+        RespDTO resp = new RespDTO();
+        resp.code = "-1";
+        resp.msg = errMsg;
+        return resp;
+    }
+
+    @Override
+    public String toString() {
+        return "RespDTO{" +
+                "code=" + code +
+                ", error='" + msg + '\'' +
+                ", data=" + data +
+                '}';
+    }
+}

+ 0 - 27
external-service/src/main/java/com/lantone/external/dto/client/AddLostBehospitalDTO.java

@@ -1,27 +0,0 @@
-package com.lantone.external.dto.client;
-
-import io.swagger.annotations.ApiModel;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * @Description: 第三方数据入库服务远程调用-丢失的住院病历信息入库-接口出参
- * @author: rengb
- * @time: 2022/3/16 16:28
- */
-@ApiModel(value = "第三方数据入库服务远程调用-丢失的住院病历信息入库-接口出参")
-@Getter
-@Setter
-public class AddLostBehospitalDTO implements Serializable {
-
-    private static final long serialVersionUID = -3423432863909470619L;
-
-    /**
-     * 病人住院号列表
-     */
-    private List<String> behospitalCodes;
-
-}

+ 0 - 202
external-service/src/main/java/com/lantone/external/entity/BehospitalInfo.java

@@ -1,202 +0,0 @@
-package com.lantone.external.entity;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 住院病历信息 实体类
- * </p>
- */
-@Data
-@TableName("his_behospital_info")
-public class BehospitalInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 病人住院ID
-     */
-    @TableId("behospital_code")
-    private String behospitalCode;
-
-    /**
-     * 医院ID
-     */
-    @TableField("hospital_id")
-    private Long hospitalId;
-
-    /**
-     * 姓名
-     */
-    @TableField("name")
-    private String name;
-
-    /**
-     * 性别(男,女)
-     */
-    @TableField("sex")
-    private String sex;
-
-    /**
-     * 出生日期
-     */
-    @TableField("birthday")
-    private Date birthday;
-
-    /**
-     * 档案号
-     */
-    @TableField("file_code")
-    private String fileCode;
-
-    /**
-     * 质控类型
-     */
-    @TableField("qc_type_id")
-    private Long qcTypeId;
-
-    /**
-     * 病区编码
-     */
-    @TableField("ward_code")
-    private String wardCode;
-
-    /**
-     * 病区名称
-     */
-    @TableField("ward_name")
-    private String wardName;
-
-    /**
-     * 住院科室ID
-     */
-    @TableField("beh_dept_id")
-    private String behDeptId;
-
-    /**
-     * 住院科室名称
-     */
-    @TableField("beh_dept_name")
-    private String behDeptName;
-
-    /**
-     * 床位号
-     */
-    @TableField("bed_code")
-    private String bedCode;
-
-    /**
-     * 床位名称
-     */
-    @TableField("bed_name")
-    private String bedName;
-
-    /**
-     * 医保类别
-     */
-    @TableField("insurance_name")
-    private String insuranceName;
-
-    /**
-     * 职业
-     */
-    @TableField("job_type")
-    private String jobType;
-
-    /**
-     * 入院时间
-     */
-    @TableField("behospital_date")
-    private Date behospitalDate;
-
-    /**
-     * 出院时间
-     */
-    @TableField("leave_hospital_date")
-    private Date leaveHospitalDate;
-
-    /**
-     * 转入时间
-     */
-    @TableField("trans_in_time")
-    private Date transInTime;
-
-    /**
-     * 转出时间
-     */
-    @TableField("trans_out_time")
-    private Date transOutTime;
-
-    /**
-     * 疾病ICD编码
-     */
-    @TableField("diagnose_icd")
-    private String diagnoseIcd;
-
-    /**
-     * 疾病名称
-     */
-    @TableField("diagnose")
-    private String diagnose;
-
-    /**
-     * 主治医生ID
-     */
-    @TableField("doctor_id")
-    private String doctorId;
-
-    /**
-     * 主治医生姓名
-     */
-    @TableField("doctor_name")
-    private String doctorName;
-
-    /**
-     * 住院医生ID
-     */
-    @TableField("beh_doctor_id")
-    private String behDoctorId;
-
-    /**
-     * 住院医生姓名
-     */
-    @TableField("beh_doctor_name")
-    private String behDoctorName;
-
-    /**
-     * 主任医生ID
-     */
-    @TableField("director_doctor_id")
-    private String directorDoctorId;
-
-    /**
-     * 主任医生姓名
-     */
-    @TableField("director_doctor_name")
-    private String directorDoctorName;
-
-    /**
-     * 是否归档(0:未归档,1:已归档)
-     */
-    @TableField("is_placefile")
-    private String isPlacefile;
-
-    /**
-     * 归档时间
-     */
-    @TableField("placefile_date")
-    private Date placefileDate;
-
-    /**
-     * R-住院登记I-病房接诊B-出院登记O-出院结算P-预约出院N-无费退院
-     */
-    @TableField("in_state")
-    private String inState;
-
-}

+ 316 - 0
external-service/src/main/java/com/lantone/external/entity/VLtBehospitalInfo.java

@@ -0,0 +1,316 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author lipc
+ * @since 2021-09-28
+ */
+@TableName("V_LT_BEHOSPITAL_INFO")
+public class VLtBehospitalInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("BEHOSPITAL_CODE")
+    private String behospitalCode;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("SEX")
+    private String sex;
+
+    @TableField("BIRTHDAY")
+    private Date birthday;
+
+    @TableField("FILE_CODE")
+    private String fileCode;
+
+    @TableField("WARD_CODE")
+    private String wardCode;
+
+    @TableField("WARD_NAME")
+    private String wardName;
+
+    @TableField("BEH_DEPT_ID")
+    private String behDeptId;
+
+    @TableField("BEH_DEPT_NAME")
+    private String behDeptName;
+
+    @TableField("BED_CODE")
+    private String bedCode;
+
+    @TableField("BED_NAME")
+    private String bedName;
+
+    @TableField("INSURANCE_NAME")
+    private String insuranceName;
+
+    @TableField("JOB_TYPE")
+    private String jobType;
+
+    @TableField("BEHOSPITAL_DATE")
+    private Date behospitalDate;
+
+    @TableField("LEAVE_HOSPITAL_DATE")
+    private Date leaveHospitalDate;
+
+    @TableField("DIAGNOSE_ICD")
+    private String diagnoseIcd;
+
+    @TableField("DOCTOR_ID")
+    private String doctorId;
+
+    @TableField("DOCTOR_NAME")
+    private String doctorName;
+
+    @TableField("BEH_DOCTOR_ID")
+    private String behDoctorId;
+
+    @TableField("BEH_DOCTOR_NAME")
+    private String behDoctorName;
+
+    @TableField("DIRECTOR_DOCTOR_ID")
+    private String directorDoctorId;
+
+    @TableField("DIRECTOR_DOCTOR_NAME")
+    private String directorDoctorName;
+
+    @TableField("DIAGNOSE")
+    private String diagnose;
+
+    @TableField("HOSPITAL_ID")
+    private Integer hospitalId;
+
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+
+    public String getFileCode() {
+        return fileCode;
+    }
+
+    public void setFileCode(String fileCode) {
+        this.fileCode = fileCode;
+    }
+
+    public String getWardCode() {
+        return wardCode;
+    }
+
+    public void setWardCode(String wardCode) {
+        this.wardCode = wardCode;
+    }
+
+    public String getWardName() {
+        return wardName;
+    }
+
+    public void setWardName(String wardName) {
+        this.wardName = wardName;
+    }
+
+    public String getBehDeptId() {
+        return behDeptId;
+    }
+
+    public void setBehDeptId(String behDeptId) {
+        this.behDeptId = behDeptId;
+    }
+
+    public String getBehDeptName() {
+        return behDeptName;
+    }
+
+    public void setBehDeptName(String behDeptName) {
+        this.behDeptName = behDeptName;
+    }
+
+    public String getBedCode() {
+        return bedCode;
+    }
+
+    public void setBedCode(String bedCode) {
+        this.bedCode = bedCode;
+    }
+
+    public String getBedName() {
+        return bedName;
+    }
+
+    public void setBedName(String bedName) {
+        this.bedName = bedName;
+    }
+
+    public String getInsuranceName() {
+        return insuranceName;
+    }
+
+    public void setInsuranceName(String insuranceName) {
+        this.insuranceName = insuranceName;
+    }
+
+    public String getJobType() {
+        return jobType;
+    }
+
+    public void setJobType(String jobType) {
+        this.jobType = jobType;
+    }
+
+    public Date getBehospitalDate() {
+        return behospitalDate;
+    }
+
+    public void setBehospitalDate(Date behospitalDate) {
+        this.behospitalDate = behospitalDate;
+    }
+
+    public Date getLeaveHospitalDate() {
+        return leaveHospitalDate;
+    }
+
+    public void setLeaveHospitalDate(Date leaveHospitalDate) {
+        this.leaveHospitalDate = leaveHospitalDate;
+    }
+
+    public String getDiagnoseIcd() {
+        return diagnoseIcd;
+    }
+
+    public void setDiagnoseIcd(String diagnoseIcd) {
+        this.diagnoseIcd = diagnoseIcd;
+    }
+
+    public String getDoctorId() {
+        return doctorId;
+    }
+
+    public void setDoctorId(String doctorId) {
+        this.doctorId = doctorId;
+    }
+
+    public String getDoctorName() {
+        return doctorName;
+    }
+
+    public void setDoctorName(String doctorName) {
+        this.doctorName = doctorName;
+    }
+
+    public String getBehDoctorId() {
+        return behDoctorId;
+    }
+
+    public void setBehDoctorId(String behDoctorId) {
+        this.behDoctorId = behDoctorId;
+    }
+
+    public String getBehDoctorName() {
+        return behDoctorName;
+    }
+
+    public void setBehDoctorName(String behDoctorName) {
+        this.behDoctorName = behDoctorName;
+    }
+
+    public String getDirectorDoctorId() {
+        return directorDoctorId;
+    }
+
+    public void setDirectorDoctorId(String directorDoctorId) {
+        this.directorDoctorId = directorDoctorId;
+    }
+
+    public String getDirectorDoctorName() {
+        return directorDoctorName;
+    }
+
+    public void setDirectorDoctorName(String directorDoctorName) {
+        this.directorDoctorName = directorDoctorName;
+    }
+
+    public String getDiagnose() {
+        return diagnose;
+    }
+
+    public void setDiagnose(String diagnose) {
+        this.diagnose = diagnose;
+    }
+
+    public Integer getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Integer hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    @Override
+    public String toString() {
+        return "HisBehospitalInfo{" +
+                "behospitalCode=" + behospitalCode +
+                ", name=" + name +
+                ", sex=" + sex +
+                ", birthday=" + birthday +
+                ", fileCode=" + fileCode +
+                ", wardCode=" + wardCode +
+                ", wardName=" + wardName +
+                ", behDeptId=" + behDeptId +
+                ", behDeptName=" + behDeptName +
+                ", bedCode=" + bedCode +
+                ", bedName=" + bedName +
+                ", insuranceName=" + insuranceName +
+                ", jobType=" + jobType +
+                ", behospitalDate=" + behospitalDate +
+                ", leaveHospitalDate=" + leaveHospitalDate +
+                ", diagnoseIcd=" + diagnoseIcd +
+                ", doctorId=" + doctorId +
+                ", doctorName=" + doctorName +
+                ", behDoctorId=" + behDoctorId +
+                ", behDoctorName=" + behDoctorName +
+                ", directorDoctorId=" + directorDoctorId +
+                ", directorDoctorName=" + directorDoctorName +
+                ", diagnose=" + diagnose +
+                ", hospitalId=" + hospitalId +
+                "}";
+    }
+
+}

+ 127 - 0
external-service/src/main/java/com/lantone/external/entity/VLtDeptInfo.java

@@ -0,0 +1,127 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@TableName("V_LT_DEPT_INFO")
+public class VLtDeptInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("DEPT_ID")
+    private String deptId;
+
+    @TableField("HOSPITAL_ID")
+    private long hospitalId;
+
+    @TableField("PARENT_DEPT_ID")
+    private String parentDeptId;
+
+    @TableField("DEPT_NAME")
+    private String deptName;
+
+    @TableField("DEPT_TYPE")
+    private String deptType;
+
+    @TableField("SPELL")
+    private String spell;
+
+    @TableField("STATION")
+    private String station;
+
+    @TableField("CREATE_TIME")
+    private Date createTime;
+
+    @TableField("UPDATE_TIME")
+    private Date updateTime;
+
+    public String getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(String deptId) {
+        this.deptId = deptId;
+    }
+    public long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getParentDeptId() {
+        return parentDeptId;
+    }
+
+    public void setParentDeptId(String parentDeptId) {
+        this.parentDeptId = parentDeptId;
+    }
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+    public String getDeptType() {
+        return deptType;
+    }
+
+    public void setDeptType(String deptType) {
+        this.deptType = deptType;
+    }
+    public String getSpell() {
+        return spell;
+    }
+
+    public void setSpell(String spell) {
+        this.spell = spell;
+    }
+    public String getStation() {
+        return station;
+    }
+
+    public void setStation(String station) {
+        this.station = station;
+    }
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        return "VLtDeptInfo{" +
+            "deptId=" + deptId +
+            ", hospitalId=" + hospitalId +
+            ", parentDeptId=" + parentDeptId +
+            ", deptName=" + deptName +
+            ", deptType=" + deptType +
+            ", spell=" + spell +
+            ", station=" + station +
+            ", createTime=" + createTime +
+            ", updateTime=" + updateTime +
+        "}";
+    }
+}

+ 303 - 0
external-service/src/main/java/com/lantone/external/entity/VLtDoctorAdvice.java

@@ -0,0 +1,303 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author lipc
+ * @since 2021-09-28
+ */
+@TableName("V_LT_DOCTOR_ADVICE")
+public class VLtDoctorAdvice implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("DOCTOR_ADVICE_ID")
+    private String doctorAdviceId;
+
+    @TableField("BEHOSPITAL_CODE")
+    private String behospitalCode;
+
+    @TableField("ORDER_DOCTOR_NAME")
+    private String orderDoctorName;
+
+    @TableField("FREQUENCY")
+    private String frequency;
+
+    @TableField("PARENT_TYPE_ID")
+    private String parentTypeId;
+
+    @TableField("DOCTOR_ADVICE_TYPE")
+    private String doctorAdviceType;
+
+    @TableField("USAGE_NUM")
+    private String usageNum;
+
+    @TableField("USAGE_UNIT")
+    private String usageUnit;
+
+    @TableField("DOSE")
+    private String dose;
+
+    @TableField("DOSE_UNIT")
+    private String doseUnit;
+
+    @TableField("MED_MODE_TYPE")
+    private String medModeType;
+
+    @TableField("DA_FREQUENCY")
+    private String daFrequency;
+
+    @TableField("DA_DEAL_TYPE")
+    private String daDealType;
+
+    @TableField("DA_START_DATE")
+    private Date daStartDate;
+
+    @TableField("DA_ITEM_NAME")
+    private String daItemName;
+
+    @TableField("DA_STATUS")
+    private String daStatus;
+
+    @TableField("DA_STOP_DATE")
+    private Date daStopDate;
+
+    @TableField("DA_GROUP_NO")
+    private String daGroupNo;
+
+    @TableField("DA_PRESCRIPTION_TYPE")
+    private String daPrescriptionType;
+
+    @TableField("MEDICINE_TYPE")
+    private String medicineType;
+
+    @TableField("DA_MED_TYPE")
+    private String daMedType;
+
+    @TableField("DOCTOR_NOTICE")
+    private String doctorNotice;
+
+    @TableField("DOCTOR_ID")
+    private String doctorId;
+
+    @TableField("HOSPITAL_ID")
+    private Long hospitalId;
+
+    @TableField("DOCTOR_NAME")
+    private String doctorName;
+
+    public String getDoctorAdviceId() {
+        return doctorAdviceId;
+    }
+
+    public void setDoctorAdviceId(String doctorAdviceId) {
+        this.doctorAdviceId = doctorAdviceId;
+    }
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+    public String getOrderDoctorName() {
+        return orderDoctorName;
+    }
+
+    public void setOrderDoctorName(String orderDoctorName) {
+        this.orderDoctorName = orderDoctorName;
+    }
+    public String getFrequency() {
+        return frequency;
+    }
+
+    public void setFrequency(String frequency) {
+        this.frequency = frequency;
+    }
+    public String getParentTypeId() {
+        return parentTypeId;
+    }
+
+    public void setParentTypeId(String parentTypeId) {
+        this.parentTypeId = parentTypeId;
+    }
+    public String getDoctorAdviceType() {
+        return doctorAdviceType;
+    }
+
+    public void setDoctorAdviceType(String doctorAdviceType) {
+        this.doctorAdviceType = doctorAdviceType;
+    }
+    public String getUsageNum() {
+        return usageNum;
+    }
+
+    public void setUsageNum(String usageNum) {
+        this.usageNum = usageNum;
+    }
+    public String getUsageUnit() {
+        return usageUnit;
+    }
+
+    public void setUsageUnit(String usageUnit) {
+        this.usageUnit = usageUnit;
+    }
+    public String getDose() {
+        return dose;
+    }
+
+    public void setDose(String dose) {
+        this.dose = dose;
+    }
+    public String getDoseUnit() {
+        return doseUnit;
+    }
+
+    public void setDoseUnit(String doseUnit) {
+        this.doseUnit = doseUnit;
+    }
+    public String getMedModeType() {
+        return medModeType;
+    }
+
+    public void setMedModeType(String medModeType) {
+        this.medModeType = medModeType;
+    }
+    public String getDaFrequency() {
+        return daFrequency;
+    }
+
+    public void setDaFrequency(String daFrequency) {
+        this.daFrequency = daFrequency;
+    }
+    public String getDaDealType() {
+        return daDealType;
+    }
+
+    public void setDaDealType(String daDealType) {
+        this.daDealType = daDealType;
+    }
+    public Date getDaStartDate() {
+        return daStartDate;
+    }
+
+    public void setDaStartDate(Date daStartDate) {
+        this.daStartDate = daStartDate;
+    }
+    public String getDaItemName() {
+        return daItemName;
+    }
+
+    public void setDaItemName(String daItemName) {
+        this.daItemName = daItemName;
+    }
+    public String getDaStatus() {
+        return daStatus;
+    }
+
+    public void setDaStatus(String daStatus) {
+        this.daStatus = daStatus;
+    }
+    public Date getDaStopDate() {
+        return daStopDate;
+    }
+
+    public void setDaStopDate(Date daStopDate) {
+        this.daStopDate = daStopDate;
+    }
+    public String getDaGroupNo() {
+        return daGroupNo;
+    }
+
+    public void setDaGroupNo(String daGroupNo) {
+        this.daGroupNo = daGroupNo;
+    }
+    public String getDaPrescriptionType() {
+        return daPrescriptionType;
+    }
+
+    public void setDaPrescriptionType(String daPrescriptionType) {
+        this.daPrescriptionType = daPrescriptionType;
+    }
+    public String getMedicineType() {
+        return medicineType;
+    }
+
+    public void setMedicineType(String medicineType) {
+        this.medicineType = medicineType;
+    }
+    public String getDaMedType() {
+        return daMedType;
+    }
+
+    public void setDaMedType(String daMedType) {
+        this.daMedType = daMedType;
+    }
+    public String getDoctorNotice() {
+        return doctorNotice;
+    }
+
+    public void setDoctorNotice(String doctorNotice) {
+        this.doctorNotice = doctorNotice;
+    }
+    public String getDoctorId() {
+        return doctorId;
+    }
+
+    public void setDoctorId(String doctorId) {
+        this.doctorId = doctorId;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getDoctorName() {
+        return doctorName;
+    }
+
+    public void setDoctorName(String doctorName) {
+        this.doctorName = doctorName;
+    }
+
+    @Override
+    public String toString() {
+        return "HisDoctorAdvice{" +
+                "doctorAdviceId=" + doctorAdviceId +
+                ", behospitalCode=" + behospitalCode +
+                ", orderDoctorName=" + orderDoctorName +
+                ", frequency=" + frequency +
+                ", parentTypeId=" + parentTypeId +
+                ", doctorAdviceType=" + doctorAdviceType +
+                ", usageNum=" + usageNum +
+                ", usageUnit=" + usageUnit +
+                ", dose=" + dose +
+                ", doseUnit=" + doseUnit +
+                ", medModeType=" + medModeType +
+                ", daFrequency=" + daFrequency +
+                ", daDealType=" + daDealType +
+                ", daStartDate=" + daStartDate +
+                ", daItemName=" + daItemName +
+                ", daStatus=" + daStatus +
+                ", daStopDate=" + daStopDate +
+                ", daGroupNo=" + daGroupNo +
+                ", daPrescriptionType=" + daPrescriptionType +
+                ", medicineType=" + medicineType +
+                ", daMedType=" + daMedType +
+                ", doctorNotice=" + doctorNotice +
+                ", doctorId=" + doctorId +
+                ", hospitalId=" + hospitalId +
+                ", doctorName=" + doctorName +
+                "}";
+    }
+}

+ 128 - 0
external-service/src/main/java/com/lantone/external/entity/VLtDoctorInfo.java

@@ -0,0 +1,128 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@TableName("V_LT_DOCTOR_INFO")
+public class VLtDoctorInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("DOCTOR_ID")
+    private String doctorId;
+
+    @TableField("HOSPITAL_ID")
+    private String hospitalId;
+
+    @TableField("DEPT_ID")
+    private String deptId;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("PROFESSOR")
+    private String professor;
+
+    @TableField("OCCUP")
+    private String occup;
+
+    @TableField("GROUP_ID")
+    private String groupId;
+
+    @TableField("CREATE_TIME")
+    private Date createTime;
+
+    @TableField("UPDATE_TIME")
+    private Date updateTime;
+
+    public String getDoctorId() {
+        return doctorId;
+    }
+
+    public void setDoctorId(String doctorId) {
+        this.doctorId = doctorId;
+    }
+    public String getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(String hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(String deptId) {
+        this.deptId = deptId;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getProfessor() {
+        return professor;
+    }
+
+    public void setProfessor(String professor) {
+        this.professor = professor;
+    }
+    public String getOccup() {
+        return occup;
+    }
+
+    public void setOccup(String occup) {
+        this.occup = occup;
+    }
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        return "VLtDoctorInfo{" +
+            "doctorId=" + doctorId +
+            ", hospitalId=" + hospitalId +
+            ", deptId=" + deptId +
+            ", name=" + name +
+            ", professor=" + professor +
+            ", occup=" + occup +
+            ", groupId=" + groupId +
+            ", createTime=" + createTime +
+            ", updateTime=" + updateTime +
+        "}";
+    }
+}

+ 162 - 0
external-service/src/main/java/com/lantone/external/entity/VLtHomeDiagnoseInfo.java

@@ -0,0 +1,162 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author lipc
+ * @since 2021-09-28
+ */
+@TableName("V_LT_HOME_DIAGNOSE_INFO")
+public class VLtHomeDiagnoseInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("HOME_PAGE_ID")
+    private String homePageId;
+
+    @TableField("BEHOSPITAL_CODE")
+    private String behospitalCode;
+
+    @TableField("DIAGNOSE_ORDER_NO")
+    private String diagnoseOrderNo;
+
+    @TableField("DIAGNOSE_TYPE")
+    private String diagnoseType;
+
+    @TableField("DIAGNOSE_TYPE_SHORT")
+    private String diagnoseTypeShort;
+
+    @TableField("DIAGNOSE_NAME")
+    private String diagnoseName;
+
+    @TableField("BEHOSPITAL_TYPE")
+    private String behospitalType;
+
+    @TableField("LEAVE_HOSPITAL_TYPE")
+    private String leaveHospitalType;
+
+    @TableField("PATHOLOGY_DIAGNOSE")
+    private String pathologyDiagnose;
+
+    @TableField("ICD_CODE")
+    private String icdCode;
+
+    @TableField("HOSPITAL_ID")
+    private Long hospitalId;
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public String getHomePageId() {
+        return homePageId;
+    }
+
+    public void setHomePageId(String homePageId) {
+        this.homePageId = homePageId;
+    }
+
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+
+    public String getDiagnoseOrderNo() {
+        return diagnoseOrderNo;
+    }
+
+    public void setDiagnoseOrderNo(String diagnoseOrderNo) {
+        this.diagnoseOrderNo = diagnoseOrderNo;
+    }
+
+    public String getDiagnoseType() {
+        return diagnoseType;
+    }
+
+    public void setDiagnoseType(String diagnoseType) {
+        this.diagnoseType = diagnoseType;
+    }
+
+    public String getDiagnoseTypeShort() {
+        return diagnoseTypeShort;
+    }
+
+    public void setDiagnoseTypeShort(String diagnoseTypeShort) {
+        this.diagnoseTypeShort = diagnoseTypeShort;
+    }
+
+    public String getDiagnoseName() {
+        return diagnoseName;
+    }
+
+    public void setDiagnoseName(String diagnoseName) {
+        this.diagnoseName = diagnoseName;
+    }
+
+    public String getBehospitalType() {
+        return behospitalType;
+    }
+
+    public void setBehospitalType(String behospitalType) {
+        this.behospitalType = behospitalType;
+    }
+
+    public String getLeaveHospitalType() {
+        return leaveHospitalType;
+    }
+
+    public void setLeaveHospitalType(String leaveHospitalType) {
+        this.leaveHospitalType = leaveHospitalType;
+    }
+
+    public String getPathologyDiagnose() {
+        return pathologyDiagnose;
+    }
+
+    public void setPathologyDiagnose(String pathologyDiagnose) {
+        this.pathologyDiagnose = pathologyDiagnose;
+    }
+
+    public String getIcdCode() {
+        return icdCode;
+    }
+
+    public void setIcdCode(String icdCode) {
+        this.icdCode = icdCode;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    @Override
+    public String toString() {
+        return "HisHomeDiagnoseInfo{" +
+                "homePageId='" + homePageId + '\'' +
+                ", behospitalCode='" + behospitalCode + '\'' +
+                ", diagnoseOrderNo='" + diagnoseOrderNo + '\'' +
+                ", diagnoseType='" + diagnoseType + '\'' +
+                ", diagnoseTypeShort='" + diagnoseTypeShort + '\'' +
+                ", diagnoseName='" + diagnoseName + '\'' +
+                ", behospitalType='" + behospitalType + '\'' +
+                ", leaveHospitalType='" + leaveHospitalType + '\'' +
+                ", pathologyDiagnose='" + pathologyDiagnose + '\'' +
+                ", icdCode='" + icdCode + '\'' +
+                ", hospitalId=" + hospitalId +
+                '}';
+    }
+}

+ 219 - 0
external-service/src/main/java/com/lantone/external/entity/VLtHomeOperationInfo.java

@@ -0,0 +1,219 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author lipc
+ * @since 2021-09-28
+ */
+@TableName("V_LT_HOME_OPERATION_INFO")
+public class VLtHomeOperationInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("HOME_PAGE_ID")
+    private String homePageId;
+
+    @TableField("BEHOSPITAL_CODE")
+    private String behospitalCode;
+
+    @TableField("OPERATION_ORDER_NO")
+    private String operationOrderNo;
+
+    @TableField("OPERATION_DATE")
+    private Date operationDate;
+
+    @TableField("OPERATION_CODE")
+    private String operationCode;
+
+    @TableField("OPERATION_DOCTOR_ID")
+    private String operationDoctorId;
+
+    @TableField("FIRST_ASSISTANT_ID")
+    private String firstAssistantId;
+
+    @TableField("SECOND_ASSISTANT_ID")
+    private String secondAssistantId;
+
+    @TableField("CUT_LEVEL")
+    private String cutLevel;
+
+    @TableField("HEALING_LEVEL")
+    private String healingLevel;
+
+    @TableField("OPERATION_NAME")
+    private String operationName;
+
+    @TableField("OPERATION_LEVEL")
+    private String operationLevel;
+
+    @TableField("ANAESTHESIA_NAME")
+    private String anaesthesiaName;
+
+    @TableField("ANAESTHESIA_DOCTOR")
+    private String anaesthesiaDoctor;
+
+    @TableField("SHAM_OPERATION_NAME")
+    private String shamOperationName;
+
+    @TableField("HOSPITAL_ID")
+    private Long hospitalId;
+
+    public String getHomePageId() {
+        return homePageId;
+    }
+
+    public void setHomePageId(String homePageId) {
+        this.homePageId = homePageId;
+    }
+
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+
+    public String getOperationOrderNo() {
+        return operationOrderNo;
+    }
+
+    public void setOperationOrderNo(String operationOrderNo) {
+        this.operationOrderNo = operationOrderNo;
+    }
+
+    public Date getOperationDate() {
+        return operationDate;
+    }
+
+    public void setOperationDate(Date operationDate) {
+        this.operationDate = operationDate;
+    }
+
+    public String getOperationCode() {
+        return operationCode;
+    }
+
+    public void setOperationCode(String operationCode) {
+        this.operationCode = operationCode;
+    }
+
+    public String getOperationDoctorId() {
+        return operationDoctorId;
+    }
+
+    public void setOperationDoctorId(String operationDoctorId) {
+        this.operationDoctorId = operationDoctorId;
+    }
+
+    public String getFirstAssistantId() {
+        return firstAssistantId;
+    }
+
+    public void setFirstAssistantId(String firstAssistantId) {
+        this.firstAssistantId = firstAssistantId;
+    }
+
+    public String getSecondAssistantId() {
+        return secondAssistantId;
+    }
+
+    public void setSecondAssistantId(String secondAssistantId) {
+        this.secondAssistantId = secondAssistantId;
+    }
+
+    public String getCutLevel() {
+        return cutLevel;
+    }
+
+    public void setCutLevel(String cutLevel) {
+        this.cutLevel = cutLevel;
+    }
+
+    public String getHealingLevel() {
+        return healingLevel;
+    }
+
+    public void setHealingLevel(String healingLevel) {
+        this.healingLevel = healingLevel;
+    }
+
+    public String getOperationName() {
+        return operationName;
+    }
+
+    public void setOperationName(String operationName) {
+        this.operationName = operationName;
+    }
+
+    public String getOperationLevel() {
+        return operationLevel;
+    }
+
+    public void setOperationLevel(String operationLevel) {
+        this.operationLevel = operationLevel;
+    }
+
+    public String getAnaesthesiaName() {
+        return anaesthesiaName;
+    }
+
+    public void setAnaesthesiaName(String anaesthesiaName) {
+        this.anaesthesiaName = anaesthesiaName;
+    }
+
+    public String getAnaesthesiaDoctor() {
+        return anaesthesiaDoctor;
+    }
+
+    public void setAnaesthesiaDoctor(String anaesthesiaDoctor) {
+        this.anaesthesiaDoctor = anaesthesiaDoctor;
+    }
+
+    public String getShamOperationName() {
+        return shamOperationName;
+    }
+
+    public void setShamOperationName(String shamOperationName) {
+        this.shamOperationName = shamOperationName;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    @Override
+    public String toString() {
+        return "HisHomeOperationInfo{" +
+                "homePageId='" + homePageId + '\'' +
+                ", behospitalCode='" + behospitalCode + '\'' +
+                ", operationOrderNo='" + operationOrderNo + '\'' +
+                ", operationDate=" + operationDate +
+                ", operationCode='" + operationCode + '\'' +
+                ", operationDoctorId='" + operationDoctorId + '\'' +
+                ", firstAssistantId='" + firstAssistantId + '\'' +
+                ", secondAssistantId='" + secondAssistantId + '\'' +
+                ", cutLevel='" + cutLevel + '\'' +
+                ", healingLevel='" + healingLevel + '\'' +
+                ", operationName='" + operationName + '\'' +
+                ", operationLevel='" + operationLevel + '\'' +
+                ", anaesthesiaName='" + anaesthesiaName + '\'' +
+                ", anaesthesiaDoctor='" + anaesthesiaDoctor + '\'' +
+                ", shamOperationName='" + shamOperationName + '\'' +
+                ", hospitalId=" + hospitalId +
+                '}';
+    }
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1568 - 0
external-service/src/main/java/com/lantone/external/entity/VLtHomePage.java


+ 129 - 0
external-service/src/main/java/com/lantone/external/entity/VLtMedicalRecord.java

@@ -0,0 +1,129 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author lipc
+ * @since 2021-09-28
+ */
+@TableName("V_LT_MEDICAL_RECORD")
+public class VLtMedicalRecord implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("REC_ID")
+    private String recId;
+
+    @TableField("BEHOSPITAL_CODE")
+    private String behospitalCode;
+
+    @TableField("ORG_CODE")
+    private String orgCode;
+
+    @TableField("REC_TYPE_ID")
+    private String recTypeId;
+
+    @TableField("REC_DATE")
+    private Date recDate;
+
+    @TableField("REC_TITLE")
+    private String recTitle;
+
+    @TableField("HOSPITAL_ID")
+    private Long hospitalId;
+
+    @TableField("XML_TEXT")
+    private String xmlText;
+
+    @TableField("HTML_TEXT")
+    private String htmlText;
+
+    public String getRecId() {
+        return recId;
+    }
+
+    public void setRecId(String recId) {
+        this.recId = recId;
+    }
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+    public String getOrgCode() {
+        return orgCode;
+    }
+
+    public void setOrgCode(String orgCode) {
+        this.orgCode = orgCode;
+    }
+    public String getRecTypeId() {
+        return recTypeId;
+    }
+
+    public void setRecTypeId(String recTypeId) {
+        this.recTypeId = recTypeId;
+    }
+    public Date getRecDate() {
+        return recDate;
+    }
+
+    public void setRecDate(Date recDate) {
+        this.recDate = recDate;
+    }
+    public String getRecTitle() {
+        return recTitle;
+    }
+
+    public void setRecTitle(String recTitle) {
+        this.recTitle = recTitle;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    public String getXmlText() {
+        return xmlText;
+    }
+
+    public void setXmlText(String xmlText) {
+        this.xmlText = xmlText;
+    }
+
+    public String getHtmlText() {
+        return htmlText;
+    }
+
+    public void setHtmlText(String htmlText) {
+        this.htmlText = htmlText;
+    }
+
+    @Override
+    public String toString() {
+        return "HisMedicalRecord{" +
+                "recId=" + recId +
+                ", behospitalCode=" + behospitalCode +
+                ", orgCode=" + orgCode +
+                ", recTypeId=" + recTypeId +
+                ", recDate=" + recDate +
+                ", recTitle=" + recTitle +
+                ", hospitalId=" + hospitalId +
+                ", xmlText=" + xmlText +
+                ", htmlText=" + htmlText +
+                "}";
+    }
+}

+ 86 - 0
external-service/src/main/java/com/lantone/external/entity/VLtMedicalRecordContent.java

@@ -0,0 +1,86 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author lipc
+ * @since 2021-09-28
+ */
+@TableName("HIS_MEDICAL_RECORD_CONTENT")
+public class VLtMedicalRecordContent implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("REC_ID")
+    private String recId;
+
+    @TableField("BEHOSPITAL_CODE")
+    private String behospitalCode;
+
+    @TableField("HOSPITAL_ID")
+    private Long hospitalId;
+
+    @TableField("HTML_TEXT")
+    private String htmlText;
+
+    @TableField("XML_TEXT")
+    private String xmlText;
+
+    public String getRecId() {
+        return recId;
+    }
+
+    public void setRecId(String recId) {
+        this.recId = recId;
+    }
+
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    public String getHtmlText() {
+        return htmlText;
+    }
+
+    public void setHtmlText(String htmlText) {
+        this.htmlText = htmlText;
+    }
+
+    public String getXmlText() {
+        return xmlText;
+    }
+
+    public void setXmlText(String xmlText) {
+        this.xmlText = xmlText;
+    }
+
+    @Override
+    public String toString() {
+        return "HisMedicalRecordContent{" +
+                "recId='" + recId + '\'' +
+                ", behospitalCode='" + behospitalCode + '\'' +
+                ", hospitalId=" + hospitalId +
+                ", htmlText='" + htmlText + '\'' +
+                ", xmlText='" + xmlText + '\'' +
+                '}';
+    }
+}

+ 105 - 0
external-service/src/main/java/com/lantone/external/entity/VLtRecordType.java

@@ -0,0 +1,105 @@
+package com.lantone.external.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@TableName("V_LT_RECORD_TYPE")
+public class VLtRecordType implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("TYPE_ID")
+    private String typeId;
+
+    @TableField("HOSPITAL_ID")
+    private long hospitalId;
+
+    @TableField("TYPE_NAME")
+    private String typeName;
+
+    @TableField("PARENT_TYPE_ID")
+    private String parentTypeId;
+
+    @TableField("OBJ_NAME")
+    private String objName;
+
+    @TableField("CREATE_TIME")
+    private Date createTime;
+
+    @TableField("UPDATE_TIME")
+    private Date updateTime;
+
+    public String getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(String typeId) {
+        this.typeId = typeId;
+    }
+    public long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+    public String getParentTypeId() {
+        return parentTypeId;
+    }
+
+    public void setParentTypeId(String parentTypeId) {
+        this.parentTypeId = parentTypeId;
+    }
+    public String getObjName() {
+        return objName;
+    }
+
+    public void setObjName(String objName) {
+        this.objName = objName;
+    }
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        return "VLtRecordType{" +
+            "typeId=" + typeId +
+            ", hospitalId=" + hospitalId +
+            ", typeName=" + typeName +
+            ", parentTypeId=" + parentTypeId +
+            ", objName=" + objName +
+            ", createTime=" + createTime +
+            ", updateTime=" + updateTime +
+        "}";
+    }
+}

+ 0 - 53
external-service/src/main/java/com/lantone/external/facade/BehospitalManagementFacade.java

@@ -1,53 +0,0 @@
-package com.lantone.external.facade;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.lantone.common.api.CommonResult;
-import com.lantone.common.util.BeanUtil;
-import com.lantone.common.util.ListUtil;
-import com.lantone.external.client.TranService;
-import com.lantone.external.dto.GetLostBehospitalDTO;
-import com.lantone.external.dto.client.AddLostBehospitalDTO;
-import com.lantone.external.entity.BehospitalInfo;
-import com.lantone.external.enums.IsPlacefileEnum;
-import com.lantone.external.facade.base.BehospitalInfoFacade;
-import com.lantone.external.vo.GetLostBehospitalVO;
-import com.lantone.external.vo.client.AddLostBehospitalVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- * @Description: 住院病历信息同步简单示例-业务处理类
- * @author: rengb
- * @time: 2022/3/16 16:28
- */
-@Component
-public class BehospitalManagementFacade {
-
-    @Autowired
-    private BehospitalInfoFacade behospitalInfoFacade;
-    @Autowired
-    private TranService tranService;
-
-    public GetLostBehospitalDTO getLostBehospital(GetLostBehospitalVO getLostBehospitalVO) {
-        QueryWrapper<BehospitalInfo> behospitalInfoQueryWrapper = new QueryWrapper<>();
-        behospitalInfoQueryWrapper.eq("is_placefile", IsPlacefileEnum.Y.getKey());
-        behospitalInfoQueryWrapper.between("behospital_date", getLostBehospitalVO.getBehospitalStartDate(), getLostBehospitalVO.getBehospitalEndDate());
-        List<BehospitalInfo> behospitalInfoList = behospitalInfoFacade.list(behospitalInfoQueryWrapper);
-        if (ListUtil.isEmpty(behospitalInfoList)) {
-            return null;
-        }
-
-        List<AddLostBehospitalVO> addLostBehospitalVOList = BeanUtil.listCopyTo(behospitalInfoList, AddLostBehospitalVO.class);
-        CommonResult<AddLostBehospitalDTO> commonResult = tranService.addLostBehospital(addLostBehospitalVOList);
-        if (commonResult == null || commonResult.getData() == null) {
-            return null;
-        }
-
-        GetLostBehospitalDTO getLostBehospitalDTO = new GetLostBehospitalDTO();
-        getLostBehospitalDTO.setBehospitalCodes(commonResult.getData().getBehospitalCodes());
-        return getLostBehospitalDTO;
-    }
-
-}

+ 69 - 0
external-service/src/main/java/com/lantone/external/facade/DataBalanceFacade.java

@@ -0,0 +1,69 @@
+package com.lantone.external.facade;
+
+import com.google.common.collect.Lists;
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.dto.DataBalanceDTO;
+import com.lantone.external.dto.RecDTO;
+import com.lantone.external.entity.VLtMedicalRecord;
+import com.lantone.external.vo.DataViewVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+@Component
+@Slf4j
+public class DataBalanceFacade {
+
+    @Autowired
+    private VLtBehospitalInfoFacade vLtBehospitalInfoFacade;
+
+    @Autowired
+    private VLtHomePageFacade vLtHomePageFacade;
+
+    @Autowired
+    private VLtMedicalRecordFacade vLtMedicalRecordFacade;
+
+    public List<DataBalanceDTO> balanceData(DataViewVO dataViewVO){
+        try{
+            List<DataBalanceDTO> dtoList= Lists.newLinkedList();
+            List<String> beHospitalCodeList=vLtBehospitalInfoFacade.getTimeSoltData(dataViewVO);
+            if(ListUtil.isNotEmpty(beHospitalCodeList)){
+                //获取病案首页数据
+                Map<String,String> homePageMap=vLtHomePageFacade.getTimeSoltData(beHospitalCodeList);
+
+                Map<String,List<VLtMedicalRecord>> recMap=vLtMedicalRecordFacade.getTimeSoltData(beHospitalCodeList);
+                beHospitalCodeList.stream().forEach(s->{
+                    DataBalanceDTO dto=new DataBalanceDTO();
+                    dto.setBehospitalCode(s);
+                    //拼接病案序号
+                    if(StringUtil.isNotEmpty(homePageMap.get(s))){
+                        dto.setHomePageId(homePageMap.get(s));
+                    }
+
+                    //拼接文书序号
+                    if(ListUtil.isNotEmpty(recMap.get(s))){
+                        List<RecDTO> recDTOList=Lists.newLinkedList();
+                        recMap.get(s).stream().forEach(i->{
+                            RecDTO recdto=new RecDTO();
+                            recdto.setRecId(i.getRecId());
+                            recdto.setRecTitle(i.getRecTitle());
+
+                            recDTOList.add(recdto);
+                        });
+                        dto.setRecList(recDTOList);
+                    }
+                    dtoList.add(dto);
+                });
+            }
+            return dtoList;
+        }catch (Exception e){
+            log.error("数据比对-获取某个入院时间段内的病历数::"+e.getMessage(),new Throwable());
+            return null;
+        }
+    }
+
+}

+ 68 - 0
external-service/src/main/java/com/lantone/external/facade/VLtBehospitalInfoFacade.java

@@ -0,0 +1,68 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.DateUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.entity.VLtBehospitalInfo;
+import com.lantone.external.service.impl.VLtBehospitalInfoServiceImpl;
+import com.lantone.external.vo.DataBalanceVO;
+import com.lantone.external.vo.DataViewVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Component
+@Slf4j
+public class VLtBehospitalInfoFacade extends VLtBehospitalInfoServiceImpl {
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public List<VLtBehospitalInfo> getBehospitalInfoData(DataViewVO dataViewVO){
+        QueryWrapper hisQueryWrapper=queryWrapper(dataViewVO);
+        List<VLtBehospitalInfo> list=this.baseMapper.selectList(hisQueryWrapper);
+        return list;
+    }
+
+    /**
+     * @Description:数据比对用,返回his某入院时间段内或指定住院序号的病历序号数量
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public List<String> getTimeSoltData(DataViewVO dataViewVO){
+        try{
+            List<VLtBehospitalInfo> list=this.baseMapper.selectList(queryWrapper(dataViewVO));
+            List<String> beHospitalCodeList=list.stream().map(VLtBehospitalInfo::getBehospitalCode).collect(Collectors.toList());
+            return beHospitalCodeList;
+        }catch (Exception e){
+            log.error("数据比对用,返回his某入院时间段内或指定住院序号的病历序号数量:"+e.getMessage(),new Throwable());
+            return null;
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public QueryWrapper queryWrapper(DataViewVO dataViewVO){
+        //拼接his查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<VLtBehospitalInfo>();
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("HOSPITAL_ID", Long.hashCode(dataViewVO.getHospitalId()));
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getBehospitalCode())){
+            queryWrapper.eq("BEHOSPITAL_CODE", dataViewVO.getBehospitalCode());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getStartDate()) && StringUtil.isNotEmpty(dataViewVO.getEndDate())){
+            queryWrapper.gt("BEHOSPITAL_DATE", DateUtil.parseDate(dataViewVO.getStartDate()));
+            queryWrapper.lt("BEHOSPITAL_DATE",DateUtil.parseDate(dataViewVO.getEndDate()));
+        }
+        return queryWrapper;
+    }
+
+}

+ 45 - 0
external-service/src/main/java/com/lantone/external/facade/VLtDeptInfoFacade.java

@@ -0,0 +1,45 @@
+package com.lantone.external.facade;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.BeanUtil;
+import com.lantone.common.util.ListUtil;
+import com.lantone.external.entity.VLtDeptInfo;
+import com.lantone.external.service.impl.VLtDeptInfoServiceImpl;
+import com.lantone.external.util.RedisUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Set;
+
+@Component
+public class VLtDeptInfoFacade extends VLtDeptInfoServiceImpl {
+
+    @Autowired
+    RedisUtil redisUtil;
+
+    private static final String DEPTS = "depts";
+
+    public Boolean syncDeptInfo(){
+        QueryWrapper queryWrapper=new QueryWrapper<VLtDeptInfo>();
+        /*查询昨天调整或新增的数据
+        queryWrapper.eq("CREATE_TIME", DateUtil.formatDate(new Date()))
+                .or()
+                .eq("UPDATE_TIME", DateUtil.formatDate(new Date()));
+        */
+        List<VLtDeptInfo> list=this.getBaseMapper().selectList(queryWrapper);
+        if(ListUtil.isNotEmpty(list)){
+            //获取所有的key值
+            Set<String> keys= redisUtil.getKeyList(DEPTS);
+            //先删除以往缓存数据
+            redisUtil.delete(keys);
+
+            //将新获取的数据进行存储
+            List<VLtDeptInfo> deptList= BeanUtil.listCopyTo(list,VLtDeptInfo.class);
+            Boolean flag=redisUtil.setIfAbsent(DEPTS, JSON.toJSONString(deptList));
+            return flag;
+        }
+        return true;
+    }
+}

+ 51 - 0
external-service/src/main/java/com/lantone/external/facade/VLtDoctorAdviceFacade.java

@@ -0,0 +1,51 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.entity.VLtDoctorAdvice;
+import com.lantone.external.service.impl.VLtDoctorAdviceServiceImpl;
+import com.lantone.external.vo.DataViewVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public class VLtDoctorAdviceFacade extends VLtDoctorAdviceServiceImpl {
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public List<VLtDoctorAdvice> getDoctorAdviceData(DataViewVO dataViewVO){
+        try{
+            QueryWrapper hisQueryWrapper=queryWrapper(dataViewVO);
+            List<VLtDoctorAdvice> list=this.baseMapper.selectList(hisQueryWrapper);
+            return list;
+        }catch (Exception e){
+            log.error(e.getMessage());
+            return null;
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    private QueryWrapper queryWrapper(DataViewVO dataViewVO){
+        //拼接HIS查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<VLtDoctorAdvice>();
+        if(StringUtil.isNotEmpty(dataViewVO.getDoctorAdviceId())){
+            queryWrapper.eq("DOCTOR_ADVICE_ID", dataViewVO.getDoctorAdviceId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("HOSPITAL_ID", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getBehospitalCode())){
+            queryWrapper.eq("BEHOSPITAL_CODE", dataViewVO.getBehospitalCode());
+        }
+        return queryWrapper;
+    }
+
+}

+ 44 - 0
external-service/src/main/java/com/lantone/external/facade/VLtDoctorInfoFacade.java

@@ -0,0 +1,44 @@
+package com.lantone.external.facade;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.BeanUtil;
+import com.lantone.common.util.ListUtil;
+import com.lantone.external.entity.VLtDoctorInfo;
+import com.lantone.external.service.impl.VLtDoctorInfoServiceImpl;
+import com.lantone.external.util.RedisUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Set;
+
+@Component
+public class VLtDoctorInfoFacade extends VLtDoctorInfoServiceImpl {
+
+    @Autowired
+    RedisUtil redisUtil;
+
+    private static final String DOCTORS = "doctors";
+
+    public void syncDoctorInfo(){
+        QueryWrapper queryWrapper=new QueryWrapper<VLtDoctorInfo>();
+
+        /*查询昨天调整或新增的数据
+        queryWrapper.eq("CREATE_TIME", DateUtil.formatDate(new Date()))
+                .or()
+                .eq("UPDATE_TIME", DateUtil.formatDate(new Date()));
+        */
+        List<VLtDoctorInfo> list=this.getBaseMapper().selectList(queryWrapper);
+        if(ListUtil.isNotEmpty(list)){
+            //获取所有的key值
+            Set<String> keys= redisUtil.getKeyList(DOCTORS);
+            //先删除以往缓存数据
+            redisUtil.delete(keys);
+
+            //将新获取的数据进行存储
+            List<VLtDoctorInfo> doctorList= BeanUtil.listCopyTo(list,VLtDoctorInfo.class);
+            Boolean flag=redisUtil.setIfAbsent(DOCTORS, JSON.toJSONString(doctorList));
+        }
+    }
+}

+ 61 - 0
external-service/src/main/java/com/lantone/external/facade/VLtHomeDiagnoseInfoFacade.java

@@ -0,0 +1,61 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.entity.VLtHomeDiagnoseInfo;
+import com.lantone.external.service.impl.VLtHomeDiagnoseInfoServiceImpl;
+import com.lantone.external.vo.DataViewVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public class VLtHomeDiagnoseInfoFacade extends VLtHomeDiagnoseInfoServiceImpl {
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public List<VLtHomeDiagnoseInfo> getHomeDiagnoseData(DataViewVO dataViewVO){
+        try{
+            QueryWrapper hisQueryWrapper=queryWrapper(dataViewVO);
+            List<VLtHomeDiagnoseInfo> hisHomeDiagnoseList=this.baseMapper.selectList(hisQueryWrapper);
+            return hisHomeDiagnoseList;
+        }catch (Exception e){
+            log.error(e.getMessage(),new Throwable());
+            return null;
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    private QueryWrapper queryWrapper(DataViewVO dataViewVO){
+        //拼接HIS查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<VLtHomeDiagnoseInfo>();
+        if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+            queryWrapper.eq("HOME_PAGE_ID", dataViewVO.getHomePageId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("HOSPITAL_ID", dataViewVO.getHospitalId());
+        }
+        return queryWrapper;
+    }
+
+    /*private UpdateWrapper updateWrapper(DataViewVO dataViewVO){
+        UpdateWrapper updateWrapper=new UpdateWrapper<HomeDiagnoseInfo>();
+        if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+            updateWrapper.eq("home_page_id", dataViewVO.getHomePageId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            updateWrapper.eq("hospital_id", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getDiagnoseOrderNo())){
+            updateWrapper.eq("diagnose_order_no", dataViewVO.getDiagnoseOrderNo());
+        }
+        return updateWrapper;
+    }*/
+}

+ 48 - 0
external-service/src/main/java/com/lantone/external/facade/VLtHomeOperationInfoFacade.java

@@ -0,0 +1,48 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.entity.VLtHomeOperationInfo;
+import com.lantone.external.service.impl.VLtHomeOperationInfoServiceImpl;
+import com.lantone.external.vo.DataViewVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public class VLtHomeOperationInfoFacade extends VLtHomeOperationInfoServiceImpl {
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public List<VLtHomeOperationInfo> getHomeOperationData(DataViewVO dataViewVO){
+        try{
+            QueryWrapper hisQueryWrapper=queryWrapper(dataViewVO);
+            List<VLtHomeOperationInfo> hisHomeOperationList=this.baseMapper.selectList(hisQueryWrapper);
+            return hisHomeOperationList;
+        }catch (Exception e){
+            log.error("病案首页手术情况操作失败!"+e.getMessage(),new Throwable());
+            return null;
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    private QueryWrapper queryWrapper(DataViewVO dataViewVO){
+        //拼接HIS查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<VLtHomeOperationInfo>();
+        if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+            queryWrapper.eq("HOME_PAGE_ID", dataViewVO.getHomePageId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("HOSPITAL_ID", dataViewVO.getHospitalId());
+        }
+        return queryWrapper;
+    }
+
+}

+ 79 - 0
external-service/src/main/java/com/lantone/external/facade/VLtHomePageFacade.java

@@ -0,0 +1,79 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.EntityUtil;
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.entity.VLtHomePage;
+import com.lantone.external.service.impl.VLtHomePageServiceImpl;
+import com.lantone.external.vo.DataViewVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class VLtHomePageFacade extends VLtHomePageServiceImpl {
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public VLtHomePage getHomePageData(DataViewVO dataViewVO){
+        try{
+            QueryWrapper hisQueryWrapper=queryWrapper(dataViewVO);
+            VLtHomePage hisHomePage=this.getOne(hisQueryWrapper);
+            return hisHomePage;
+        }catch (Exception e){
+            log.error(e.getMessage(),new Throwable());
+            return null;
+        }
+    }
+
+    /**
+     * @Description:数据比对,根据对应病历序号查找病案号
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public Map<String,String> getTimeSoltData(List<String> beHospitalCodeList){
+        QueryWrapper queryWrapper=new QueryWrapper<VLtHomePage>();
+        if(ListUtil.isNotEmpty(beHospitalCodeList)){
+            queryWrapper.in("BEHOSPITAL_CODE", beHospitalCodeList);
+        }
+        List<VLtHomePage> list=this.baseMapper.selectList(queryWrapper);
+        Map<String,String> map=EntityUtil.makeMapWithKeyValue(list,"behospitalCode","homePageId");
+        return map;
+    }
+
+    public List<VLtHomePage> getHomePageSupplement(DataViewVO dataViewVO){
+        try{
+            QueryWrapper hisQueryWrapper=queryWrapper(dataViewVO);
+            List<VLtHomePage> list=this.baseMapper.selectList(hisQueryWrapper);
+            return list;
+        }catch (Exception e){
+            log.error(e.getMessage(),new Throwable());
+            return null;
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    private QueryWrapper queryWrapper(DataViewVO dataViewVO){
+        //拼接HIS查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<VLtHomePage>();
+        if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+            queryWrapper.eq("HOME_PAGE_ID", dataViewVO.getHomePageId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("HOSPITAL_ID", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getBehospitalCode())){
+            queryWrapper.eq("BEHOSPITAL_CODE", dataViewVO.getBehospitalCode());
+        }
+        return queryWrapper;
+    }
+}

+ 36 - 0
external-service/src/main/java/com/lantone/external/facade/VLtMedicalRecordContentFacade.java

@@ -0,0 +1,36 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.entity.VLtMedicalRecord;
+import com.lantone.external.entity.VLtMedicalRecordContent;
+import com.lantone.external.service.impl.VLtMedicalRecordContentServiceImpl;
+import com.lantone.external.vo.DataViewVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public class VLtMedicalRecordContentFacade extends VLtMedicalRecordContentServiceImpl {
+
+    public List<VLtMedicalRecordContent> getHisMedicalRecordContentData(DataViewVO dataViewVO) {
+        List<VLtMedicalRecordContent> VLtMedicalRecordContent = this.baseMapper.selectList(queryWrapper(dataViewVO));
+        return VLtMedicalRecordContent;
+    }
+
+    public QueryWrapper queryWrapper(DataViewVO dataViewVO){
+        //拼接朗通查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<VLtMedicalRecord>();
+        if(StringUtil.isNotEmpty(dataViewVO.getRecId())){
+            queryWrapper.eq("REC_ID", dataViewVO.getRecId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("HOSPITAL_ID", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getBehospitalCode())){
+            queryWrapper.eq("BEHOSPITAL_CODE", dataViewVO.getBehospitalCode());
+        }
+        return queryWrapper;
+    }
+
+}

+ 84 - 0
external-service/src/main/java/com/lantone/external/facade/VLtMedicalRecordFacade.java

@@ -0,0 +1,84 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.EntityUtil;
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.entity.VLtMedicalRecord;
+import com.lantone.external.service.impl.VLtMedicalRecordServiceImpl;
+import com.lantone.external.vo.DataViewVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class VLtMedicalRecordFacade extends VLtMedicalRecordServiceImpl {
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public VLtMedicalRecord getMedicalRecordData(DataViewVO dataViewVO){
+        try{
+            QueryWrapper hisQueryWrapper=queryHisWrapper(dataViewVO);
+            VLtMedicalRecord hisMedicalRecord=this.getOne(hisQueryWrapper);
+            return hisMedicalRecord;
+        }catch (Exception e){
+            log.error(e.getMessage());
+            return null;
+        }
+    }
+
+    /**
+     * @Description:数据比对,根据对应病历序号查找文书序号
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public Map<String,List<VLtMedicalRecord>> getTimeSoltData(List<String> beHospitalCodeList){
+        QueryWrapper queryWrapper=new QueryWrapper<VLtMedicalRecord>();
+        if(ListUtil.isNotEmpty(beHospitalCodeList)){
+            queryWrapper.in("BEHOSPITAL_CODE", beHospitalCodeList);
+        }
+        List<VLtMedicalRecord> list=this.baseMapper.selectList(queryWrapper);
+        Map<String,List<VLtMedicalRecord>> map= EntityUtil.makeEntityListMap(list,"behospitalCode");
+        return map;
+    }
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public List<VLtMedicalRecord> getMedicalRecordSupplement(DataViewVO dataViewVO){
+        try{
+            QueryWrapper hisQueryWrapper=queryHisWrapper(dataViewVO);
+            List<VLtMedicalRecord> hisMedicalRecordList=this.baseMapper.selectList(hisQueryWrapper);
+            return hisMedicalRecordList;
+        }catch (Exception e){
+            log.error(e.getMessage());
+            return null;
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    private QueryWrapper queryHisWrapper(DataViewVO dataViewVO){
+        //拼接HIS查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<VLtMedicalRecord>();
+        if(StringUtil.isNotEmpty(dataViewVO.getRecId())){
+            queryWrapper.eq("REC_ID", dataViewVO.getRecId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("HOSPITAL_ID", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getBehospitalCode())){
+            queryWrapper.eq("BEHOSPITAL_CODE", dataViewVO.getBehospitalCode());
+        }
+        return queryWrapper;
+    }
+}

+ 44 - 0
external-service/src/main/java/com/lantone/external/facade/VLtRecordTypeFacade.java

@@ -0,0 +1,44 @@
+package com.lantone.external.facade;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.BeanUtil;
+import com.lantone.common.util.ListUtil;
+import com.lantone.external.config.RedisConfig;
+import com.lantone.external.entity.VLtRecordType;
+import com.lantone.external.service.impl.VLtRecordTypeServiceImpl;
+import com.lantone.external.util.RedisUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Set;
+
+@Component
+public class VLtRecordTypeFacade extends VLtRecordTypeServiceImpl {
+
+    @Autowired
+    RedisUtil redisUtil;
+
+    private static final String RECORD_TYPE = "recordTypes";
+
+    public void syncRecordType(){
+        QueryWrapper queryWrapper=new QueryWrapper<VLtRecordType>();
+
+        /*查询昨天调整或新增的数据
+        queryWrapper.eq("CREATE_TIME", DateUtil.formatDate(new Date()))
+                .or()
+                .eq("UPDATE_TIME", DateUtil.formatDate(new Date()));
+        */
+        List<VLtRecordType> list=this.getBaseMapper().selectList(queryWrapper);
+        if(ListUtil.isNotEmpty(list)){
+            //获取所有的key值
+            Set<String> keys= redisUtil.getKeyList(RECORD_TYPE);
+            //先删除以往缓存数据
+            redisUtil.delete(keys);
+            //将新获取的数据进行存储
+            List<VLtRecordType> deptList= BeanUtil.listCopyTo(list,VLtRecordType.class);
+            Boolean flag=redisUtil.setIfAbsent(RECORD_TYPE, JSON.toJSONString(deptList));
+        }
+    }
+}

+ 188 - 0
external-service/src/main/java/com/lantone/external/facade/ViewBehospitalInfoFacade.java

@@ -0,0 +1,188 @@
+package com.lantone.external.facade;
+
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.dto.RespDTO;
+import com.lantone.external.entity.VLtBehospitalInfo;
+import com.lantone.external.vo.DataViewVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+@Slf4j
+public class ViewBehospitalInfoFacade{
+
+    @Autowired
+    private VLtBehospitalInfoFacade hisBehospitalInfoFacade;
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public RespDTO getBehospitalInfoData(DataViewVO dataViewVO){
+        try{
+            //判断入参
+            if(dataViewVO.getHospitalId()==null && dataViewVO.getHospitalId()==0L){
+                return RespDTO.onError("初始医院ID为空!!");
+            }else if(StringUtil.isEmpty(dataViewVO.getBehospitalCode())){
+                return RespDTO.onError("住院登记病历号为空!!");
+            }
+            //从his视图中获取数据
+            List<VLtBehospitalInfo> list=hisBehospitalInfoFacade.getBehospitalInfoData(dataViewVO);
+            if(ListUtil.isNotEmpty(list)){
+                list.stream().forEach(s->{
+                    /*BehospitalInfo vo = new BehospitalInfo();
+                    BeanUtils.copyProperties(s, vo);
+                    vo.setHospitalId(Integer.toUnsignedLong(s.getHospitalId()));
+                    vo.setQcTypeId(initQcTypeId(vo));
+                    BehospitalInfo behospitalInfo = behospitalInfoFacade.getOne(queryWrapper(vo));
+                    //获取到对应数据,存到我方数据库中
+                    if (behospitalInfo != null) {
+                        //更新数据
+                        UpdateWrapper updateWrapper = updateWrapper(behospitalInfo);
+                        vo.setIsDeleted(IsDeleteEnum.N.getKey());
+                        vo.setGmtModified(new Date());
+                        behospitalInfoFacade.update(vo, updateWrapper);
+                    } else {
+                        //新增数据
+                        vo.setGmtCreate(new Date());
+                        behospitalInfoFacade.save(vo);
+                    }*/
+                });
+                return RespDTO.onSuc("入院登记操作成功!");
+            }else{
+                return RespDTO.onSuc("入院登记操作取消,未获取到数据!");
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),new Throwable());
+            return RespDTO.onError("入院登记操作失败!");
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     *
+    public QueryWrapper queryWrapper(BehospitalInfo behospitalInfo){
+        //拼接朗通查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<BehospitalInfo>();
+        if(behospitalInfo.getHospitalId()!=null && behospitalInfo.getHospitalId()!=0L){
+            queryWrapper.eq("hospital_id", behospitalInfo.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(behospitalInfo.getBehospitalCode())){
+            queryWrapper.eq("behospital_code", behospitalInfo.getBehospitalCode());
+        }
+        return queryWrapper;
+    }
+
+    private UpdateWrapper updateWrapper(BehospitalInfo behospitalInfo){
+        UpdateWrapper updateWrapper=new UpdateWrapper<BehospitalInfo>();
+        if(behospitalInfo.getHospitalId()!=null && behospitalInfo.getHospitalId()!=0L){
+            updateWrapper.eq("hospital_id", behospitalInfo.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(behospitalInfo.getBehospitalCode())){
+            updateWrapper.eq("behospital_code", behospitalInfo.getBehospitalCode());
+        }
+        return updateWrapper;
+    }
+
+    *//**
+     * @Description:his数据补录,根据单个病历号或某个出院时间段内病历数去进去补录
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **//*
+    public RespDTO hisDataSupplement(DataViewVO dataViewVO){
+        try {
+            //从his视图中获取数据
+            List<VLtBehospitalInfo> list=hisBehospitalInfoFacade.getBehospitalInfoData(dataViewVO);
+            //将所有病历号组成list集合
+            List<String> beHospitalCodeList=list.stream().map(VLtBehospitalInfo::getBehospitalCode).collect(Collectors.toList());
+            Map<String, Object> invokeParams = new HashMap<>();
+            invokeParams.put("beHospitalCodeList", beHospitalCodeList);
+            invokeParams.put("beHospitalInfoList", list);
+            invokeParams.put("dataViewVO", dataViewVO);
+            RespDTO dto= DataFacade.get("viewDataSupplement", invokeParams, RespDTO.class);
+
+            return dto;
+        } catch (Exception e) {
+            log.error("数据补录异常!!!!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("数据补录异常!!!!"+e.getMessage());
+        }
+    }
+
+    *//**
+     * @Description:
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **//*
+    public RespDTO getBehospitalInfoData(List<VLtBehospitalInfo> VLtBehospitalInfoList){
+        try {
+            if (ListUtil.isNotEmpty(VLtBehospitalInfoList)) {
+                VLtBehospitalInfoList.stream().forEach(s -> {
+                    BehospitalInfo vo = new BehospitalInfo();
+                    BeanUtils.copyProperties(s, vo);
+                    vo.setHospitalId(Integer.toUnsignedLong(s.getHospitalId()));
+                    vo.setQcTypeId(initQcTypeId(vo));
+                    BehospitalInfo behospitalInfo = behospitalInfoFacade.getOne(queryWrapper(vo));
+                    //获取到对应数据,存到我方数据库中
+                    if (behospitalInfo != null) {
+                        //更新数据
+                        UpdateWrapper updateWrapper = updateWrapper(behospitalInfo);
+                        vo.setIsDeleted(IsDeleteEnum.N.getKey());
+                        vo.setGmtModified(new Date());
+                        behospitalInfoFacade.update(vo, updateWrapper);
+                    } else {
+                        //新增数据
+                        vo.setGmtCreate(new Date());
+                        behospitalInfoFacade.save(vo);
+                    }
+                });
+                return RespDTO.onSuc("入院登记数据补录完成!");
+            }else{
+                return RespDTO.onSuc("入院登记数据补录取消,未获取到数据!");
+            }
+        }catch (Exception e){
+            log.error("入院登记数据补录异常!!!!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("入院登记数据补录异常!!!"+e.getMessage());
+        }
+    }
+
+    *//**
+     * 初始化QcTypeId
+     * @param s
+     * @return
+     *//*
+    private Long initQcTypeId(BehospitalInfo s) {
+        Long qcTypeId = Long.valueOf("0");
+        try {
+            //根据科室查找对应质控类型
+            QcType qcTypeList = qcTypeFacade.getOne(new QueryWrapper<QcType>()
+                    .eq("beh_dept_id", s.getBehDeptId())
+                    .eq("hospital_id", s.getHospitalId())
+                    .eq("default_module", 0)
+                    .eq("sex",s.getSex())
+                    .eq("is_deleted", IsDeleteEnum.N));
+            if(qcTypeList == null){
+                //无质控类型时,新增后初始化
+                QcType qcType = qcTypeFacade.getOne(new QueryWrapper<QcType>()
+                        .eq("default_module", 1)
+                        .eq("hospital_id", s.getHospitalId())
+                        .eq("sex",s.getSex())
+                        .eq("is_deleted", IsDeleteEnum.N));
+                if(qcType!=null){
+                    qcTypeId = qcType.getId();
+                }
+            }else {
+                qcTypeId = qcTypeList.getId();
+            }
+        }catch (Exception e){
+            log.error("住院登记信息qc_type_id初始化异常!!!!"+e.getMessage(),new Throwable());
+        }
+        return qcTypeId;
+    }*/
+}

+ 99 - 0
external-service/src/main/java/com/lantone/external/facade/ViewDoctorAdviceFacade.java

@@ -0,0 +1,99 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.lantone.common.enums.IsDeleteEnum;
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.dto.RespDTO;
+import com.lantone.external.entity.VLtDoctorAdvice;
+import com.lantone.external.vo.DataViewVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+
+@Component
+@Slf4j
+public class ViewDoctorAdviceFacade {
+
+    @Autowired
+    private VLtDoctorAdviceFacade hisDoctorAdviceFacade;
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public RespDTO getDoctorAdviceData(DataViewVO dataViewVO){
+        try{
+            if(StringUtil.isEmpty(dataViewVO.getBehospitalCode())){
+                return RespDTO.onError("住院医嘱病历号为空!!");
+            }
+            //从his视图中获取数据
+            List<VLtDoctorAdvice> list=hisDoctorAdviceFacade.getDoctorAdviceData(dataViewVO);
+            if(ListUtil.isNotEmpty(list)){
+                list.stream().forEach(s->{
+                    /*DoctorAdvice vo=new DoctorAdvice();
+                    BeanUtils.copyProperties(s,vo);
+                    DoctorAdvice doctorAdvice=this.getOne(queryWrapper(vo));
+                    //获取到对应数据,存到我方数据库中
+                    if(doctorAdvice!=null){
+                        //更新数据
+                        vo.setIsDeleted(IsDeleteEnum.N.getKey());
+                        vo.setGmtModified(new Date());
+                        this.update(vo,updateWrapper(vo));
+                    }else{
+                        //新增数据
+                        vo.setGmtCreate(new Date());
+                        this.save(vo);
+                    }*/
+                });
+                return RespDTO.onSuc("住院医嘱操作成功!");
+            }else{
+                return RespDTO.onSuc("住院医嘱操作取消,未获取到数据!");
+            }
+
+        }catch (Exception e){
+            log.error("住院医嘱操作失败!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("住院医嘱操作失败!"+e.getMessage());
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    /*private QueryWrapper queryWrapper(DoctorAdvice doctorAdvice){
+        //拼接朗通查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<DoctorAdvice>();
+        if(StringUtil.isNotEmpty(doctorAdvice.getDoctorAdviceId())){
+            queryWrapper.eq("doctor_advice_id", doctorAdvice.getDoctorAdviceId());
+        }
+        if(doctorAdvice.getHospitalId()!=null && doctorAdvice.getHospitalId()!=0L){
+            queryWrapper.eq("hospital_id", doctorAdvice.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(doctorAdvice.getBehospitalCode())){
+            queryWrapper.eq("behospital_code", doctorAdvice.getBehospitalCode());
+        }
+        return queryWrapper;
+    }
+
+    private UpdateWrapper updateWrapper(DoctorAdvice doctorAdvice){
+        UpdateWrapper updateWrapper=new UpdateWrapper<DoctorAdvice>();
+        if(StringUtil.isNotEmpty(doctorAdvice.getDoctorAdviceId())){
+            updateWrapper.eq("doctor_advice_id", doctorAdvice.getDoctorAdviceId());
+        }
+        if(doctorAdvice.getHospitalId()!=null && doctorAdvice.getHospitalId()!=0L){
+            updateWrapper.eq("hospital_id", doctorAdvice.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(doctorAdvice.getBehospitalCode())){
+            updateWrapper.eq("behospital_code", doctorAdvice.getBehospitalCode());
+        }
+        return updateWrapper;
+    }*/
+}

+ 43 - 0
external-service/src/main/java/com/lantone/external/facade/ViewDoctorInfoFacade.java

@@ -0,0 +1,43 @@
+package com.lantone.external.facade;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.common.util.BeanUtil;
+import com.lantone.common.util.ListUtil;
+import com.lantone.external.entity.VLtDoctorInfo;
+import com.lantone.external.util.RedisUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Set;
+
+@Component
+public class ViewDoctorInfoFacade {
+
+    @Autowired
+    RedisUtil redisUtil;
+
+    private static final String DOCTORS = "doctors";
+
+    public void syncDoctorInfo(){
+        QueryWrapper queryWrapper=new QueryWrapper<VLtDoctorInfo>();
+
+        /*查询昨天调整或新增的数据
+        queryWrapper.eq("CREATE_TIME", DateUtil.formatDate(new Date()))
+                .or()
+                .eq("UPDATE_TIME", DateUtil.formatDate(new Date()));
+        */
+        /*List<VLtDoctorInfo> list=this.getBaseMapper().selectList(queryWrapper);
+        if(ListUtil.isNotEmpty(list)){
+            //获取所有的key值
+            Set<String> keys= redisUtil.getKeyList(DOCTORS);
+            //先删除以往缓存数据
+            redisUtil.delete(keys);
+
+            //将新获取的数据进行存储
+            List<BasDoctorInfo> doctorList= BeanUtil.listCopyTo(list,BasDoctorInfo.class);
+            Boolean flag=redisUtil.setIfAbsent(DOCTORS, JSON.toJSONString(doctorList));
+        }*/
+    }
+}

+ 96 - 0
external-service/src/main/java/com/lantone/external/facade/ViewHomeDiagnoseInfoFacade.java

@@ -0,0 +1,96 @@
+package com.lantone.external.facade;
+
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.dto.RespDTO;
+import com.lantone.external.entity.VLtHomeDiagnoseInfo;
+import com.lantone.external.vo.DataViewVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+
+@Component
+@Slf4j
+public class ViewHomeDiagnoseInfoFacade{
+
+    @Autowired
+    private VLtHomeDiagnoseInfoFacade hisHomeDiagnoseInfoFacade;
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public RespDTO getHomeDiagnoseData(DataViewVO dataViewVO){
+        try{
+            if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+                return RespDTO.onError("病案首页ID为空!!");
+            }else if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+                return RespDTO.onError("初始医院ID为空!!");
+            }else if(StringUtil.isNotEmpty(dataViewVO.getBehospitalCode())){
+                return RespDTO.onError("病历号为空!!");
+            }
+
+            List<VLtHomeDiagnoseInfo> hisHomeDiagnoseList=hisHomeDiagnoseInfoFacade.getHomeDiagnoseData(dataViewVO);
+            /*if(ListUtil.isNotEmpty(hisHomeDiagnoseList)){
+                for (VLtHomeDiagnoseInfo hisHomeDiagnose:hisHomeDiagnoseList) {
+                    HomeDiagnoseInfo vo=new HomeDiagnoseInfo();
+                    BeanUtils.copyProperties(hisHomeDiagnose,vo);
+
+                    HomeDiagnoseInfo homeDiagnoseInfo=this.getOne(queryWrapper(dataViewVO));
+                    //获取到对应数据,存到我方数据库中
+                    if(homeDiagnoseInfo!=null){
+                        //更新数据
+                        vo.setIsDeleted(IsDeleteEnum.N.getKey());
+                        vo.setGmtModified(new Date());
+                        this.update(vo,updateWrapper(dataViewVO));
+                    }else{
+                        //新增数据
+                        vo.setGmtCreate(new Date());
+                        this.save(vo);
+                    }
+                }
+            }*/
+            return RespDTO.onSuc("操作成功!");
+        }catch (Exception e){
+            log.error("病案首页出院诊断操作失败!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("操作失败!");
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    /*public QueryWrapper queryWrapper(DataViewVO dataViewVO){
+        //拼接朗通查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<HomeDiagnoseInfo>();
+        if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+            queryWrapper.eq("home_page_id", dataViewVO.getHomePageId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("hospital_id", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getDiagnoseOrderNo())){
+            queryWrapper.eq("diagnose_order_no", dataViewVO.getDiagnoseOrderNo());
+        }
+        return queryWrapper;
+    }
+
+    public UpdateWrapper updateWrapper(DataViewVO dataViewVO){
+        UpdateWrapper updateWrapper=new UpdateWrapper<HomeDiagnoseInfo>();
+        if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+            updateWrapper.eq("home_page_id", dataViewVO.getHomePageId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            updateWrapper.eq("hospital_id", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getDiagnoseOrderNo())){
+            updateWrapper.eq("diagnose_order_no", dataViewVO.getDiagnoseOrderNo());
+        }
+        return updateWrapper;
+    }*/
+}

+ 87 - 0
external-service/src/main/java/com/lantone/external/facade/ViewHomeOperationFacade.java

@@ -0,0 +1,87 @@
+package com.lantone.external.facade;
+
+import com.lantone.common.util.ListUtil;
+import com.lantone.external.dto.RespDTO;
+import com.lantone.external.entity.VLtHomeOperationInfo;
+import com.lantone.external.vo.DataViewVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+@Slf4j
+public class ViewHomeOperationFacade {
+    @Autowired
+    private VLtHomeOperationInfoFacade hisHomeOperationInfoFacade;
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public RespDTO getHomeOperationData(DataViewVO dataViewVO){
+        try{
+            List<VLtHomeOperationInfo> hisHomeOperationList=hisHomeOperationInfoFacade.getHomeOperationData(dataViewVO);
+            if(ListUtil.isNotEmpty(hisHomeOperationList)){
+                /*for (VLtHomeOperationInfo hisHomeOperation:hisHomeOperationList) {
+                    HomeOperationInfo homeOperationInfo=this.getOne(queryWrapper(dataViewVO));
+                    HomeOperationInfo vo=new HomeOperationInfo();
+                    BeanUtils.copyProperties(hisHomeOperation,vo);
+                    //获取到对应数据,存到我方数据库中
+                    if(homeOperationInfo!=null){
+                        //更新数据
+                        vo.setIsDeleted(IsDeleteEnum.N.getKey());
+                        vo.setGmtModified(new Date());
+                        this.update(vo,updateWrapper(dataViewVO));
+                    }else{
+                        //新增数据
+                        vo.setGmtCreate(new Date());
+                        this.save(vo);
+                    }
+                }*/
+                return RespDTO.onSuc("病案首页手术情况操作成功!");
+            }else{
+                return RespDTO.onSuc("病案首页手术情况操作取消,未获取到数据!");
+            }
+        }catch (Exception e){
+            log.error("病案首页手术情况操作失败!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("病案首页手术情况操作失败!"+e.getMessage());
+        }
+    }
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    /*private QueryWrapper queryWrapper(DataViewVO dataViewVO){
+        //拼接朗通查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<HomeOperationInfo>();
+        if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+            queryWrapper.eq("home_page_id", dataViewVO.getHomePageId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            queryWrapper.eq("hospital_id", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getOperationOrderNo())){
+            queryWrapper.eq("operation_order_no", dataViewVO.getOperationOrderNo());
+        }
+        return queryWrapper;
+    }
+
+    private UpdateWrapper updateWrapper(DataViewVO dataViewVO){
+        UpdateWrapper updateWrapper=new UpdateWrapper<HomeOperationInfo>();
+        if(StringUtil.isNotEmpty(dataViewVO.getHomePageId())){
+            updateWrapper.eq("home_page_id", dataViewVO.getHomePageId());
+        }
+        if(dataViewVO.getHospitalId()!=null && dataViewVO.getHospitalId()!=0L){
+            updateWrapper.eq("hospital_id", dataViewVO.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(dataViewVO.getOperationOrderNo())){
+            updateWrapper.eq("operation_order_no", dataViewVO.getOperationOrderNo());
+        }
+        return updateWrapper;
+    }*/
+}

+ 150 - 0
external-service/src/main/java/com/lantone/external/facade/ViewHomePageFacade.java

@@ -0,0 +1,150 @@
+package com.lantone.external.facade;
+
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.dto.RespDTO;
+import com.lantone.external.entity.VLtHomePage;
+import com.lantone.external.vo.DataViewVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Component
+@Slf4j
+public class ViewHomePageFacade {
+    @Autowired
+    private VLtHomePageFacade hisHomePageFacade;
+    @Autowired
+    private ViewHomeDiagnoseInfoFacade viewHomeDiagnoseInfoFacade;
+    @Autowired
+    private ViewHomeOperationFacade viewHomeOperationFacade;
+    /*@Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;*/
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public RespDTO getHomePageData(DataViewVO dataViewVO){
+        try{
+            if(StringUtil.isEmpty(dataViewVO.getBehospitalCode())){
+                return RespDTO.onError("病案首页病历号为空!!");
+            }
+            VLtHomePage hisHomePage=hisHomePageFacade.getHomePageData(dataViewVO);
+            if(hisHomePage!=null){
+                //this.addHomePage(hisHomePage);
+                //病案首页关联出院诊断及手术
+                viewHomeDiagnoseInfoFacade.getHomeDiagnoseData(dataViewVO);
+                viewHomeOperationFacade.getHomeOperationData(dataViewVO);
+
+                return RespDTO.onSuc("病案首页操作成功!");
+                /*
+                //是否需要先评分,增加如下业务代码
+                this.analyzeRun(hisHomePage);
+                */
+            }else{
+                return RespDTO.onSuc("病案首页操作取消,未获取到数据!");
+            }
+        }catch (Exception e){
+            log.error("病案首页操作失败!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("病案首页操作失败!");
+        }
+    }
+
+    /*public RespDTO analyzeRun(VLtHomePage hisHomePage){
+        AnalyzeRunVO analyzeRunVO = new AnalyzeRunVO();
+        analyzeRunVO.setBehospitalCode(hisHomePage.getBehospitalCode());
+        analyzeRunVO.setHospitalId(hisHomePage.getHospitalId());
+        analyzeRunVO.setModeId(6L);
+        AnalyzeRunDTO analyzeRunDTO =new AnalyzeRunDTO();
+        Map<String, Object> map = new HashMap<String, Object>();
+        if (analyzeRunDTO.getMsgDTOList().size() > 0) {
+            map.put("analyze", analyzeRunDTO.getMsgDTOList());
+        }
+        return RespDTO.onSuc(map);
+    }*/
+
+    /**
+     * @Description:补录数据时调用
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public RespDTO getHomePageSupplement(DataViewVO dataViewVO){
+        try{
+            if(StringUtil.isEmpty(dataViewVO.getBehospitalCode())){
+                return RespDTO.onError("病案首页病历号为空!!");
+            }
+            List<VLtHomePage> list=hisHomePageFacade.getHomePageSupplement(dataViewVO);
+            if(ListUtil.isNotEmpty(list)){
+                list.stream().forEach(s->{
+                    //this.addHomePage(s);
+                    //病案首页关联出院诊断及手术
+                    viewHomeDiagnoseInfoFacade.getHomeDiagnoseData(dataViewVO);
+                    viewHomeOperationFacade.getHomeOperationData(dataViewVO);
+                });
+            }
+            return RespDTO.onSuc("病案首页操作成功!");
+        }catch (Exception e){
+            log.error("病案首页操作失败!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("病案首页操作失败!");
+        }
+    }
+
+    /*public void addHomePage(VLtHomePage hisHomePage){
+        HomePage vo=new HomePage();
+        BeanUtils.copyProperties(hisHomePage,vo);
+        HomePage homePage=this.getOne(queryWrapper(hisHomePage));
+        //获取到对应数据,存到我方数据库中
+        if(homePage!=null){
+            vo.setIsDeleted(IsDeleteEnum.N.getKey());
+            vo.setGmtModified(new Date());
+            //更新数据
+            UpdateWrapper updateWrapper=updateWrapper(hisHomePage);
+            this.update(vo,updateWrapper);
+        }else{
+            vo.setGmtCreate(new Date());
+            //新增数据
+            this.save(vo);
+        }
+    }*/
+
+    /**
+     * @Description:拼接查询条件
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    /*private QueryWrapper queryWrapper(VLtHomePage hisHomePage){
+        //拼接朗通查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<HomePage>();
+        if(StringUtil.isNotEmpty(hisHomePage.getHomePageId())){
+            queryWrapper.eq("home_page_id", hisHomePage.getHomePageId());
+        }
+        if(hisHomePage.getHospitalId()!=null && hisHomePage.getHospitalId()!=0L){
+            queryWrapper.eq("hospital_id", hisHomePage.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(hisHomePage.getBehospitalCode())){
+            queryWrapper.eq("behospital_code", hisHomePage.getBehospitalCode());
+        }
+        return queryWrapper;
+    }
+
+    private UpdateWrapper updateWrapper(VLtHomePage hisHomePage){
+        UpdateWrapper updateWrapper=new UpdateWrapper<HomePage>();
+        if(StringUtil.isNotEmpty(hisHomePage.getHomePageId())){
+            updateWrapper.eq("home_page_id", hisHomePage.getHomePageId());
+        }
+        if(hisHomePage.getHospitalId()!=null && hisHomePage.getHospitalId()!=0L){
+            updateWrapper.eq("hospital_id", hisHomePage.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(hisHomePage.getBehospitalCode())){
+            updateWrapper.eq("behospital_code", hisHomePage.getBehospitalCode());
+        }
+        return updateWrapper;
+    }*/
+}

+ 59 - 0
external-service/src/main/java/com/lantone/external/facade/ViewMRecordContentFacade.java

@@ -0,0 +1,59 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.lantone.common.enums.IsDeleteEnum;
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.entity.VLtMedicalRecord;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+@Component
+@Slf4j
+public class ViewMRecordContentFacade {
+
+    /*public void addMrecordContent(VLtMedicalRecord vLtMedicalRecord){
+        try{
+            MedicalRecordContent contentVo=new MedicalRecordContent();
+            BeanUtils.copyProperties(vLtMedicalRecord,contentVo);
+            //判断我方数据是否有记录
+            MedicalRecordContent mRecordContent=this.getOne(queryWrapper(contentVo));
+            if(mRecordContent!=null){
+                contentVo.setGmtModified(new Date());
+                contentVo.setIsDeleted(IsDeleteEnum.N.getKey());
+                this.update(contentVo,updateWrapper(contentVo));
+            }else{
+                contentVo.setGmtCreate(new Date());
+                this.save(contentVo);
+            }
+        }catch (Exception e){
+            log.error("异步增加文书详情数据异常::::"+e.getMessage(),new Throwable());
+        }
+    }
+
+    public QueryWrapper queryWrapper(MedicalRecordContent contentVo){
+        //拼接朗通查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<MedicalRecord>();
+        if(StringUtil.isNotEmpty(contentVo.getRecId())){
+            queryWrapper.eq("rec_id", contentVo.getRecId());
+        }
+        if(contentVo.getHospitalId()!=null && contentVo.getHospitalId()!=0L){
+            queryWrapper.eq("hospital_id", contentVo.getHospitalId());
+        }
+        return queryWrapper;
+    }
+
+    public UpdateWrapper updateWrapper(MedicalRecordContent contentVo){
+        UpdateWrapper updateWrapper=new UpdateWrapper<MedicalRecordContent>();
+        if(StringUtil.isNotEmpty(contentVo.getRecId())){
+            updateWrapper.eq("rec_id", contentVo.getRecId());
+        }
+        if(contentVo.getHospitalId()!=null && contentVo.getHospitalId()!=0L){
+            updateWrapper.eq("hospital_id", contentVo.getHospitalId());
+        }
+        return updateWrapper;
+    }*/
+}

+ 164 - 0
external-service/src/main/java/com/lantone/external/facade/ViewMRecordFacade.java

@@ -0,0 +1,164 @@
+package com.lantone.external.facade;
+
+import com.lantone.common.util.StringUtil;
+import com.lantone.external.dto.RespDTO;
+import com.lantone.external.entity.VLtMedicalRecord;
+import com.lantone.external.vo.DataViewVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+@Slf4j
+public class ViewMRecordFacade {
+    @Autowired
+    private VLtMedicalRecordFacade hisMedicalRecordFacade;
+
+    /*@Autowired
+    private ModelHospitalFacade modelHospitalFacade;*/
+
+    @Autowired
+    private ViewMRecordContentFacade viewMRecordContentFacade;
+
+    /**
+     * @Description:根据接口中的参数,进行查询拉取数据到入院登记表
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    public RespDTO getMedicalRecordData(DataViewVO dataViewVO){
+        try{
+            if(StringUtil.isEmpty(dataViewVO.getBehospitalCode())){
+                return RespDTO.onError("文书病历号为空!!");
+            }else if(StringUtil.isEmpty(dataViewVO.getRecId())){
+                return RespDTO.onError("文书病历序号为空!!");
+            }else if(dataViewVO.getHospitalId()==null || dataViewVO.getHospitalId()==0L){
+                return RespDTO.onError("初始医院ID为空!!");
+            }
+            VLtMedicalRecord VLtMedicalRecord =hisMedicalRecordFacade.getMedicalRecordData(dataViewVO);
+
+            if(VLtMedicalRecord !=null){
+                //this.addMrecord(VLtMedicalRecord);
+                //viewMRecordContentFacade.addMrecordContent(VLtMedicalRecord);
+                return RespDTO.onSuc("病历文书操作成功!");
+                /*
+                //是否需要先评分,增加如下业务代码
+                this.analyzeRun(hisMedicalRecord);
+                */
+            }else{
+                return RespDTO.onSuc("病历文书操作取消,未获取到数据!");
+            }
+        }catch (Exception e){
+            log.error("病历文书操作失败!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("病历文书操作失败!");
+        }
+    }
+
+    /*public RespDTO analyzeRun(VLtMedicalRecord VLtMedicalRecord){
+        Long initModeId=initModeId(VLtMedicalRecord.getHospitalId(), VLtMedicalRecord.getRecTypeId());
+        AnalyzeRunVO analyzeRunVO = new AnalyzeRunVO();
+        analyzeRunVO.setBehospitalCode(VLtMedicalRecord.getBehospitalCode());
+        analyzeRunVO.setHospitalId(VLtMedicalRecord.getHospitalId());
+        analyzeRunVO.setModeId(initModeId);
+        //AnalyzeRunDTO analyzeRunDTO = behospitalInfoFacade.analyzeRun(analyzeRunVO);
+        AnalyzeRunDTO analyzeRunDTO =new AnalyzeRunDTO();
+        Map<String, Object> map = new HashMap<String, Object>();
+        if (analyzeRunDTO.getMsgDTOList().size() > 0) {
+            map.put("analyze", analyzeRunDTO.getMsgDTOList());
+        }
+        return RespDTO.onSuc(map);
+    }
+
+    public RespDTO getMedicalRecordSupplement(DataViewVO dataViewVO){
+        try{
+            List<VLtMedicalRecord> VLtMedicalRecordList =hisMedicalRecordFacade.getMedicalRecordSupplement(dataViewVO);
+            if(ListUtil.isNotEmpty(VLtMedicalRecordList)){
+                for (VLtMedicalRecord VLtMedicalRecord : VLtMedicalRecordList) {
+                    this.addMrecord(VLtMedicalRecord);
+                    viewMRecordContentFacade.addMrecordContent(VLtMedicalRecord);
+                }
+                return RespDTO.onSuc("病历文书操作成功!");
+            }else{
+                return RespDTO.onSuc("病历文书操作取消,未获取到数据!");
+            }
+        }catch (Exception e){
+            log.error("病历文书操作失败!"+e.getMessage(),new Throwable());
+            return RespDTO.onError("病历文书操作失败!");
+        }
+    }
+
+    public QueryWrapper queryWrapper(VLtMedicalRecord VLtMedicalRecord){
+        //拼接朗通查询条件
+        QueryWrapper queryWrapper=new QueryWrapper<MedicalRecord>();
+        if(StringUtil.isNotEmpty(VLtMedicalRecord.getRecId())){
+            queryWrapper.eq("rec_id", VLtMedicalRecord.getRecId());
+        }
+        if(VLtMedicalRecord.getHospitalId()!=null && VLtMedicalRecord.getHospitalId()!=0L){
+            queryWrapper.eq("hospital_id", VLtMedicalRecord.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(VLtMedicalRecord.getBehospitalCode())){
+            queryWrapper.eq("behospital_code", VLtMedicalRecord.getBehospitalCode());
+        }
+        return queryWrapper;
+    }
+
+    public UpdateWrapper updateWrapper(VLtMedicalRecord VLtMedicalRecord){
+        UpdateWrapper updateWrapper=new UpdateWrapper<MedicalRecord>();
+        if(StringUtil.isNotEmpty(VLtMedicalRecord.getRecId())){
+            updateWrapper.eq("rec_id", VLtMedicalRecord.getRecId());
+        }
+        if(VLtMedicalRecord.getHospitalId()!=null && VLtMedicalRecord.getHospitalId()!=0L){
+            updateWrapper.eq("hospital_id", VLtMedicalRecord.getHospitalId());
+        }
+        if(StringUtil.isNotEmpty(VLtMedicalRecord.getBehospitalCode())){
+            updateWrapper.eq("behospital_code", VLtMedicalRecord.getBehospitalCode());
+        }
+        return updateWrapper;
+    }
+
+    public void addMrecord(VLtMedicalRecord VLtMedicalRecord){
+        try{
+            MedicalRecord medicalRecord=this.getOne(queryWrapper(VLtMedicalRecord));
+            MedicalRecord vo=new MedicalRecord();
+            BeanUtils.copyProperties(VLtMedicalRecord,vo);
+            //初始化mode_id
+            vo.setModeId(initModeId(VLtMedicalRecord.getHospitalId(), VLtMedicalRecord.getRecTypeId()));
+
+            //获取到对应数据,存到我方数据库中
+            if(medicalRecord!=null){
+                vo.setGmtModified(new Date());
+                vo.setIsDeleted(IsDeleteEnum.N.getKey());
+                //更新数据
+                this.update(vo,updateWrapper(VLtMedicalRecord));
+            }else{
+                //新增数据
+                vo.setGmtCreate(new Date());
+                this.save(vo);
+            }
+        }catch (Exception e){
+            log.error("异步增加文书数据异常::::"+e.getMessage(),new Throwable());
+        }
+    }
+
+    *//**
+     * 初始化模型ID
+     *
+     * @param hospitalId
+     * @param recTypeId
+     * @return
+     *//*
+    public Long initModeId(Long hospitalId, String recTypeId) {
+        Long modeId = Long.valueOf("0");
+        QueryWrapper<ModelHospital> wrapper = new QueryWrapper<>();
+        wrapper.eq("hospital_id", hospitalId);
+        //wrapper.eq("hospital_model_name", recTitle);
+        wrapper.eq("remark", recTypeId);
+        ModelHospital mode = modelHospitalFacade.getOne(wrapper, false);
+        if (mode != null) {
+            modeId = mode.getStandModelId();
+        } else {
+            modeId = Long.valueOf("0");
+        }
+        modeId=11L;
+        return modeId;
+    }*/
+}

+ 37 - 0
external-service/src/main/java/com/lantone/external/facade/ViewRecordTypeFacade.java

@@ -0,0 +1,37 @@
+package com.lantone.external.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.lantone.external.entity.VLtRecordType;
+import com.lantone.external.util.RedisUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ViewRecordTypeFacade{
+
+   @Autowired
+   RedisUtil redisUtil;
+
+    private static final String RECORD_TYPE = "recordTypes";
+
+    public void syncRecordType(){
+        QueryWrapper queryWrapper=new QueryWrapper<VLtRecordType>();
+
+        /*查询昨天调整或新增的数据
+        queryWrapper.eq("CREATE_TIME", DateUtil.formatDate(new Date()))
+                .or()
+                .eq("UPDATE_TIME", DateUtil.formatDate(new Date()));
+        */
+        /*List<VLtRecordType> list=this.getBaseMapper().selectList(queryWrapper);
+        if(ListUtil.isNotEmpty(list)){
+            //获取所有的key值
+            Set<String> keys= redisUtil.getKeyList(RECORD_TYPE);
+            //先删除以往缓存数据
+            redisUtil.delete(keys);
+
+            //将新获取的数据进行存储
+            List<BasDeptInfo> deptList= BeanUtil.listCopyTo(list,BasDeptInfo.class);
+            Boolean flag=redisUtil.setIfAbsent(RECORD_TYPE, JSON.toJSONString(deptList));
+        }*/
+    }
+}

+ 0 - 14
external-service/src/main/java/com/lantone/external/facade/base/BehospitalInfoFacade.java

@@ -1,14 +0,0 @@
-package com.lantone.external.facade.base;
-
-import com.lantone.external.service.impl.BehospitalInfoServiceImpl;
-import org.springframework.stereotype.Component;
-
-/**
- * <p>
- * 表名:his_behospital_info 业务类
- * </p>
- */
-@Component
-public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
-
-}

+ 0 - 13
external-service/src/main/java/com/lantone/external/mapper/BehospitalInfoMapper.java

@@ -1,13 +0,0 @@
-package com.lantone.external.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.lantone.external.entity.BehospitalInfo;
-
-/**
- * <p>
- * 表名:his_behospital_info Mapper接口
- * </p>
- */
-public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
-
-}

+ 16 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtBehospitalInfoMapper.java

@@ -0,0 +1,16 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtBehospitalInfo;
+
+/**
+ * <p>
+ * 住院病历信息 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtBehospitalInfoMapper extends BaseMapper<VLtBehospitalInfo> {
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtDeptInfoMapper.java

@@ -0,0 +1,16 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtDeptInfo;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface VLtDeptInfoMapper extends BaseMapper<VLtDeptInfo> {
+
+}

+ 15 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtDoctorAdviceMapper.java

@@ -0,0 +1,15 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtDoctorAdvice;
+
+/**
+ * <p>
+ * 病人医嘱 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtDoctorAdviceMapper extends BaseMapper<VLtDoctorAdvice> {
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtDoctorInfoMapper.java

@@ -0,0 +1,16 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtDoctorInfo;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface VLtDoctorInfoMapper extends BaseMapper<VLtDoctorInfo> {
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtHomeDiagnoseInfoMapper.java

@@ -0,0 +1,16 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtHomeDiagnoseInfo;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtHomeDiagnoseInfoMapper extends BaseMapper<VLtHomeDiagnoseInfo> {
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtHomeOperationInfoMapper.java

@@ -0,0 +1,16 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtHomeOperationInfo;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtHomeOperationInfoMapper extends BaseMapper<VLtHomeOperationInfo> {
+
+}

+ 15 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtHomePageMapper.java

@@ -0,0 +1,15 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtHomePage;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtHomePageMapper extends BaseMapper<VLtHomePage> {
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtMedicalRecordContentMapper.java

@@ -0,0 +1,16 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtMedicalRecordContent;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtMedicalRecordContentMapper extends BaseMapper<VLtMedicalRecordContent> {
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtMedicalRecordMapper.java

@@ -0,0 +1,16 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtMedicalRecord;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtMedicalRecordMapper extends BaseMapper<VLtMedicalRecord> {
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/mapper/VLtRecordTypeMapper.java

@@ -0,0 +1,16 @@
+package com.lantone.external.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.external.entity.VLtRecordType;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface VLtRecordTypeMapper extends BaseMapper<VLtRecordType> {
+
+}

+ 0 - 13
external-service/src/main/java/com/lantone/external/service/BehospitalInfoService.java

@@ -1,13 +0,0 @@
-package com.lantone.external.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.lantone.external.entity.BehospitalInfo;
-
-/**
- * <p>
- * 住院病历信息 Service类
- * </p>
- */
-public interface BehospitalInfoService extends IService<BehospitalInfo> {
-
-}

+ 9 - 0
external-service/src/main/java/com/lantone/external/service/VLtBehospitalInfoService.java

@@ -0,0 +1,9 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtBehospitalInfo;
+
+public interface VLtBehospitalInfoService extends IService<VLtBehospitalInfo> {
+
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/service/VLtDeptInfoService.java

@@ -0,0 +1,16 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtDeptInfo;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface VLtDeptInfoService extends IService<VLtDeptInfo> {
+
+}

+ 7 - 0
external-service/src/main/java/com/lantone/external/service/VLtDoctorAdviceService.java

@@ -0,0 +1,7 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtDoctorAdvice;
+
+public interface VLtDoctorAdviceService extends IService<VLtDoctorAdvice> {
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/service/VLtDoctorInfoService.java

@@ -0,0 +1,16 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtDoctorInfo;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface VLtDoctorInfoService extends IService<VLtDoctorInfo> {
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/service/VLtHomeDiagnoseInfoService.java

@@ -0,0 +1,16 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtHomeDiagnoseInfo;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtHomeDiagnoseInfoService extends IService<VLtHomeDiagnoseInfo> {
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/service/VLtHomeOperationInfoService.java

@@ -0,0 +1,16 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtHomeOperationInfo;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtHomeOperationInfoService extends IService<VLtHomeOperationInfo> {
+
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/service/VLtHomePageService.java

@@ -0,0 +1,16 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtHomePage;
+
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface VLtHomePageService extends IService<VLtHomePage> {
+}

+ 7 - 0
external-service/src/main/java/com/lantone/external/service/VLtMedicalRecordContentService.java

@@ -0,0 +1,7 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtMedicalRecordContent;
+
+public interface VLtMedicalRecordContentService extends IService<VLtMedicalRecordContent> {
+}

+ 7 - 0
external-service/src/main/java/com/lantone/external/service/VLtMedicalRecordService.java

@@ -0,0 +1,7 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtMedicalRecord;
+
+public interface VLtMedicalRecordService extends IService<VLtMedicalRecord> {
+}

+ 16 - 0
external-service/src/main/java/com/lantone/external/service/VLtRecordTypeService.java

@@ -0,0 +1,16 @@
+package com.lantone.external.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.external.entity.VLtRecordType;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface VLtRecordTypeService extends IService<VLtRecordType> {
+
+}

+ 0 - 17
external-service/src/main/java/com/lantone/external/service/impl/BehospitalInfoServiceImpl.java

@@ -1,17 +0,0 @@
-package com.lantone.external.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.lantone.external.entity.BehospitalInfo;
-import com.lantone.external.mapper.BehospitalInfoMapper;
-import com.lantone.external.service.BehospitalInfoService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 住院病历信息 Service实现类
- * </p>
- */
-@Service
-public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper, BehospitalInfo> implements BehospitalInfoService {
-
-}

+ 11 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtBehospitalInfoServiceImpl.java

@@ -0,0 +1,11 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtBehospitalInfo;
+import com.lantone.external.mapper.VLtBehospitalInfoMapper;
+import com.lantone.external.service.VLtBehospitalInfoService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class VLtBehospitalInfoServiceImpl extends ServiceImpl<VLtBehospitalInfoMapper, VLtBehospitalInfo> implements VLtBehospitalInfoService {
+}

+ 20 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtDeptInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtDeptInfo;
+import com.lantone.external.mapper.VLtDeptInfoMapper;
+import com.lantone.external.service.VLtDeptInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@Service
+public class VLtDeptInfoServiceImpl extends ServiceImpl<VLtDeptInfoMapper, VLtDeptInfo> implements VLtDeptInfoService {
+
+}

+ 11 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtDoctorAdviceServiceImpl.java

@@ -0,0 +1,11 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtDoctorAdvice;
+import com.lantone.external.mapper.VLtDoctorAdviceMapper;
+import com.lantone.external.service.VLtDoctorAdviceService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class VLtDoctorAdviceServiceImpl extends ServiceImpl<VLtDoctorAdviceMapper, VLtDoctorAdvice> implements VLtDoctorAdviceService {
+}

+ 20 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtDoctorInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtDoctorInfo;
+import com.lantone.external.mapper.VLtDoctorInfoMapper;
+import com.lantone.external.service.VLtDoctorInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@Service
+public class VLtDoctorInfoServiceImpl extends ServiceImpl<VLtDoctorInfoMapper, VLtDoctorInfo> implements VLtDoctorInfoService {
+
+}

+ 11 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtHomeDiagnoseInfoServiceImpl.java

@@ -0,0 +1,11 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtHomeDiagnoseInfo;
+import com.lantone.external.mapper.VLtHomeDiagnoseInfoMapper;
+import com.lantone.external.service.VLtHomeDiagnoseInfoService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class VLtHomeDiagnoseInfoServiceImpl extends ServiceImpl<VLtHomeDiagnoseInfoMapper, VLtHomeDiagnoseInfo> implements VLtHomeDiagnoseInfoService {
+}

+ 11 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtHomeOperationInfoServiceImpl.java

@@ -0,0 +1,11 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtHomeOperationInfo;
+import com.lantone.external.mapper.VLtHomeOperationInfoMapper;
+import com.lantone.external.service.VLtHomeOperationInfoService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class VLtHomeOperationInfoServiceImpl extends ServiceImpl<VLtHomeOperationInfoMapper, VLtHomeOperationInfo> implements VLtHomeOperationInfoService {
+}

+ 20 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtHomePageServiceImpl.java

@@ -0,0 +1,20 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtHomePage;
+import com.lantone.external.mapper.VLtHomePageMapper;
+import com.lantone.external.service.VLtHomePageService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@Service
+public class VLtHomePageServiceImpl extends ServiceImpl<VLtHomePageMapper, VLtHomePage> implements VLtHomePageService {
+
+}

+ 11 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtMedicalRecordContentServiceImpl.java

@@ -0,0 +1,11 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtMedicalRecordContent;
+import com.lantone.external.mapper.VLtMedicalRecordContentMapper;
+import com.lantone.external.service.VLtMedicalRecordContentService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class VLtMedicalRecordContentServiceImpl extends ServiceImpl<VLtMedicalRecordContentMapper, VLtMedicalRecordContent> implements VLtMedicalRecordContentService {
+}

+ 11 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtMedicalRecordServiceImpl.java

@@ -0,0 +1,11 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtMedicalRecord;
+import com.lantone.external.mapper.VLtMedicalRecordMapper;
+import com.lantone.external.service.VLtMedicalRecordService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class VLtMedicalRecordServiceImpl extends ServiceImpl<VLtMedicalRecordMapper, VLtMedicalRecord> implements VLtMedicalRecordService {
+}

+ 20 - 0
external-service/src/main/java/com/lantone/external/service/impl/VLtRecordTypeServiceImpl.java

@@ -0,0 +1,20 @@
+package com.lantone.external.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.external.entity.VLtRecordType;
+import com.lantone.external.mapper.VLtRecordTypeMapper;
+import com.lantone.external.service.VLtRecordTypeService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@Service
+public class VLtRecordTypeServiceImpl extends ServiceImpl<VLtRecordTypeMapper, VLtRecordType> implements VLtRecordTypeService {
+
+}

+ 137 - 0
external-service/src/main/java/com/lantone/external/task/DataViewTask.java

@@ -0,0 +1,137 @@
+package com.lantone.external.task;
+
+import com.lantone.external.dto.RespDTO;
+import com.lantone.external.facade.VLtDeptInfoFacade;
+import com.lantone.external.facade.VLtDoctorInfoFacade;
+import com.lantone.external.facade.VLtRecordTypeFacade;
+import com.lantone.external.util.RedisUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.*;
+
+@Component
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling   // 2.开启定时任务
+@Slf4j
+public class DataViewTask {
+    @Autowired
+    RedisUtil redisUtil;
+
+    private static final String DEPTS = "depts";
+    private static final String DOCTORS = "doctors";
+    private static final String RECORD_TYPE = "recordTypes";
+
+    @Autowired
+    private VLtDeptInfoFacade vLtDeptInfoFacade;
+
+    @Autowired
+    private VLtDoctorInfoFacade vLtDoctorInfoFacade;
+
+    @Autowired
+    private VLtRecordTypeFacade vLtRecordTypeFacade;
+
+    /**
+     * @Description:查询数据并存到缓存中
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    @Scheduled(cron = "0 25 17 * * ?")
+    public void syncHisData() throws Exception{
+        //将his数据存到缓存中
+        vLtRecordTypeFacade.syncRecordType();
+        vLtDeptInfoFacade.syncDeptInfo();
+        vLtDoctorInfoFacade.syncDoctorInfo();
+    }
+
+    /**
+     * @Description:
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    //@Scheduled(cron = "0 23 14 * * ?")
+    public RespDTO initDoctorData(){
+        try{
+            //获取所有的key值
+            String values= redisUtil.get(DOCTORS);
+            //根据key值,获取对应的数据
+           /* List<BasDoctorInfo> list= JSON.parseArray(values,BasDoctorInfo.class);
+            if(ListUtil.isNotEmpty(list)){
+                aBasDoctorInfoFacade.execute(list);
+            }*/
+            return RespDTO.onSuc("定时拉取医生信息成功!!!");
+        }catch (Exception e){
+            return RespDTO.onError("定时拉取医生信息异常!!!"+e.getMessage());
+        }
+    }
+
+    /**
+     * @Description:
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    //@Scheduled(cron = "0 47 17 * * ?")
+    public void initDeptData(){
+        //获取所有的key值
+        String values= redisUtil.get(DEPTS);
+        //根据key值,获取对应的数据
+        /*List<BasDeptInfo> list= JSON.parseArray(values,BasDeptInfo.class);
+        if(ListUtil.isNotEmpty(list)){
+            aBasDeptInfoFacade.execute(list);
+        }*/
+    }
+
+    /**
+     * @Description:
+     * @Author:liuqq
+     * @time: ${DATE} ${TIME}
+     **/
+    //@Scheduled(cron = "0 48 17 * * ?")
+    public void initRecordTypeData(){
+        //获取所有的key值
+        String values= redisUtil.get(RECORD_TYPE);
+        //根据key值,获取对应的数据
+        /*List<MedRecordType> list= JSON.parseArray(values,MedRecordType.class);
+        if(ListUtil.isNotEmpty(list)){
+            aMedRecordTypeFacade.execute(list);
+        }*/
+    }
+
+    public void initDoctors() throws Exception{
+        //获取所有的key值
+        Set<String> keys= redisUtil.getKeyList(DEPTS+"**");
+        //根据key值,获取对应的数据
+        /*List<List<BasDoctorInfo>> list=redisUtil.multiGet(keys);
+        if(ListUtil.isNotEmpty(list)){
+            List<BasDoctorInfo> basDoctorInfoList= Lists.newArrayList();
+            list.forEach(s->{
+                s.forEach(l->{
+                    //l.setDoctorId(l.getDoctorId()+ RandomUtil.randomNumber());
+                    l.setDoctorId(l.getDoctorId()+ RandomUtil.randomNumbers(3));
+                    l.setOccup(RandomUtil.randomNumbers(3));
+                    l.setGmtCreate(new Date());
+                    basDoctorInfoList.add(l);
+                });
+            });
+            //剔除重复项,已最新入库时间为先,医生ID为唯一值
+            basDoctorInfoList.sort(Comparator.comparing(BasDoctorInfo::getGmtCreate).reversed());
+            basDoctorInfoList.stream().filter(i-> StringUtil.isNotBlank(i.getDoctorId())).findFirst();
+            Map<String,BasDoctorInfo> doctorMap= new HashMap<>();
+            basDoctorInfoList.stream().forEach(s->{
+                if(!doctorMap.containsKey(s.getDoctorId())){
+                    doctorMap.put(s.getDoctorId(),s);
+                }
+            });
+
+            List<BasDoctorInfo> doctorInfoList=doctorMap.values().stream().collect(Collectors.toList());
+            aBasDoctorInfoFacade.execute(doctorInfoList);
+
+            //清除缓存中内容
+            redisUtil.delete(keys);
+        }*/
+    }
+}

+ 306 - 0
external-service/src/main/java/com/lantone/external/util/RedisUtil.java

@@ -0,0 +1,306 @@
+package com.lantone.external.util;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Component;
+
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @description: redis工具类
+ * @author: zhoutg
+ * @time: 2020/8/11 19:52
+ */
+@Component
+public class RedisUtil {
+
+    @Autowired
+    @Qualifier("redisTemplateForTable")
+    RedisTemplate redisTemplate;
+
+    /**
+     * 根据指定key获取value
+     *
+     * @param key 键
+     */
+    public <T> T get(String key) {
+        return (T) redisTemplate.opsForValue().get(key);
+    }
+
+    /**
+     * 根据指定key设置obj
+     *
+     * @param key
+     * @param obj
+     */
+    public void set(String key, Object obj) {
+        redisTemplate.opsForValue().set(key, obj);
+    }
+
+    /**
+     * 根据指定key设置obj
+     *
+     * @param key
+     * @param obj
+     */
+    public boolean setFlag(String key, Object obj) {
+        try {
+            redisTemplate.opsForValue().set(key, obj);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    /**
+     * 批量获取
+     *
+     * @param keys
+     * @return
+     */
+    public <T> List<T> multiGet(Collection<String> keys) {
+        return redisTemplate.opsForValue().multiGet(keys);
+    }
+
+    /**
+     * 批量设置
+     *
+     * @param map
+     * @return
+     */
+    public void multiSet(Map<String, Object> map) {
+        redisTemplate.opsForValue().multiSet(map);
+    }
+
+    /**
+     * 更新指定的数据
+     *
+     * @param key
+     * @param str
+     */
+    public void updateValue(String key, String str) {
+        redisTemplate.opsForValue().set(key, str);
+    }
+
+    /**
+     * 删除key
+     *
+     * @param key
+     */
+    public void delete(String key) {
+        redisTemplate.delete(key);
+    }
+
+    /**
+     * 批量删除key
+     *
+     * @param keys
+     */
+    public void delete(Collection<String> keys) {
+        redisTemplate.delete(keys);
+    }
+
+    /**
+     * 根据前缀删除key
+     *
+     * @param prex
+     */
+    public void deleteByPrex(String prex) {
+        prex = prex + "**";
+        Set<String> keys = getKeyList(prex);
+        if (CollectionUtils.isNotEmpty(keys)) {
+            redisTemplate.delete(keys);
+        }
+    }
+
+    /**
+     * 根据前缀删除key
+     *
+     * @param prex
+     */
+    public <T> List<T> getByPrex(String prex) {
+        prex = prex + "**";
+        Set<String> keys = getKeyList(prex);
+        if (CollectionUtils.isNotEmpty(keys)) {
+            return multiGet(keys);
+        }
+        return null;
+    }
+
+    /**
+     * 根据正则key获取value列表
+     *
+     * @param pattern 键
+     */
+    public <T> List<T> getByRegex(String pattern) {
+        Set<String> keys = getKeyList(pattern);
+        return multiGet(keys);
+    }
+
+    /**
+     * 查找匹配的key
+     *
+     * @param pattern
+     * @return
+     */
+    public Set<String> getKeyList(String pattern) {
+        return redisTemplate.keys(pattern);
+    }
+
+    /**
+     * 序列化key
+     *
+     * @param key
+     * @return
+     */
+    public byte[] dump(String key) {
+        return redisTemplate.dump(key);
+    }
+
+    /**
+     * 是否存在key
+     *
+     * @param key
+     * @return
+     */
+    public Boolean hasKey(String key) {
+        return redisTemplate.hasKey(key);
+    }
+
+    /**
+     * 设置过期时间
+     *
+     * @param key
+     * @param timeout
+     * @param unit
+     * @return
+     */
+    public Boolean expire(String key, long timeout, TimeUnit unit) {
+        return redisTemplate.expire(key, timeout, unit);
+    }
+
+    /**
+     * 设置过期时间
+     *
+     * @param key
+     * @param date
+     * @return
+     */
+    public Boolean expireAt(String key, Date date) {
+        return redisTemplate.expireAt(key, date);
+    }
+
+    /**
+     * 移除 key 的过期时间,key 将持久保持
+     *
+     * @param key
+     * @return
+     */
+    public Boolean persist(String key) {
+        return redisTemplate.persist(key);
+    }
+
+    /**
+     * 返回 key 的剩余的过期时间
+     *
+     * @param key
+     * @param unit
+     * @return
+     */
+    public Long getExpire(String key, TimeUnit unit) {
+        return redisTemplate.getExpire(key, unit);
+    }
+
+    /**
+     * 返回 key 的剩余的过期时间
+     *
+     * @param key
+     * @return
+     */
+    public Long getExpire(String key) {
+        return redisTemplate.getExpire(key);
+    }
+
+    /**
+     * 修改 key 的名称
+     *
+     * @param oldKey
+     * @param newKey
+     */
+    public void rename(String oldKey, String newKey) {
+        redisTemplate.rename(oldKey, newKey);
+    }
+
+    /**
+     * 仅当 newkey 不存在时,将 oldKey 改名为 newkey
+     *
+     * @param oldKey
+     * @param newKey
+     * @return
+     */
+    public Boolean renameIfAbsent(String oldKey, String newKey) {
+        return redisTemplate.renameIfAbsent(oldKey, newKey);
+    }
+
+    /**
+     * 设置指定 key 的值
+     *
+     * @param key
+     * @param value
+     */
+    public void set(String key, String value) {
+        redisTemplate.opsForValue().set(key, value);
+    }
+
+    /**
+     * 将值 value 关联到 key ,并将 key 的过期时间设为 timeout
+     *
+     * @param key
+     * @param value
+     * @param timeout 过期时间
+     * @param unit    时间单位, 天:TimeUnit.DAYS 小时:TimeUnit.HOURS 分钟:TimeUnit.MINUTES
+     *                秒:TimeUnit.SECONDS 毫秒:TimeUnit.MILLISECONDS
+     */
+    public void setEx(String key, Object value, long timeout, TimeUnit unit) {
+        redisTemplate.opsForValue().set(key, value, timeout, unit);
+    }
+
+    /**
+     * 只有在 key 不存在时设置 key 的值
+     *
+     * @param key
+     * @param value
+     * @return 之前已经存在返回false, 不存在返回true
+     */
+    public boolean setIfAbsent(String key, String value) {
+        return redisTemplate.opsForValue().setIfAbsent(key, value);
+    }
+
+    /**
+     * map集合的形式添加键值对
+     *
+     * @param key
+     * @param map
+     */
+    public void putHashMap(String key, Map<String, Object> map) {
+        if (MapUtils.isNotEmpty(map)) {
+            redisTemplate.opsForHash().putAll(key, map);
+        }
+    }
+
+    /**
+     * 获取集合中指定field的内容
+     * @param key
+     * @param field
+     * @param <T>
+     * @return
+     */
+    public <T> T getByKeyAndField(String key, String field) {
+        return (T)redisTemplate.opsForHash().get(key, field);
+    }
+}

+ 19 - 0
external-service/src/main/java/com/lantone/external/vo/DataBalanceVO.java

@@ -0,0 +1,19 @@
+package com.lantone.external.vo;
+
+import lombok.Data;
+
+@Data
+public class DataBalanceVO {
+    /*
+     *开始时间
+     */
+    private String startTime;
+    /*
+     * 结束时间
+     */
+    private String endTime;
+    /*
+     * 病历号
+     */
+    private String behospitalCode;
+}

+ 59 - 0
external-service/src/main/java/com/lantone/external/vo/DataViewVO.java

@@ -0,0 +1,59 @@
+package com.lantone.external.vo;
+
+import lombok.Data;
+
+@Data
+public class DataViewVO {
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+
+    /**
+     * 病人医嘱ID
+     */
+    private String doctorAdviceId;
+
+    /**
+     * 文书序号
+     */
+    private String recId;
+
+    /**
+     * 病历类别编号
+     */
+    private String recTypeId;
+
+    /**
+     * 病历日期
+     */
+    private String recDate;
+
+    /**
+     * 病历标题
+     */
+    private String recTitle;
+
+    /**
+     * 病案首页序号
+     **/
+    private String homePageId;
+
+    /**
+     * 病案首页诊断序号
+     **/
+    private String diagnoseOrderNo;
+
+    private String operationOrderNo;
+
+    private String startDate;
+
+    private String endDate;
+}

+ 0 - 32
external-service/src/main/java/com/lantone/external/vo/GetLostBehospitalVO.java

@@ -1,32 +0,0 @@
-package com.lantone.external.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @Description: 获取丢失的住院病历信息-接口入参
- * @author: rengb
- * @time: 2022/3/16 16:28
- */
-@ApiModel(value = "获取丢失的住院病历信息-接口入参")
-@Getter
-@Setter
-public class GetLostBehospitalVO implements Serializable {
-
-    private static final long serialVersionUID = -345554179620072672L;
-
-    @ApiModelProperty(value = "入院起始时间", required = true)
-    @NotNull(message = "入院起始时间不能为空")
-    private Date behospitalStartDate;
-
-    @ApiModelProperty(value = "入院截止时间", required = true)
-    @NotNull(message = "入院截止时间不能为空")
-    private Date behospitalEndDate;
-
-}

+ 0 - 165
external-service/src/main/java/com/lantone/external/vo/client/AddLostBehospitalVO.java

@@ -1,165 +0,0 @@
-package com.lantone.external.vo.client;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import io.swagger.annotations.ApiModel;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @Description: 第三方数据入库服务远程调用-丢失的住院病历信息入库-接口入参
- * @author: rengb
- * @time: 2022/3/16 16:28
- */
-@ApiModel(value = "第三方数据入库服务远程调用-丢失的住院病历信息入库-接口入参")
-@Getter
-@Setter
-public class AddLostBehospitalVO implements Serializable {
-
-    private static final long serialVersionUID = -345554179620072672L;
-
-    /**
-     * 医院ID
-     */
-    private Long hospitalId;
-
-    /**
-     * 病人住院ID
-     */
-    private String behospitalCode;
-
-    /**
-     * 姓名
-     */
-    private String name;
-
-    /**
-     * 性别(男,女)
-     */
-    private String sex;
-
-    /**
-     * 出生日期
-     */
-    private Date birthday;
-
-    /**
-     * 档案号
-     */
-    @TableField("file_code")
-    private String fileCode;
-
-    /**
-     * 病区编码
-     */
-    private String wardCode;
-
-    /**
-     * 病区名称
-     */
-    private String wardName;
-
-    /**
-     * 住院科室ID
-     */
-    private String behDeptId;
-
-    /**
-     * 住院科室名称
-     */
-    private String behDeptName;
-
-    /**
-     * 床位号
-     */
-    private String bedCode;
-
-    /**
-     * 床位名称
-     */
-    private String bedName;
-
-    /**
-     * 医保类别
-     */
-    @TableField("insurance_name")
-    private String insuranceName;
-
-    /**
-     * 职业
-     */
-    private String jobType;
-
-    /**
-     * 入院时间
-     */
-    private Date behospitalDate;
-
-    /**
-     * 出院时间
-     */
-    private Date leaveHospitalDate;
-
-    /**
-     * 转入时间
-     */
-    private Date transInTime;
-
-    /**
-     * 转出时间
-     */
-    private Date transOutTime;
-
-    /**
-     * 疾病ICD编码
-     */
-    private String diagnoseIcd;
-
-    /**
-     * 疾病名称
-     */
-    private String diagnose;
-
-    /**
-     * 主治医生ID
-     */
-    private String doctorId;
-
-    /**
-     * 主治医生姓名
-     */
-    private String doctorName;
-
-    /**
-     * 住院医生ID
-     */
-    private String behDoctorId;
-
-    /**
-     * 住院医生姓名
-     */
-    private String behDoctorName;
-
-    /**
-     * 主任医生ID
-     */
-    private String directorDoctorId;
-
-    /**
-     * 主任医生姓名
-     */
-    private String directorDoctorName;
-
-    /**
-     * 是否归档(0:未归档,1:已归档)
-     */
-    private String isPlacefile;
-
-    /**
-     * 归档时间
-     */
-    private Date placefileDate;
-
-}

+ 0 - 36
external-service/src/main/java/com/lantone/external/web/BehospitalManagementController.java

@@ -1,36 +0,0 @@
-package com.lantone.external.web;
-
-import com.lantone.common.api.CommonResult;
-import com.lantone.external.dto.GetLostBehospitalDTO;
-import com.lantone.external.facade.BehospitalManagementFacade;
-import com.lantone.external.vo.GetLostBehospitalVO;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.validation.Valid;
-
-/**
- * @Description: 住院病历信息同步简单示例API
- * @author: rengb
- * @time: 2022/3/16 16:28
- */
-@RestController
-@Api(value = "住院病历信息同步简单示例API", tags = { "住院病历信息同步简单示例API" })
-@RequestMapping("/behospitalManage")
-public class BehospitalManagementController {
-
-    @Autowired
-    private BehospitalManagementFacade behospitalManagementFacade;
-
-    @ApiOperation(value = "获取丢失的住院病历信息 [by:rengb]", notes = "获取丢失的住院病历信息")
-    @PostMapping("/getLostBehospital")
-    public CommonResult<GetLostBehospitalDTO> getLostBehospital(@RequestBody @Valid GetLostBehospitalVO getLostBehospitalVO) {
-        return CommonResult.success(behospitalManagementFacade.getLostBehospital(getLostBehospitalVO));
-    }
-
-}

+ 29 - 0
external-service/src/main/java/com/lantone/external/web/DataBalanceController.java

@@ -0,0 +1,29 @@
+package com.lantone.external.web;
+
+import com.lantone.external.dto.DataBalanceDTO;
+import com.lantone.external.facade.DataBalanceFacade;
+import com.lantone.external.vo.DataBalanceVO;
+import com.lantone.external.vo.DataViewVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/balance/data")
+@Api(value = "数据比对", tags = { "对接接口API-数据比对" })
+public class DataBalanceController {
+
+    @Autowired
+    private DataBalanceFacade dataBalanceFacade;
+
+    @ApiOperation(value = "数据比对-获取某个入院时间段内的病历数")
+    @PostMapping("/getDataCount")
+    public List<DataBalanceDTO> getDataCount(DataViewVO dataViewVO){
+        return dataBalanceFacade.balanceData(dataViewVO);
+    }
+}

+ 55 - 0
external-service/src/main/java/com/lantone/external/web/DataViewController.java

@@ -0,0 +1,55 @@
+package com.lantone.external.web;
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/qcView/data")
+@Api(value = "对接接口API-视图+接口模式", tags = { "对接接口API-视图+接口模式" })
+public class DataViewController {
+
+    /*@Autowired
+    private ViewBehospitalInfoFacade viewBehospitalInfoFacade;
+    @Autowired
+    private ViewDoctorAdviceFacade viewDoctorAdviceFacade;
+    @Autowired
+    private ViewMRecordFacade viewMRecordFacade;
+    @Autowired
+    private ViewHomePageFacade viewHomePageFacade;
+
+    @ApiOperation(value = "数据引擎-获取医院病人住院记录信息")
+    @PostMapping("/sendPatientInfo")
+    @MrqcLog
+    public RespDTO sendPatientInfo(@RequestBody DataViewVO dataViewVO) {
+        return viewBehospitalInfoFacade.getBehospitalInfoData(dataViewVO);
+    }
+
+    @ApiOperation(value = "数据引擎-获取医院医生医嘱信息")
+    @PostMapping("/sendDoctorAdvice")
+    @MrqcLog
+    public RespDTO sendDoctorAdvice(@RequestBody DataViewVO dataViewVO) {
+        return viewDoctorAdviceFacade.getDoctorAdviceData(dataViewVO);
+    }
+
+    @ApiOperation(value = "运行质控-评分-文书信息")
+    @PostMapping("/sendMrRecordIng")
+    @MrqcLog
+    public RespDTO sendMrRecordIng(@RequestBody DataViewVO dataViewVO) {
+        return viewMRecordFacade.getMedicalRecordData(dataViewVO);
+    }
+
+    @ApiOperation(value = "运行质控-获取病案首页")
+    @PostMapping("/sendHomePageIng")
+    @MrqcLog
+    public RespDTO sendHomePageIng(@RequestBody DataViewVO dataViewVO) {
+        return viewHomePageFacade.getHomePageData(dataViewVO);
+    }
+
+    @ApiOperation(value = "his数据补录,根据单个病历号或某个出院时间段内病历数去进去补录")
+    @PostMapping("/dataSupplement")
+    @MrqcLog
+    public RespDTO dataSupplement(@RequestBody DataViewVO dataViewVO) {
+        return viewBehospitalInfoFacade.hisDataSupplement(dataViewVO);
+    }*/
+}

+ 0 - 5
external-service/src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -1,5 +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.lantone.external.mapper.BehospitalInfoMapper">
-
-</mapper>

+ 34 - 0
external-service/src/main/resources/mapper/VLtBehospitalInfoMapper.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.lantone.external.mapper.VLtBehospitalInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtBehospitalInfo">
+        <result column="BEHOSPITAL_CODE" property="behospitalCode" />
+        <result column="NAME" property="name" />
+        <result column="SEX" property="sex" />
+        <result column="BIRTHDAY" property="birthday" />
+        <result column="FILE_CODE" property="fileCode" />
+        <result column="WARD_CODE" property="wardCode" />
+        <result column="WARD_NAME" property="wardName" />
+        <result column="BEH_DEPT_ID" property="behDeptId" />
+        <result column="BEH_DEPT_NAME" property="behDeptName" />
+        <result column="BED_CODE" property="bedCode" />
+        <result column="BED_NAME" property="bedName" />
+        <result column="INSURANCE_NAME" property="insuranceName" />
+        <result column="JOB_TYPE" property="jobType" />
+        <result column="BEHOSPITAL_DATE" property="behospitalDate" />
+        <result column="LEAVE_HOSPITAL_DATE" property="leaveHospitalDate" />
+        <result column="DIAGNOSE_ICD" property="diagnoseIcd" />
+        <result column="DOCTOR_ID" property="doctorId" />
+        <result column="DOCTOR_NAME" property="doctorName" />
+        <result column="BEH_DOCTOR_ID" property="behDoctorId" />
+        <result column="BEH_DOCTOR_NAME" property="behDoctorName" />
+        <result column="DIRECTOR_DOCTOR_ID" property="directorDoctorId" />
+        <result column="DIRECTOR_DOCTOR_NAME" property="directorDoctorName" />
+        <result column="DIAGNOSE" property="diagnose" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+    </resultMap>
+
+</mapper>

+ 18 - 0
external-service/src/main/resources/mapper/VLtDeptInfoMapper.xml

@@ -0,0 +1,18 @@
+<?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.lantone.external.mapper.VLtDeptInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtDeptInfo">
+        <result column="DEPT_ID" property="deptId" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+        <result column="PARENT_DEPT_ID" property="parentDeptId" />
+        <result column="DEPT_NAME" property="deptName" />
+        <result column="DEPT_TYPE" property="deptType" />
+        <result column="SPELL" property="spell" />
+        <result column="STATION" property="station" />
+        <result column="CREATE_TIME" property="createTime" />
+        <result column="UPDATE_TIME" property="updateTime" />
+    </resultMap>
+
+</mapper>

+ 34 - 0
external-service/src/main/resources/mapper/VLtDoctorAdviceMapper.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.lantone.external.mapper.VLtDoctorAdviceMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtDoctorAdvice">
+        <result column="DOCTOR_ADVICE_ID" property="doctorAdviceId" />
+        <result column="BEHOSPITAL_CODE" property="behospitalCode" />
+        <result column="ORDER_DOCTOR_NAME" property="orderDoctorName" />
+        <result column="FREQUENCY" property="frequency" />
+        <result column="PARENT_TYPE_ID" property="parentTypeId" />
+        <result column="DOCTOR_ADVICE_TYPE" property="doctorAdviceType" />
+        <result column="USAGE_NUM" property="usageNum" />
+        <result column="USAGE_UNIT" property="usageUnit" />
+        <result column="DOSE" property="dose" />
+        <result column="DOSE_UNIT" property="doseUnit" />
+        <result column="MED_MODE_TYPE" property="medModeType" />
+        <result column="DA_FREQUENCY" property="daFrequency" />
+        <result column="DA_DEAL_TYPE" property="daDealType" />
+        <result column="DA_START_DATE" property="daStartDate" />
+        <result column="DA_ITEM_NAME" property="daItemName" />
+        <result column="DA_STATUS" property="daStatus" />
+        <result column="DA_STOP_DATE" property="daStopDate" />
+        <result column="DA_GROUP_NO" property="daGroupNo" />
+        <result column="DA_PRESCRIPTION_TYPE" property="daPrescriptionType" />
+        <result column="MEDICINE_TYPE" property="medicineType" />
+        <result column="DA_MED_TYPE" property="daMedType" />
+        <result column="DOCTOR_NOTICE" property="doctorNotice" />
+        <result column="DOCTOR_ID" property="doctorId" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+        <result column="DOCTOR_NAME" property="doctorName" />
+    </resultMap>
+
+</mapper>

+ 18 - 0
external-service/src/main/resources/mapper/VLtDoctorInfoMapper.xml

@@ -0,0 +1,18 @@
+<?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.lantone.external.mapper.VLtDoctorInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtDoctorInfo">
+        <id column="DOCTOR_ID" property="doctorId" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+        <result column="DEPT_ID" property="deptId" />
+        <result column="NAME" property="name" />
+        <result column="PROFESSOR" property="professor" />
+        <result column="OCCUP" property="occup" />
+        <result column="GROUP_ID" property="groupId" />
+        <result column="CREATE_TIME" property="createTime" />
+        <result column="UPDATE_TIME" property="updateTime" />
+    </resultMap>
+
+</mapper>

+ 19 - 0
external-service/src/main/resources/mapper/VLtHomeDiagnoseInfoMapper.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.lantone.external.mapper.VLtHomeDiagnoseInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtHomeDiagnoseInfo">
+        <result column="HOME_PAGE_ID" property="homePageId" />
+        <result column="DIAGNOSE_ORDER_NO" property="diagnoseOrderNo" />
+        <result column="DIAGNOSE_TYPE" property="diagnoseType" />
+        <result column="DIAGNOSE_TYPE_SHORT" property="diagnoseTypeShort" />
+        <result column="DIAGNOSE_NAME" property="diagnoseName" />
+        <result column="BEHOSPITAL_TYPE" property="behospitalType" />
+        <result column="LEAVE_HOSPITAL_TYPE" property="leaveHospitalType" />
+        <result column="PATHOLOGY_DIAGNOSE" property="pathologyDiagnose" />
+        <result column="ICD_CODE" property="icdCode" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+    </resultMap>
+
+</mapper>

+ 24 - 0
external-service/src/main/resources/mapper/VLtHomeOperationInfoMapper.xml

@@ -0,0 +1,24 @@
+<?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.lantone.external.mapper.VLtHomeOperationInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtHomeOperationInfo">
+        <result column="HOME_PAGE_ID" property="homePageId" />
+        <result column="OPERATION_ORDER_NO" property="operationOrderNo" />
+        <result column="OPERATION_DATE" property="operationDate" />
+        <result column="OPERATION_CODE" property="operationCode" />
+        <result column="OPERATION_DOCTOR_ID" property="operationDoctorId" />
+        <result column="FIRST_ASSISTANT_ID" property="firstAssistantId" />
+        <result column="SECOND_ASSISTANT_ID" property="secondAssistantId" />
+        <result column="CUT_LEVEL" property="cutLevel" />
+        <result column="HEALING_LEVEL" property="healingLevel" />
+        <result column="OPERATION_NAME" property="operationName" />
+        <result column="OPERATION_LEVEL" property="operationLevel" />
+        <result column="ANAESTHESIA_NAME" property="anaesthesiaName" />
+        <result column="ANAESTHESIA_DOCTOR" property="anaesthesiaDoctor" />
+        <result column="SHAM_OPERATION_NAME" property="shamOperationName" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+    </resultMap>
+
+</mapper>

+ 149 - 0
external-service/src/main/resources/mapper/VLtHomePageMapper.xml

@@ -0,0 +1,149 @@
+<?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.lantone.external.mapper.VLtHomePageMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtHomePage">
+        <result column="HOME_PAGE_ID" property="homePageId" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+        <result column="BEHOSPITAL_CODE" property="behospitalCode" />
+        <result column="HOSPITAL_CODE" property="hospitalCode" />
+        <result column="HOSPITAL_NAME" property="hospitalName" />
+        <result column="ORG_CODE" property="orgCode" />
+        <result column="PAY_TYPE" property="payType" />
+        <result column="HEALTH_CARD" property="healthCard" />
+        <result column="BEHOSPITAL_NUM" property="behospitalNum" />
+        <result column="FILE_CODE" property="fileCode" />
+        <result column="NAME" property="name" />
+        <result column="SEX" property="sex" />
+        <result column="BIRTHDAY" property="birthday" />
+        <result column="AGE" property="age" />
+        <result column="AGE_UNIT" property="ageUnit" />
+        <result column="NATIONALITY" property="nationality" />
+        <result column="NEWBORN_MONTH" property="newbornMonth" />
+        <result column="NEWBORN_DAY" property="newbornDay" />
+        <result column="NEWBORN_WEIGHT" property="newbornWeight" />
+        <result column="NEWBORN_BEHOSPITAL_WEIGHT" property="newbornBehospitalWeight" />
+        <result column="BORN_ADDRESS" property="bornAddress" />
+        <result column="BORN_PLACE" property="bornPlace" />
+        <result column="NATION" property="nation" />
+        <result column="IDENTITY_CARD_NO" property="identityCardNo" />
+        <result column="CUR_POST_CODE" property="curPostCode" />
+        <result column="JOB_TYPE" property="jobType" />
+        <result column="MARRIAGE" property="marriage" />
+        <result column="CUR_ADDRESS" property="curAddress" />
+        <result column="CUR_PHONE" property="curPhone" />
+        <result column="RESIDENCE_ADDRESS" property="residenceAddress" />
+        <result column="RESIDENCE_POST_CODE" property="residencePostCode" />
+        <result column="WORK_ADDRESS" property="workAddress" />
+        <result column="WORK_PHONE" property="workPhone" />
+        <result column="WORK_POST_CODE" property="workPostCode" />
+        <result column="CONTACT_NAME" property="contactName" />
+        <result column="CONTACT_RELATION" property="contactRelation" />
+        <result column="CONTACT_ADDRESS" property="contactAddress" />
+        <result column="CONTACT_PHONE" property="contactPhone" />
+        <result column="BEHOSPITAL_WAY" property="behospitalWay" />
+        <result column="BEHOSPITAL_DATE" property="behospitalDate" />
+        <result column="BEHOSPITAL_DEPT" property="behospitalDept" />
+        <result column="BEHOSPITAL_WARD" property="behospitalWard" />
+        <result column="BEHOSPITAL_BED_ID" property="behospitalBedId" />
+        <result column="BEHOSPITAL_BED_CODE" property="behospitalBedCode" />
+        <result column="CHANGE_DEPT" property="changeDept" />
+        <result column="LEAVE_HOSPITAL_DATE" property="leaveHospitalDate" />
+        <result column="LEAVE_HOSPITAL_DEPT" property="leaveHospitalDept" />
+        <result column="LEAVE_HOSPITAL_WARD" property="leaveHospitalWard" />
+        <result column="LEAVE_HOSPITAL_BED_ID" property="leaveHospitalBedId" />
+        <result column="LEAVE_HOSPITAL_BED_CODE" property="leaveHospitalBedCode" />
+        <result column="BEHOSPITAL_DAY_NUM" property="behospitalDayNum" />
+        <result column="OUTPATIENT_EMR_DIAGNOSE" property="outpatientEmrDiagnose" />
+        <result column="OUTPATIENT_EMR_DIAGNOSE_CODE" property="outpatientEmrDiagnoseCode" />
+        <result column="POISON_FACTOR" property="poisonFactor" />
+        <result column="POISON_FACTOR_CODE" property="poisonFactorCode" />
+        <result column="PATHOLOGY_DIAGNOSE" property="pathologyDiagnose" />
+        <result column="PATHOLOGY_DIAGNOSE_CODE" property="pathologyDiagnoseCode" />
+        <result column="PATHOLOGY_DIAGNOSE_ID" property="pathologyDiagnoseId" />
+        <result column="IS_MED_ALLERGY" property="isMedAllergy" />
+        <result column="MED_ALLERGY_NAME" property="medAllergyName" />
+        <result column="AUTOPSY" property="autopsy" />
+        <result column="BLOOD_TYPE" property="bloodType" />
+        <result column="RH" property="rh" />
+        <result column="DEPT_DIRECTOR" property="deptDirector" />
+        <result column="DIRECTOR_DOCTOR" property="directorDoctor" />
+        <result column="ATTENDING_DOCTOR" property="attendingDoctor" />
+        <result column="BEHOSPITAL_DOCTOR" property="behospitalDoctor" />
+        <result column="RESPONSE_NURSE" property="responseNurse" />
+        <result column="STUDY_DOCTOR" property="studyDoctor" />
+        <result column="PRACTICE_DOCTOR" property="practiceDoctor" />
+        <result column="ENCODE_MAN" property="encodeMan" />
+        <result column="HOME_PAGE_QUALITY" property="homePageQuality" />
+        <result column="QC_DOCTOR" property="qcDoctor" />
+        <result column="QC_NURSE" property="qcNurse" />
+        <result column="QC_DATE" property="qcDate" />
+        <result column="LEAVE_HOSPITAL_TYPE" property="leaveHospitalType" />
+        <result column="ACCEPT_ORG_CODE" property="acceptOrgCode" />
+        <result column="AGAIN_BEHOSPITAL_PLAN" property="againBehospitalPlan" />
+        <result column="AGAIN_BEHOSPITAL_GOAL" property="againBehospitalGoal" />
+        <result column="TBI_BEFORE_DAY" property="tbiBeforeDay" />
+        <result column="TBI_BEFORE_HOUR" property="tbiBeforeHour" />
+        <result column="TBI_BEFORE_MINUTE" property="tbiBeforeMinute" />
+        <result column="TBI_AFTER_DAY" property="tbiAfterDay" />
+        <result column="TBI_AFTER_HOUR" property="tbiAfterHour" />
+        <result column="TBI_AFTER_MINUTE" property="tbiAfterMinute" />
+        <result column="TOTAL_FEE" property="totalFee" />
+        <result column="OWN_FEE" property="ownFee" />
+        <result column="GENERAL_FEE" property="generalFee" />
+        <result column="SERVICE_FEE" property="serviceFee" />
+        <result column="NURSE_FEE" property="nurseFee" />
+        <result column="OTHER_FEE" property="otherFee" />
+        <result column="PATHOLOGY_FEE" property="pathologyFee" />
+        <result column="LAB_FEE" property="labFee" />
+        <result column="PACS_FEE" property="pacsFee" />
+        <result column="CLINIC_DIAGNOSE_FEE" property="clinicDiagnoseFee" />
+        <result column="NOT_OPERATION_FEE" property="notOperationFee" />
+        <result column="CLINIC_PHYSIC_FEE" property="clinicPhysicFee" />
+        <result column="OPERATION_TREAT_FEE" property="operationTreatFee" />
+        <result column="ANAESTHESIA_FEE" property="anaesthesiaFee" />
+        <result column="OPERATION_FEE" property="operationFee" />
+        <result column="HEALTH_TYPE_FEE" property="healthTypeFee" />
+        <result column="CHN_TREAT_FEE" property="chnTreatFee" />
+        <result column="WESTERN_MED_FEE" property="westernMedFee" />
+        <result column="ANTIBIOSIS_FEE" property="antibiosisFee" />
+        <result column="CHN_MED_FEE" property="chnMedFee" />
+        <result column="CHN_HERB_FEE" property="chnHerbFee" />
+        <result column="BLOOD_FEE" property="bloodFee" />
+        <result column="ALBUMEN_FEE" property="albumenFee" />
+        <result column="GLOBULIN_FEE" property="globulinFee" />
+        <result column="BLOOD_FACTOR_FEE" property="bloodFactorFee" />
+        <result column="CELL_FACTOR_FEE" property="cellFactorFee" />
+        <result column="CHECK_MATERIAL_FEE" property="checkMaterialFee" />
+        <result column="TREAT_MATERIAL_FEE" property="treatMaterialFee" />
+        <result column="OPERATION_MATERIAL_FEE" property="operationMaterialFee" />
+        <result column="OTHER_TYPE_FEE" property="otherTypeFee" />
+        <result column="SINGLE_DIAG_MANAGE" property="singleDiagManage" />
+        <result column="CLINIC_PATHWAY_MANAGE" property="clinicPathwayManage" />
+        <result column="IS_OUTPATIENT_BEHOSPITAL" property="isOutpatientBehospital" />
+        <result column="IS_LEAVE_BEHOSPITAL" property="isLeaveBehospital" />
+        <result column="IS_OPERATION_BEFORE_AFTER" property="isOperationBeforeAfter" />
+        <result column="IS_CLINIC_PATHOLOGY" property="isClinicPathology" />
+        <result column="IS_RADIATE_PATHOLOGY" property="isRadiatePathology" />
+        <result column="RESCUE_NUM" property="rescueNum" />
+        <result column="RESCUE_SUCCESS_NUM" property="rescueSuccessNum" />
+        <result column="IS_AUTO_LEAVEHOSPITAL" property="isAutoLeavehospital" />
+        <result column="RETURN_TO_TYPE" property="returnToType" />
+        <result column="IS_PHYSICAL_RESTRAINT" property="isPhysicalRestraint" />
+        <result column="TBI_BEHOSPITAL_BEFORE_TIME" property="tbiBehospitalBeforeTime" />
+        <result column="TBI_BEHOSPITAL_AFTER_TIME" property="tbiBehospitalAfterTime" />
+        <result column="IS_FALL_BED" property="isFallBed" />
+        <result column="IS_NOSOCOMIAL_INFECTION" property="isNosocomialInfection" />
+        <result column="IS_INTO_ICU" property="isIntoIcu" />
+        <result column="IS_COMPLICATIONS" property="isComplications" />
+        <result column="IS_PRESSURE_SORE" property="isPressureSore" />
+        <result column="IS_BEHOSPITAL_PRESSURE_SORE" property="isBehospitalPressureSore" />
+        <result column="IS_UNPLANNED_REOPERATION" property="isUnplannedReoperation" />
+        <result column="TREATMENT_RESULTS" property="treatmentResults" />
+        <result column="COMPLICATIONS_RESULTS" property="complicationsResults" />
+        <result column="INFECTION_SITE" property="infectionSite" />
+        <result column="IS_BE_IN_DANGER" property="isBeInDanger" />
+    </resultMap>
+
+</mapper>

+ 13 - 0
external-service/src/main/resources/mapper/VLtMedicalRecordContentMapper.xml

@@ -0,0 +1,13 @@
+<?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.lantone.external.mapper.VLtMedicalRecordContentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtMedicalRecordContent">
+        <result column="REC_ID" property="recId" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+        <result column="HTML_TEXT" property="htmlText" />
+        <result column="XML_TEXT" property="xmlText" />
+    </resultMap>
+
+</mapper>

+ 18 - 0
external-service/src/main/resources/mapper/VLtMedicalRecordMapper.xml

@@ -0,0 +1,18 @@
+<?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.lantone.external.mapper.VLtMedicalRecordMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtMedicalRecord">
+        <result column="REC_ID" property="recId" />
+        <result column="BEHOSPITAL_CODE" property="behospitalCode" />
+        <result column="ORG_CODE" property="orgCode" />
+        <result column="REC_TYPE_ID" property="recTypeId" />
+        <result column="REC_DATE" property="recDate" />
+        <result column="REC_TITLE" property="recTitle" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+        <result column="HTML_TEXT" property="htmlText" />
+        <result column="XML_TEXT" property="xmlText" />
+    </resultMap>
+
+</mapper>

+ 16 - 0
external-service/src/main/resources/mapper/VLtRecordTypeMapper.xml

@@ -0,0 +1,16 @@
+<?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.lantone.external.mapper.VLtRecordTypeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.external.entity.VLtRecordType">
+        <result column="TYPE_ID" property="typeId" />
+        <result column="HOSPITAL_ID" property="hospitalId" />
+        <result column="TYPE_NAME" property="typeName" />
+        <result column="PARENT_TYPE_ID" property="parentTypeId" />
+        <result column="OBJ_NAME" property="objName" />
+        <result column="CREATE_TIME" property="createTime" />
+        <result column="UPDATE_TIME" property="updateTime" />
+    </resultMap>
+
+</mapper>

+ 0 - 39
external-service/src/main/resources/mapper/base/BaseBehospitalInfoMapper.xml

@@ -1,39 +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.lantone.external.mapper.BehospitalInfoMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.lantone.external.entity.BehospitalInfo">
-        <id column="behospital_code" property="behospitalCode"/>
-        <result column="hospital_id" property="hospitalId"/>
-        <result column="name" property="name"/>
-        <result column="sex" property="sex"/>
-        <result column="birthday" property="birthday"/>
-        <result column="file_code" property="fileCode"/>
-        <result column="qc_type_id" property="qcTypeId"/>
-        <result column="ward_code" property="wardCode"/>
-        <result column="ward_name" property="wardName"/>
-        <result column="beh_dept_id" property="behDeptId"/>
-        <result column="beh_dept_name" property="behDeptName"/>
-        <result column="bed_code" property="bedCode"/>
-        <result column="bed_name" property="bedName"/>
-        <result column="insurance_name" property="insuranceName"/>
-        <result column="job_type" property="jobType"/>
-        <result column="behospital_date" property="behospitalDate"/>
-        <result column="leave_hospital_date" property="leaveHospitalDate"/>
-        <result column="trans_in_time" property="transInTime"/>
-        <result column="trans_out_time" property="transOutTime"/>
-        <result column="diagnose_icd" property="diagnoseIcd"/>
-        <result column="diagnose" property="diagnose"/>
-        <result column="doctor_id" property="doctorId"/>
-        <result column="doctor_name" property="doctorName"/>
-        <result column="beh_doctor_id" property="behDoctorId"/>
-        <result column="beh_doctor_name" property="behDoctorName"/>
-        <result column="director_doctor_id" property="directorDoctorId"/>
-        <result column="director_doctor_name" property="directorDoctorName"/>
-        <result column="is_placefile" property="isPlacefile"/>
-        <result column="placefile_date" property="placefileDate"/>
-        <result column="in_state" property="inState"/>
-    </resultMap>
-
-</mapper>