ソースを参照

修改质控代码

lipc 5 年 前
コミット
7917dbf2a5
58 ファイル変更5720 行追加63 行削除
  1. 55 0
      pom.xml
  2. 13 0
      src/main/java/com/diagbot/entity/BasDoctorInfo.java
  3. 104 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/PatientInfo.java
  4. 192 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFBeHospitalInfo.java
  5. 473 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFDept.java
  6. 373 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFDoctorAdvice.java
  7. 1253 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFHomePage.java
  8. 92 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFHomePageDiagnose.java
  9. 123 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFHomePageOperation.java
  10. 112 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFMedicalRecord.java
  11. 83 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFMedicalRecordType.java
  12. 512 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFPatientCrisis.java
  13. 152 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFPatientList.java
  14. 192 0
      src/main/java/com/diagbot/entity/shaoyifu/entity/SYFStaff.java
  15. 32 0
      src/main/java/com/diagbot/entity/shaoyifu/request/BeHospitalInfoRequest.java
  16. 83 0
      src/main/java/com/diagbot/entity/shaoyifu/request/DeptRequest.java
  17. 82 0
      src/main/java/com/diagbot/entity/shaoyifu/request/DoctorAdviceRequest.java
  18. 43 0
      src/main/java/com/diagbot/entity/shaoyifu/request/HomePageDiagnoseRequest.java
  19. 43 0
      src/main/java/com/diagbot/entity/shaoyifu/request/HomePageOperationRequest.java
  20. 22 0
      src/main/java/com/diagbot/entity/shaoyifu/request/HomePageRequest.java
  21. 23 0
      src/main/java/com/diagbot/entity/shaoyifu/request/MRTypeRequest.java
  22. 32 0
      src/main/java/com/diagbot/entity/shaoyifu/request/MedicalRecordRequest.java
  23. 43 0
      src/main/java/com/diagbot/entity/shaoyifu/request/PatientCrisisRequest.java
  24. 32 0
      src/main/java/com/diagbot/entity/shaoyifu/request/PatientListRequest.java
  25. 32 0
      src/main/java/com/diagbot/entity/shaoyifu/request/StaffRequest.java
  26. 7 0
      src/main/java/com/diagbot/entity/shaoyifu/response/BeHospitalInfoResponse.java
  27. 9 0
      src/main/java/com/diagbot/entity/shaoyifu/response/DeptResponse.java
  28. 9 0
      src/main/java/com/diagbot/entity/shaoyifu/response/DoctorAdviceResponse.java
  29. 9 0
      src/main/java/com/diagbot/entity/shaoyifu/response/HomePageDiagnoseResponse.java
  30. 9 0
      src/main/java/com/diagbot/entity/shaoyifu/response/HomePageOperationResponse.java
  31. 7 0
      src/main/java/com/diagbot/entity/shaoyifu/response/HomePageResponse.java
  32. 9 0
      src/main/java/com/diagbot/entity/shaoyifu/response/MRTypeResponse.java
  33. 9 0
      src/main/java/com/diagbot/entity/shaoyifu/response/MedicalRecordResponse.java
  34. 10 0
      src/main/java/com/diagbot/entity/shaoyifu/response/PatientCrisisResponse.java
  35. 10 0
      src/main/java/com/diagbot/entity/shaoyifu/response/PatientListResponse.java
  36. 11 0
      src/main/java/com/diagbot/entity/shaoyifu/response/StaffResponse.java
  37. 153 0
      src/main/java/com/diagbot/entity/shaoyifu/util/HttpApi.java
  38. 54 0
      src/main/java/com/diagbot/entity/shaoyifu/util/HttpConnectionManager.java
  39. 58 0
      src/main/java/com/diagbot/entity/shaoyifu/util/JsonMapper.java
  40. 31 0
      src/main/java/com/diagbot/entity/shaoyifu/util/SYFInterfaceRequest.java
  41. 41 0
      src/main/java/com/diagbot/entity/shaoyifu/util/SYFInterfaceResponse.java
  42. 80 0
      src/main/java/com/diagbot/entity/shaoyifu/util/SYFNlRequest.java
  43. 90 0
      src/main/java/com/diagbot/entity/shaoyifu/util/SYFNlResponse.java
  44. 42 5
      src/main/java/com/diagbot/facade/data/ABasDeptInfoFacade.java
  45. 37 3
      src/main/java/com/diagbot/facade/data/ABasDoctorInfoFacade.java
  46. 92 4
      src/main/java/com/diagbot/facade/data/ABehospitalInfoFacade.java
  47. 88 4
      src/main/java/com/diagbot/facade/data/ADoctorAdviceFacade.java
  48. 70 5
      src/main/java/com/diagbot/facade/data/AHomeDiagnoseInfoFacade.java
  49. 78 5
      src/main/java/com/diagbot/facade/data/AHomeOperationInfoFacade.java
  50. 215 13
      src/main/java/com/diagbot/facade/data/AHomePageFacade.java
  51. 56 18
      src/main/java/com/diagbot/facade/data/AMedRecordTypeFacade.java
  52. 89 4
      src/main/java/com/diagbot/facade/data/AMedicalRecordContentFacade.java
  53. 97 0
      src/main/java/com/diagbot/facade/data/APatientListFacade.java
  54. 16 0
      src/main/java/com/diagbot/mapper/PatientInfoMapper.java
  55. 16 0
      src/main/java/com/diagbot/service/PatientInfoService.java
  56. 20 0
      src/main/java/com/diagbot/service/impl/PatientInfoServiceImpl.java
  57. 1 1
      src/main/java/com/diagbot/task/BasDeptInfoTask.java
  58. 1 1
      src/main/java/com/diagbot/task/BasDoctorInfoTask.java

+ 55 - 0
pom.xml

@@ -54,6 +54,61 @@
     </dependencyManagement>
 
     <dependencies>
+
+        <!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+            <version>1.6.3</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/commons-discovery/commons-discovery -->
+        <dependency>
+            <groupId>commons-discovery</groupId>
+            <artifactId>commons-discovery</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/javax.mail/mail -->
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+            <version>1.4</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/javax.activation/activation -->
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.metaparadigm</groupId>
+            <artifactId>json-rpc</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml</groupId>
+            <artifactId>jaxrpc</artifactId>
+            <version>1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis</groupId>
+            <artifactId>axis</artifactId>
+            <version>1.4</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/org.apache.axis/axis-jaxrpc -->
+        <dependency>
+            <groupId>org.apache.axis</groupId>
+            <artifactId>axis-jaxrpc</artifactId>
+            <version>1.4</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>3.1</version>
+        </dependency>
+
         <dependency>
             <groupId>com.diagbot</groupId>
             <artifactId>common</artifactId>

+ 13 - 0
src/main/java/com/diagbot/entity/BasDoctorInfo.java

@@ -39,6 +39,11 @@ public class BasDoctorInfo implements Serializable {
      */
     private String name;
 
+    /**
+     * 组id
+     */
+    private String groupId;
+
     /**
      * 职称
      */
@@ -74,6 +79,14 @@ public class BasDoctorInfo implements Serializable {
      */
     private String modifier;
 
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
     public String getDoctorId() {
         return doctorId;
     }

+ 104 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/PatientInfo.java

@@ -0,0 +1,104 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author lipc
+ * @since 2020-06-23
+ */
+public class PatientInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private Integer id;
+
+    @TableId(value = "behospital_code", type = IdType.INPUT)
+    private String behospitalCode;
+
+    private String rdn;
+
+    private String mrn;
+
+    private String series;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+    public String getRdn() {
+        return rdn;
+    }
+
+    public void setRdn(String rdn) {
+        this.rdn = rdn;
+    }
+    public String getMrn() {
+        return mrn;
+    }
+
+    public void setMrn(String mrn) {
+        this.mrn = mrn;
+    }
+    public String getSeries() {
+        return series;
+    }
+
+    public void setSeries(String series) {
+        this.series = series;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    @Override
+    public String toString() {
+        return "PatientInfo{" +
+            "id=" + id +
+            ", behospitalCode=" + behospitalCode +
+            ", rdn=" + rdn +
+            ", mrn=" + mrn +
+            ", series=" + series +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+        "}";
+    }
+}

+ 192 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFBeHospitalInfo.java

@@ -0,0 +1,192 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFBeHospitalInfo implements Serializable {
+    private String MRN;//             	病历号
+    private String PNAME;//	患者姓名
+    private String PSEX;//	性别
+    private String PBIRTHDAY;//	生日
+    private String FILECODE;//	档案号
+    private String WARDCODE;//	病区代码
+    private String WARDCAME;//	病区名称
+    private String DEPTID;//	科室代码
+    private String DEPTNAME;//	科室名称
+    private String BEDID;//	床位号
+    private String INSURANCENAME;//	医保类别
+    private String JOBTYPE;//	职业
+    private String ADMID;//	入院时间
+    private String DISCD;//	出院时间
+    private String DIAGNOSEICD;//	诊断ICD编码
+    private String DIAGNOSE;//	诊断名称
+    private String DOCTORID;//	医生ID
+    private String DOCTORNAME;//	医生姓名
+
+    public String getMRN() {
+        return MRN;
+    }
+
+    public void setMRN(String MRN) {
+        this.MRN = MRN;
+    }
+
+    public String getPNAME() {
+        return PNAME;
+    }
+
+    public void setPNAME(String PNAME) {
+        this.PNAME = PNAME;
+    }
+
+    public String getPSEX() {
+        return PSEX;
+    }
+
+    public void setPSEX(String PSEX) {
+        this.PSEX = PSEX;
+    }
+
+    public String getPBIRTHDAY() {
+        return PBIRTHDAY;
+    }
+
+    public void setPBIRTHDAY(String PBIRTHDAY) {
+        this.PBIRTHDAY = PBIRTHDAY;
+    }
+
+    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 getWARDCAME() {
+        return WARDCAME;
+    }
+
+    public void setWARDCAME(String WARDCAME) {
+        this.WARDCAME = WARDCAME;
+    }
+
+    public String getDEPTID() {
+        return DEPTID;
+    }
+
+    public void setDEPTID(String DEPTID) {
+        this.DEPTID = DEPTID;
+    }
+
+    public String getDEPTNAME() {
+        return DEPTNAME;
+    }
+
+    public void setDEPTNAME(String DEPTNAME) {
+        this.DEPTNAME = DEPTNAME;
+    }
+
+    public String getBEDID() {
+        return BEDID;
+    }
+
+    public void setBEDID(String BEDID) {
+        this.BEDID = BEDID;
+    }
+
+    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 String getADMID() {
+        return ADMID;
+    }
+
+    public void setADMID(String ADMID) {
+        this.ADMID = ADMID;
+    }
+
+    public String getDISCD() {
+        return DISCD;
+    }
+
+    public void setDISCD(String DISCD) {
+        this.DISCD = DISCD;
+    }
+
+    public String getDIAGNOSEICD() {
+        return DIAGNOSEICD;
+    }
+
+    public void setDIAGNOSEICD(String DIAGNOSEICD) {
+        this.DIAGNOSEICD = DIAGNOSEICD;
+    }
+
+    public String getDIAGNOSE() {
+        return DIAGNOSE;
+    }
+
+    public void setDIAGNOSE(String DIAGNOSE) {
+        this.DIAGNOSE = DIAGNOSE;
+    }
+
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFBeHospitalInfo{" +
+                "MRN='" + MRN + '\'' +
+                ", PNAME='" + PNAME + '\'' +
+                ", PSEX='" + PSEX + '\'' +
+                ", PBIRTHDAY='" + PBIRTHDAY + '\'' +
+                ", FILECODE='" + FILECODE + '\'' +
+                ", WARDCODE='" + WARDCODE + '\'' +
+                ", WARDCAME='" + WARDCAME + '\'' +
+                ", DEPTID='" + DEPTID + '\'' +
+                ", DEPTNAME='" + DEPTNAME + '\'' +
+                ", BEDID='" + BEDID + '\'' +
+                ", INSURANCENAME='" + INSURANCENAME + '\'' +
+                ", JOBTYPE='" + JOBTYPE + '\'' +
+                ", ADMID='" + ADMID + '\'' +
+                ", DISCD='" + DISCD + '\'' +
+                ", DIAGNOSEICD='" + DIAGNOSEICD + '\'' +
+                ", DIAGNOSE='" + DIAGNOSE + '\'' +
+                ", DOCTORID='" + DOCTORID + '\'' +
+                ", DOCTORNAME='" + DOCTORNAME + '\'' +
+                '}';
+    }
+}

+ 473 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFDept.java

@@ -0,0 +1,473 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFDept implements Serializable {
+
+    private String DEPTNAME;
+    private String DEPTID;
+    private String PY;
+    private String FORWARD;
+    private String REGTYPE;
+    private String STAY;
+    private String SFLAG;
+    private String STATUS;
+    private String HOSCODE;
+    private String USEFLAG;
+    private String PRINTTIME_A;
+    private String HOTKEY;
+    private String ECNOMIC;
+    private String REGFLAG;
+    private String CD;
+    private String DFLAG;
+    private String FEELIMIT;
+    private String SIMPLE;
+    private String BM;
+    private String ALLDEPTFLAG;
+    private String DEPTLR;
+    private String DEPTADD;
+    private String DEPTPHARM;
+    private String YBDEPTID;
+    private String YJKS;
+    private String FTYPE;
+    private String SORT;
+    private String SIMPLENAME;
+    private String GH;
+    private String BAFORMARD;
+    private String BAORDER;
+    private String BONUSDEPT;
+    private String PRINTTIME;
+    private String PRINTTIME_B;
+    private String BEDQUOTA;
+    private String TIMEA;
+    private String TIMEB;
+    private String REGFCODE;
+    private String HOSTRANDT;
+    private String HOSTRANFLAG;
+    private String BEDDEPTCODE;
+    private String AUTOCHARGEFLAG;
+    private String DEPTID_RSK;
+    private String HZFLAG;
+    private String PATIENTFLAG;
+    private String LENGTH;
+
+    public String getDEPTNAME() {
+        return DEPTNAME;
+    }
+
+    public void setDEPTNAME(String DEPTNAME) {
+        this.DEPTNAME = DEPTNAME;
+    }
+
+    public String getDEPTID() {
+        return DEPTID;
+    }
+
+    public void setDEPTID(String DEPTID) {
+        this.DEPTID = DEPTID;
+    }
+
+    public String getPY() {
+        return PY;
+    }
+
+    public void setPY(String PY) {
+        this.PY = PY;
+    }
+
+    public String getFORWARD() {
+        return FORWARD;
+    }
+
+    public void setFORWARD(String FORWARD) {
+        this.FORWARD = FORWARD;
+    }
+
+    public String getREGTYPE() {
+        return REGTYPE;
+    }
+
+    public void setREGTYPE(String REGTYPE) {
+        this.REGTYPE = REGTYPE;
+    }
+
+    public String getSTAY() {
+        return STAY;
+    }
+
+    public void setSTAY(String STAY) {
+        this.STAY = STAY;
+    }
+
+    public String getSFLAG() {
+        return SFLAG;
+    }
+
+    public void setSFLAG(String SFLAG) {
+        this.SFLAG = SFLAG;
+    }
+
+    public String getSTATUS() {
+        return STATUS;
+    }
+
+    public void setSTATUS(String STATUS) {
+        this.STATUS = STATUS;
+    }
+
+    public String getHOSCODE() {
+        return HOSCODE;
+    }
+
+    public void setHOSCODE(String HOSCODE) {
+        this.HOSCODE = HOSCODE;
+    }
+
+    public String getUSEFLAG() {
+        return USEFLAG;
+    }
+
+    public void setUSEFLAG(String USEFLAG) {
+        this.USEFLAG = USEFLAG;
+    }
+
+    public String getPRINTTIME_A() {
+        return PRINTTIME_A;
+    }
+
+    public void setPRINTTIME_A(String PRINTTIME_A) {
+        this.PRINTTIME_A = PRINTTIME_A;
+    }
+
+    public String getHOTKEY() {
+        return HOTKEY;
+    }
+
+    public void setHOTKEY(String HOTKEY) {
+        this.HOTKEY = HOTKEY;
+    }
+
+    public String getECNOMIC() {
+        return ECNOMIC;
+    }
+
+    public void setECNOMIC(String ECNOMIC) {
+        this.ECNOMIC = ECNOMIC;
+    }
+
+    public String getREGFLAG() {
+        return REGFLAG;
+    }
+
+    public void setREGFLAG(String REGFLAG) {
+        this.REGFLAG = REGFLAG;
+    }
+
+    public String getCD() {
+        return CD;
+    }
+
+    public void setCD(String CD) {
+        this.CD = CD;
+    }
+
+    public String getDFLAG() {
+        return DFLAG;
+    }
+
+    public void setDFLAG(String DFLAG) {
+        this.DFLAG = DFLAG;
+    }
+
+    public String getFEELIMIT() {
+        return FEELIMIT;
+    }
+
+    public void setFEELIMIT(String FEELIMIT) {
+        this.FEELIMIT = FEELIMIT;
+    }
+
+    public String getSIMPLE() {
+        return SIMPLE;
+    }
+
+    public void setSIMPLE(String SIMPLE) {
+        this.SIMPLE = SIMPLE;
+    }
+
+    public String getBM() {
+        return BM;
+    }
+
+    public void setBM(String BM) {
+        this.BM = BM;
+    }
+
+    public String getALLDEPTFLAG() {
+        return ALLDEPTFLAG;
+    }
+
+    public void setALLDEPTFLAG(String ALLDEPTFLAG) {
+        this.ALLDEPTFLAG = ALLDEPTFLAG;
+    }
+
+    public String getDEPTLR() {
+        return DEPTLR;
+    }
+
+    public void setDEPTLR(String DEPTLR) {
+        this.DEPTLR = DEPTLR;
+    }
+
+    public String getDEPTADD() {
+        return DEPTADD;
+    }
+
+    public void setDEPTADD(String DEPTADD) {
+        this.DEPTADD = DEPTADD;
+    }
+
+    public String getDEPTPHARM() {
+        return DEPTPHARM;
+    }
+
+    public void setDEPTPHARM(String DEPTPHARM) {
+        this.DEPTPHARM = DEPTPHARM;
+    }
+
+    public String getYBDEPTID() {
+        return YBDEPTID;
+    }
+
+    public void setYBDEPTID(String YBDEPTID) {
+        this.YBDEPTID = YBDEPTID;
+    }
+
+    public String getYJKS() {
+        return YJKS;
+    }
+
+    public void setYJKS(String YJKS) {
+        this.YJKS = YJKS;
+    }
+
+    public String getFTYPE() {
+        return FTYPE;
+    }
+
+    public void setFTYPE(String FTYPE) {
+        this.FTYPE = FTYPE;
+    }
+
+    public String getSORT() {
+        return SORT;
+    }
+
+    public void setSORT(String SORT) {
+        this.SORT = SORT;
+    }
+
+    public String getSIMPLENAME() {
+        return SIMPLENAME;
+    }
+
+    public void setSIMPLENAME(String SIMPLENAME) {
+        this.SIMPLENAME = SIMPLENAME;
+    }
+
+    public String getGH() {
+        return GH;
+    }
+
+    public void setGH(String GH) {
+        this.GH = GH;
+    }
+
+    public String getBAFORMARD() {
+        return BAFORMARD;
+    }
+
+    public void setBAFORMARD(String BAFORMARD) {
+        this.BAFORMARD = BAFORMARD;
+    }
+
+    public String getBAORDER() {
+        return BAORDER;
+    }
+
+    public void setBAORDER(String BAORDER) {
+        this.BAORDER = BAORDER;
+    }
+
+    public String getBONUSDEPT() {
+        return BONUSDEPT;
+    }
+
+    public void setBONUSDEPT(String BONUSDEPT) {
+        this.BONUSDEPT = BONUSDEPT;
+    }
+
+    public String getPRINTTIME() {
+        return PRINTTIME;
+    }
+
+    public void setPRINTTIME(String PRINTTIME) {
+        this.PRINTTIME = PRINTTIME;
+    }
+
+    public String getPRINTTIME_B() {
+        return PRINTTIME_B;
+    }
+
+    public void setPRINTTIME_B(String PRINTTIME_B) {
+        this.PRINTTIME_B = PRINTTIME_B;
+    }
+
+    public String getBEDQUOTA() {
+        return BEDQUOTA;
+    }
+
+    public void setBEDQUOTA(String BEDQUOTA) {
+        this.BEDQUOTA = BEDQUOTA;
+    }
+
+    public String getTIMEA() {
+        return TIMEA;
+    }
+
+    public void setTIMEA(String TIMEA) {
+        this.TIMEA = TIMEA;
+    }
+
+    public String getTIMEB() {
+        return TIMEB;
+    }
+
+    public void setTIMEB(String TIMEB) {
+        this.TIMEB = TIMEB;
+    }
+
+    public String getREGFCODE() {
+        return REGFCODE;
+    }
+
+    public void setREGFCODE(String REGFCODE) {
+        this.REGFCODE = REGFCODE;
+    }
+
+    public String getHOSTRANDT() {
+        return HOSTRANDT;
+    }
+
+    public void setHOSTRANDT(String HOSTRANDT) {
+        this.HOSTRANDT = HOSTRANDT;
+    }
+
+    public String getHOSTRANFLAG() {
+        return HOSTRANFLAG;
+    }
+
+    public void setHOSTRANFLAG(String HOSTRANFLAG) {
+        this.HOSTRANFLAG = HOSTRANFLAG;
+    }
+
+    public String getBEDDEPTCODE() {
+        return BEDDEPTCODE;
+    }
+
+    public void setBEDDEPTCODE(String BEDDEPTCODE) {
+        this.BEDDEPTCODE = BEDDEPTCODE;
+    }
+
+    public String getAUTOCHARGEFLAG() {
+        return AUTOCHARGEFLAG;
+    }
+
+    public void setAUTOCHARGEFLAG(String AUTOCHARGEFLAG) {
+        this.AUTOCHARGEFLAG = AUTOCHARGEFLAG;
+    }
+
+    public String getDEPTID_RSK() {
+        return DEPTID_RSK;
+    }
+
+    public void setDEPTID_RSK(String DEPTID_RSK) {
+        this.DEPTID_RSK = DEPTID_RSK;
+    }
+
+    public String getHZFLAG() {
+        return HZFLAG;
+    }
+
+    public void setHZFLAG(String HZFLAG) {
+        this.HZFLAG = HZFLAG;
+    }
+
+    public String getPATIENTFLAG() {
+        return PATIENTFLAG;
+    }
+
+    public void setPATIENTFLAG(String PATIENTFLAG) {
+        this.PATIENTFLAG = PATIENTFLAG;
+    }
+
+    public String getLENGTH() {
+        return LENGTH;
+    }
+
+    public void setLENGTH(String LENGTH) {
+        this.LENGTH = LENGTH;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFDept{" +
+                "DEPTNAME='" + DEPTNAME + '\'' +
+                ", DEPTID='" + DEPTID + '\'' +
+                ", PY='" + PY + '\'' +
+                ", FORWARD='" + FORWARD + '\'' +
+                ", REGTYPE='" + REGTYPE + '\'' +
+                ", STAY='" + STAY + '\'' +
+                ", SFLAG='" + SFLAG + '\'' +
+                ", STATUS='" + STATUS + '\'' +
+                ", HOSCODE='" + HOSCODE + '\'' +
+                ", USEFLAG='" + USEFLAG + '\'' +
+                ", PRINTTIME_A='" + PRINTTIME_A + '\'' +
+                ", HOTKEY='" + HOTKEY + '\'' +
+                ", ECNOMIC='" + ECNOMIC + '\'' +
+                ", REGFLAG='" + REGFLAG + '\'' +
+                ", CD='" + CD + '\'' +
+                ", DFLAG='" + DFLAG + '\'' +
+                ", FEELIMIT='" + FEELIMIT + '\'' +
+                ", SIMPLE='" + SIMPLE + '\'' +
+                ", BM='" + BM + '\'' +
+                ", ALLDEPTFLAG='" + ALLDEPTFLAG + '\'' +
+                ", DEPTLR='" + DEPTLR + '\'' +
+                ", DEPTADD='" + DEPTADD + '\'' +
+                ", DEPTPHARM='" + DEPTPHARM + '\'' +
+                ", YBDEPTID='" + YBDEPTID + '\'' +
+                ", YJKS='" + YJKS + '\'' +
+                ", FTYPE='" + FTYPE + '\'' +
+                ", SORT='" + SORT + '\'' +
+                ", SIMPLENAME='" + SIMPLENAME + '\'' +
+                ", GH='" + GH + '\'' +
+                ", BAFORMARD='" + BAFORMARD + '\'' +
+                ", BAORDER='" + BAORDER + '\'' +
+                ", BONUSDEPT='" + BONUSDEPT + '\'' +
+                ", PRINTTIME='" + PRINTTIME + '\'' +
+                ", PRINTTIME_B='" + PRINTTIME_B + '\'' +
+                ", BEDQUOTA='" + BEDQUOTA + '\'' +
+                ", TIMEA='" + TIMEA + '\'' +
+                ", TIMEB='" + TIMEB + '\'' +
+                ", REGFCODE='" + REGFCODE + '\'' +
+                ", HOSTRANDT='" + HOSTRANDT + '\'' +
+                ", HOSTRANFLAG='" + HOSTRANFLAG + '\'' +
+                ", BEDDEPTCODE='" + BEDDEPTCODE + '\'' +
+                ", AUTOCHARGEFLAG='" + AUTOCHARGEFLAG + '\'' +
+                ", DEPTID_RSK='" + DEPTID_RSK + '\'' +
+                ", HZFLAG='" + HZFLAG + '\'' +
+                ", PATIENTFLAG='" + PATIENTFLAG + '\'' +
+                ", LENGTH='" + LENGTH + '\'' +
+                '}';
+    }
+}

+ 373 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFDoctorAdvice.java

@@ -0,0 +1,373 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFDoctorAdvice implements Serializable {
+
+    private String orderno;//医嘱序号
+    private String ordertype;//医嘱类型
+    private String setno;//分组序号
+    private String orderseq;//分组位置
+    private String datestart;//开始时间
+    private String datestop;//停止时间
+    private String drcode;//项目代码
+    private String drname;//项目名称
+    private String drmodel;//项目规格
+    private String dosage;//项目剂量
+    private String sunit;//剂量单位
+    private String admission;//用法代码
+    private String admission_name;//用法名称
+    private String frequency;//频次代码
+    private String frequency_name;//频次名称
+    private String attime;//频次执行时间
+    private String dr;//录入医生代码
+    private String dr_name;//录入医生姓名
+    private String datein;//录入时间
+    private String stopdr;//停止医生代码
+    private String stopdr_name;//停止医生姓名
+    private String dodate;//执行时间
+    private String nur;//执行护士
+    private String dodept;//执行科室代码
+    private String dodeptname;//执行科室名称
+    private String doflag;//医嘱状态
+    private String orderflag;//医嘱类别
+    private String selfflag;//是否自备药
+    private String printflag;//是否打印
+    private String remark;//医嘱备注
+    private String mrn;//病历号
+    private String deptid;//科室代码
+    private String totaldosage;//总剂量
+    private String npl;//单价
+    private String dosageday;//数量
+    private String orderflag_name;//医嘱类别名称
+
+    public String getOrderno() {
+        return orderno;
+    }
+
+    public void setOrderno(String orderno) {
+        this.orderno = orderno;
+    }
+
+    public String getOrdertype() {
+        return ordertype;
+    }
+
+    public void setOrdertype(String ordertype) {
+        this.ordertype = ordertype;
+    }
+
+    public String getSetno() {
+        return setno;
+    }
+
+    public void setSetno(String setno) {
+        this.setno = setno;
+    }
+
+    public String getOrderseq() {
+        return orderseq;
+    }
+
+    public void setOrderseq(String orderseq) {
+        this.orderseq = orderseq;
+    }
+
+    public String getDatestart() {
+        return datestart;
+    }
+
+    public void setDatestart(String datestart) {
+        this.datestart = datestart;
+    }
+
+    public String getDatestop() {
+        return datestop;
+    }
+
+    public void setDatestop(String datestop) {
+        this.datestop = datestop;
+    }
+
+    public String getDrcode() {
+        return drcode;
+    }
+
+    public void setDrcode(String drcode) {
+        this.drcode = drcode;
+    }
+
+    public String getDrname() {
+        return drname;
+    }
+
+    public void setDrname(String drname) {
+        this.drname = drname;
+    }
+
+    public String getDrmodel() {
+        return drmodel;
+    }
+
+    public void setDrmodel(String drmodel) {
+        this.drmodel = drmodel;
+    }
+
+    public String getDosage() {
+        return dosage;
+    }
+
+    public void setDosage(String dosage) {
+        this.dosage = dosage;
+    }
+
+    public String getSunit() {
+        return sunit;
+    }
+
+    public void setSunit(String sunit) {
+        this.sunit = sunit;
+    }
+
+    public String getAdmission() {
+        return admission;
+    }
+
+    public void setAdmission(String admission) {
+        this.admission = admission;
+    }
+
+    public String getAdmission_name() {
+        return admission_name;
+    }
+
+    public void setAdmission_name(String admission_name) {
+        this.admission_name = admission_name;
+    }
+
+    public String getFrequency() {
+        return frequency;
+    }
+
+    public void setFrequency(String frequency) {
+        this.frequency = frequency;
+    }
+
+    public String getFrequency_name() {
+        return frequency_name;
+    }
+
+    public void setFrequency_name(String frequency_name) {
+        this.frequency_name = frequency_name;
+    }
+
+    public String getAttime() {
+        return attime;
+    }
+
+    public void setAttime(String attime) {
+        this.attime = attime;
+    }
+
+    public String getDr() {
+        return dr;
+    }
+
+    public void setDr(String dr) {
+        this.dr = dr;
+    }
+
+    public String getDr_name() {
+        return dr_name;
+    }
+
+    public void setDr_name(String dr_name) {
+        this.dr_name = dr_name;
+    }
+
+    public String getDatein() {
+        return datein;
+    }
+
+    public void setDatein(String datein) {
+        this.datein = datein;
+    }
+
+    public String getStopdr() {
+        return stopdr;
+    }
+
+    public void setStopdr(String stopdr) {
+        this.stopdr = stopdr;
+    }
+
+    public String getStopdr_name() {
+        return stopdr_name;
+    }
+
+    public void setStopdr_name(String stopdr_name) {
+        this.stopdr_name = stopdr_name;
+    }
+
+    public String getDodate() {
+        return dodate;
+    }
+
+    public void setDodate(String dodate) {
+        this.dodate = dodate;
+    }
+
+    public String getNur() {
+        return nur;
+    }
+
+    public void setNur(String nur) {
+        this.nur = nur;
+    }
+
+    public String getDodept() {
+        return dodept;
+    }
+
+    public void setDodept(String dodept) {
+        this.dodept = dodept;
+    }
+
+    public String getDodeptname() {
+        return dodeptname;
+    }
+
+    public void setDodeptname(String dodeptname) {
+        this.dodeptname = dodeptname;
+    }
+
+    public String getDoflag() {
+        return doflag;
+    }
+
+    public void setDoflag(String doflag) {
+        this.doflag = doflag;
+    }
+
+    public String getOrderflag() {
+        return orderflag;
+    }
+
+    public void setOrderflag(String orderflag) {
+        this.orderflag = orderflag;
+    }
+
+    public String getSelfflag() {
+        return selfflag;
+    }
+
+    public void setSelfflag(String selfflag) {
+        this.selfflag = selfflag;
+    }
+
+    public String getPrintflag() {
+        return printflag;
+    }
+
+    public void setPrintflag(String printflag) {
+        this.printflag = printflag;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getMrn() {
+        return mrn;
+    }
+
+    public void setMrn(String mrn) {
+        this.mrn = mrn;
+    }
+
+    public String getDeptid() {
+        return deptid;
+    }
+
+    public void setDeptid(String deptid) {
+        this.deptid = deptid;
+    }
+
+    public String getTotaldosage() {
+        return totaldosage;
+    }
+
+    public void setTotaldosage(String totaldosage) {
+        this.totaldosage = totaldosage;
+    }
+
+    public String getNpl() {
+        return npl;
+    }
+
+    public void setNpl(String npl) {
+        this.npl = npl;
+    }
+
+    public String getDosageday() {
+        return dosageday;
+    }
+
+    public void setDosageday(String dosageday) {
+        this.dosageday = dosageday;
+    }
+
+    public String getOrderflag_name() {
+        return orderflag_name;
+    }
+
+    public void setOrderflag_name(String orderflag_name) {
+        this.orderflag_name = orderflag_name;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFDoctorAdvice{" +
+                "orderno='" + orderno + '\'' +
+                ", ordertype='" + ordertype + '\'' +
+                ", setno='" + setno + '\'' +
+                ", orderseq='" + orderseq + '\'' +
+                ", datestart='" + datestart + '\'' +
+                ", datestop='" + datestop + '\'' +
+                ", drcode='" + drcode + '\'' +
+                ", drname='" + drname + '\'' +
+                ", drmodel='" + drmodel + '\'' +
+                ", dosage='" + dosage + '\'' +
+                ", sunit='" + sunit + '\'' +
+                ", admission='" + admission + '\'' +
+                ", admission_name='" + admission_name + '\'' +
+                ", frequency='" + frequency + '\'' +
+                ", frequency_name='" + frequency_name + '\'' +
+                ", attime='" + attime + '\'' +
+                ", dr='" + dr + '\'' +
+                ", dr_name='" + dr_name + '\'' +
+                ", datein='" + datein + '\'' +
+                ", stopdr='" + stopdr + '\'' +
+                ", stopdr_name='" + stopdr_name + '\'' +
+                ", dodate='" + dodate + '\'' +
+                ", nur='" + nur + '\'' +
+                ", dodept='" + dodept + '\'' +
+                ", dodeptname='" + dodeptname + '\'' +
+                ", doflag='" + doflag + '\'' +
+                ", orderflag='" + orderflag + '\'' +
+                ", selfflag='" + selfflag + '\'' +
+                ", printflag='" + printflag + '\'' +
+                ", remark='" + remark + '\'' +
+                ", mrn='" + mrn + '\'' +
+                ", deptid='" + deptid + '\'' +
+                ", totaldosage='" + totaldosage + '\'' +
+                ", npl='" + npl + '\'' +
+                ", dosageday='" + dosageday + '\'' +
+                ", orderflag_name='" + orderflag_name + '\'' +
+                '}';
+    }
+}

ファイルの差分が大きいため隠しています
+ 1253 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFHomePage.java


+ 92 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFHomePageDiagnose.java

@@ -0,0 +1,92 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFHomePageDiagnose implements Serializable {
+    private String primaryflag;//诊断类型
+    private String diagnose;//诊断名称
+    private String diagnosecodep;//诊断代码
+    private String mrn;//病历号
+    private String rdn;//诊断序号
+    private String dcondi;//⼊院病情
+    private String dr;//诊断医师
+    private String dodate;//诊断时间
+
+    public String getPrimaryflag() {
+        return primaryflag;
+    }
+
+    public void setPrimaryflag(String primaryflag) {
+        this.primaryflag = primaryflag;
+    }
+
+    public String getDiagnose() {
+        return diagnose;
+    }
+
+    public void setDiagnose(String diagnose) {
+        this.diagnose = diagnose;
+    }
+
+    public String getDiagnosecodep() {
+        return diagnosecodep;
+    }
+
+    public void setDiagnosecodep(String diagnosecodep) {
+        this.diagnosecodep = diagnosecodep;
+    }
+
+    public String getMrn() {
+        return mrn;
+    }
+
+    public void setMrn(String mrn) {
+        this.mrn = mrn;
+    }
+
+    public String getRdn() {
+        return rdn;
+    }
+
+    public void setRdn(String rdn) {
+        this.rdn = rdn;
+    }
+
+    public String getDcondi() {
+        return dcondi;
+    }
+
+    public void setDcondi(String dcondi) {
+        this.dcondi = dcondi;
+    }
+
+    public String getDr() {
+        return dr;
+    }
+
+    public void setDr(String dr) {
+        this.dr = dr;
+    }
+
+    public String getDodate() {
+        return dodate;
+    }
+
+    public void setDodate(String dodate) {
+        this.dodate = dodate;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFHomePageDiagnose{" +
+                "primaryflag='" + primaryflag + '\'' +
+                ", diagnose='" + diagnose + '\'' +
+                ", diagnosecodep='" + diagnosecodep + '\'' +
+                ", mrn='" + mrn + '\'' +
+                ", rdn='" + rdn + '\'' +
+                ", dcondi='" + dcondi + '\'' +
+                ", dr='" + dr + '\'' +
+                ", dodate='" + dodate + '\'' +
+                '}';
+    }
+}

+ 123 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFHomePageOperation.java

@@ -0,0 +1,123 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFHomePageOperation implements Serializable {
+
+    private String mrn;//病历号
+    private String operpcode;//⼿术(操作)编码
+    private String operp;//⼿术(操作)名称
+    private String plandate;//⼿术(操作)⽇期
+    private String opslevel;//⼿术级别
+    private String drp;//术者
+    private String drs;//I助
+    private String drt;//II助
+    private String wound;//切⼝愈合等级
+    private String aneask;//麻醉⽅式
+    private String ansp;//麻醉医师
+
+    public String getMrn() {
+        return mrn;
+    }
+
+    public void setMrn(String mrn) {
+        this.mrn = mrn;
+    }
+
+    public String getOperpcode() {
+        return operpcode;
+    }
+
+    public void setOperpcode(String operpcode) {
+        this.operpcode = operpcode;
+    }
+
+    public String getOperp() {
+        return operp;
+    }
+
+    public void setOperp(String operp) {
+        this.operp = operp;
+    }
+
+    public String getPlandate() {
+        return plandate;
+    }
+
+    public void setPlandate(String plandate) {
+        this.plandate = plandate;
+    }
+
+    public String getOpslevel() {
+        return opslevel;
+    }
+
+    public void setOpslevel(String opslevel) {
+        this.opslevel = opslevel;
+    }
+
+    public String getDrp() {
+        return drp;
+    }
+
+    public void setDrp(String drp) {
+        this.drp = drp;
+    }
+
+    public String getDrs() {
+        return drs;
+    }
+
+    public void setDrs(String drs) {
+        this.drs = drs;
+    }
+
+    public String getDrt() {
+        return drt;
+    }
+
+    public void setDrt(String drt) {
+        this.drt = drt;
+    }
+
+    public String getWound() {
+        return wound;
+    }
+
+    public void setWound(String wound) {
+        this.wound = wound;
+    }
+
+    public String getAneask() {
+        return aneask;
+    }
+
+    public void setAneask(String aneask) {
+        this.aneask = aneask;
+    }
+
+    public String getAnsp() {
+        return ansp;
+    }
+
+    public void setAnsp(String ansp) {
+        this.ansp = ansp;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFHomePageOperation{" +
+                "mrn='" + mrn + '\'' +
+                ", operpcode='" + operpcode + '\'' +
+                ", operp='" + operp + '\'' +
+                ", plandate='" + plandate + '\'' +
+                ", opslevel='" + opslevel + '\'' +
+                ", drp='" + drp + '\'' +
+                ", drs='" + drs + '\'' +
+                ", drt='" + drt + '\'' +
+                ", wound='" + wound + '\'' +
+                ", aneask='" + aneask + '\'' +
+                ", ansp='" + ansp + '\'' +
+                '}';
+    }
+}

+ 112 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFMedicalRecord.java

@@ -0,0 +1,112 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFMedicalRecord implements Serializable {
+    private String ZYLSH; // 住院流水号
+    private String MODELID; // 模块号
+    private String WDLSH; // 文档流水号
+    private String PRLOG_RDN; // 记录号 cpr_prlog rdn
+    private String WSMC; // 病历名称
+    private String DRNAME; // 创建医生姓名
+    private String LRRQ; // 创建时间
+    private String WSID; // 文书分类
+    private String BLNR; // 文书内容(HTML)
+    private String XMLWD; // XML文档
+
+    public String getZYLSH() {
+        return ZYLSH;
+    }
+
+    public void setZYLSH(String ZYLSH) {
+        this.ZYLSH = ZYLSH;
+    }
+
+    public String getMODELID() {
+        return MODELID;
+    }
+
+    public void setMODELID(String MODELID) {
+        this.MODELID = MODELID;
+    }
+
+    public String getWDLSH() {
+        return WDLSH;
+    }
+
+    public void setWDLSH(String WDLSH) {
+        this.WDLSH = WDLSH;
+    }
+
+    public String getPRLOG_RDN() {
+        return PRLOG_RDN;
+    }
+
+    public void setPRLOG_RDN(String PRLOG_RDN) {
+        this.PRLOG_RDN = PRLOG_RDN;
+    }
+
+    public String getWSMC() {
+        return WSMC;
+    }
+
+    public void setWSMC(String WSMC) {
+        this.WSMC = WSMC;
+    }
+
+    public String getDRNAME() {
+        return DRNAME;
+    }
+
+    public void setDRNAME(String DRNAME) {
+        this.DRNAME = DRNAME;
+    }
+
+    public String getLRRQ() {
+        return LRRQ;
+    }
+
+    public void setLRRQ(String LRRQ) {
+        this.LRRQ = LRRQ;
+    }
+
+    public String getWSID() {
+        return WSID;
+    }
+
+    public void setWSID(String WSID) {
+        this.WSID = WSID;
+    }
+
+    public String getBLNR() {
+        return BLNR;
+    }
+
+    public void setBLNR(String BLNR) {
+        this.BLNR = BLNR;
+    }
+
+    public String getXMLWD() {
+        return XMLWD;
+    }
+
+    public void setXMLWD(String XMLWD) {
+        this.XMLWD = XMLWD;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFMedicalRecord{" +
+                "ZYLSH='" + ZYLSH + '\'' +
+                ", MODELID='" + MODELID + '\'' +
+                ", WDLSH='" + WDLSH + '\'' +
+                ", PRLOG_RDN='" + PRLOG_RDN + '\'' +
+                ", WSMC='" + WSMC + '\'' +
+                ", DRNAME='" + DRNAME + '\'' +
+                ", LRRQ='" + LRRQ + '\'' +
+                ", WSID='" + WSID + '\'' +
+                ", BLNR='" + BLNR + '\'' +
+                ", XMLWD='" + XMLWD + '\'' +
+                '}';
+    }
+}

+ 83 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFMedicalRecordType.java

@@ -0,0 +1,83 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFMedicalRecordType implements Serializable {
+
+    private String MODELID; // 模板号
+    private String MBMC; // 模板名称
+    private String PRTYPE; // 大类
+    private String PRTYPE_NAME; // 大类名称
+    private String WSID; // 文书类别
+    private String WSID_NAME; // 文书类别名称
+    private String USEFLAG; // 使用标记
+
+    public String getMODELID() {
+        return MODELID;
+    }
+
+    public void setMODELID(String MODELID) {
+        this.MODELID = MODELID;
+    }
+
+    public String getMBMC() {
+        return MBMC;
+    }
+
+    public void setMBMC(String MBMC) {
+        this.MBMC = MBMC;
+    }
+
+    public String getPRTYPE() {
+        return PRTYPE;
+    }
+
+    public void setPRTYPE(String PRTYPE) {
+        this.PRTYPE = PRTYPE;
+    }
+
+    public String getPRTYPE_NAME() {
+        return PRTYPE_NAME;
+    }
+
+    public void setPRTYPE_NAME(String PRTYPE_NAME) {
+        this.PRTYPE_NAME = PRTYPE_NAME;
+    }
+
+    public String getWSID() {
+        return WSID;
+    }
+
+    public void setWSID(String WSID) {
+        this.WSID = WSID;
+    }
+
+    public String getWSID_NAME() {
+        return WSID_NAME;
+    }
+
+    public void setWSID_NAME(String WSID_NAME) {
+        this.WSID_NAME = WSID_NAME;
+    }
+
+    public String getUSEFLAG() {
+        return USEFLAG;
+    }
+
+    public void setUSEFLAG(String USEFLAG) {
+        this.USEFLAG = USEFLAG;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFMedicalRecordType{" +
+                "MODELID='" + MODELID + '\'' +
+                ", MBMC='" + MBMC + '\'' +
+                ", PRTYPE='" + PRTYPE + '\'' +
+                ", PRTYPE_NAME='" + PRTYPE_NAME + '\'' +
+                ", WSID='" + WSID + '\'' +
+                ", WSID_NAME='" + WSID_NAME + '\'' +
+                ", USEFLAG='" + USEFLAG + '\'' +
+                '}';
+    }
+}

+ 512 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFPatientCrisis.java

@@ -0,0 +1,512 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFPatientCrisis implements Serializable {
+    private String rdn;//危急值唯一号
+    private String mrn;//病历号
+    private String series;//就诊次数
+    private String pname;//姓名
+    private String stay;//来源
+    private String deptin;//科室
+    private String deptbed;//病区
+    private String bedid;//床号
+    private String datein;//写入日期
+    private String jp;//经办人
+    private String category;
+    private String grade;
+    private String nurse;//护士
+    private String nurse_date;//护士操作日期
+    private String dr;//医生
+    private String dr_date;//医生操作日期
+    private String attending;//主治医生
+    private String attending_date;//主治医生操作日期
+    private String remark;//备注
+    private String useflag;//有效标记
+    private String orderno;//医嘱号
+    private String ordertype;//医嘱类型
+    private String drin;//录入医生
+    private String ordercode;//项目代码
+    private String ordername;//项目名称
+    private String chinaname;
+    private String notes;
+    private String smsflag;
+    private String smsdate;
+    private String ckqj;
+    private String jydw;
+    private String lab_orderno;
+    private String reflow;
+    private String refhigh;
+    private String paniclow;
+    private String panichigh;
+    private String clinic_orderno;
+    private String hoscode;//院区
+    private String dr_remark;
+    private String labcode;
+    private String cpr_pr_rdn;//关联cpr_prlog
+    private String reporttime;//报告时间
+    private String drflag;//医嘱标志
+    private String rdnflag;//文书标志
+    private String dododate;//护士执行时间
+    private String dodate;//化验发送时间
+    private String receivedate;//化验接收时间
+    private String returndatetime;//阅读时间
+    private String jiantou;//箭头
+    private String wjzqj;
+
+    public String getRdn() {
+        return rdn;
+    }
+
+    public void setRdn(String rdn) {
+        this.rdn = rdn;
+    }
+
+    public String getMrn() {
+        return mrn;
+    }
+
+    public void setMrn(String mrn) {
+        this.mrn = mrn;
+    }
+
+    public String getSeries() {
+        return series;
+    }
+
+    public void setSeries(String series) {
+        this.series = series;
+    }
+
+    public String getPname() {
+        return pname;
+    }
+
+    public void setPname(String pname) {
+        this.pname = pname;
+    }
+
+    public String getStay() {
+        return stay;
+    }
+
+    public void setStay(String stay) {
+        this.stay = stay;
+    }
+
+    public String getDeptin() {
+        return deptin;
+    }
+
+    public void setDeptin(String deptin) {
+        this.deptin = deptin;
+    }
+
+    public String getDeptbed() {
+        return deptbed;
+    }
+
+    public void setDeptbed(String deptbed) {
+        this.deptbed = deptbed;
+    }
+
+    public String getBedid() {
+        return bedid;
+    }
+
+    public void setBedid(String bedid) {
+        this.bedid = bedid;
+    }
+
+    public String getDatein() {
+        return datein;
+    }
+
+    public void setDatein(String datein) {
+        this.datein = datein;
+    }
+
+    public String getJp() {
+        return jp;
+    }
+
+    public void setJp(String jp) {
+        this.jp = jp;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public String getGrade() {
+        return grade;
+    }
+
+    public void setGrade(String grade) {
+        this.grade = grade;
+    }
+
+    public String getNurse() {
+        return nurse;
+    }
+
+    public void setNurse(String nurse) {
+        this.nurse = nurse;
+    }
+
+    public String getNurse_date() {
+        return nurse_date;
+    }
+
+    public void setNurse_date(String nurse_date) {
+        this.nurse_date = nurse_date;
+    }
+
+    public String getDr() {
+        return dr;
+    }
+
+    public void setDr(String dr) {
+        this.dr = dr;
+    }
+
+    public String getDr_date() {
+        return dr_date;
+    }
+
+    public void setDr_date(String dr_date) {
+        this.dr_date = dr_date;
+    }
+
+    public String getAttending() {
+        return attending;
+    }
+
+    public void setAttending(String attending) {
+        this.attending = attending;
+    }
+
+    public String getAttending_date() {
+        return attending_date;
+    }
+
+    public void setAttending_date(String attending_date) {
+        this.attending_date = attending_date;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getUseflag() {
+        return useflag;
+    }
+
+    public void setUseflag(String useflag) {
+        this.useflag = useflag;
+    }
+
+    public String getOrderno() {
+        return orderno;
+    }
+
+    public void setOrderno(String orderno) {
+        this.orderno = orderno;
+    }
+
+    public String getOrdertype() {
+        return ordertype;
+    }
+
+    public void setOrdertype(String ordertype) {
+        this.ordertype = ordertype;
+    }
+
+    public String getDrin() {
+        return drin;
+    }
+
+    public void setDrin(String drin) {
+        this.drin = drin;
+    }
+
+    public String getOrdercode() {
+        return ordercode;
+    }
+
+    public void setOrdercode(String ordercode) {
+        this.ordercode = ordercode;
+    }
+
+    public String getOrdername() {
+        return ordername;
+    }
+
+    public void setOrdername(String ordername) {
+        this.ordername = ordername;
+    }
+
+    public String getChinaname() {
+        return chinaname;
+    }
+
+    public void setChinaname(String chinaname) {
+        this.chinaname = chinaname;
+    }
+
+    public String getNotes() {
+        return notes;
+    }
+
+    public void setNotes(String notes) {
+        this.notes = notes;
+    }
+
+    public String getSmsflag() {
+        return smsflag;
+    }
+
+    public void setSmsflag(String smsflag) {
+        this.smsflag = smsflag;
+    }
+
+    public String getSmsdate() {
+        return smsdate;
+    }
+
+    public void setSmsdate(String smsdate) {
+        this.smsdate = smsdate;
+    }
+
+    public String getCkqj() {
+        return ckqj;
+    }
+
+    public void setCkqj(String ckqj) {
+        this.ckqj = ckqj;
+    }
+
+    public String getJydw() {
+        return jydw;
+    }
+
+    public void setJydw(String jydw) {
+        this.jydw = jydw;
+    }
+
+    public String getLab_orderno() {
+        return lab_orderno;
+    }
+
+    public void setLab_orderno(String lab_orderno) {
+        this.lab_orderno = lab_orderno;
+    }
+
+    public String getReflow() {
+        return reflow;
+    }
+
+    public void setReflow(String reflow) {
+        this.reflow = reflow;
+    }
+
+    public String getRefhigh() {
+        return refhigh;
+    }
+
+    public void setRefhigh(String refhigh) {
+        this.refhigh = refhigh;
+    }
+
+    public String getPaniclow() {
+        return paniclow;
+    }
+
+    public void setPaniclow(String paniclow) {
+        this.paniclow = paniclow;
+    }
+
+    public String getPanichigh() {
+        return panichigh;
+    }
+
+    public void setPanichigh(String panichigh) {
+        this.panichigh = panichigh;
+    }
+
+    public String getClinic_orderno() {
+        return clinic_orderno;
+    }
+
+    public void setClinic_orderno(String clinic_orderno) {
+        this.clinic_orderno = clinic_orderno;
+    }
+
+    public String getHoscode() {
+        return hoscode;
+    }
+
+    public void setHoscode(String hoscode) {
+        this.hoscode = hoscode;
+    }
+
+    public String getDr_remark() {
+        return dr_remark;
+    }
+
+    public void setDr_remark(String dr_remark) {
+        this.dr_remark = dr_remark;
+    }
+
+    public String getLabcode() {
+        return labcode;
+    }
+
+    public void setLabcode(String labcode) {
+        this.labcode = labcode;
+    }
+
+    public String getCpr_pr_rdn() {
+        return cpr_pr_rdn;
+    }
+
+    public void setCpr_pr_rdn(String cpr_pr_rdn) {
+        this.cpr_pr_rdn = cpr_pr_rdn;
+    }
+
+    public String getReporttime() {
+        return reporttime;
+    }
+
+    public void setReporttime(String reporttime) {
+        this.reporttime = reporttime;
+    }
+
+    public String getDrflag() {
+        return drflag;
+    }
+
+    public void setDrflag(String drflag) {
+        this.drflag = drflag;
+    }
+
+    public String getRdnflag() {
+        return rdnflag;
+    }
+
+    public void setRdnflag(String rdnflag) {
+        this.rdnflag = rdnflag;
+    }
+
+    public String getDododate() {
+        return dododate;
+    }
+
+    public void setDododate(String dododate) {
+        this.dododate = dododate;
+    }
+
+    public String getDodate() {
+        return dodate;
+    }
+
+    public void setDodate(String dodate) {
+        this.dodate = dodate;
+    }
+
+    public String getReceivedate() {
+        return receivedate;
+    }
+
+    public void setReceivedate(String receivedate) {
+        this.receivedate = receivedate;
+    }
+
+    public String getReturndatetime() {
+        return returndatetime;
+    }
+
+    public void setReturndatetime(String returndatetime) {
+        this.returndatetime = returndatetime;
+    }
+
+    public String getJiantou() {
+        return jiantou;
+    }
+
+    public void setJiantou(String jiantou) {
+        this.jiantou = jiantou;
+    }
+
+    public String getWjzqj() {
+        return wjzqj;
+    }
+
+    public void setWjzqj(String wjzqj) {
+        this.wjzqj = wjzqj;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFPatientCrisis{" +
+                "rdn='" + rdn + '\'' +
+                ", mrn='" + mrn + '\'' +
+                ", series='" + series + '\'' +
+                ", pname='" + pname + '\'' +
+                ", stay='" + stay + '\'' +
+                ", deptin='" + deptin + '\'' +
+                ", deptbed='" + deptbed + '\'' +
+                ", bedid='" + bedid + '\'' +
+                ", datein='" + datein + '\'' +
+                ", jp='" + jp + '\'' +
+                ", category='" + category + '\'' +
+                ", grade='" + grade + '\'' +
+                ", nurse='" + nurse + '\'' +
+                ", nurse_date='" + nurse_date + '\'' +
+                ", dr='" + dr + '\'' +
+                ", dr_date='" + dr_date + '\'' +
+                ", attending='" + attending + '\'' +
+                ", attending_date='" + attending_date + '\'' +
+                ", remark='" + remark + '\'' +
+                ", useflag='" + useflag + '\'' +
+                ", orderno='" + orderno + '\'' +
+                ", ordertype='" + ordertype + '\'' +
+                ", drin='" + drin + '\'' +
+                ", ordercode='" + ordercode + '\'' +
+                ", ordername='" + ordername + '\'' +
+                ", chinaname='" + chinaname + '\'' +
+                ", notes='" + notes + '\'' +
+                ", smsflag='" + smsflag + '\'' +
+                ", smsdate='" + smsdate + '\'' +
+                ", ckqj='" + ckqj + '\'' +
+                ", jydw='" + jydw + '\'' +
+                ", lab_orderno='" + lab_orderno + '\'' +
+                ", reflow='" + reflow + '\'' +
+                ", refhigh='" + refhigh + '\'' +
+                ", paniclow='" + paniclow + '\'' +
+                ", panichigh='" + panichigh + '\'' +
+                ", clinic_orderno='" + clinic_orderno + '\'' +
+                ", hoscode='" + hoscode + '\'' +
+                ", dr_remark='" + dr_remark + '\'' +
+                ", labcode='" + labcode + '\'' +
+                ", cpr_pr_rdn='" + cpr_pr_rdn + '\'' +
+                ", reporttime='" + reporttime + '\'' +
+                ", drflag='" + drflag + '\'' +
+                ", rdnflag='" + rdnflag + '\'' +
+                ", dododate='" + dododate + '\'' +
+                ", dodate='" + dodate + '\'' +
+                ", receivedate='" + receivedate + '\'' +
+                ", returndatetime='" + returndatetime + '\'' +
+                ", jiantou='" + jiantou + '\'' +
+                ", wjzqj='" + wjzqj + '\'' +
+                '}';
+    }
+}

+ 152 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFPatientList.java

@@ -0,0 +1,152 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFPatientList implements Serializable {
+    private String RDN; // 主键唯一号
+    private String MRN; // 病历号
+    private String SERIES; // 就诊次数
+    private String STAY; // 来源
+    private String PNAME; // 患者姓名
+    private String ADMID; // 入院时间
+    private String DISCD; // 出院时间
+    private String DEPTID; // 临床科室
+    private String DR; // 主治医生
+    private String DAYS; // 住院天数
+    private String INDATE; // 录入时间
+    private String JP; // 经办人
+    private String CHECKJP; // 审核人
+    private String CHECKDATE; // 审核时间
+
+    public String getRDN() {
+        return RDN;
+    }
+
+    public void setRDN(String RDN) {
+        this.RDN = RDN;
+    }
+
+    public String getMRN() {
+        return MRN;
+    }
+
+    public void setMRN(String MRN) {
+        this.MRN = MRN;
+    }
+
+    public String getSERIES() {
+        return SERIES;
+    }
+
+    public void setSERIES(String SERIES) {
+        this.SERIES = SERIES;
+    }
+
+    public String getSTAY() {
+        return STAY;
+    }
+
+    public void setSTAY(String STAY) {
+        this.STAY = STAY;
+    }
+
+    public String getPNAME() {
+        return PNAME;
+    }
+
+    public void setPNAME(String PNAME) {
+        this.PNAME = PNAME;
+    }
+
+    public String getADMID() {
+        return ADMID;
+    }
+
+    public void setADMID(String ADMID) {
+        this.ADMID = ADMID;
+    }
+
+    public String getDISCD() {
+        return DISCD;
+    }
+
+    public void setDISCD(String DISCD) {
+        this.DISCD = DISCD;
+    }
+
+    public String getDEPTID() {
+        return DEPTID;
+    }
+
+    public void setDEPTID(String DEPTID) {
+        this.DEPTID = DEPTID;
+    }
+
+    public String getDR() {
+        return DR;
+    }
+
+    public void setDR(String DR) {
+        this.DR = DR;
+    }
+
+    public String getDAYS() {
+        return DAYS;
+    }
+
+    public void setDAYS(String DAYS) {
+        this.DAYS = DAYS;
+    }
+
+    public String getINDATE() {
+        return INDATE;
+    }
+
+    public void setINDATE(String INDATE) {
+        this.INDATE = INDATE;
+    }
+
+    public String getJP() {
+        return JP;
+    }
+
+    public void setJP(String JP) {
+        this.JP = JP;
+    }
+
+    public String getCHECKJP() {
+        return CHECKJP;
+    }
+
+    public void setCHECKJP(String CHECKJP) {
+        this.CHECKJP = CHECKJP;
+    }
+
+    public String getCHECKDATE() {
+        return CHECKDATE;
+    }
+
+    public void setCHECKDATE(String CHECKDATE) {
+        this.CHECKDATE = CHECKDATE;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFPatientList{" +
+                "RDN='" + RDN + '\'' +
+                ", MRN='" + MRN + '\'' +
+                ", SERIES='" + SERIES + '\'' +
+                ", STAY='" + STAY + '\'' +
+                ", PNAME='" + PNAME + '\'' +
+                ", ADMID='" + ADMID + '\'' +
+                ", DISCD='" + DISCD + '\'' +
+                ", DEPTID='" + DEPTID + '\'' +
+                ", DR='" + DR + '\'' +
+                ", DAYS='" + DAYS + '\'' +
+                ", INDATE='" + INDATE + '\'' +
+                ", JP='" + JP + '\'' +
+                ", CHECKJP='" + CHECKJP + '\'' +
+                ", CHECKDATE='" + CHECKDATE + '\'' +
+                '}';
+    }
+}

+ 192 - 0
src/main/java/com/diagbot/entity/shaoyifu/entity/SYFStaff.java

@@ -0,0 +1,192 @@
+package com.diagbot.entity.shaoyifu.entity;
+
+import java.io.Serializable;
+
+public class SYFStaff  implements Serializable {
+
+    private String total;// 返回记录数
+    private String start;// 结果集开始位置
+    private String size;// 结果集记录数
+    private String empid;// 工号
+    private String name;// 姓名
+    private String sex;// 性别
+    private String deptid;// 所属科室代码
+    private String deptname;// 所属科室名称
+    private String deptbed;// 所属病区代码
+    private String deptbedname;// 所属病区名称
+    private String domain;// 人员类别
+    private String title;// 职称代码
+    private String titlename;// 职称名称
+    private String pphone;// 电话
+    private String hoscode;// 院区
+    private String cacertno;// 身份证号
+    private String occup;// 职业医师资格
+    private String MEDGROUP;//医疗组
+
+    public String getMEDGROUP() {
+        return MEDGROUP;
+    }
+
+    public void setMEDGROUP(String MEDGROUP) {
+        this.MEDGROUP = MEDGROUP;
+    }
+
+    public String getTotal() {
+        return total;
+    }
+
+    public void setTotal(String total) {
+        this.total = total;
+    }
+
+    public String getStart() {
+        return start;
+    }
+
+    public void setStart(String start) {
+        this.start = start;
+    }
+
+    public String getSize() {
+        return size;
+    }
+
+    public void setSize(String size) {
+        this.size = size;
+    }
+
+    public String getEmpid() {
+        return empid;
+    }
+
+    public void setEmpid(String empid) {
+        this.empid = empid;
+    }
+
+    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 String getDeptid() {
+        return deptid;
+    }
+
+    public void setDeptid(String deptid) {
+        this.deptid = deptid;
+    }
+
+    public String getDeptname() {
+        return deptname;
+    }
+
+    public void setDeptname(String deptname) {
+        this.deptname = deptname;
+    }
+
+    public String getDeptbed() {
+        return deptbed;
+    }
+
+    public void setDeptbed(String deptbed) {
+        this.deptbed = deptbed;
+    }
+
+    public String getDeptbedname() {
+        return deptbedname;
+    }
+
+    public void setDeptbedname(String deptbedname) {
+        this.deptbedname = deptbedname;
+    }
+
+    public String getDomain() {
+        return domain;
+    }
+
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getTitlename() {
+        return titlename;
+    }
+
+    public void setTitlename(String titlename) {
+        this.titlename = titlename;
+    }
+
+    public String getPphone() {
+        return pphone;
+    }
+
+    public void setPphone(String pphone) {
+        this.pphone = pphone;
+    }
+
+    public String getHoscode() {
+        return hoscode;
+    }
+
+    public void setHoscode(String hoscode) {
+        this.hoscode = hoscode;
+    }
+
+    public String getCacertno() {
+        return cacertno;
+    }
+
+    public void setCacertno(String cacertno) {
+        this.cacertno = cacertno;
+    }
+
+    public String getOccup() {
+        return occup;
+    }
+
+    public void setOccup(String occup) {
+        this.occup = occup;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFStaff{" +
+                "total='" + total + '\'' +
+                ", start='" + start + '\'' +
+                ", size='" + size + '\'' +
+                ", empid='" + empid + '\'' +
+                ", name='" + name + '\'' +
+                ", sex='" + sex + '\'' +
+                ", deptid='" + deptid + '\'' +
+                ", deptname='" + deptname + '\'' +
+                ", deptbed='" + deptbed + '\'' +
+                ", deptbedname='" + deptbedname + '\'' +
+                ", domain='" + domain + '\'' +
+                ", title='" + title + '\'' +
+                ", titlename='" + titlename + '\'' +
+                ", pphone='" + pphone + '\'' +
+                ", hoscode='" + hoscode + '\'' +
+                ", cacertno='" + cacertno + '\'' +
+                ", occup='" + occup + '\'' +
+                '}';
+    }
+}

+ 32 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/BeHospitalInfoRequest.java

@@ -0,0 +1,32 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class BeHospitalInfoRequest implements Serializable {
+    private String MRN; // 病历号
+    private String SERIES; // 就诊次数
+
+    public String getMRN() {
+        return MRN;
+    }
+
+    public void setMRN(String MRN) {
+        this.MRN = MRN;
+    }
+
+    public String getSERIES() {
+        return SERIES;
+    }
+
+    public void setSERIES(String SERIES) {
+        this.SERIES = SERIES;
+    }
+
+    @Override
+    public String toString() {
+        return "BeHospitalInfoRequest{" +
+                "MRN='" + MRN + '\'' +
+                ", SERIES='" + SERIES + '\'' +
+                '}';
+    }
+}

+ 83 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/DeptRequest.java

@@ -0,0 +1,83 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class DeptRequest implements Serializable {
+
+    private String DEPTID = "";
+    private String DEPTNAME = "";
+    private String USEFLAG = "";
+    private String PY = "";
+    private String HOSCODE = "";
+    private String STAY = "";
+    private String SFLAG = "";
+
+    public String getDEPTID() {
+        return DEPTID;
+    }
+
+    public void setDEPTID(String DEPTID) {
+        this.DEPTID = DEPTID;
+    }
+
+    public String getDEPTNAME() {
+        return DEPTNAME;
+    }
+
+    public void setDEPTNAME(String DEPTNAME) {
+        this.DEPTNAME = DEPTNAME;
+    }
+
+    public String getUSEFLAG() {
+        return USEFLAG;
+    }
+
+    public void setUSEFLAG(String USEFLAG) {
+        this.USEFLAG = USEFLAG;
+    }
+
+    public String getPY() {
+        return PY;
+    }
+
+    public void setPY(String PY) {
+        this.PY = PY;
+    }
+
+    public String getHOSCODE() {
+        return HOSCODE;
+    }
+
+    public void setHOSCODE(String HOSCODE) {
+        this.HOSCODE = HOSCODE;
+    }
+
+    public String getSTAY() {
+        return STAY;
+    }
+
+    public void setSTAY(String STAY) {
+        this.STAY = STAY;
+    }
+
+    public String getSFLAG() {
+        return SFLAG;
+    }
+
+    public void setSFLAG(String SFLAG) {
+        this.SFLAG = SFLAG;
+    }
+
+    @Override
+    public String toString() {
+        return "DeptRequest{" +
+                "DEPTID='" + DEPTID + '\'' +
+                ", DEPTNAME='" + DEPTNAME + '\'' +
+                ", USEFLAG='" + USEFLAG + '\'' +
+                ", PY='" + PY + '\'' +
+                ", HOSCODE='" + HOSCODE + '\'' +
+                ", STAY='" + STAY + '\'' +
+                ", SFLAG='" + SFLAG + '\'' +
+                '}';
+    }
+}

+ 82 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/DoctorAdviceRequest.java

@@ -0,0 +1,82 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class DoctorAdviceRequest implements Serializable {
+    private String mrn;//病历号
+    private String series;//就诊次数
+    private String ordertype = "0";//医嘱类型
+    private String orderflag = "0";//医嘱类别
+    private String setno;//分组序号
+    private String index = "1";//页码
+    private String size = "10000";//每页大小
+
+    public String getMrn() {
+        return mrn;
+    }
+
+    public void setMrn(String mrn) {
+        this.mrn = mrn;
+    }
+
+    public String getSeries() {
+        return series;
+    }
+
+    public void setSeries(String series) {
+        this.series = series;
+    }
+
+    public String getOrdertype() {
+        return ordertype;
+    }
+
+    public void setOrdertype(String ordertype) {
+        this.ordertype = ordertype;
+    }
+
+    public String getOrderflag() {
+        return orderflag;
+    }
+
+    public void setOrderflag(String orderflag) {
+        this.orderflag = orderflag;
+    }
+
+    public String getSetno() {
+        return setno;
+    }
+
+    public void setSetno(String setno) {
+        this.setno = setno;
+    }
+
+    public String getIndex() {
+        return index;
+    }
+
+    public void setIndex(String index) {
+        this.index = index;
+    }
+
+    public String getSize() {
+        return size;
+    }
+
+    public void setSize(String size) {
+        this.size = size;
+    }
+
+    @Override
+    public String toString() {
+        return "DoctorAdviceRequest{" +
+                "mrn='" + mrn + '\'' +
+                ", series='" + series + '\'' +
+                ", ordertype='" + ordertype + '\'' +
+                ", orderflag='" + orderflag + '\'' +
+                ", setno='" + setno + '\'' +
+                ", index='" + index + '\'' +
+                ", size='" + size + '\'' +
+                '}';
+    }
+}

+ 43 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/HomePageDiagnoseRequest.java

@@ -0,0 +1,43 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class HomePageDiagnoseRequest implements Serializable {
+
+    private String rdn;//主键唯一号
+    private String index = "";//页码
+    private String size = "";//每页大小
+
+    public String getRdn() {
+        return rdn;
+    }
+
+    public void setRdn(String rdn) {
+        this.rdn = rdn;
+    }
+
+    public String getIndex() {
+        return index;
+    }
+
+    public void setIndex(String index) {
+        this.index = index;
+    }
+
+    public String getSize() {
+        return size;
+    }
+
+    public void setSize(String size) {
+        this.size = size;
+    }
+
+    @Override
+    public String toString() {
+        return "HomePageDiagnoseRequest{" +
+                "rdn='" + rdn + '\'' +
+                ", index='" + index + '\'' +
+                ", size='" + size + '\'' +
+                '}';
+    }
+}

+ 43 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/HomePageOperationRequest.java

@@ -0,0 +1,43 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class HomePageOperationRequest implements Serializable {
+
+    private String rdn;//主键唯一号
+    private String index = "";//页码
+    private String size = "";//每页大小
+
+    public String getRdn() {
+        return rdn;
+    }
+
+    public void setRdn(String rdn) {
+        this.rdn = rdn;
+    }
+
+    public String getIndex() {
+        return index;
+    }
+
+    public void setIndex(String index) {
+        this.index = index;
+    }
+
+    public String getSize() {
+        return size;
+    }
+
+    public void setSize(String size) {
+        this.size = size;
+    }
+
+    @Override
+    public String toString() {
+        return "HomePageOperationRequest{" +
+                "rdn='" + rdn + '\'' +
+                ", index='" + index + '\'' +
+                ", size='" + size + '\'' +
+                '}';
+    }
+}

+ 22 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/HomePageRequest.java

@@ -0,0 +1,22 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class HomePageRequest implements Serializable {
+    private String rdn;//主键唯一号
+
+    public String getRdn() {
+        return rdn;
+    }
+
+    public void setRdn(String rdn) {
+        this.rdn = rdn;
+    }
+
+    @Override
+    public String toString() {
+        return "HomePageRequest{" +
+                "rdn='" + rdn + '\'' +
+                '}';
+    }
+}

+ 23 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/MRTypeRequest.java

@@ -0,0 +1,23 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class MRTypeRequest implements Serializable {
+
+    private String modelid = "";
+
+    public String getModelid() {
+        return modelid;
+    }
+
+    public void setModelid(String modelid) {
+        this.modelid = modelid;
+    }
+
+    @Override
+    public String toString() {
+        return "MRTypeRequest{" +
+                "modelid='" + modelid + '\'' +
+                '}';
+    }
+}

+ 32 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/MedicalRecordRequest.java

@@ -0,0 +1,32 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class MedicalRecordRequest implements Serializable {
+    private String MRN; // 病历号
+    private String SERIES; // 就诊次数
+
+    public String getMRN() {
+        return MRN;
+    }
+
+    public void setMRN(String MRN) {
+        this.MRN = MRN;
+    }
+
+    public String getSERIES() {
+        return SERIES;
+    }
+
+    public void setSERIES(String SERIES) {
+        this.SERIES = SERIES;
+    }
+
+    @Override
+    public String toString() {
+        return "MedicalRecordRequest{" +
+                "MRN='" + MRN + '\'' +
+                ", SERIES='" + SERIES + '\'' +
+                '}';
+    }
+}

+ 43 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/PatientCrisisRequest.java

@@ -0,0 +1,43 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class PatientCrisisRequest implements Serializable {
+
+    private String MRN;
+    private String SERIES;
+    private String QUERYTYPE; //1=检验2=病理3=检查
+
+    public String getMRN() {
+        return MRN;
+    }
+
+    public void setMRN(String MRN) {
+        this.MRN = MRN;
+    }
+
+    public String getSERIES() {
+        return SERIES;
+    }
+
+    public void setSERIES(String SERIES) {
+        this.SERIES = SERIES;
+    }
+
+    public String getQUERYTYPE() {
+        return QUERYTYPE;
+    }
+
+    public void setQUERYTYPE(String QUERYTYPE) {
+        this.QUERYTYPE = QUERYTYPE;
+    }
+
+    @Override
+    public String toString() {
+        return "PatientCrisisRequest{" +
+                "MRN='" + MRN + '\'' +
+                ", SERIES='" + SERIES + '\'' +
+                ", QUERYTYPE='" + QUERYTYPE + '\'' +
+                '}';
+    }
+}

+ 32 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/PatientListRequest.java

@@ -0,0 +1,32 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class PatientListRequest implements Serializable {
+    private String DATESTART; //查询开始时间
+    private String DATEEND; //查询结束时间
+
+    public String getDATESTART() {
+        return DATESTART;
+    }
+
+    public void setDATESTART(String DATESTART) {
+        this.DATESTART = DATESTART;
+    }
+
+    public String getDATEEND() {
+        return DATEEND;
+    }
+
+    public void setDATEEND(String DATEEND) {
+        this.DATEEND = DATEEND;
+    }
+
+    @Override
+    public String toString() {
+        return "PatientListRequest{" +
+                "DATESTART='" + DATESTART + '\'' +
+                ", DATEEND='" + DATEEND + '\'' +
+                '}';
+    }
+}

+ 32 - 0
src/main/java/com/diagbot/entity/shaoyifu/request/StaffRequest.java

@@ -0,0 +1,32 @@
+package com.diagbot.entity.shaoyifu.request;
+
+import java.io.Serializable;
+
+public class StaffRequest  implements Serializable {
+    private String index;// 页码
+    private String size;// 每页大小
+
+    public String getIndex() {
+        return index;
+    }
+
+    public void setIndex(String index) {
+        this.index = index;
+    }
+
+    public String getSize() {
+        return size;
+    }
+
+    public void setSize(String size) {
+        this.size = size;
+    }
+
+    @Override
+    public String toString() {
+        return "StaffRequest{" +
+                "index='" + index + '\'' +
+                ", size='" + size + '\'' +
+                '}';
+    }
+}

+ 7 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/BeHospitalInfoResponse.java

@@ -0,0 +1,7 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFBeHospitalInfo;
+import com.diagbot.entity.shaoyifu.util.SYFInterfaceResponse;
+
+public class BeHospitalInfoResponse extends SYFInterfaceResponse<SYFBeHospitalInfo> {
+}

+ 9 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/DeptResponse.java

@@ -0,0 +1,9 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFDept;
+import com.diagbot.entity.shaoyifu.util.SYFInterfaceResponse;
+
+import java.util.List;
+
+public class DeptResponse extends SYFInterfaceResponse<List<SYFDept>> {
+}

+ 9 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/DoctorAdviceResponse.java

@@ -0,0 +1,9 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFDoctorAdvice;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+import java.util.List;
+
+public class DoctorAdviceResponse extends SYFNlResponse<List<SYFDoctorAdvice>> {
+}

+ 9 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/HomePageDiagnoseResponse.java

@@ -0,0 +1,9 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFHomePageDiagnose;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+import java.util.List;
+
+public class HomePageDiagnoseResponse extends SYFNlResponse<List<SYFHomePageDiagnose>> {
+}

+ 9 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/HomePageOperationResponse.java

@@ -0,0 +1,9 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFHomePageOperation;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+import java.util.List;
+
+public class HomePageOperationResponse extends SYFNlResponse<List<SYFHomePageOperation>> {
+}

+ 7 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/HomePageResponse.java

@@ -0,0 +1,7 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFHomePage;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+public class HomePageResponse extends SYFNlResponse<SYFHomePage> {
+}

+ 9 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/MRTypeResponse.java

@@ -0,0 +1,9 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFMedicalRecordType;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+import java.util.List;
+
+public class MRTypeResponse extends SYFNlResponse<List<SYFMedicalRecordType>> {
+}

+ 9 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/MedicalRecordResponse.java

@@ -0,0 +1,9 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFMedicalRecord;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+import java.util.List;
+
+public class MedicalRecordResponse extends SYFNlResponse<List<SYFMedicalRecord>> {
+}

+ 10 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/PatientCrisisResponse.java

@@ -0,0 +1,10 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFPatientCrisis;
+import com.diagbot.entity.shaoyifu.util.SYFInterfaceResponse;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+import java.util.List;
+
+public class PatientCrisisResponse extends SYFInterfaceResponse<List<SYFPatientCrisis>> {
+}

+ 10 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/PatientListResponse.java

@@ -0,0 +1,10 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFPatientList;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+import java.util.List;
+
+public class PatientListResponse extends SYFNlResponse<List<SYFPatientList>> {
+
+}

+ 11 - 0
src/main/java/com/diagbot/entity/shaoyifu/response/StaffResponse.java

@@ -0,0 +1,11 @@
+package com.diagbot.entity.shaoyifu.response;
+
+import com.diagbot.entity.shaoyifu.entity.SYFStaff;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
+
+import java.util.List;
+
+public class StaffResponse extends SYFNlResponse<List<SYFStaff>> {
+
+
+}

+ 153 - 0
src/main/java/com/diagbot/entity/shaoyifu/util/HttpApi.java

@@ -0,0 +1,153 @@
+package com.diagbot.entity.shaoyifu.util;
+
+import com.google.common.collect.Lists;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.protocol.HttpClientContext;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.util.EntityUtils;
+import org.codehaus.jackson.JsonParseException;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.net.ConnectException;
+import java.net.URLDecoder;
+import java.util.List;
+
+@Component
+public class HttpApi<T> {
+    private static Logger log = LoggerFactory.getLogger(HttpApi.class);
+
+    public HttpApi() {
+    }
+
+    public String doPost(String httpUrl, Object obj) throws ConnectException, Exception {
+        JsonMapper mapper = JsonMapper.nonEmptyMapper();
+
+        try {
+            HttpPost httppost = new HttpPost(httpUrl);
+            if (obj != null) {
+                String post = mapper.toJson(obj);
+                log.info("开始发起远程请求Param String:" + post);
+                StringEntity se = new StringEntity(post, "UTF-8");
+                se.setContentType("application/json");
+                se.setContentEncoding("utf-8");
+                httppost.setEntity(se);
+            }
+            httppost.setHeader("Authorization", "srrsh_langtong");
+
+            CloseableHttpResponse response = HttpConnectionManager.getHttpClient().execute(httppost, HttpClientContext.create());
+            int code = response.getStatusLine().getStatusCode();
+            HttpEntity entity = response.getEntity();
+            String receive = EntityUtils.toString(entity, "UTF-8").trim();
+            log.info("服务器返回Response String:" + receive);
+            return receive;
+        } catch (ConnectException var10) {
+            throw var10;
+        } catch (JsonParseException var11) {
+            throw new Exception("Json映射对象错误!----" + var11.getMessage(), var11);
+        } catch (Exception var12) {
+            throw new Exception("远程服务器调用接口失败!----" + var12.getMessage(), var12);
+        }
+    }
+
+    public T doPostReplace(String httpUrl, Object obj, Class<T> type) throws ConnectException, Exception {
+        JsonMapper mapper = JsonMapper.nonEmptyMapper();
+
+        try {
+            HttpPost httppost = new HttpPost(httpUrl);
+            if (obj != null) {
+                String post = mapper.toJson(obj);
+                log.info("开始发起远程请求Param String:" + post);
+                StringEntity se = new StringEntity(post, "UTF-8");
+                se.setContentType("application/json");
+                se.setContentEncoding("utf-8");
+                httppost.setEntity(se);
+            }
+
+            CloseableHttpResponse response = HttpConnectionManager.getHttpClient().execute(httppost, HttpClientContext.create());
+            int code = response.getStatusLine().getStatusCode();
+            HttpEntity entity = response.getEntity();
+            String receive = EntityUtils.toString(entity, "UTF-8").trim();
+            log.info("服务器返回Response String:" + receive);
+            receive = receive.replace("\\\"", "\"").replace("\"[{", "[{").replace("}]\"", "}]").replace("\"{", "{").replace("}\"", "}").replace("\"data\":\"[]\"", "\"data\":null");
+            return mapper.fromJson(receive, type);
+        } catch (ConnectException var10) {
+            throw var10;
+        } catch (JsonParseException var11) {
+            throw new Exception("Json映射对象错误!----" + var11.getMessage(), var11);
+        } catch (Exception var12) {
+            throw new Exception("远程服务器调用接口失败!----" + var12.getMessage(), var12);
+        }
+    }
+
+    public List<T> doListPost(String httpUrl, String string, Class<T> type) throws ConnectException, Exception {
+        JsonMapper mapper = JsonMapper.nonEmptyMapper();
+
+        try {
+            HttpPost httppost = new HttpPost(httpUrl);
+            StringEntity se = new StringEntity(string, "UTF-8");
+            se.setContentType("text/html");
+            se.setContentEncoding("utf-8");
+            httppost.setEntity(se);
+            CloseableHttpResponse response = HttpConnectionManager.getHttpClient().execute(httppost, HttpClientContext.create());
+            int code = response.getStatusLine().getStatusCode();
+            HttpEntity entity = response.getEntity();
+            String receive = EntityUtils.toString(entity, "UTF-8").trim();
+            log.info("服务器返回Response String:" + receive);
+            JSONArray jsonArray = new JSONArray(receive);
+            List<T> returnObjList = Lists.newArrayList();
+
+            for(int i = 0; i < jsonArray.length(); ++i) {
+                JSONObject jsonObj = jsonArray.getJSONObject(i);
+                returnObjList.add(mapper.fromJson(jsonObj.toString(), type));
+            }
+
+            return returnObjList;
+        } catch (ConnectException var15) {
+            throw var15;
+        } catch (JsonParseException var16) {
+            throw new Exception("Json映射对象错误!----" + var16.getMessage(), var16);
+        } catch (Exception var17) {
+            throw new Exception("远程服务器调用接口失败!----" + var17.getMessage(), var17);
+        }
+    }
+
+    public String doPostXml(String httpUrl, String xmlString) throws Exception {
+        try {
+            HttpPost httppost = new HttpPost(httpUrl);
+            StringEntity se = new StringEntity(xmlString, "UTF-8");
+            se.setContentType("text/html");
+            se.setContentEncoding("utf-8");
+            httppost.setEntity(se);
+            CloseableHttpResponse response = HttpConnectionManager.getHttpClient().execute(httppost, HttpClientContext.create());
+            HttpEntity entity = response.getEntity();
+            String receiveXml = EntityUtils.toString(entity, "UTF-8").trim();
+            return receiveXml;
+        } catch (Exception var8) {
+            throw new Exception("远程服务器调用接口失败!----" + var8.getMessage(), var8);
+        }
+    }
+
+    public String receivePost(HttpServletRequest request) throws IOException, UnsupportedEncodingException {
+        BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream()));
+        String line = null;
+        StringBuilder sb = new StringBuilder();
+
+        while((line = br.readLine()) != null) {
+            sb.append(line);
+        }
+
+        String reqBody = sb.toString();
+        return URLDecoder.decode(reqBody, "UTF-8");
+    }
+}

+ 54 - 0
src/main/java/com/diagbot/entity/shaoyifu/util/HttpConnectionManager.java

@@ -0,0 +1,54 @@
+package com.diagbot.entity.shaoyifu.util;
+
+import org.apache.http.HttpHost;
+import org.apache.http.conn.routing.HttpRoute;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class HttpConnectionManager {
+    private static Logger log = LoggerFactory.getLogger(HttpConnectionManager.class);
+    private static PoolingHttpClientConnectionManager cm;
+
+    public HttpConnectionManager() {
+    }
+
+    public static CloseableHttpClient getHttpClient() throws Exception {
+        try {
+            CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(cm).build();
+            return httpClient;
+        } catch (Exception var1) {
+            log.error("获取CloseableHttpClient出错", var1);
+            throw var1;
+        }
+    }
+
+    public static void closeHttpClient(CloseableHttpClient httpClient) throws IOException {
+        if (httpClient != null) {
+            try {
+                httpClient.close();
+            } catch (IOException var2) {
+                log.error("关闭HTTP连接出错", var2);
+                throw var2;
+            }
+        }
+
+    }
+
+    static {
+        try {
+            cm = new PoolingHttpClientConnectionManager();
+            cm.setMaxTotal(200);
+            cm.setDefaultMaxPerRoute(20);
+            HttpHost localhost = new HttpHost("http://115.28.138.12", 7070);
+            cm.setMaxPerRoute(new HttpRoute(localhost), 50);
+        } catch (Exception var1) {
+            log.error("初始化HTTP连接池出错", var1);
+        }
+
+    }
+}

+ 58 - 0
src/main/java/com/diagbot/entity/shaoyifu/util/JsonMapper.java

@@ -0,0 +1,58 @@
+package com.diagbot.entity.shaoyifu.util;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class JsonMapper {
+    private static Logger logger = LoggerFactory.getLogger(JsonMapper.class);
+    private ObjectMapper mapper;
+
+    public JsonMapper(JsonInclude.Include include) {
+        this.mapper = new ObjectMapper();
+        if (include != null) {
+            this.mapper.setSerializationInclusion(include);
+        }
+
+        this.mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+    }
+
+    public static JsonMapper nonEmptyMapper() {
+        return new JsonMapper(JsonInclude.Include.NON_EMPTY);
+    }
+
+    public static JsonMapper nonDefaultMapper() {
+        return new JsonMapper(JsonInclude.Include.NON_DEFAULT);
+    }
+
+    public String toJson(Object object) {
+        try {
+            return this.mapper.writeValueAsString(object);
+        } catch (IOException var3) {
+            logger.warn("write to json string error:" + object, var3);
+            return null;
+        }
+    }
+
+    public <T> T fromJson(String jsonString, Class<T> clazz) {
+        if (StringUtils.isEmpty(jsonString)) {
+            return null;
+        } else {
+            try {
+                return this.mapper.readValue(jsonString, clazz);
+            } catch (IOException var4) {
+                logger.warn("parse json string error:" + jsonString, var4);
+                return null;
+            }
+        }
+    }
+
+    public ObjectMapper getMapper() {
+        return this.mapper;
+    }
+}

+ 31 - 0
src/main/java/com/diagbot/entity/shaoyifu/util/SYFInterfaceRequest.java

@@ -0,0 +1,31 @@
+package com.diagbot.entity.shaoyifu.util;
+
+public class SYFInterfaceRequest<T> {
+
+    private String serviceFunCode = "00000000";
+    private T serviceParam;
+
+    public String getServiceFunCode() {
+        return serviceFunCode;
+    }
+
+    public void setServiceFunCode(String serviceFunCode) {
+        this.serviceFunCode = serviceFunCode;
+    }
+
+    public T getServiceParam() {
+        return serviceParam;
+    }
+
+    public void setServiceParam(T serviceParam) {
+        this.serviceParam = serviceParam;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFInterfaceRequest{" +
+                "serviceFunCode='" + serviceFunCode + '\'' +
+                ", serviceParam=" + serviceParam +
+                '}';
+    }
+}

+ 41 - 0
src/main/java/com/diagbot/entity/shaoyifu/util/SYFInterfaceResponse.java

@@ -0,0 +1,41 @@
+package com.diagbot.entity.shaoyifu.util;
+
+public class SYFInterfaceResponse<T> {
+
+    private String resultCode;
+    private String resultMsg;
+    private T resultJson;
+
+    public String getResultCode() {
+        return resultCode;
+    }
+
+    public void setResultCode(String resultCode) {
+        this.resultCode = resultCode;
+    }
+
+    public String getResultMsg() {
+        return resultMsg;
+    }
+
+    public void setResultMsg(String resultMsg) {
+        this.resultMsg = resultMsg;
+    }
+
+    public T getResultJson() {
+        return resultJson;
+    }
+
+    public void setResultJson(T resultJson) {
+        this.resultJson = resultJson;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFInterfaceResponse{" +
+                "resultCode='" + resultCode + '\'' +
+                ", resultMsg='" + resultMsg + '\'' +
+                ", resultJson=" + resultJson +
+                '}';
+    }
+}

+ 80 - 0
src/main/java/com/diagbot/entity/shaoyifu/util/SYFNlRequest.java

@@ -0,0 +1,80 @@
+package com.diagbot.entity.shaoyifu.util;
+
+public class SYFNlRequest<T> {
+    private String tradeCode = "";
+    private String hospitalCode = "";
+    private String authentication = "";
+    private String tradeTime = "";
+    private String sourceSystem = "";
+    private String doType = "";
+    private T data;
+
+    public String getTradeCode() {
+        return tradeCode;
+    }
+
+    public void setTradeCode(String tradeCode) {
+        this.tradeCode = tradeCode;
+    }
+
+    public String getHospitalCode() {
+        return hospitalCode;
+    }
+
+    public void setHospitalCode(String hospitalCode) {
+        this.hospitalCode = hospitalCode;
+    }
+
+    public String getAuthentication() {
+        return authentication;
+    }
+
+    public void setAuthentication(String authentication) {
+        this.authentication = authentication;
+    }
+
+    public String getTradeTime() {
+        return tradeTime;
+    }
+
+    public void setTradeTime(String tradeTime) {
+        this.tradeTime = tradeTime;
+    }
+
+    public String getSourceSystem() {
+        return sourceSystem;
+    }
+
+    public void setSourceSystem(String sourceSystem) {
+        this.sourceSystem = sourceSystem;
+    }
+
+    public String getDoType() {
+        return doType;
+    }
+
+    public void setDoType(String doType) {
+        this.doType = doType;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFNlRequest{" +
+                "tradeCode='" + tradeCode + '\'' +
+                ", hospitalCode='" + hospitalCode + '\'' +
+                ", authentication='" + authentication + '\'' +
+                ", tradeTime='" + tradeTime + '\'' +
+                ", sourceSystem='" + sourceSystem + '\'' +
+                ", doType='" + doType + '\'' +
+                ", data=" + data +
+                '}';
+    }
+}

+ 90 - 0
src/main/java/com/diagbot/entity/shaoyifu/util/SYFNlResponse.java

@@ -0,0 +1,90 @@
+package com.diagbot.entity.shaoyifu.util;
+
+/**
+ * 
+ * ClassName: org.diagbot.pub.api.Response 
+ * Function: API接口提供标准返回数据包, 数据包格式如下:
+ *                        {
+ *   "result": "string",
+ *   "tradeCode": "string",
+ *   "hospitalCode": "string",
+ *   "tradeTime": "string",
+ *   "message": "string",
+ *   "data": [
+ *     ...
+ *   ]
+ * }
+ * date: 2015年7月6日 下午1:36:58  
+ * 
+ * @author 楼辉荣(Fyeman) 
+ * @version 1.0 
+ * @since JDK 1.7
+ */
+public class SYFNlResponse<T>{
+	private String result;
+    private String tradeCode;
+    private String hospitalCode;
+    private String tradeTime;
+    private String message;
+    private T data;
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+    public String getTradeCode() {
+        return tradeCode;
+    }
+
+    public void setTradeCode(String tradeCode) {
+        this.tradeCode = tradeCode;
+    }
+
+    public String getHospitalCode() {
+        return hospitalCode;
+    }
+
+    public void setHospitalCode(String hospitalCode) {
+        this.hospitalCode = hospitalCode;
+    }
+
+    public String getTradeTime() {
+        return tradeTime;
+    }
+
+    public void setTradeTime(String tradeTime) {
+        this.tradeTime = tradeTime;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    @Override
+    public String toString() {
+        return "SYFNlResponse{" +
+                "result='" + result + '\'' +
+                ", tradeCode='" + tradeCode + '\'' +
+                ", hospitalCode='" + hospitalCode + '\'' +
+                ", tradeTime='" + tradeTime + '\'' +
+                ", message='" + message + '\'' +
+                ", data=" + data +
+                '}';
+    }
+}

+ 42 - 5
src/main/java/com/diagbot/facade/data/ABasDeptInfoFacade.java

@@ -1,13 +1,19 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ABasDeptInfoDTO;
 import com.diagbot.entity.BasDeptInfo;
+import com.diagbot.entity.shaoyifu.entity.SYFDept;
+import com.diagbot.entity.shaoyifu.request.DeptRequest;
+import com.diagbot.entity.shaoyifu.response.DeptResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFInterfaceRequest;
 import com.diagbot.service.impl.BasDeptInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
 import com.diagbot.util.TZDBConn;
 import com.diagbot.vo.data.ABasDeptInfoVO;
-import com.diagbot.util.BeanUtil;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -26,12 +32,43 @@ public class ABasDeptInfoFacade extends BasDeptInfoServiceImpl{
     private TZDBConn tzDBConn = new TZDBConn();
 
     /**
-     * 同步前一天科室的信息
+     * 同步科室的信息
      */
     public void executeDept() {
-        String sql="select * from hi_deptinfo where cjcxrq>=dateadd(day,-2,getdate()) and cjcxrq<=getdate()";
-        List<BasDeptInfo> basDeptInfoList = tzDBConn.getDeptInfo(sql);
-        execute(basDeptInfoList);
+
+        try {
+            SYFInterfaceRequest<DeptRequest> request = new SYFInterfaceRequest<>();
+            DeptRequest deptRequest = new DeptRequest();
+            request.setServiceParam(deptRequest);
+
+            HttpApi<DeptResponse> httpApi = new HttpApi<>();
+            String a = httpApi.doPost("http://192.1.5.162:8088/api/InterfaceService/GetDeptList", request);
+
+            DeptResponse deptResponse = JSON.parseObject(a, DeptResponse.class);
+
+            List<SYFDept> sYFDeptList = deptResponse.getResultJson();
+            List<BasDeptInfo> basDeptInfoList = Lists.newLinkedList();
+            if (sYFDeptList.size() > 0) {
+                for (int i = 0; i < sYFDeptList.size(); i++) {
+                    BasDeptInfo basDeptInfo = new BasDeptInfo();
+                    basDeptInfo.setDeptId(sYFDeptList.get(i).getDEPTID());
+                    basDeptInfo.setHospitalId(Long.parseLong("2"));
+                    basDeptInfo.setDeptName(sYFDeptList.get(i).getDEPTNAME());
+                    basDeptInfo.setParentDeptId(sYFDeptList.get(i).getFORWARD());
+                    basDeptInfo.setDeptType(sYFDeptList.get(i).getSTATUS());
+                    basDeptInfo.setSpell(sYFDeptList.get(i).getPY());
+                    basDeptInfo.setStation(sYFDeptList.get(i).getSTAY());
+
+                    basDeptInfoList.add(basDeptInfo);
+                }
+            }
+            execute(basDeptInfoList);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+
     }
 
     /**

+ 37 - 3
src/main/java/com/diagbot/facade/data/ABasDoctorInfoFacade.java

@@ -1,9 +1,15 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ABasDoctorInfoDTO;
 import com.diagbot.entity.BasDoctorInfo;
+import com.diagbot.entity.shaoyifu.entity.SYFStaff;
+import com.diagbot.entity.shaoyifu.request.StaffRequest;
+import com.diagbot.entity.shaoyifu.response.StaffResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFNlResponse;
 import com.diagbot.service.impl.BasDoctorInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.TZDBConn;
@@ -37,9 +43,37 @@ public class ABasDoctorInfoFacade extends BasDoctorInfoServiceImpl {
      * 同步前一天医生信息
      */
     public void executeDoctor() {
-        String sql="select * from gi_userinfo";
-        List<BasDoctorInfo> basDeptInfoList = tzDBConn.getBasDoctorInfo(sql);
-        execute(basDeptInfoList);
+        try {
+            StaffRequest staffRequest = new StaffRequest();
+            staffRequest.setIndex("1");
+            staffRequest.setSize("100000");
+
+            HttpApi<StaffResponse> httpApi = new HttpApi<>();
+            SYFNlResponse<StaffRequest> request = new SYFNlResponse<>();
+            request.setData(staffRequest);
+
+            String a = httpApi.doPost("http://192.1.5.162:8088/api/NlService/GetEMPLIST", request);
+            StaffResponse staffResponse = JSON.parseObject(a, StaffResponse.class);
+            List<SYFStaff> syfStaffListist = staffResponse.getData();
+            List<BasDoctorInfo> basDoctorInfoList = Lists.newLinkedList();
+            for (int i = 0; i < syfStaffListist.size(); i++) {
+                BasDoctorInfo basDoctorInfo = new BasDoctorInfo();
+                basDoctorInfo.setProfessor(syfStaffListist.get(i).getTitlename());
+                basDoctorInfo.setDoctorId(syfStaffListist.get(i).getEmpid());
+                basDoctorInfo.setHospitalId(Long.parseLong("2"));
+                basDoctorInfo.setDeptId(syfStaffListist.get(i).getDeptid());
+                basDoctorInfo.setName(syfStaffListist.get(i).getName());
+                basDoctorInfo.setOccup(syfStaffListist.get(i).getOccup());
+                basDoctorInfo.setGroupId(syfStaffListist.get(i).getMEDGROUP());
+
+                basDoctorInfoList.add(basDoctorInfo);
+            }
+            execute(basDoctorInfoList);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
     }
     /**
      * 从接口接收医生信息

+ 92 - 4
src/main/java/com/diagbot/facade/data/ABehospitalInfoFacade.java

@@ -1,9 +1,17 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ABehospitalInfoDTO;
 import com.diagbot.entity.*;
+import com.diagbot.entity.shaoyifu.entity.SYFBeHospitalInfo;
+import com.diagbot.entity.shaoyifu.request.BeHospitalInfoRequest;
+import com.diagbot.entity.shaoyifu.request.PatientListRequest;
+import com.diagbot.entity.shaoyifu.response.BeHospitalInfoResponse;
+import com.diagbot.entity.shaoyifu.response.PatientListResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFInterfaceRequest;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.facade.QcAbnormalFacade;
 import com.diagbot.facade.QcTypeFacade;
@@ -18,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 
@@ -37,16 +46,95 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
     @Autowired
     private QcAbnormalFacade qcAbnormalFacade;
 
+    @Autowired
+    private APatientListFacade aPatientListFacade;
+
     private TZDBConn tzDBConn = new TZDBConn();
 
     /**
      * 终末质控-同步前一天的入院记录
      */
     public void executeBehospital() {
-        //String sql="select * from br_inpatientinfo where cjcxrq>=dateadd(day,-2,getdate()) and cjcxrq<=getdate()";
-        String sql="select * from br_inpatientinfo where cjcxrq>=(select CONVERT(varchar,GETDATE()-2,23)) and cjcxrq<(select CONVERT(varchar,GETDATE(),23)) ORDER BY cjcxrq DESC";
-        List<BehospitalInfo> behospitalInfoList = tzDBConn.getBehospitalInfo(sql);
-        execute(behospitalInfoList);
+
+        try {
+
+            /*SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Calendar start = Calendar.getInstance();
+            start.setTime(new Date());
+            start.set(Calendar.DATE, start.get(Calendar.DATE) - 1);
+            start.set(Calendar.HOUR_OF_DAY, 0);
+            start.set(Calendar.MINUTE, 0);
+            start.set(Calendar.SECOND, 0);
+            Date startTime = start.getTime();
+            Calendar end = Calendar.getInstance();
+            end.setTime(new Date());
+            end.set(Calendar.DATE, end.get(Calendar.DATE));
+            end.set(Calendar.HOUR_OF_DAY, 0);
+            end.set(Calendar.MINUTE, 0);
+            end.set(Calendar.SECOND, 0);
+            Date endTime = end.getTime();*/
+            PatientListRequest patientListRequest = new PatientListRequest();
+            /*patientListRequest.setDATESTART(sdf.format(startTime));
+            patientListRequest.setDATEEND(sdf.format(endTime));*/
+            patientListRequest.setDATESTART("2020-04-01 00:00:00");
+            patientListRequest.setDATEEND("2020-04-08 00:00:00");
+            PatientListResponse patientListResponse = aPatientListFacade.getPatientList(patientListRequest);
+
+            for (int i = 0; i < patientListResponse.getData().size(); i++) {
+                BeHospitalInfoRequest beHospitalInfoRequest = new BeHospitalInfoRequest();
+                beHospitalInfoRequest.setMRN(patientListResponse.getData().get(i).getMRN());
+                beHospitalInfoRequest.setSERIES(patientListResponse.getData().get(i).getSERIES());
+
+                HttpApi<BeHospitalInfoResponse> httpApi = new HttpApi<>();
+                SYFInterfaceRequest<BeHospitalInfoRequest> request = new SYFInterfaceRequest<>();
+                request.setServiceParam(beHospitalInfoRequest);
+
+                String a = httpApi.doPost("http://192.1.5.162:8088/api/InterfaceService/getPcaseIn", request);
+                System.out.println(a);
+                BeHospitalInfoResponse beHospitalInfoResponse = JSON.parseObject(a, BeHospitalInfoResponse.class);
+
+                SYFBeHospitalInfo sYFBeHospitalInfo = beHospitalInfoResponse.getResultJson();
+
+                List<BehospitalInfo> behospitalInfoList =Lists.newLinkedList();
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+                if (sYFBeHospitalInfo != null) {
+                    BehospitalInfo behospitalInfo = new BehospitalInfo();
+                    behospitalInfo.setBehospitalCode(patientListResponse.getData().get(i).getMRN() + "_" + patientListResponse.getData().get(i).getSERIES());
+                    behospitalInfo.setHospitalId(Long.parseLong("2"));
+                    behospitalInfo.setName(sYFBeHospitalInfo.getPNAME());
+                    behospitalInfo.setSex(sYFBeHospitalInfo.getPSEX());
+                    if (sYFBeHospitalInfo.getPBIRTHDAY() != null && sYFBeHospitalInfo.getPBIRTHDAY().length() > 0) {
+                        behospitalInfo.setBirthday(sdf.parse(sYFBeHospitalInfo.getPBIRTHDAY()));
+                    }
+                    behospitalInfo.setFileCode(sYFBeHospitalInfo.getFILECODE());
+                    behospitalInfo.setWardCode(sYFBeHospitalInfo.getWARDCODE());
+                    behospitalInfo.setWardName(sYFBeHospitalInfo.getWARDCAME());
+                    behospitalInfo.setBehDeptId(sYFBeHospitalInfo.getDEPTID());
+                    behospitalInfo.setBehDeptName(sYFBeHospitalInfo.getDEPTNAME());
+                    behospitalInfo.setBedCode(sYFBeHospitalInfo.getBEDID());
+                    behospitalInfo.setInsuranceName(sYFBeHospitalInfo.getINSURANCENAME());
+                    if (sYFBeHospitalInfo.getADMID() != null && sYFBeHospitalInfo.getADMID().length() > 0) {
+                        behospitalInfo.setBehospitalDate(sdf.parse(sYFBeHospitalInfo.getADMID()));
+                    }
+                    if (sYFBeHospitalInfo.getDISCD() != null && sYFBeHospitalInfo.getDISCD().length() > 0) {
+                        behospitalInfo.setLeaveHospitalDate(sdf.parse(sYFBeHospitalInfo.getDISCD()));
+                    }
+                    behospitalInfo.setDiagnoseIcd(sYFBeHospitalInfo.getDIAGNOSEICD());
+                    behospitalInfo.setDiagnose(sYFBeHospitalInfo.getDIAGNOSE());
+                    behospitalInfo.setDoctorId(sYFBeHospitalInfo.getDOCTORID());
+                    behospitalInfo.setDoctorName(sYFBeHospitalInfo.getDOCTORNAME());
+                    behospitalInfo.setIsPlacefile("1");
+
+                    behospitalInfoList.add(behospitalInfo);
+
+                    execute(behospitalInfoList);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+
     }
 
     /**

+ 88 - 4
src/main/java/com/diagbot/facade/data/ADoctorAdviceFacade.java

@@ -1,9 +1,17 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ADoctorAdviceDTO;
 import com.diagbot.entity.DoctorAdvice;
+import com.diagbot.entity.shaoyifu.entity.SYFDoctorAdvice;
+import com.diagbot.entity.shaoyifu.request.DoctorAdviceRequest;
+import com.diagbot.entity.shaoyifu.request.PatientListRequest;
+import com.diagbot.entity.shaoyifu.response.DoctorAdviceResponse;
+import com.diagbot.entity.shaoyifu.response.PatientListResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFNlRequest;
 import com.diagbot.service.impl.DoctorAdviceServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
@@ -15,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 
@@ -25,16 +34,91 @@ public class ADoctorAdviceFacade extends DoctorAdviceServiceImpl{
     @Qualifier("doctorAdviceServiceImpl")
     private DoctorAdviceServiceImpl doctorAdviceService;
 
+    @Autowired
+    private APatientListFacade aPatientListFacade;
+
     private TZDBConn tzDBConn = new TZDBConn();
 
     /**
      * 终末质控-同步前一天的入院病人医嘱信息
      */
     public void executeDoctorAdvice() {
-        //String sql="select * from br_doctadvice where cjcxrq>=dateadd(day,-2,getdate()) and cjcxrq<=getdate()";
-        String sql="select * from br_doctadvice where BRZYID in (select BRZYID from br_inpatientinfo where cjcxrq>=(select CONVERT(varchar,GETDATE()-2,23)) and cjcxrq<(select CONVERT(varchar,GETDATE(),23)) and requestflag='1')";
-        List<DoctorAdvice> doctorAdviceList = tzDBConn.getDoctorAdvice(sql);
-        execute(doctorAdviceList);
+
+        try {
+            /*SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Calendar start = Calendar.getInstance();
+            start.setTime(new Date());
+            start.set(Calendar.DATE, start.get(Calendar.DATE) - 1);
+            start.set(Calendar.HOUR_OF_DAY, 0);
+            start.set(Calendar.MINUTE, 0);
+            start.set(Calendar.SECOND, 0);
+            Date startTime = start.getTime();
+            Calendar end = Calendar.getInstance();
+            end.setTime(new Date());
+            end.set(Calendar.DATE, end.get(Calendar.DATE));
+            end.set(Calendar.HOUR_OF_DAY, 0);
+            end.set(Calendar.MINUTE, 0);
+            end.set(Calendar.SECOND, 0);
+            Date endTime = end.getTime();*/
+            PatientListRequest patientListRequest = new PatientListRequest();
+            /*patientListRequest.setDATESTART(sdf.format(startTime));
+            patientListRequest.setDATEEND(sdf.format(endTime));*/
+            patientListRequest.setDATESTART("2020-04-01 00:00:00");
+            patientListRequest.setDATEEND("2020-04-08 00:00:00");
+            PatientListResponse patientListResponse = aPatientListFacade.getPatientList(patientListRequest);
+
+            for (int i = 0; i < patientListResponse.getData().size(); i++) {
+
+                SYFNlRequest<DoctorAdviceRequest> request = new SYFNlRequest<>();
+                DoctorAdviceRequest doctorAdviceRequest = new DoctorAdviceRequest();
+                doctorAdviceRequest.setMrn(patientListResponse.getData().get(i).getMRN());
+                doctorAdviceRequest.setSeries(patientListResponse.getData().get(i).getSERIES());
+                request.setData(doctorAdviceRequest);
+
+                HttpApi<DoctorAdviceResponse> httpApi = new HttpApi<>();
+                String a = httpApi.doPost("http://192.1.5.162:8088/api/NlService/GetPATPDRUGLIST", request);
+
+                DoctorAdviceResponse doctorAdviceResponse = JSON.parseObject(a, DoctorAdviceResponse.class);
+
+                List<SYFDoctorAdvice> sYFDoctorAdviceList = doctorAdviceResponse.getData();
+                List<DoctorAdvice> doctorAdviceList = Lists.newLinkedList();
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+                for (int j = 0; j < sYFDoctorAdviceList.size(); j++) {
+                    DoctorAdvice doctorAdvice = new DoctorAdvice();
+                    doctorAdvice.setDoctorAdviceId(sYFDoctorAdviceList.get(j).getOrderno());
+                    doctorAdvice.setHospitalId(Long.parseLong("2"));
+                    doctorAdvice.setBehospitalCode(patientListResponse.getData().get(i).getMRN() + "_" + patientListResponse.getData().get(i).getSERIES());
+                    doctorAdvice.setOrderDoctorName(sYFDoctorAdviceList.get(j).getDr_name());
+                    doctorAdvice.setFrequency(sYFDoctorAdviceList.get(j).getFrequency_name());
+                    doctorAdvice.setDoctorAdviceType(sYFDoctorAdviceList.get(j).getOrdertype());
+                    doctorAdvice.setUsageNum(sYFDoctorAdviceList.get(j).getDosageday());
+                    doctorAdvice.setUsageUnit(sYFDoctorAdviceList.get(j).getSunit());
+                    doctorAdvice.setDose(sYFDoctorAdviceList.get(j).getDosage());
+                    doctorAdvice.setDoseUnit(sYFDoctorAdviceList.get(j).getSunit());
+                    doctorAdvice.setMedModeType(sYFDoctorAdviceList.get(j).getAdmission_name());
+                    doctorAdvice.setDaFrequency(sYFDoctorAdviceList.get(j).getFrequency());
+                    if (sYFDoctorAdviceList.get(j).getDatestart() != null && sYFDoctorAdviceList.get(j).getDatestart().length() > 0) {
+                        doctorAdvice.setDaStartDate(sdf.parse(sYFDoctorAdviceList.get(j).getDatestart()));
+                    }
+                    doctorAdvice.setDaItemName(sYFDoctorAdviceList.get(j).getDrname());
+                    doctorAdvice.setDaStatus(sYFDoctorAdviceList.get(j).getDoflag());
+                    if (sYFDoctorAdviceList.get(j).getDatestop() != null && sYFDoctorAdviceList.get(j).getDatestop().length() > 0) {
+                        doctorAdvice.setDaStopDate(sdf.parse(sYFDoctorAdviceList.get(j).getDatestop()));
+                    }
+                    doctorAdvice.setDaGroupNo(sYFDoctorAdviceList.get(j).getSetno());
+                    doctorAdvice.setDaPrescriptionType(sYFDoctorAdviceList.get(j).getOrderflag_name());
+                    doctorAdvice.setDoctorNotice(sYFDoctorAdviceList.get(j).getRemark());
+                    doctorAdvice.setDoctorId(sYFDoctorAdviceList.get(j).getDr());
+                    doctorAdvice.setDoctorName(sYFDoctorAdviceList.get(j).getDr_name());
+                    doctorAdviceList.add(doctorAdvice);
+                }
+
+                execute(doctorAdviceList);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
     }
 
     public void executeDoctorAdvicePast() {

+ 70 - 5
src/main/java/com/diagbot/facade/data/AHomeDiagnoseInfoFacade.java

@@ -1,9 +1,16 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AHomeDiagnoseDTO;
 import com.diagbot.entity.HomeDiagnoseInfo;
+import com.diagbot.entity.shaoyifu.request.HomePageDiagnoseRequest;
+import com.diagbot.entity.shaoyifu.request.PatientListRequest;
+import com.diagbot.entity.shaoyifu.response.HomePageDiagnoseResponse;
+import com.diagbot.entity.shaoyifu.response.PatientListResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFNlRequest;
 import com.diagbot.service.impl.HomeDiagnoseInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.TZDBConn;
@@ -23,17 +30,75 @@ public class AHomeDiagnoseInfoFacade extends HomeDiagnoseInfoServiceImpl{
     @Qualifier("homeDiagnoseInfoServiceImpl")
     private HomeDiagnoseInfoServiceImpl homeDiagnoseInfoService;
 
+    @Autowired
+    private APatientListFacade aPatientListFacade;
+
     private TZDBConn tzDBConn = new TZDBConn();
 
     /**
      * 终末质控-定时同步病案首页诊断
      */
     public void executeHomeDiagnose() {
-        //String sql="select * from br_recdiagnose where BASYID in (select BASYID from br_rechome where cjcxrq>=dateadd(day,-2,getdate()) and cjcxrq<=getdate())";//今年的数据
-        //前一天的数据
-        String sql="select * from br_recdiagnose where BASYID in (select BASYID from br_rechome where cjcxrq>=(select CONVERT(varchar,GETDATE()-1,23)) and cjcxrq<(select CONVERT(varchar,GETDATE(),23)))";
-        List<HomeDiagnoseInfo> homeDiagnoseList = tzDBConn.getHomeDiagnose(sql);
-        execute(homeDiagnoseList);
+
+        try {
+            /*SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Calendar start = Calendar.getInstance();
+            start.setTime(new Date());
+            start.set(Calendar.DATE, start.get(Calendar.DATE) - 1);
+            start.set(Calendar.HOUR_OF_DAY, 0);
+            start.set(Calendar.MINUTE, 0);
+            start.set(Calendar.SECOND, 0);
+            Date startTime = start.getTime();
+            Calendar end = Calendar.getInstance();
+            end.setTime(new Date());
+            end.set(Calendar.DATE, end.get(Calendar.DATE));
+            end.set(Calendar.HOUR_OF_DAY, 0);
+            end.set(Calendar.MINUTE, 0);
+            end.set(Calendar.SECOND, 0);
+            Date endTime = end.getTime();*/
+
+            PatientListRequest patientListRequest = new PatientListRequest();
+            /*patientListRequest.setDATESTART(sdf.format(startTime));
+            patientListRequest.setDATEEND(sdf.format(endTime));*/
+            patientListRequest.setDATESTART("2020-04-01 00:00:00");
+            patientListRequest.setDATEEND("2020-04-08 00:00:00");
+            PatientListResponse patientListResponse = aPatientListFacade.getPatientList(patientListRequest);
+
+            for (int i = 0; i < patientListResponse.getData().size(); i++) {
+
+                SYFNlRequest<HomePageDiagnoseRequest> request = new SYFNlRequest<>();
+                HomePageDiagnoseRequest homePageDiagnoseRequest = new HomePageDiagnoseRequest();
+                homePageDiagnoseRequest.setRdn(patientListResponse.getData().get(i).getRDN());
+                request.setData(homePageDiagnoseRequest);
+
+                HttpApi<HomePageDiagnoseResponse> httpApi = new HttpApi<>();
+                String a = httpApi.doPost("http://192.1.5.162:8088/api/NlService/GetPDIAGNOSELIST", request);
+                HomePageDiagnoseResponse homePageDiagnoseResponse = JSON.parseObject(a, HomePageDiagnoseResponse.class);
+
+                List<HomeDiagnoseInfo> homeDiagnoseList = Lists.newLinkedList();
+                for (int j = 0; j < homePageDiagnoseResponse.getData().size(); j++) {
+
+                    HomeDiagnoseInfo homeDiagnoseInfo = new HomeDiagnoseInfo();
+                    homeDiagnoseInfo.setHomePageId(patientListResponse.getData().get(i).getRDN());
+                    homeDiagnoseInfo.setHospitalId(Long.parseLong("2"));
+                    homeDiagnoseInfo.setDiagnoseOrderNo(homePageDiagnoseResponse.getData().get(j).getRdn());
+                    homeDiagnoseInfo.setDiagnoseType(homePageDiagnoseResponse.getData().get(j).getPrimaryflag());
+                    homeDiagnoseInfo.setDiagnoseTypeShort(homePageDiagnoseResponse.getData().get(j).getPrimaryflag());
+                    homeDiagnoseInfo.setDiagnoseName(homePageDiagnoseResponse.getData().get(j).getDiagnose());
+                    homeDiagnoseInfo.setBehospitalType(homePageDiagnoseResponse.getData().get(j).getDcondi());
+                    homeDiagnoseInfo.setIcdCode(homePageDiagnoseResponse.getData().get(j).getDiagnosecodep());
+
+                    homeDiagnoseList.add(homeDiagnoseInfo);
+
+                    execute(homeDiagnoseList);
+
+                }
+
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
     }
 
     /**

+ 78 - 5
src/main/java/com/diagbot/facade/data/AHomeOperationInfoFacade.java

@@ -1,8 +1,15 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.data.AHomeOperationDTO;
 import com.diagbot.entity.HomeOperationInfo;
+import com.diagbot.entity.shaoyifu.request.HomePageOperationRequest;
+import com.diagbot.entity.shaoyifu.request.PatientListRequest;
+import com.diagbot.entity.shaoyifu.response.HomePageOperationResponse;
+import com.diagbot.entity.shaoyifu.response.PatientListResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFNlRequest;
 import com.diagbot.service.impl.HomeOperationInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
@@ -13,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 
@@ -23,17 +31,82 @@ public class AHomeOperationInfoFacade extends HomeOperationInfoServiceImpl{
     @Qualifier("homeOperationInfoServiceImpl")
     private HomeOperationInfoServiceImpl homeOperationInfoService;
 
+    @Autowired
+    private APatientListFacade aPatientListFacade;
+
     private TZDBConn tzDBConn = new TZDBConn();
 
     /**
      * 终末质控-同步前一天数据
      */
     public void executeHomeOperation() {
-        //String sql="select * from br_recoperation where cjcxrq>=dateadd(day,-2,getdate()) and cjcxrq<=getdate()";
-        //前一天数据
-        String sql="select * from br_recoperation where cjcxrq>=(select CONVERT(varchar,GETDATE()-2,23)) and cjcxrq<(select CONVERT(varchar,GETDATE(),23))";
-        List<HomeOperationInfo> homeOperationList = tzDBConn.getHomeOperation(sql);
-        execute(homeOperationList);
+
+        try {
+
+            /*SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Calendar start = Calendar.getInstance();
+            start.setTime(new Date());
+            start.set(Calendar.DATE, start.get(Calendar.DATE) - 1);
+            start.set(Calendar.HOUR_OF_DAY, 0);
+            start.set(Calendar.MINUTE, 0);
+            start.set(Calendar.SECOND, 0);
+            Date startTime = start.getTime();
+            Calendar end = Calendar.getInstance();
+            end.setTime(new Date());
+            end.set(Calendar.DATE, end.get(Calendar.DATE));
+            end.set(Calendar.HOUR_OF_DAY, 0);
+            end.set(Calendar.MINUTE, 0);
+            end.set(Calendar.SECOND, 0);
+            Date endTime = end.getTime();*/
+
+            PatientListRequest patientListRequest = new PatientListRequest();
+            /*patientListRequest.setDATESTART(sdf.format(startTime));
+            patientListRequest.setDATEEND(sdf.format(endTime));*/
+            patientListRequest.setDATESTART("2020-04-01 00:00:00");
+            patientListRequest.setDATEEND("2020-04-08 00:00:00");
+            PatientListResponse patientListResponse = aPatientListFacade.getPatientList(patientListRequest);
+
+            for (int i = 0; i < patientListResponse.getData().size(); i++) {
+
+                SYFNlRequest<HomePageOperationRequest> request = new SYFNlRequest<>();
+                HomePageOperationRequest homePageOperationRequest = new HomePageOperationRequest();
+                homePageOperationRequest.setRdn(patientListResponse.getData().get(i).getRDN());
+                request.setData(homePageOperationRequest);
+
+                HttpApi<HomePageOperationResponse> httpApi = new HttpApi<>();
+                String a = httpApi.doPost("http://192.1.5.162:8088/api/NlService/GetOPERLIST", request);
+                HomePageOperationResponse homePageOperationResponse = JSON.parseObject(a, HomePageOperationResponse.class);
+
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+                List<HomeOperationInfo> homeOperationList = Lists.newLinkedList();
+                for (int j = 0; j < homePageOperationResponse.getData().size(); j++) {
+
+                    HomeOperationInfo homeOperationInfo = new HomeOperationInfo();
+                    homeOperationInfo.setHomePageId(patientListResponse.getData().get(i).getRDN());
+                    homeOperationInfo.setHospitalId(Long.parseLong("2"));
+                    if (homePageOperationResponse.getData().get(j).getPlandate() != null && homePageOperationResponse.getData().get(j).getPlandate().length() > 0) {
+                        homeOperationInfo.setOperationDate(sdf.parse(homePageOperationResponse.getData().get(j).getPlandate()));
+                    }
+                    homeOperationInfo.setOperationCode(homePageOperationResponse.getData().get(j).getOperpcode());
+                    homeOperationInfo.setOperationName(homePageOperationResponse.getData().get(j).getOperp());
+                    homeOperationInfo.setOperationDoctorId(homePageOperationResponse.getData().get(j).getDrp());
+                    homeOperationInfo.setFirstAssistantId(homePageOperationResponse.getData().get(j).getDrs());
+                    homeOperationInfo.setSecondAssistantId(homePageOperationResponse.getData().get(j).getDrt());
+                    homeOperationInfo.setHealingLevel(homePageOperationResponse.getData().get(j).getWound());
+                    homeOperationInfo.setOperationLevel(homePageOperationResponse.getData().get(j).getOpslevel());
+                    homeOperationInfo.setAnaesthesiaName(homePageOperationResponse.getData().get(j).getAneask());
+
+                    homeOperationList.add(homeOperationInfo);
+
+                    execute(homeOperationList);
+
+                }
+
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
     }
 
     /**

+ 215 - 13
src/main/java/com/diagbot/facade/data/AHomePageFacade.java

@@ -1,10 +1,17 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.AnalyzeRunDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AHomePageDTO;
 import com.diagbot.entity.HomePage;
+import com.diagbot.entity.shaoyifu.request.HomePageRequest;
+import com.diagbot.entity.shaoyifu.request.PatientListRequest;
+import com.diagbot.entity.shaoyifu.response.HomePageResponse;
+import com.diagbot.entity.shaoyifu.response.PatientListResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFNlRequest;
 import com.diagbot.facade.BehospitalInfoFacade;
 import com.diagbot.service.impl.HomePageServiceImpl;
 import com.diagbot.util.BeanUtil;
@@ -21,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -45,6 +53,9 @@ public class AHomePageFacade extends HomePageServiceImpl{
     @Autowired
     private ReadProperties readProperties;
 
+    @Autowired
+    private APatientListFacade aPatientListFacade;
+
     private TZDBConn tzDBConn = new TZDBConn();
 
     /*public static void main(String[] args){
@@ -63,20 +74,211 @@ public class AHomePageFacade extends HomePageServiceImpl{
      * 同步前一天病案首页
      */
     public void executeHomePage() {
-        //String sql="select * from br_rechome where cjcxrq>=dateadd(day,-2,getdate()) and cjcxrq<=getdate()";
-        //同步前一天的数据
-        String sql="select * from br_rechome where cjcxrq>=(select CONVERT(varchar,GETDATE()-2,23)) and cjcxrq<(select CONVERT(varchar,GETDATE(),23))";
-        List<HomePage> homePageList = tzDBConn.getHomePage(sql);
-        /*
-        int mod=Math.floorMod(homePageList.size(),500);
-        int div=Math.floorDiv(homePageList.size(),500);
-        for (int i = 0; i <= homePageList.size(); i++) {
-            System.out.println((i-1)*500+"---"+(i*500));
-            homePageList=homePageList.subList((i*500),(i+1)*500);
-            execute(homePageList);
+        try {
+            /*SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Calendar start = Calendar.getInstance();
+            start.setTime(new Date());
+            start.set(Calendar.DATE, start.get(Calendar.DATE) - 1);
+            start.set(Calendar.HOUR_OF_DAY, 0);
+            start.set(Calendar.MINUTE, 0);
+            start.set(Calendar.SECOND, 0);
+            Date startTime = start.getTime();
+            Calendar end = Calendar.getInstance();
+            end.setTime(new Date());
+            end.set(Calendar.DATE, end.get(Calendar.DATE));
+            end.set(Calendar.HOUR_OF_DAY, 0);
+            end.set(Calendar.MINUTE, 0);
+            end.set(Calendar.SECOND, 0);
+            Date endTime = end.getTime();*/
+
+            PatientListRequest patientListRequest = new PatientListRequest();
+            /*patientListRequest.setDATESTART(sdf.format(startTime));
+            patientListRequest.setDATEEND(sdf.format(endTime));*/
+            patientListRequest.setDATESTART("2020-04-01 00:00:00");
+            patientListRequest.setDATEEND("2020-04-08 00:00:00");
+            PatientListResponse patientListResponse = aPatientListFacade.getPatientList(patientListRequest);
+
+            for (int i = 0; i < patientListResponse.getData().size(); i++) {
+
+                SYFNlRequest<HomePageRequest> request = new SYFNlRequest<>();
+                HomePageRequest homePageRequest = new HomePageRequest();
+                homePageRequest.setRdn(patientListResponse.getData().get(i).getRDN());
+                request.setData(homePageRequest);
+
+                HttpApi<HomePageResponse> httpApi = new HttpApi<>();
+                String a = httpApi.doPost("http://192.1.5.162:8088/api/NlService/GetEMRFIRST", request);
+                HomePageResponse homePageResponse = JSON.parseObject(a, HomePageResponse.class);
+
+                List<HomePage> homePageList = Lists.newLinkedList();
+                SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
+                SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/MM/dd HH");
+                SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
+                if (homePageResponse.getData() != null) {
+                    HomePage homePage = new HomePage();
+                    homePage.setHomePageId(homePageResponse.getData().getRdn());
+                    homePage.setHospitalId(Long.parseLong("2"));
+                    homePage.setBehospitalCode(patientListResponse.getData().get(i).getMRN() + "_" + patientListResponse.getData().get(i).getSERIES());
+                    homePage.setHospitalCode("A001");
+                    homePage.setHospitalName("邵逸夫");
+                    homePage.setOrgCode("A001");
+                    homePage.setPayType(homePageResponse.getData().getChargetype());
+                    homePage.setHealthCard(homePageResponse.getData().getHealthcard());
+                    homePage.setBehospitalNum(homePageResponse.getData().getSeries());
+                    homePage.setFileCode(homePageResponse.getData().getMrn());
+                    homePage.setName(homePageResponse.getData().getPname());
+                    switch (homePageResponse.getData().getPsex()) {
+                        case "男":
+                            homePage.setSex("男");
+                            break;
+                        case "女":
+                            homePage.setSex("女");
+                            break;
+                        case "M":
+                            homePage.setSex("男");
+                            break;
+                        case "F":
+                            homePage.setSex("女");
+                            break;
+                        case "?":
+                            homePage.setSex("");
+                            break;
+                        case "B":
+                            homePage.setSex("");
+                            break;
+                    }
+                    if (homePageResponse.getData().getPbirthday() != null && homePageResponse.getData().getPbirthday().length() > 0) {
+                        homePage.setBirthday(sdf1.parse(homePageResponse.getData().getPbirthday()));
+                    }
+                    homePage.setAge(homePageResponse.getData().getAge());
+                    homePage.setAgeUnit(homePageResponse.getData().getAgeunit());
+                    homePage.setNationality(homePageResponse.getData().getCitizenship());
+                    homePage.setNewbornMonth(homePageResponse.getData().getBabyage_month());
+                    homePage.setNewbornWeight(homePageResponse.getData().getBaby_weight());
+                    homePage.setNewbornBehospitalWeight(homePageResponse.getData().getBaby_inhosweight());
+                    homePage.setBornAddress((homePageResponse.getData().getBornadress_province() == null ? "" : homePageResponse.getData().getBornadress_province()) + (homePageResponse.getData().getBornadress_city() == null ? "" : homePageResponse.getData().getBornadress_city()) + (homePageResponse.getData().getBornadress_county() == null ? "" : homePageResponse.getData().getBornadress_county()));
+                    homePage.setBornPlace((homePageResponse.getData().getHometown_province() == null ? "" : homePageResponse.getData().getHometown_province()) + (homePageResponse.getData().getHometown_city() == null ? "" : homePageResponse.getData().getHometown_city()));
+                    homePage.setNation(homePageResponse.getData().getNation());
+                    homePage.setIdentityCardNo(homePageResponse.getData().getIcd());
+                    homePage.setJobType(homePageResponse.getData().getOccupation());
+                    homePage.setMarriage(homePageResponse.getData().getMarital_status());
+                    homePage.setCurAddress((homePageResponse.getData().getNowadress_province() == null ? "" : homePageResponse.getData().getNowadress_province()) + (homePageResponse.getData().getNowadress_city() == null ? "" : homePageResponse.getData().getNowadress_city()) + (homePageResponse.getData().getNowadress_county() == null ? "" : homePageResponse.getData().getNowadress_county()));
+                    homePage.setCurPhone(homePageResponse.getData().getTelephone());
+                    homePage.setCurPostCode(homePageResponse.getData().getNowadress_postcode());
+                    homePage.setResidenceAddress((homePageResponse.getData().getCensus_province() == null ? "" : homePageResponse.getData().getCensus_province()) + (homePageResponse.getData().getCensus_city() == null ? "" : homePageResponse.getData().getCensus_city()) + (homePageResponse.getData().getCensus_county() == null ? "" : homePageResponse.getData().getCensus_county()));
+                    homePage.setResidencePostCode(homePageResponse.getData().getCensus_postcode());
+                    homePage.setWorkAddress(homePageResponse.getData().getWork_adress());
+                    homePage.setWorkPhone(homePageResponse.getData().getWork_phone());
+                    homePage.setWorkPostCode(homePageResponse.getData().getWork_postcode());
+                    homePage.setContactName(homePageResponse.getData().getConcatperson());
+                    homePage.setContactRelation(homePageResponse.getData().getConcatperson_relation());
+                    homePage.setContactAddress(homePageResponse.getData().getConcatperson_adress());
+                    homePage.setContactPhone(homePageResponse.getData().getConcatperson_phone());
+                    homePage.setBehospitalWay(homePageResponse.getData().getInhos_way());
+                    if (homePageResponse.getData().getAdmid() != null && homePageResponse.getData().getAdmid().length() > 0) {
+                        if (homePageResponse.getData().getAdmid().indexOf("-") != -1) {
+                            homePage.setBehospitalDate(sdf3.parse(homePageResponse.getData().getAdmid()));
+                        } else if (homePageResponse.getData().getAdmid().indexOf("/") != -1) {
+                            homePage.setBehospitalDate(sdf2.parse(homePageResponse.getData().getAdmid()));
+                        }
+                    }
+                    homePage.setBehospitalWard(homePageResponse.getData().getInhosward());
+                    homePage.setBehospitalBedCode(homePageResponse.getData().getBedid_in());
+                    homePage.setChangeDept(homePageResponse.getData().getTransferdept());
+                    if (homePageResponse.getData().getDiscd() != null && homePageResponse.getData().getDiscd().length() > 0) {
+                        if (homePageResponse.getData().getDiscd().indexOf("-") != -1) {
+                            homePage.setLeaveHospitalDate(sdf3.parse(homePageResponse.getData().getDiscd()));
+                        } else if (homePageResponse.getData().getDiscd().indexOf("/") != -1) {
+                            homePage.setLeaveHospitalDate(sdf2.parse(homePageResponse.getData().getDiscd()));
+                        }
+
+                    }
+                    homePage.setLeaveHospitalDept(homePageResponse.getData().getOuthosdept());
+                    homePage.setLeaveHospitalWard(homePageResponse.getData().getOuthosward());
+                    homePage.setBehospitalDayNum(homePageResponse.getData().getInhosday());
+                    homePage.setOutpatientEmrDiagnose(homePageResponse.getData().getOutpatientEmrDiagnose());
+                    homePage.setOutpatientEmrDiagnoseCode(homePageResponse.getData().getOutpatientEmrDiagnoseCode());
+                    homePage.setPoisonFactor(homePageResponse.getData().getPoisonFactor());
+                    homePage.setPoisonFactorCode(homePageResponse.getData().getPoisonFactorCode());
+                    homePage.setPathologyDiagnoseId(homePageResponse.getData().getPathology_number());
+                    homePage.setMedAllergyName(homePageResponse.getData().getDrug_allergy());
+                    homePage.setAutopsy(homePageResponse.getData().getAutopsy());
+                    homePage.setBloodType(homePageResponse.getData().getBloodtype());
+                    homePage.setRh(homePageResponse.getData().getRh());
+                    homePage.setDeptDirector(homePageResponse.getData().getChief_doctor());
+                    homePage.setDirectorDoctor(homePageResponse.getData().getChief_doctor());
+                    homePage.setAttendingDoctor(homePageResponse.getData().getAttend_doctor());
+                    homePage.setBehospitalDoctor(homePageResponse.getData().getResident_doctor());
+                    homePage.setResponseNurse(homePageResponse.getData().getCharge_nurse());
+                    homePage.setStudyDoctor(homePageResponse.getData().getPhysician_doctor());
+                    homePage.setPracticeDoctor(homePageResponse.getData().getTrainee_doctor());
+                    homePage.setEncodeMan(homePageResponse.getData().getCoder());
+                    homePage.setHomePageQuality(homePageResponse.getData().getMedical_quality());
+                    homePage.setQcDoctor(homePageResponse.getData().getQc_doctor());
+                    homePage.setQcNurse(homePageResponse.getData().getQc_nurse());
+                    if (homePageResponse.getData().getQc_date() != null && homePageResponse.getData().getQc_date().length() > 0) {
+                        homePage.setQcDate(sdf1.parse(homePageResponse.getData().getQc_date()));
+                    }
+                    homePage.setLeaveHospitalType(homePageResponse.getData().getLeavehos_type());
+                    homePage.setAcceptOrgCode(homePageResponse.getData().getAcceptOrgCode());
+                    homePage.setAgainBehospitalPlan(homePageResponse.getData().getAgaininhosplan());
+                    homePage.setAgainBehospitalGoal(homePageResponse.getData().getAgainBehospitalGoal());
+                    homePage.setTbiBeforeDay(homePageResponse.getData().getBraininjurybefore_day());
+                    homePage.setTbiBeforeHour(homePageResponse.getData().getBraininjurybefore_hour());
+                    homePage.setTbiBeforeMinute(homePageResponse.getData().getBraininjurybefore_minute());
+                    homePage.setTbiAfterDay(homePageResponse.getData().getBraininjuryafter_day());
+                    homePage.setTbiAfterHour(homePageResponse.getData().getBraininjuryafter_hour());
+                    homePage.setTbiAfterMinute(homePageResponse.getData().getBraininjuryafter_minute());
+                    homePage.setTotalFee(homePageResponse.getData().getTotalcost());
+                    homePage.setOwnFee(homePageResponse.getData().getOwnpaycost());
+                    homePage.setGeneralFee(homePageResponse.getData().getGeneralcost_medicalservice());
+                    homePage.setServiceFee(homePageResponse.getData().getTreatcost_medicalservice());
+                    homePage.setNurseFee(homePageResponse.getData().getNursecost_medicalservice());
+                    homePage.setOtherFee(homePageResponse.getData().getOthercost_medicalservice());
+                    homePage.setPathologyFee(homePageResponse.getData().getBlcost_diagnosis());
+                    homePage.setLabFee(homePageResponse.getData().getLabcost_diagnosis());
+                    homePage.setPacsFee(homePageResponse.getData().getExamcost_diagnosis());
+                    homePage.setClinicDiagnoseFee(homePageResponse.getData().getClinicalcost_diagnosis());
+                    homePage.setNotOperationFee(homePageResponse.getData().getNoopscost_treat());
+                    homePage.setClinicPhysicFee(homePageResponse.getData().getClinicalcost_treat());
+                    homePage.setOperationTreatFee(homePageResponse.getData().getOpscost_treat());
+                    homePage.setAnaesthesiaFee(homePageResponse.getData().getAnesthesiacost_treat());
+                    homePage.setOperationFee(homePageResponse.getData().getSurgicacost_trear());
+                    homePage.setHealthTypeFee(homePageResponse.getData().getKfcost());
+                    homePage.setChnTreatFee(homePageResponse.getData().getCmtreatcost());
+                    homePage.setWesternMedFee(homePageResponse.getData().getWmmedicine());
+                    homePage.setAntibiosisFee(homePageResponse.getData().getAntibacterial());
+                    homePage.setChnMedFee(homePageResponse.getData().getMedicine_cpm());
+                    homePage.setChnHerbFee(homePageResponse.getData().getMedicine_chm());
+                    homePage.setBloodFee(homePageResponse.getData().getBloodcost());
+                    homePage.setAlbumenFee(homePageResponse.getData().getProductcost_bdb());
+                    homePage.setGlobulinFee(homePageResponse.getData().getProductcost_qdb());
+                    homePage.setBloodFactorFee(homePageResponse.getData().getProductcost_nxyz());
+                    homePage.setCellFactorFee(homePageResponse.getData().getProductcost_xbyz());
+                    homePage.setCheckMaterialFee(homePageResponse.getData().getConsumables_exam());
+                    homePage.setTreatMaterialFee(homePageResponse.getData().getConsumables_treat());
+                    homePage.setOperationMaterialFee(homePageResponse.getData().getConsumables_ops());
+                    homePage.setOtherTypeFee(homePageResponse.getData().getOthercost());
+                    homePage.setSingleDiagManage(homePageResponse.getData().getSingleDiagManage());
+                    homePage.setClinicPathwayManage(homePageResponse.getData().getClinicPathwayManage());
+                    homePage.setIsOutpatientBehospital(homePageResponse.getData().getIsOutpatientBehospital());
+                    homePage.setIsLeaveBehospital(homePageResponse.getData().getIsLeaveBehospital());
+                    homePage.setIsOperationBeforeAfter(homePageResponse.getData().getIsOperationBeforeAfter());
+                    homePage.setIsClinicPathology(homePageResponse.getData().getIsClinicPathology());
+                    homePage.setIsRadiatePathology(homePageResponse.getData().getIsRadiatePathology());
+                    homePage.setRescueNum(homePageResponse.getData().getRescueNum());
+                    homePage.setRescueSuccessNum(homePageResponse.getData().getRescueSuccessNum());
+                    homePage.setIsAutoLeavehospital(homePageResponse.getData().getIsAutoLeavehospital());
+                    homePage.setReturnToType(homePageResponse.getData().getReturnToType());
+                    homePage.setPathologyDiagnoseCode(homePageResponse.getData().getPathologyDiagnoseCode());
+                    homePageList.add(homePage);
+
+                    execute(homePageList);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
         }
-        */
-        execute(homePageList);
+
     }
 
     /**

+ 56 - 18
src/main/java/com/diagbot/facade/data/AMedRecordTypeFacade.java

@@ -1,9 +1,16 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AMedicalRecordTypeDTO;
 import com.diagbot.entity.MedRecordType;
+import com.diagbot.entity.shaoyifu.entity.SYFMedicalRecordType;
+import com.diagbot.entity.shaoyifu.request.MRTypeRequest;
+import com.diagbot.entity.shaoyifu.response.MRTypeResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFNlRequest;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.service.impl.MedRecordTypeServiceImpl;
 import com.diagbot.util.BeanUtil;
@@ -30,40 +37,71 @@ public class AMedRecordTypeFacade extends MedRecordTypeServiceImpl {
      * 终末质控-同步前一天变更的模板类型
      */
     public void executeMRType() {
-        //String sql="select * from ar_medirecclass where SFZFPB='1'";
-        String sql="select * from ar_medirecclass where SFZFPB='1' and cjcxrq>=(select CONVERT(varchar,GETDATE()-2,23)) and cjcxrq<(select CONVERT(varchar,GETDATE(),23))";
-        List<MedRecordType> medRecordTypeList = tzDBConn.getMedicalRecordType(sql);
-        execute(medRecordTypeList);
+
+        try {
+            SYFNlRequest<MRTypeRequest> request = new SYFNlRequest<>();
+            MRTypeRequest mRTypeRequest = new MRTypeRequest();
+            request.setData(mRTypeRequest);
+
+            HttpApi<MRTypeResponse> api = new HttpApi<>();
+            System.out.println(JSONObject.toJSONString(request));
+
+            String a = api.doPost("http://192.1.5.162:8088/api/NlService/getEmrMbList", request);
+            System.out.println(a);
+            MRTypeResponse response = JSON.parseObject(a, MRTypeResponse.class);
+            if (response.getResult().equals("1") && response.getData() != null) {
+                List<SYFMedicalRecordType> sYFMedicalRecordTypeList = response.getData();
+                List<MedRecordType> medRecordTypeList = Lists.newLinkedList();
+                for (int i = 0; i < sYFMedicalRecordTypeList.size(); i++) {
+                    MedRecordType medRecordType = new MedRecordType();
+                    medRecordType.setHospitalId(Long.parseLong("2"));
+                    medRecordType.setTypeName(sYFMedicalRecordTypeList.get(i).getMBMC());
+                    medRecordType.setTypeId(sYFMedicalRecordTypeList.get(i).getMODELID());
+                    medRecordType.setParentTypeId(sYFMedicalRecordTypeList.get(i).getPRTYPE());
+                    /*medRecordType.setObjName(sYFMedicalRecordTypeList.get(i).getPRTYPE_NAME());
+                    medRecordType.setSpell(sYFMedicalRecordTypeList.get(i).getWSID_NAME());
+                    medRecordType.setRemark(sYFMedicalRecordTypeList.get(i).getUSEFLAG());*/
+                    medRecordTypeList.add(medRecordType);
+                }
+                execute(medRecordTypeList);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
     }
+
     /**
      * 数据引擎-通过接口更新病人住院记录信息
+     *
      * @param list
      * @return
      */
     public RespDTO<List<AMedicalRecordTypeDTO>> executeMRType(List<AMedicalRecordTypeVO> list) {
-        if(list!=null && list.size()>0){
+        if (list != null && list.size() > 0) {
             //循环验证数据有效性
-            for (AMedicalRecordTypeVO medRecordType:list) {
-                if("".equals(medRecordType.getTypeId())) {
+            for (AMedicalRecordTypeVO medRecordType : list) {
+                if ("".equals(medRecordType.getTypeId())) {
                     return RespDTO.onError("请输入文书类型编码!");
-                }else if(medRecordType.getHospitalId()==null){
+                } else if (medRecordType.getHospitalId() == null) {
                     return RespDTO.onError("请输入医院编码!");
-                }else if("".equals(medRecordType.getTypeName())){
+                } else if ("".equals(medRecordType.getTypeName())) {
                     return RespDTO.onError("请文书类型名称!");
                 }
             }
-            List<MedRecordType> medRecordTypeList=Lists.newArrayList();
-            List<AMedicalRecordTypeDTO> medRecordTypeDtoList=Lists.newArrayList();
-            medRecordTypeList=BeanUtil.listCopyTo(list,MedRecordType.class);
-            medRecordTypeDtoList=BeanUtil.listCopyTo(list,AMedicalRecordTypeDTO.class);
+            List<MedRecordType> medRecordTypeList = Lists.newArrayList();
+            List<AMedicalRecordTypeDTO> medRecordTypeDtoList = Lists.newArrayList();
+            medRecordTypeList = BeanUtil.listCopyTo(list, MedRecordType.class);
+            medRecordTypeDtoList = BeanUtil.listCopyTo(list, AMedicalRecordTypeDTO.class);
             execute(medRecordTypeList);
             return RespDTO.onSuc(medRecordTypeDtoList);
-        }else{
+        } else {
             return RespDTO.onError("未接收到数据!");
         }
     }
 
-    public void execute(List<MedRecordType> medRecordTypeList){
+    public void execute(List<MedRecordType> medRecordTypeList) {
         List<MedRecordType> addE = Lists.newLinkedList();
         List<MedRecordType> updateE = Lists.newLinkedList();
         if (medRecordTypeList != null && medRecordTypeList.size() != 0) {
@@ -71,7 +109,7 @@ public class AMedRecordTypeFacade extends MedRecordTypeServiceImpl {
                 MedRecordType mrType = this.getOne(new QueryWrapper<MedRecordType>()
                         .eq("type_id", s.getTypeId())
                         .eq("hospital_id", s.getHospitalId())
-                        .eq("is_deleted",IsDeleteEnum.N), false);
+                        .eq("is_deleted", IsDeleteEnum.N), false);
                 if (mrType != null) {
                     s.setGmtModified(new Date());
                     updateE.add(s);
@@ -81,10 +119,10 @@ public class AMedRecordTypeFacade extends MedRecordTypeServiceImpl {
                 }
             });
         }
-        if(addE.size()>0){
+        if (addE.size() > 0) {
             medRecordTypeService.saveBatch(addE);
         }
-        if(updateE.size()>0){
+        if (updateE.size() > 0) {
             medRecordTypeService.updateBatchByKey(updateE);
         }
     }

+ 89 - 4
src/main/java/com/diagbot/facade/data/AMedicalRecordContentFacade.java

@@ -1,9 +1,19 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AMedicalRecordContentDTO;
+import com.diagbot.entity.MedicalRecord;
 import com.diagbot.entity.MedicalRecordContent;
+import com.diagbot.entity.QcModelHospital;
+import com.diagbot.entity.shaoyifu.entity.SYFMedicalRecord;
+import com.diagbot.entity.shaoyifu.request.MedicalRecordRequest;
+import com.diagbot.entity.shaoyifu.request.PatientListRequest;
+import com.diagbot.entity.shaoyifu.response.MedicalRecordResponse;
+import com.diagbot.entity.shaoyifu.response.PatientListResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFNlRequest;
 import com.diagbot.service.impl.MedicalRecordContentServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.TZDBConn;
@@ -13,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 @Component
@@ -22,16 +33,90 @@ public class AMedicalRecordContentFacade extends MedicalRecordContentServiceImpl
     @Autowired
     private MedicalRecordContentServiceImpl medicalRecordContentService;
 
+    @Autowired
+    private AMedicalRecordFacade aMedicalRecordFacade;
+
+    @Autowired
+    private APatientListFacade aPatientListFacade;
+
     private TZDBConn tzDBConn = new TZDBConn();
 
     /**
      * 终末质控-同步前一天的病历详细记录
      */
     public void executeMrRecordContent() {
-        //String sql="select * from mr_mrcontent  where cjcxrq>=dateadd(day,-2,getdate()) and cjcxrq<=getdate()";
-        String sql="select BLJLID,BLJLNR from mr_mrcontent  where cjcxrq>=(select CONVERT(varchar,GETDATE()-2,23)) and cjcxrq<(select CONVERT(varchar,GETDATE(),23)) ORDER BY cjcxrq DESC";
-        List<MedicalRecordContent> mrContentList = tzDBConn.getMedicalRecordContent(sql);
-        execute(mrContentList);
+
+        try {
+            /*SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Calendar start = Calendar.getInstance();
+            start.setTime(new Date());
+            start.set(Calendar.DATE, start.get(Calendar.DATE) - 1);
+            start.set(Calendar.HOUR_OF_DAY, 0);
+            start.set(Calendar.MINUTE, 0);
+            start.set(Calendar.SECOND, 0);
+            Date startTime = start.getTime();
+            Calendar end = Calendar.getInstance();
+            end.setTime(new Date());
+            end.set(Calendar.DATE, end.get(Calendar.DATE));
+            end.set(Calendar.HOUR_OF_DAY, 0);
+            end.set(Calendar.MINUTE, 0);
+            end.set(Calendar.SECOND, 0);
+            Date endTime = end.getTime();*/
+
+            PatientListRequest patientListRequest = new PatientListRequest();
+            /*patientListRequest.setDATESTART(sdf.format(startTime));
+            patientListRequest.setDATEEND(sdf.format(endTime));*/
+            patientListRequest.setDATESTART("2020-04-01 00:00:00");
+            patientListRequest.setDATEEND("2020-04-08 00:00:00");
+            PatientListResponse patientListResponse = aPatientListFacade.getPatientList(patientListRequest);
+
+            for (int i = 0; i < patientListResponse.getData().size(); i++) {
+                MedicalRecordRequest medicalRecordRequest = new MedicalRecordRequest();
+                medicalRecordRequest.setMRN(patientListResponse.getData().get(i).getMRN());
+                medicalRecordRequest.setSERIES(patientListResponse.getData().get(i).getSERIES());
+
+                HttpApi<MedicalRecordResponse> httpApi = new HttpApi<>();
+                SYFNlRequest<MedicalRecordRequest> request = new SYFNlRequest<>();
+                request.setData(medicalRecordRequest);
+
+                String a = httpApi.doPost("http://192.1.5.162:8088/api/NlService/getEmrWdList", request);
+                System.out.println(a);
+                MedicalRecordResponse medicalRecordResponse = JSON.parseObject(a, MedicalRecordResponse.class);
+
+                List<SYFMedicalRecord> syfMedicalRecordList = medicalRecordResponse.getData();
+
+                List<MedicalRecord> medicalRecordList = Lists.newLinkedList();
+                List<MedicalRecordContent> medicalRecordContentList = Lists.newLinkedList();
+                SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+                for (int j = 0; j < syfMedicalRecordList.size(); j++) {
+
+                    MedicalRecord medicalRecord = new MedicalRecord();
+                    medicalRecord.setBehospitalCode(syfMedicalRecordList.get(j).getZYLSH());
+                    medicalRecord.setHospitalId(Long.parseLong("2"));
+                    medicalRecord.setRecTypeId(syfMedicalRecordList.get(j).getMODELID());
+                    medicalRecord.setRecId(syfMedicalRecordList.get(j).getWDLSH());
+                    medicalRecord.setRecTitle(syfMedicalRecordList.get(j).getWSMC());
+                    if (syfMedicalRecordList.get(j).getLRRQ() != null && syfMedicalRecordList.get(j).getLRRQ().length() > 0) {
+                        medicalRecord.setRecDate(sdf1.parse(syfMedicalRecordList.get(j).getLRRQ()));
+                    }
+                    medicalRecordList.add(medicalRecord);
+
+                    MedicalRecordContent medicalRecordContent = new MedicalRecordContent();
+                    medicalRecordContent.setRecId(syfMedicalRecordList.get(j).getWDLSH());
+                    medicalRecordContent.setHospitalId(Long.parseLong("2"));
+                    medicalRecordContent.setHtmlText(syfMedicalRecordList.get(j).getBLNR());
+                    medicalRecordContent.setXmlText(syfMedicalRecordList.get(j).getXMLWD());
+                    medicalRecordContentList.add(medicalRecordContent);
+                }
+
+
+                execute(medicalRecordContentList);
+                aMedicalRecordFacade.execute(medicalRecordList);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
     }
 
     /**

+ 97 - 0
src/main/java/com/diagbot/facade/data/APatientListFacade.java

@@ -0,0 +1,97 @@
+package com.diagbot.facade.data;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.shaoyifu.entity.PatientInfo;
+import com.diagbot.entity.shaoyifu.entity.SYFPatientList;
+import com.diagbot.entity.shaoyifu.request.PatientListRequest;
+import com.diagbot.entity.shaoyifu.response.PatientListResponse;
+import com.diagbot.entity.shaoyifu.util.HttpApi;
+import com.diagbot.entity.shaoyifu.util.SYFNlRequest;
+import com.diagbot.service.impl.PatientInfoServiceImpl;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+
+@Component
+public class APatientListFacade extends PatientInfoServiceImpl{
+
+    @Autowired
+    @Qualifier("patientInfoServiceImpl")
+    private PatientInfoServiceImpl patientInfoServiceImpl;
+
+    /**
+     * 获取保存一段时间内归档的患者信息 已到六月二十二日
+     */
+    public PatientListResponse getPatientList1() {
+
+        PatientListRequest patientListRequest = new PatientListRequest();
+        patientListRequest.setDATESTART("2020-06-17 00:00:00");
+        patientListRequest.setDATEEND("2020-06-23 00:00:00");
+
+        SYFNlRequest<PatientListRequest> request = new SYFNlRequest<>();
+        request.setData(patientListRequest);
+        PatientListResponse response = null;
+        try {
+            HttpApi<SYFNlRequest<PatientListRequest>> httpApi = new HttpApi<>();
+            String a = httpApi.doPost("http://192.1.5.162:8088/api/NlService/getEmrMedrcfileList", request);
+            response = JSON.parseObject(a, PatientListResponse.class);
+            List<SYFPatientList> sYFPatientList = response.getData();
+            List<PatientInfo> patientList = Lists.newLinkedList();
+            if (sYFPatientList != null && sYFPatientList.size() > 0) {
+                for (int i = 0; i < sYFPatientList.size(); i++) {
+
+                    PatientInfo patientInfo = new PatientInfo();
+                    patientInfo.setBehospitalCode(sYFPatientList.get(i).getMRN() + "_" + sYFPatientList.get(i).getSERIES());
+                    patientInfo.setRdn(sYFPatientList.get(i).getRDN());
+                    patientInfo.setMrn(sYFPatientList.get(i).getMRN());
+                    patientInfo.setSeries(sYFPatientList.get(i).getSERIES());
+                    patientList.add(patientInfo);
+
+                }
+            }
+
+            patientList.stream().forEach(s -> {
+                QueryWrapper<PatientInfo> queryWrapper = new QueryWrapper<>();
+                queryWrapper.eq("behospital_code", (s.getBehospitalCode()));
+                PatientInfo patientInfo1 = patientInfoServiceImpl.getOne(queryWrapper);
+                if (patientInfo1 != null) {
+                    s.setGmtModified(new Date());
+                    patientInfoServiceImpl.updateById(s);
+                } else {
+                    s.setGmtCreate(new Date());
+                    patientInfoServiceImpl.save(s);
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return response;
+    }
+
+
+    /**
+     * 获取一段时间内归档的患者信息
+     */
+    public PatientListResponse getPatientList(PatientListRequest patientListRequest) {
+
+        SYFNlRequest<PatientListRequest> request = new SYFNlRequest<>();
+        request.setData(patientListRequest);
+        PatientListResponse response = null;
+        try {
+            HttpApi<SYFNlRequest<PatientListRequest>> httpApi = new HttpApi<>();
+            String a = httpApi.doPost("http://192.1.5.162:8088/api/NlService/getEmrMedrcfileList", request);
+            response = JSON.parseObject(a, PatientListResponse.class);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return response;
+    }
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/PatientInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.shaoyifu.entity.PatientInfo;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author lipc
+ * @since 2020-06-23
+ */
+public interface PatientInfoMapper extends BaseMapper<PatientInfo> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.shaoyifu.entity.PatientInfo;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author lipc
+ * @since 2020-06-23
+ */
+public interface PatientInfoService extends IService<PatientInfo> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.shaoyifu.entity.PatientInfo;
+import com.diagbot.mapper.PatientInfoMapper;
+import com.diagbot.service.PatientInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author lipc
+ * @since 2020-06-23
+ */
+@Service
+public class PatientInfoServiceImpl extends ServiceImpl<PatientInfoMapper, PatientInfo> implements PatientInfoService {
+
+}

+ 1 - 1
src/main/java/com/diagbot/task/BasDeptInfoTask.java

@@ -47,7 +47,7 @@ public class BasDeptInfoTask implements SchedulingConfigurer{
                         && task001.getIsDeleted().equals(IsDeleteEnum.N.getKey())
                         && task001.getIsUsed().equals(1)) {
                     log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
-                    //aBasDeptInfoFacade.executeDept();
+                    aBasDeptInfoFacade.executeDept();
                 }
             }
         }, new Trigger() {

+ 1 - 1
src/main/java/com/diagbot/task/BasDoctorInfoTask.java

@@ -46,7 +46,7 @@ public class BasDoctorInfoTask implements SchedulingConfigurer{
                         && task001.getIsDeleted().equals(IsDeleteEnum.N.getKey())
                         && task001.getIsUsed().equals(1)) {
                     log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
-                    //aBasDoctorInfoFacade.executeDoctor();
+                    aBasDoctorInfoFacade.executeDoctor();
                 }
             }
         }, new Trigger() {