Bläddra i källkod

Merge branch 'master' into TestConditionalOnProperty

xiaochan 7 månader sedan
förälder
incheckning
175df30342
45 ändrade filer med 1153 tillägg och 176 borttagningar
  1. 5 0
      pom.xml
  2. 0 1
      thyy-beinhospital/HELP.md
  3. 0 7
      thyy-emr-query/pom.xml
  4. 6 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/ThyyScheduledApplication.java
  5. 1 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/config/constant/Dpcc.java
  6. 66 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/dao/DpccDao.java
  7. 95 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyreq/JyIndexRequest.java
  8. 22 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/AntibioticItem.java
  9. 35 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyDetailBacterias.java
  10. 90 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyDetailItem.java
  11. 84 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyDetailOrder.java
  12. 12 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyDetailResponse.java
  13. 23 0
      thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyIndexResponse.java
  14. 71 51
      thyy-scheduled/src/main/java/org/thyy/scheduled/service/DpccService.java
  15. 5 5
      thyy-scheduled/src/main/java/org/thyy/scheduled/task/AccessTokenTask.java
  16. 5 5
      thyy-scheduled/src/main/java/org/thyy/scheduled/task/DpccUploadTask.java
  17. 27 1
      thyy-scheduled/src/main/resources/application-dev.yml
  18. 1 0
      thyy-scheduled/src/main/resources/application-prod.yml
  19. 2 1
      thyy-socket/src/main/java/org/thyy/socket/ThyySocketApplication.java
  20. 14 0
      thyy-socket/src/main/java/org/thyy/socket/service/Business.java
  21. 0 74
      thyy-socket/src/main/java/org/thyy/socket/service/Intergration.java
  22. 13 6
      thyy-socket/src/main/java/org/thyy/socket/service/IntergrationPlatform/IntergrationPlatform.java
  23. 27 4
      thyy-socket/src/main/java/org/thyy/socket/service/callnumber/HelpDeskScreen.java
  24. 10 4
      thyy-socket/src/main/java/org/thyy/socket/service/callnumber/RoomScreen.java
  25. 1 1
      thyy-socket/src/main/java/org/thyy/socket/service/callnumber/ScreenSession.java
  26. 2 3
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/ThyyThirdpartApiApplication.java
  27. 51 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/InspectionController.java
  28. 17 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/InspectionInterface.java
  29. 28 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/CardType.java
  30. 23 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/Category.java
  31. 15 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/InspectionApi.java
  32. 33 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/PatientNumType.java
  33. 6 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/ResponseMode.java
  34. 67 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/inspectionImpl/ThyyInspectionImpl.java
  35. 10 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/request/jy/ReportDetailInquiry.java
  36. 15 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/request/jy/ReportIndexInquiry.java
  37. 22 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/AntibioticItem.java
  38. 35 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyDetailBacterias.java
  39. 90 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyDetailItem.java
  40. 84 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyDetailOrder.java
  41. 12 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyDetailResponse.java
  42. 23 0
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyIndexResponse.java
  43. 1 11
      thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/tts/TtsController.java
  44. 3 1
      thyy-thirdpart-api/src/main/resources/application.yml
  45. 1 1
      thyy-utils/src/main/java/org/thyy/utils/config/RestTemplateConfig.java

+ 5 - 0
pom.xml

@@ -75,6 +75,11 @@
             <groupId>com.microsoft.sqlserver</groupId>
             <artifactId>mssql-jdbc</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
+        </dependency>
+
     </dependencies>
 
     <dependencyManagement>

+ 0 - 1
thyy-beinhospital/HELP.md

@@ -1 +0,0 @@
-# 住院服务

+ 0 - 7
thyy-emr-query/pom.xml

@@ -49,13 +49,6 @@
             <groupId>org.thyy.business</groupId>
             <artifactId>thyy-utils</artifactId>
         </dependency>
-
-
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
-        </dependency>
-
         <dependency>
             <groupId>com.baomidou</groupId>
             <artifactId>dynamic-datasource-spring-boot3-starter</artifactId>

+ 6 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/ThyyScheduledApplication.java

@@ -1,9 +1,15 @@
 package org.thyy.scheduled;
 
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 @SpringBootApplication
+@ComponentScan("org.thyy.*")
+@MapperScan("org.thyy.scheduled.dao")
+@EnableScheduling
 public class ThyyScheduledApplication {
 
     public static void main(String[] args) {

+ 1 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/config/constant/Dpcc.java

@@ -15,4 +15,5 @@ public class Dpcc {
     private String tokenUrl;
     private String checkUrl;
     private String drugUrl;
+    private String jyApi;
 }

+ 66 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/dao/DpccDao.java

@@ -0,0 +1,66 @@
+package org.thyy.scheduled.dao;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.thyy.scheduled.entity.dpcc.MedicalPrescription;
+import org.thyy.scheduled.entity.dpcc.Patient;
+
+import java.util.List;
+
+@Mapper
+public interface DpccDao {
+    @Select("select " +
+            "rtrim(a.inpatient_no) as patNo,a.admiss_times as times, " +
+            "rtrim(b.social_no) as idCard,source='2' " +
+            "from zy_actpatient a,a_patient_mi b where a.zk_ward='1020700' " +
+            "and a.dpcc_upload_flag=0 and a.inpatient_no=b.inpatient_no")
+    List<Patient> getInpatientList();
+
+    @Select("select " +
+            "rtrim(a.patient_id) as patNo,a.times," +
+            "rtrim(b.social_no) as idCard,source='1' " +
+            "from mz_visit_table a,mz_patient_mi b where a.visit_dept_code='1020700' " +
+            "and a.dpcc_upload_flag=0 and datediff(day,a.visit_date,getdate())=0 " +
+            "and a.patient_id=b.patient_id")
+    List<Patient> getOutpatientList();
+
+    @Select("select " +
+            "patientNo=rtrim(b.inpatient_no), " +
+            "prescriptionNo=cast(cast (order_no as decimal) as varchar), " +
+            "hisDrugCode=rtrim(charge_code_mx), " +
+            "hisDrugName=(select top 1 rtrim(d.name) from yp_zd_dict d where d.code=a.charge_code_mx), " +
+            "hisDrugFrequencyCode=rtrim(b.frequ_code), " +
+            "hisDrugFrequencyName=rtrim(b.frequ_code), " +
+            "hisDrugUnit=(select rtrim(d.name) from yp_zd_unit d where d.code=b.dose_unit), " +
+            "hisDrugUsage=(select rtrim(d.supply_name) from yz_supply_type d where d.supply_code=b.supply_code), " +
+            "hisDrugDosage=b.dose, " +
+            "prescriptionTime=convert(varchar(19),a.charge_date,21), " +
+            "uniqueIndex=rtrim(b.inpatient_no)+'_'+cast(a.admiss_times as varchar)+'_'+cast(detail_sn as varchar), " +
+            "source='2',oecPrdesc=N'医嘱用药',isCydy='0' " +
+            "from zy_detail_charge a,yz_act_order b " +
+            "where a.inpatient_no=#{patNo} and a.admiss_times=#{times} " +
+            "and a.charge_code in ('BILL01','BILL02','BILL28') " +
+            "and a.charge_date<=getdate()" +
+            "and datediff(minute,a.charge_date,getdate())<=180 " +
+            "and a.order_no=b.act_order_no")
+    List<MedicalPrescription> getInpatientDrugs(Patient patient);
+
+    @Select("select " +
+            "patientNo=rtrim(a.patient_id), " +
+            "prescriptionNo=rtrim(a.patient_id) + '_' + cast(a.times as varchar) + '_1', " +
+            "hisDrugCode=rtrim(a.charge_item_code), " +
+            "hisDrugName=(select top 1 rtrim(d.name) from yp_zd_dict d where d.code=a.charge_item_code), " +
+            "hisDrugFrequencyCode=rtrim(a.frequency), " +
+            "hisDrugFrequencyName=rtrim(a.frequency), " +
+            "hisDrugUnit=(select rtrim(d.name) from yp_zd_unit d where d.code=a.drug_unit), " +
+            "hisDrugUsage=(select rtrim(d.supply_name) from yz_supply_type d where d.supply_code=a.supply_code), " +
+            "hisDrugDosage=a.quantity, " +
+            "prescriptionTime=convert(varchar(19),a.charge_date,21), " +
+            "uniqueIndex=rtrim(a.patient_id)+'_'+cast(a.times as varchar)+'_'+cast(receipt_no as varchar) " +
+            "+'_'+cast(a.order_no as varchar)+'_'+cast(item_no as varchar), " +
+            "source='1' " +
+            "from mz_charge_detail a " +
+            "where a.patient_id=#{patNo} and a.times=#{times} " +
+            "and a.group_no!='00' and a.pay_mark!='5' ")
+    List<MedicalPrescription> getOutpatientDrugs(Patient patient);
+}

+ 95 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyreq/JyIndexRequest.java

@@ -0,0 +1,95 @@
+package org.thyy.scheduled.entity.dpcc.jyreq;
+
+import lombok.Data;
+
+@Data
+public class JyIndexRequest {
+    /**
+     * 卡类型,枚举值。
+     * 值域:
+     * SocialSecurityCard = 国家社保卡
+     * HealthCard = 居民健康卡
+     * MedicalCard = 院内诊疗卡
+     * IDCard = 居民身份证
+     * Undefine = 未知(默认值)
+     * */
+    private String cardType;
+    private String cardNo;
+    /**
+     * 患者病历号类别(对应检验网的验单录入界面的病历号类型),枚举值。
+     * 值域:
+     * OutPatient = 门诊号
+     * InPatient = 住院号
+     * Lis = 验单号
+     * Pis = 体检号
+     * Marry = 婚检号
+     * None = 未知(默认值)
+     * */
+    private String patientNumType;
+    /**
+     * 对应 patientNumType 参数的具体号码
+     * */
+    private String patientNum;
+    /**
+     * 查询起始日期: yyyy-MM-dd
+     * */
+    private String startDate;
+    /**
+     * 查询截止日期: yyyy-MM-dd
+     * */
+    private String endDate;
+
+    public JyIndexRequest() {}
+
+    public JyIndexRequest(String cardType, String cardNo, String patientNumType, String patientNum, String startDate, String endDate) {
+        this.cardType = cardType;
+        this.cardNo = cardNo;
+        this.patientNumType = patientNumType;
+        this.patientNum = patientNum;
+        this.startDate = startDate;
+        this.endDate = endDate;
+    }
+
+    public static class Builder {
+        private String cardType = "Undefine";
+        private String cardNo = "";
+        private String patientNumType;
+        private String patientNum;
+        private String startDate;
+        private String endDate;
+
+        public Builder cardType(String cardType) {
+            this.cardType = cardType;
+            return this;
+        }
+
+        public Builder cardNo(String cardNo) {
+            this.cardNo = cardNo;
+            return this;
+        }
+
+        public Builder patientNumType(String patientNumType) {
+            this.patientNumType = patientNumType;
+            return this;
+        }
+
+        public Builder patientNum(String patientNum) {
+            this.patientNum = patientNum;
+            return this;
+        }
+
+        public Builder startDate(String startDate) {
+            this.startDate = startDate;
+            return this;
+        }
+
+        public Builder endDate(String endDate) {
+            this.endDate = endDate;
+            return this;
+        }
+
+        public JyIndexRequest build() {
+            return new JyIndexRequest(cardType, cardNo, patientNumType, patientNum, startDate, endDate);
+        }
+    }
+}

+ 22 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/AntibioticItem.java

@@ -0,0 +1,22 @@
+package org.thyy.scheduled.entity.dpcc.jyrs;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class AntibioticItem {
+    @JSONField(name = "anti_id")
+    private Integer antiId;
+    @JSONField(name = "anti_name_uk")
+    private String antiNameUk;
+    @JSONField(name = "anti_name_cn")
+    private String antiNameCn;
+    @JSONField(name = "anti_abb")
+    private String antiAbb;
+    @JSONField(name = "anti_mic")
+    private String antiMic;
+    @JSONField(name = "anti_value")
+    private String antiValue;
+    @JSONField(name = "anti_str")
+    private String antiStr;
+}

+ 35 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyDetailBacterias.java

@@ -0,0 +1,35 @@
+package org.thyy.scheduled.entity.dpcc.jyrs;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class JyDetailBacterias {
+    @JSONField(name = "itm_id")
+    private Integer itmId;
+    @JSONField(name = "itm_code")
+    private String itmCode;
+    @JSONField(name = "itm_name")
+    private String itmName;
+    @JSONField(name = "itm_ordr")
+    private Integer itmOrdr;
+    @JSONField(name = "rslt_strs")
+    private String rsltStrs;
+    @JSONField(name = "bac_id")
+    private Integer bacId;
+    @JSONField(name = "bac_name_uk")
+    private String bacNameUk;
+    @JSONField(name = "bac_name_cn")
+    private String bacNameCn;
+    @JSONField(name = "bac_abb")
+    private String bacAbb;
+    @JSONField(name = "iden_no")
+    private String idenNo;
+    @JSONField(name = "itm_calg")
+    private Integer itmCalg;
+    @JSONField(name = "test_mthd")
+    private Integer testMthd;
+    private List<AntibioticItem> antiList;
+}

+ 90 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyDetailItem.java

@@ -0,0 +1,90 @@
+package org.thyy.scheduled.entity.dpcc.jyrs;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class JyDetailItem {
+    @JSONField(name = "itm_id")
+    private Integer itmId;
+    @JSONField(name = "itm_code")
+    private String itmCode;
+    @JSONField(name = "itm_name")
+    private String itmName;
+    @JSONField(name = "itm_unit")
+    private String itmUnit;
+    @JSONField(name = "itm_ordr")
+    private Integer itmOrdr;
+    @JSONField(name = "itm_value")
+    private String itmValue;
+    @JSONField(name = "itm_src_value")
+    private String itmSrcValue;
+    @JSONField(name = "rslt_list_id")
+    private Integer rsltListId;
+    @JSONField(name = "rslt_id")
+    private Integer rsltId;
+    @JSONField(name = "rslt_strs")
+    private String rsltStrs;
+    @JSONField(name = "itm_str_value")
+    private String itmStrValue;
+    @JSONField(name = "itm_str_src_value")
+    private String itmStrSrcValue;
+    @JSONField(name = "res_type")
+    private Integer resType;
+    @JSONField(name = "item_src_flow_id")
+    private Long itemSrcFlowId;
+    @JSONField(name = "defl_rslt_id")
+    private Integer deflRsltId;
+    @JSONField(name = "rslt_name")
+    private String rsltName;
+    @JSONField(name = "range_low")
+    private String rangeLow;
+    @JSONField(name = "range_high")
+    private String rangeHigh;
+    @JSONField(name = "range")
+    private String range;
+    @JSONField(name = "range_rslt_id")
+    private Integer rangeRsltId;
+    @JSONField(name = "ran_ge_str")
+    private String ranGeStr;
+    @JSONField(name = "itm_alert")
+    private String itmAlert;
+    @JSONField(name = "critical_low")
+    private String criticalLow;
+    @JSONField(name = "critical_high")
+    private String criticalHigh;
+    @JSONField(name = "critical")
+    private String critical;
+    @JSONField(name = "critical_alert")
+    private String criticalAlert;
+    @JSONField(name = "calc_type")
+    private Integer calcType;
+    @JSONField(name = "calc_fomula")
+    private String calcFomula;
+    @JSONField(name = "calc_fomula_items")
+    private String calcFomulaItems;
+    @JSONField(name = "dec_bit")
+    private Integer decBit;
+    @JSONField(name = "is_null")
+    private Integer isNull;
+    @JSONField(name = "is_num")
+    private Integer isNum;
+    @JSONField(name = "prnt_grup")
+    private Integer prntGrup;
+    @JSONField(name = "other_flag_a")
+    private Integer otherFlagA;
+    @JSONField(name = "other_flag_b")
+    private Integer otherFlagB;
+    @JSONField(name = "other_flag_c")
+    private Integer otherFlagC;
+    @JSONField(name = "mthd_name")
+    private String mthdName;
+    @JSONField(name = "critical_exec_flag")
+    private Integer criticalExecFlag;
+    @JSONField(name = "critical_exec_info")
+    private String criticalExecInfo;
+    @JSONField(name = "critical_exec_time")
+    private String criticalExecTime;
+    @JSONField(name = "map_pis_code")
+    private String mapPisCode;
+}

+ 84 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyDetailOrder.java

@@ -0,0 +1,84 @@
+package org.thyy.scheduled.entity.dpcc.jyrs;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class JyDetailOrder {
+    @JSONField(name = "ordr_id")
+    private Integer ordrId;
+    @JSONField(name = "aply_date")
+    private String aplyDate;
+    @JSONField(name = "ordr_create_date")
+    private String ordrCreateDate;
+    @JSONField(name = "inspect_time")
+    private String inspectTime;
+    @JSONField(name = "sign_time")
+    private String signTime;
+    @JSONField(name = "ordr_date")
+    private String ordrDate;
+    @JSONField(name = "audt_time")
+    private String audtTime;
+    @JSONField(name = "prnt_status")
+    private Integer prntStatus;
+    @JSONField(name = "smpl_num")
+    private String smplNum;
+    @JSONField(name = "smpl_name")
+    private String smplName;
+    @JSONField(name = "aply_cntn")
+    private String aplyCntn;
+    @JSONField(name = "test_usr_id")
+    private Integer testUsrId;
+    @JSONField(name = "test_usr_name")
+    private String testUsrName;
+    @JSONField(name = "ordr_usr_id")
+    private Integer ordrUsrId;
+    @JSONField(name = "ordr_usr_name")
+    private String ordrUsrName;
+    @JSONField(name = "audt_usr_id")
+    private Integer audtUsrId;
+    @JSONField(name = "audt_usr_name")
+    private String audtUsrName;
+    @JSONField(name = "aply_flow_num")
+    private String aplyFlowNum;
+    @JSONField(name = "emcy_mrk")
+    private Integer emcyMrk;
+    @JSONField(name = "dept_name")
+    private String deptName;
+    @JSONField(name = "doc_name")
+    private String docName;
+    @JSONField(name = "id_card")
+    private String idCard;
+    @JSONField(name = "ic_card")
+    private String icCard;
+    @JSONField(name = "ptnt_no")
+    private String ptntNo;
+    @JSONField(name = "ptnt_no_type")
+    private Integer ptntNoType;
+    @JSONField(name = "ptnt_name")
+    private String ptntName;
+    @JSONField(name = "ptnt_sex")
+    private Integer ptntSex;
+    @JSONField(name = "ptnt_age_first")
+    private String ptntAgeFirst;
+    @JSONField(name = "ptnt_age_second")
+    private Integer ptntAgeSecond;
+    @JSONField(name = "ptnt_age")
+    private String ptntAge;
+    @JSONField(name = "ptnt_age_unit")
+    private Integer ptntAgeUnit;
+    @JSONField(name = "ptnt_bed_no")
+    private String ptntBedNo;
+    @JSONField(name = "diag_info")
+    private String diagInfo;
+    @JSONField(name = "ctat_addr")
+    private String ctatAddr;
+    @JSONField(name = "phone_num")
+    private String phoneNum;
+    @JSONField(name = "ordr_remark")
+    private String ordrRemark;
+    @JSONField(name = "sqnc_num")
+    private Integer sqncNum;
+    @JSONField(name = "dvce_name")
+    private String dvceName;
+}

+ 12 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyDetailResponse.java

@@ -0,0 +1,12 @@
+package org.thyy.scheduled.entity.dpcc.jyrs;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class JyDetailResponse {
+    private JyDetailOrder order;
+    private List<JyDetailItem> items;
+    private List<JyDetailBacterias> bacterias;
+}

+ 23 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/entity/dpcc/jyrs/JyIndexResponse.java

@@ -0,0 +1,23 @@
+package org.thyy.scheduled.entity.dpcc.jyrs;
+
+import lombok.Data;
+
+@Data
+public class JyIndexResponse {
+    private String reportId;
+    private String reportType;
+    private String icCard;
+    private String idCard;
+    private String patientNumType;
+    private String patientNum;
+    private String patientName;
+    private String patientGender;
+    private String patientAge;
+    private String departName;
+    private String doctorName;
+    private String sampleNum;
+    private String printStatus;
+    private String trscDate;
+    private String barCode;
+    private String examPurpose;
+}

+ 71 - 51
thyy-scheduled/src/main/java/org/thyy/scheduled/service/DpccHttp.java → thyy-scheduled/src/main/java/org/thyy/scheduled/service/DpccService.java

@@ -11,13 +11,20 @@ import org.springframework.http.HttpHeaders;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 import org.thyy.scheduled.config.constant.Dpcc;
+import org.thyy.scheduled.dao.DpccDao;
 import org.thyy.scheduled.entity.dpcc.MedicalCheckResult;
 import org.thyy.scheduled.entity.dpcc.MedicalPrescription;
 import org.thyy.scheduled.entity.dpcc.Patient;
 import org.thyy.scheduled.entity.dpcc.ReportIndexInquiry;
+import org.thyy.scheduled.entity.dpcc.jyreq.JyIndexRequest;
+import org.thyy.scheduled.entity.dpcc.jyrs.JyDetailItem;
+import org.thyy.scheduled.entity.dpcc.jyrs.JyDetailOrder;
+import org.thyy.scheduled.entity.dpcc.jyrs.JyDetailResponse;
+import org.thyy.scheduled.entity.dpcc.jyrs.JyIndexResponse;
 import org.thyy.scheduled.utils.AccessTokenUtil;
 import org.thyy.utils.exception.BizException;
 import org.thyy.utils.exception.ExceptionEnum;
+import org.thyy.utils.result.ResultVo;
 
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
@@ -29,13 +36,15 @@ import java.util.List;
 
 @Slf4j
 @Service
-public class DpccHttp {
+public class DpccService {
     private final Dpcc dpcc;
+    private final DpccDao dao;
     private final RestTemplate restTemplate;
 
     @Autowired
-    public DpccHttp(Dpcc dpcc, RestTemplate restTemplate) {
+    public DpccService(Dpcc dpcc, DpccDao dao, RestTemplate restTemplate) {
         this.dpcc = dpcc;
+        this.dao = dao;
         this.restTemplate = restTemplate;
     }
 
@@ -75,11 +84,11 @@ public class DpccHttp {
         uploadHisData();
     }
 
-    public String uploadHisData() {
+    public void uploadHisData() {
         List<Patient> inpatientList = dao.getInpatientList();
         List<Patient> outpatientList = dao.getOutpatientList();
         if (inpatientList.isEmpty() && outpatientList.isEmpty()) {
-            return "没有需要上传的数据。";
+            return;
         }
 
         ReportIndexInquiry inquiry = getReportIndexInquiry();
@@ -89,11 +98,9 @@ public class DpccHttp {
 
         uploadInpatientDrug(inpatientList);
         uploadOutpatientDrug(outpatientList);
-        return "OK";
     }
 
 
-
     private ReportIndexInquiry getReportIndexInquiry() {
         String now = DateUtil.formatDate(new Date());
         String start = now + " 00:00:00";
@@ -105,34 +112,46 @@ public class DpccHttp {
         return inquiry;
     }
 
-    private void uploadInpatientCheck(List<Patient> inpatientList, ReportIndexInquiry inquiry) throws Exception {
+    private void uploadInpatientCheck(List<Patient> inpatientList, ReportIndexInquiry inquiry) {
         inquiry.setPatType("InPatient");
         for (Patient inpatient : inpatientList) {
             queryCheckAndUpload(inquiry, inpatient);
         }
     }
 
-    private void uploadOutpatientCheck(List<Patient> outpatientList, ReportIndexInquiry inquiry) throws Exception {
+    private void uploadOutpatientCheck(List<Patient> outpatientList, ReportIndexInquiry inquiry) {
         inquiry.setPatType("OutPatient");
         for (Patient outpatient : outpatientList) {
             queryCheckAndUpload(inquiry, outpatient);
         }
     }
 
-    private List<ExamIndexResponse> getExamIndex(ReportIndexInquiry inquiry) {
-        ExamIndexRequest request = new ExamIndexRequest.Builder()
+    private List<JyIndexResponse> getJyIndex(ReportIndexInquiry inquiry) {
+        JyIndexRequest request = new JyIndexRequest.Builder()
                 .patientNumType(inquiry.getPatType()).patientNum(inquiry.getPatNo())
                 .startDate(inquiry.getReqStartTime()).endDate(inquiry.getReqEndTime()).build();
-        ExamReportService examReportService = new ExamReportService();
-        return examReportService.queryExamIndex(request);
+        JSONObject json = JSONObject.from(request);
+        ResultVo<List<JyIndexResponse>> resultVo =
+                restTemplate.postForObject(dpcc.getJyApi() + "/queryExamIndex", json, ResultVo.class);
+        if (null == resultVo) {
+            return new ArrayList<>();
+        }
+        return resultVo.getData();
     }
 
-    private ExamDetailResponse getExamDetail(String reportId) {
-        ExamReportService examReportService = new ExamReportService();
-        return examReportService.queryExamDetail(reportId);
+    private JyDetailResponse getJyDetail(String reportId) {
+        JSONObject json = new JSONObject();
+        json.put("reportId", reportId);
+        json.put("responseMode", "Json");
+        ResultVo<JyDetailResponse> resultVo =
+                restTemplate.postForObject(dpcc.getJyApi() + "/queryExamDetail", json, ResultVo.class);
+        if (null == resultVo) {
+            throw new BizException(ExceptionEnum.API_ERROR);
+        }
+        return resultVo.getData();
     }
 
-    private boolean reportTimeValid(ExamDetailOrder order) {
+    private boolean reportTimeValid(JyDetailOrder order) {
         Date auditTime = DateUtil.parse(order.getAudtTime());
         if (null == auditTime) {
             return false;
@@ -142,19 +161,19 @@ public class DpccHttp {
         return diff / 1000 / 60 / 60 <= 72;
     }
 
-    private void queryCheckAndUpload(ReportIndexInquiry inquiry, Patient patient) throws Exception {
+    private void queryCheckAndUpload(ReportIndexInquiry inquiry, Patient patient) {
         List<MedicalCheckResult> checkResultBatches = new ArrayList<>();
         inquiry.setPatNo(patient.getPatNo());
-        List<ExamIndexResponse> indexList = getExamIndex(inquiry);
-        for (ExamIndexResponse index : indexList) {
-            ExamDetailResponse detail = getExamDetail(index.getReportId());
+        List<JyIndexResponse> indexList = getJyIndex(inquiry);
+        for (JyIndexResponse index : indexList) {
+            JyDetailResponse detail = getJyDetail(index.getReportId());
             if (reportTimeValid(detail.getOrder())) {
                 patient.setReportId(index.getReportId());
                 patient.setInspectTime(detail.getOrder().getInspectTime());
                 if (StrUtil.isBlank(patient.getInspectTime())) {
                     patient.setInspectTime(detail.getOrder().getAudtTime());
                 }
-                for (ExamDetailItem item : detail.getItems()) {
+                for (JyDetailItem item : detail.getItems()) {
                     if (StrUtil.isBlank(item.getItmUnit())) {
                         continue;
                     }
@@ -173,7 +192,7 @@ public class DpccHttp {
         }
     }
 
-    private MedicalCheckResult getMedicalCheckResult(Patient patient, ExamDetailItem item) {
+    private MedicalCheckResult getMedicalCheckResult(Patient patient, JyDetailItem item) {
         MedicalCheckResult checkResult = new MedicalCheckResult();
         checkResult.setSource(patient.getSource());
         checkResult.setIdCard(patient.getIdCard());
@@ -191,7 +210,7 @@ public class DpccHttp {
         return checkResult;
     }
 
-    private void uploadInpatientDrug(List<Patient> inpatientList) throws Exception {
+    private void uploadInpatientDrug(List<Patient> inpatientList) {
         List<MedicalPrescription> drugBatches = new ArrayList<>();
         for (Patient inpatient : inpatientList) {
             String patNo = inpatient.getPatNo();
@@ -210,7 +229,7 @@ public class DpccHttp {
         }
     }
 
-    private void uploadOutpatientDrug(List<Patient> outpatientList) throws Exception {
+    private void uploadOutpatientDrug(List<Patient> outpatientList) {
         for (Patient outpatient : outpatientList) {
             String patNo = outpatient.getPatNo();
             int times = outpatient.getTimes();
@@ -231,23 +250,20 @@ public class DpccHttp {
     }
 
     private void executeUploadChecks(List<MedicalCheckResult> checkBatches,
-                                     String patNo, int times) throws Exception {
+                                     String patNo, int times) {
         String json = JSON.toJSONString(checkBatches);
         log.info("DPCC上传检验:{}, {}", patNo, times);
         uploadToSino(encrypt(json), Type.CHECK);
     }
 
     private void executeUploadDrugs(List<MedicalPrescription> drugBatches,
-                                    String patNo, int times) throws Exception {
+                                    String patNo, int times) {
         String json = JSON.toJSONString(drugBatches);
         log.info("DPCC上传药品:{}, {}", patNo, times);
-        int res = uploadToSino(encrypt(json), Type.DRUG);
-        if (res == 200 && times != -1) {
-            dao.updateDpccFlag(patNo, times);
-        }
+        uploadToSino(encrypt(json), Type.DRUG);
     }
 
-    private int uploadToSino(String encrypt, Type type) {
+    private void uploadToSino(String encrypt, Type type) {
         String url = type == Type.CHECK ? dpcc.getCheckUrl() : dpcc.getDrugUrl();
         String label = type == Type.CHECK ? "检验" : "药品";
         String dpccToken = AccessTokenUtil.getInstance().get("dpccToken");
@@ -258,12 +274,10 @@ public class DpccHttp {
         HttpEntity<JSONObject> body = new HttpEntity<>(data, headers);
         String response = new RestTemplate().postForObject(url, body, String.class);
         log.info("DPCC上传{}返回:{}", label, response);
-        if (StrUtil.isNotBlank(response)) {
-            JSONObject json = JSON.parseObject(response);
-            Integer code = json.getInteger("code");
-            return null == code ? -1 : code;
-        }
-        return -1;
+//        if (StrUtil.isNotBlank(response)) {
+//            JSONObject json = JSON.parseObject(response);
+//            Integer code = json.getInteger("code");
+//        }
     }
 
     enum Type {
@@ -271,25 +285,31 @@ public class DpccHttp {
         DRUG,
     }
     
-    
-
-    private String encrypt(String plainText) throws Exception {
+    private String encrypt(String plainText) {
         byte[] keyBytes = dpcc.getEncryptKey().getBytes(StandardCharsets.UTF_8);
         SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES");
-        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
-        cipher.init(Cipher.ENCRYPT_MODE, keySpec);
-        byte[] plainTextBytes = plainText.getBytes(StandardCharsets.UTF_8);
-        byte[] cipherTextBytes = cipher.doFinal(plainTextBytes);
-        return Base64.getEncoder().encodeToString(cipherTextBytes);
+        try {
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            cipher.init(Cipher.ENCRYPT_MODE, keySpec);
+            byte[] plainTextBytes = plainText.getBytes(StandardCharsets.UTF_8);
+            byte[] cipherTextBytes = cipher.doFinal(plainTextBytes);
+            return Base64.getEncoder().encodeToString(cipherTextBytes);
+        } catch (Exception e) {
+            throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, e.getMessage());
+        }
     }
 
-    private String decrypt(String cipherTextBase64) throws Exception {
+    private String decrypt(String cipherTextBase64) {
         byte[] keyBytes = dpcc.getEncryptKey().getBytes(StandardCharsets.UTF_8);
         SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES");
-        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
-        cipher.init(Cipher.DECRYPT_MODE, keySpec);
-        byte[] cipherTextBytes = Base64.getDecoder().decode(cipherTextBase64);
-        byte[] plainTextBytes = cipher.doFinal(cipherTextBytes);
-        return new String(plainTextBytes, StandardCharsets.UTF_8);
+        try {
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            cipher.init(Cipher.DECRYPT_MODE, keySpec);
+            byte[] cipherTextBytes = Base64.getDecoder().decode(cipherTextBase64);
+            byte[] plainTextBytes = cipher.doFinal(cipherTextBytes);
+            return new String(plainTextBytes, StandardCharsets.UTF_8);
+        } catch (Exception e) {
+            throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, e.getMessage());
+        }
     }
 }

+ 5 - 5
thyy-scheduled/src/main/java/org/thyy/scheduled/task/AccessTokenTask.java

@@ -5,21 +5,21 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 import org.thyy.scheduled.service.CorpwxHttp;
-import org.thyy.scheduled.service.DpccHttp;
+import org.thyy.scheduled.service.DpccService;
 import org.thyy.scheduled.service.LisDockSign;
 import org.thyy.scheduled.service.ThmzHttp;
 
 @Slf4j
 @Component
 public class AccessTokenTask {
-    private final DpccHttp dpccHttp;
+    private final DpccService dpccService;
     private final CorpwxHttp corpwxHttp;
     private final LisDockSign lisDockSign;
     private final ThmzHttp thmzHttp;
 
     @Autowired
-    public AccessTokenTask(DpccHttp dpccHttp, CorpwxHttp corpwxHttp, LisDockSign lisDockSign, ThmzHttp thmzHttp) {
-        this.dpccHttp = dpccHttp;
+    public AccessTokenTask(DpccService dpccService, CorpwxHttp corpwxHttp, LisDockSign lisDockSign, ThmzHttp thmzHttp) {
+        this.dpccService = dpccService;
         this.corpwxHttp = corpwxHttp;
         this.lisDockSign = lisDockSign;
         this.thmzHttp = thmzHttp;
@@ -27,7 +27,7 @@ public class AccessTokenTask {
 
     @Scheduled(fixedRate = 7000 * 1000)
     public void majorTask() {
-        dpccHttp.getToken();
+        dpccService.getToken();
         corpwxHttp.getAddressBookToken();
         corpwxHttp.getHospAppsToken();
         corpwxHttp.getClockinToken();

+ 5 - 5
thyy-scheduled/src/main/java/org/thyy/scheduled/task/DpccUploadTask.java

@@ -4,20 +4,20 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
-import org.thyy.scheduled.service.DpccHttp;
+import org.thyy.scheduled.service.DpccService;
 
 @Slf4j
 @Component
 public class DpccUploadTask {
-    private final DpccHttp dpccHttp;
+    private final DpccService dpccService;
 
     @Autowired
-    public DpccUploadTask(DpccHttp dpccHttp) {
-        this.dpccHttp = dpccHttp;
+    public DpccUploadTask(DpccService dpccService) {
+        this.dpccService = dpccService;
     }
 
     @Scheduled(fixedRate = 60 * 30 * 1000, initialDelay = 30 * 1000)
     public void execute() {
-        dpccHttp.uploadHisData2Dpcc();
+        dpccService.uploadHisData2Dpcc();
     }
 }

+ 27 - 1
thyy-scheduled/src/main/resources/application-dev.yml

@@ -52,4 +52,30 @@ spring:
   mvc:
     format:
       date: yyyy-MM-dd
-      date-time: yyyy-MM-dd HH:mm:ss
+      date-time: yyyy-MM-dd HH:mm:ss
+
+thyy:
+  main-address:
+  corpwx:
+    corp-id-secret:
+    address-book-secret:
+    hosp-apps-secret:
+    clockin-secret:
+    urgent-msg-secret:
+    file-push-secret:
+    api-url:
+  lis-dock:
+    app-id:
+    app-secret:
+  thmz:
+    api-url:
+    token-user:
+  dpcc:
+    client-name:
+    client-secret:
+    password:
+    encrypt-key:
+    token-url:
+    check-url:
+    drug-url:
+    jy-api: http://localhost:21701/thyy/thirdpart/api/inspection

+ 1 - 0
thyy-scheduled/src/main/resources/application-prod.yml

@@ -78,4 +78,5 @@ thyy:
     token-url: https://manage.national-dpcc.com/api/sino-auth/oauth/token
     check-url: https://manage.national-dpcc.com/api/sino-common/access-client/uploadHisCheckData
     drug-url: https://manage.national-dpcc.com/api/sino-common/access-client/uploadHisDrugData
+    jy-api: http://localhost:21701/thyy/thirdpart/api/inspection
 

+ 2 - 1
thyy-socket/src/main/java/org/thyy/socket/ThyySocketApplication.java

@@ -2,10 +2,11 @@ package org.thyy.socket;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.context.annotation.ComponentScan;
 
-@SpringBootApplication
 @ComponentScan("org.thyy.*")
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
 public class ThyySocketApplication {
     public static void main(String[] args) {
         SpringApplication.run(ThyySocketApplication.class, args);

+ 14 - 0
thyy-socket/src/main/java/org/thyy/socket/service/Business.java

@@ -1,11 +1,14 @@
 package org.thyy.socket.service;
 
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 import org.springframework.web.socket.TextMessage;
 import org.springframework.web.socket.WebSocketSession;
 import org.thyy.socket.config.CloseCodes;
 
 import java.io.IOException;
+import java.util.function.Consumer;
 
 public interface Business {
 
@@ -46,4 +49,15 @@ public interface Business {
     default void sendMessage(JSONObject json) {
     }
 
+    static void attemptToConvertJson(String json, Consumer<JSONObject> consumer) {
+        if (!JSONUtil.isTypeJSON(json)) {
+            return;
+        }
+        try {
+            JSONObject jsonObject = JSON.parseObject(json);
+            consumer.accept(jsonObject);
+        } catch (Exception ignore) {
+        }
+    }
+
 }

+ 0 - 74
thyy-socket/src/main/java/org/thyy/socket/service/Intergration.java

@@ -1,74 +0,0 @@
-package org.thyy.socket.service;
-
-import com.alibaba.fastjson2.JSONObject;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import org.springframework.web.socket.WebSocketSession;
-import org.thyy.socket.config.CloseCodes;
-import org.thyy.socket.utils.OnMessageUtil;
-import org.thyy.utils.TryUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-@Service
-@Slf4j
-public class Intergration implements Business {
-
-    private final Map<String, List<WebSocketSession>> SESSION_MAP = new ConcurrentHashMap<>();
-
-    OnMessageUtil function = OnMessageUtil.create()
-            .onListener("sendAllConnections", (value) -> {
-                for (Map.Entry<String, List<WebSocketSession>> stringListEntry : SESSION_MAP.entrySet()) {
-                    for (WebSocketSession session : stringListEntry.getValue()) {
-                        Business.send(session, "systemNotification", value);
-                    }
-                }
-            });
-
-    @Override
-    public void onOpen(WebSocketSession session, String sid) {
-        SESSION_MAP.computeIfAbsent(sid, k -> new ArrayList<>());
-        SESSION_MAP.get(sid).add(session);
-        TryUtil.ignoreErr(() -> {
-            handleOpen(session, sid);
-        });
-        log.info("有新连接加入:{},当前在线人数为:{}", sid, SESSION_MAP.size());
-    }
-
-    @Override
-    public void onClose(WebSocketSession session, String sid) {
-        if (SESSION_MAP.get(sid) != null) {
-            SESSION_MAP.get(sid).remove(session);
-            if (SESSION_MAP.get(sid).isEmpty()) {
-                SESSION_MAP.remove(sid);
-            }
-        }
-        log.info("有一连接关闭:{},当前在线人数为:{}", sid, SESSION_MAP.size());
-    }
-
-    @Override
-    public void onMessage(WebSocketSession session, String sid, String data) {
-        function.runMessage(session, sid, data);
-    }
-
-    private void handleOpen(WebSocketSession session, String sid) {
-        List<WebSocketSession> webSocketSessions = SESSION_MAP.get(sid);
-        String currentIp = (String) session.getAttributes().get("ip");
-        if (webSocketSessions != null) {
-            for (WebSocketSession item : webSocketSessions) {
-                String ip = (String) item.getAttributes().get("ip");
-                if (!ip.equals(currentIp)) {
-                    Business.closeReason(item, CloseCodes.DEVICE_LOGIN);
-                }
-            }
-        }
-    }
-
-    @Override
-    public void sendMessage(JSONObject json) {
-        function.runController(json);
-    }
-}

+ 13 - 6
thyy-socket/src/main/java/org/thyy/socket/service/IntergrationPlatform.java → thyy-socket/src/main/java/org/thyy/socket/service/IntergrationPlatform/IntergrationPlatform.java

@@ -1,11 +1,13 @@
-package org.thyy.socket.service;
+package org.thyy.socket.service.IntergrationPlatform;
 
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.socket.TextMessage;
 import org.springframework.web.socket.WebSocketSession;
+import org.thyy.socket.service.Business;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -53,6 +55,13 @@ public class IntergrationPlatform implements Business {
         if (data.equals("heart-beat")) {
             Business.send(session, data);
         }
+        Business.attemptToConvertJson(data, (value) -> {
+            if (value.getString("code").equals("getOnlineCount")) {
+                Business.send(session, StrUtil.format("""
+                        {"code": "onlineCount" , "message": {} }
+                        """, sessionContainer.size()));
+            }
+        });
     }
 
     @Override
@@ -95,10 +104,8 @@ public class IntergrationPlatform implements Business {
 
     private void executeSendMessage(String sid, String msg) {
         List<WebSocketSession> sessionList = sessionContainer.get(sid);
-        try {
-            for (WebSocketSession item : sessionList) {
-                item.sendMessage(new TextMessage(msg));
-            }
-        } catch (Exception ignored) {}
+        for (WebSocketSession item : sessionList) {
+            Business.send(item, msg);
+        }
     }
 }

+ 27 - 4
thyy-socket/src/main/java/org/thyy/socket/service/callnumber/HelpDeskScreen.java

@@ -1,37 +1,60 @@
 package org.thyy.socket.service.callnumber;
 
 import com.alibaba.fastjson2.JSONObject;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.socket.WebSocketSession;
 import org.thyy.socket.service.Business;
 
 import java.util.concurrent.ConcurrentHashMap;
 
+@Slf4j
 @Component
 public class HelpDeskScreen implements Business {
-    private ConcurrentHashMap<String, WebSocketSession> sessionMap = new ConcurrentHashMap<>();
+    private final ConcurrentHashMap<String, WebSocketSession> sessionContainer = new ConcurrentHashMap<>();
 
     @Override
     public void onOpen(WebSocketSession session, String sid) {
-        ScreenSession.instance().newConnection(sessionMap, sid, session);
+        ScreenSession.instance().newConnection(sessionContainer, sid, session);
+        log.info("有新连接加入:{},当前在线人数为:{}", sid, sessionContainer.size());
     }
 
     @Override
     public void onClose(WebSocketSession session, String sid) {
-        sessionMap.remove(sid, session);
+        sessionContainer.remove(sid, session);
+        log.info("有一连接关闭:{},当前在线人数为:{}", sid, sessionContainer.size());
     }
 
     @Override
     public void onMessage(WebSocketSession session, String sid, String data) {
+        log.info("有{}发送的新消息:{}", sid, data);
         if (data.equals("heart-beat")) {
             Business.send(session, data);
         }
     }
 
+    /**
+     * POST http://localhost:20922/thyy/api/socket/send/helpDeskScreen
+     * Content-Type: application/json
+     * {
+     *   "sid": "01897",
+     *   "msg": {
+     *     "action": 1,
+     *     "deptName": "骨科",
+     *     "serialNo": 1952155,
+     *     "speechUrl": "http://172.16.32.160:8080/resource/voice/1952155.mp3",
+     *     "name": "龙一如",
+     *     "blurName": "龙*如",
+     *     "fzNo": 12,
+     *     "roomNo": 1
+     *   }
+     * }
+     * */
     @Override
     public void sendMessage(JSONObject json) {
         String sid = json.getString("sid");
-        WebSocketSession session = sessionMap.get(sid);
+        WebSocketSession session = sessionContainer.get(sid);
         ScreenSession.instance().sendMessage(json, session);
+        log.info("向分诊台发送消息:{}", json);
     }
 }

+ 10 - 4
thyy-socket/src/main/java/org/thyy/socket/service/callnumber/RoomScreen.java

@@ -1,28 +1,33 @@
 package org.thyy.socket.service.callnumber;
 
 import com.alibaba.fastjson2.JSONObject;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.socket.WebSocketSession;
 import org.thyy.socket.service.Business;
 
 import java.util.concurrent.ConcurrentHashMap;
 
+@Slf4j
 @Component
 public class RoomScreen implements Business {
-    private final ConcurrentHashMap<String, WebSocketSession> sessionMap = new ConcurrentHashMap<>();
+    private final ConcurrentHashMap<String, WebSocketSession> sessionContainer = new ConcurrentHashMap<>();
 
     @Override
     public void onOpen(WebSocketSession session, String sid) {
-        ScreenSession.instance().newConnection(sessionMap, sid, session);
+        ScreenSession.instance().newConnection(sessionContainer, sid, session);
+        log.info("有新连接加入:{},当前在线人数为:{}", sid, sessionContainer.size());
     }
 
     @Override
     public void onClose(WebSocketSession session, String sid) {
-        sessionMap.remove(sid, session);
+        sessionContainer.remove(sid, session);
+        log.info("有一连接关闭:{},当前在线人数为:{}", sid, sessionContainer.size());
     }
 
     @Override
     public void onMessage(WebSocketSession session, String sid, String data) {
+        log.info("有{}发送的新消息:{}", sid, data);
         if (data.equals("heart-beat")) {
             Business.send(session, data);
         }
@@ -31,7 +36,8 @@ public class RoomScreen implements Business {
     @Override
     public void sendMessage(JSONObject json) {
         String sid = json.getString("sid");
-        WebSocketSession session = sessionMap.get(sid);
+        WebSocketSession session = sessionContainer.get(sid);
         ScreenSession.instance().sendMessage(json, session);
+        log.info("向诊室小屏发送消息:{}", json);
     }
 }

+ 1 - 1
thyy-socket/src/main/java/org/thyy/socket/service/callnumber/ScreenSession.java

@@ -7,7 +7,7 @@ import org.thyy.socket.service.Business;
 
 import java.util.concurrent.ConcurrentHashMap;
 
-import static org.thyy.socket.service.IntergrationPlatform.SINGLE_LOGIN;
+import static org.thyy.socket.service.IntergrationPlatform.IntergrationPlatform.SINGLE_LOGIN;
 
 public class ScreenSession {
     private static ScreenSession INSTANCE;

+ 2 - 3
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/ThyyThirdpartApiApplication.java

@@ -2,14 +2,13 @@ package org.thyy.thirdpartapi;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.context.annotation.ComponentScan;
 
-@SpringBootApplication
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
 @ComponentScan("org.thyy.*")
 public class ThyyThirdpartApiApplication {
-
     public static void main(String[] args) {
         SpringApplication.run(ThyyThirdpartApiApplication.class, args);
     }
-
 }

+ 51 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/InspectionController.java

@@ -0,0 +1,51 @@
+package org.thyy.thirdpartapi.inspection;
+
+import com.alibaba.fastjson2.JSONObject;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.thyy.thirdpartapi.inspection.response.jy.JyDetailResponse;
+import org.thyy.thirdpartapi.inspection.response.jy.JyIndexResponse;
+import org.thyy.utils.result.R;
+import org.thyy.utils.result.ResultVo;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/inspection")
+public class InspectionController {
+    private final InspectionInterface service;
+
+    public InspectionController(InspectionInterface service) {
+        this.service = service;
+    }
+
+    @Service
+    @ConditionalOnProperty(prefix = "thyy.inspection", name = "service", havingValue = "default", matchIfMissing = true)
+    static class Default implements InspectionInterface {
+        @Override
+        public List<JyIndexResponse> queryExamIndex(JSONObject request) {
+            return List.of();
+        }
+
+        @Override
+        public JyDetailResponse queryExamDetail(JSONObject request) {
+            return null;
+        }
+    }
+
+    @PostMapping("/queryExamIndex")
+    public ResultVo<List<JyIndexResponse>> queryExamIndex(@RequestBody JSONObject request) {
+        List<JyIndexResponse> list = service.queryExamIndex(request);
+        return R.ok(list);
+    }
+
+    @PostMapping("/queryExamDetail")
+    public ResultVo<JyDetailResponse> queryExamDetail(@RequestBody JSONObject request) {
+        JyDetailResponse response = service.queryExamDetail(request);
+        return R.ok(response);
+    }
+}

+ 17 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/InspectionInterface.java

@@ -0,0 +1,17 @@
+package org.thyy.thirdpartapi.inspection;
+
+import com.alibaba.fastjson2.JSONObject;
+import org.thyy.thirdpartapi.inspection.response.jy.JyDetailResponse;
+import org.thyy.thirdpartapi.inspection.response.jy.JyIndexResponse;
+
+import java.util.List;
+
+/**
+ * 查询检验结果
+ */
+public interface InspectionInterface {
+
+    List<JyIndexResponse> queryExamIndex(JSONObject request);
+
+    JyDetailResponse queryExamDetail(JSONObject request);
+}

+ 28 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/CardType.java

@@ -0,0 +1,28 @@
+package org.thyy.thirdpartapi.inspection.config;
+
+public enum CardType {
+    /**
+     * 国家社保卡
+     */
+    SocialSecurityCard,
+
+    /**
+     * 居民健康卡
+     */
+    HealthCard,
+
+    /**
+     * 院内诊疗卡
+     */
+    MedicalCard,
+
+    /**
+     * 居民身份证
+     */
+    IDCard,
+
+    /**
+     * 未知(默认值)
+     */
+    Undefine
+}

+ 23 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/Category.java

@@ -0,0 +1,23 @@
+package org.thyy.thirdpartapi.inspection.config;
+
+public enum Category {
+    /**
+     * 检验
+     * */
+    JY,
+
+    /**
+     * 检查
+     * */
+    JC,
+
+    /**
+     * 病理
+     * */
+    BL,
+
+    /**
+     * 心电
+     * */
+    XD
+}

+ 15 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/InspectionApi.java

@@ -0,0 +1,15 @@
+package org.thyy.thirdpartapi.inspection.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "thyy.inspection")
+public class InspectionApi {
+    private String jy;
+    private String service;
+}

+ 33 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/PatientNumType.java

@@ -0,0 +1,33 @@
+package org.thyy.thirdpartapi.inspection.config;
+
+public enum PatientNumType {
+    /**
+     * 门诊号
+     * */
+    OutPatient,
+
+    /**
+     * 住院号
+     * */
+    InPatient,
+    
+    /**
+     * 验单号
+     * */
+    Lis,
+
+    /**
+     * 体检号
+     * */
+    Pis,
+
+    /**
+     * 婚检号
+     * */
+    Marry ,
+
+    /**
+     * 未知(默认值)
+     * */
+    None
+}

+ 6 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/config/ResponseMode.java

@@ -0,0 +1,6 @@
+package org.thyy.thirdpartapi.inspection.config;
+
+public enum ResponseMode {
+    Json,
+    Xml
+}

+ 67 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/inspectionImpl/ThyyInspectionImpl.java

@@ -0,0 +1,67 @@
+package org.thyy.thirdpartapi.inspection.inspectionImpl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+import org.thyy.thirdpartapi.inspection.InspectionInterface;
+import org.thyy.thirdpartapi.inspection.config.InspectionApi;
+import org.thyy.thirdpartapi.inspection.response.jy.*;
+import org.thyy.utils.exception.BizException;
+import org.thyy.utils.exception.ExceptionEnum;
+
+import java.util.List;
+
+@Slf4j
+@Service
+@ConditionalOnProperty(prefix = "thyy.inspection", name = "service", havingValue = "shanghaihaotai")
+public class ThyyInspectionImpl implements InspectionInterface {
+    private String api;
+    private final RestTemplate restTemplate;
+    private final InspectionApi inspectionApiConfig;
+
+    @Autowired
+    public ThyyInspectionImpl(RestTemplate restTemplate, InspectionApi inspectionApiConfig) {
+        this.restTemplate = restTemplate;
+        this.inspectionApiConfig = inspectionApiConfig;
+        init();
+    }
+
+    public void init( ) {
+        this.api = inspectionApiConfig.getJy();
+        log.info("检验检查模块初始化完成");
+    }
+
+    @Override
+    public List<JyIndexResponse> queryExamIndex(JSONObject request) {
+        JSONObject response = restTemplate.postForObject(api + "/self", request, JSONObject.class);
+        if (null == response) {
+            throw new BizException(ExceptionEnum.NETWORK_ERROR);
+        }
+        Boolean code = response.getBoolean("code");
+        if (null == code || !code) {
+            throw new BizException(ExceptionEnum.API_ERROR, response.getString("message"));
+        }
+        JSONObject data = response.getJSONObject("data");
+        String items = JSON.toJSONString(data.getJSONArray("items"));
+        return JSON.parseArray(items, JyIndexResponse.class);
+    }
+
+    @Override
+    public JyDetailResponse queryExamDetail(JSONObject request) {
+        JSONObject response = new RestTemplate().postForObject(
+                api + "/detail", request, JSONObject.class);
+        if (null == response) {
+            throw new BizException(ExceptionEnum.NETWORK_ERROR);
+        }
+        Boolean code = response.getBoolean("code");
+        if (null == code || !code) {
+            throw new BizException(ExceptionEnum.API_ERROR, response.getString("message"));
+        }
+        JSONObject data = response.getJSONObject("data");
+        return JSON.parseObject(JSON.toJSONString(data), JyDetailResponse.class);
+    }
+}

+ 10 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/request/jy/ReportDetailInquiry.java

@@ -0,0 +1,10 @@
+package org.thyy.thirdpartapi.inspection.request.jy;
+
+import lombok.Data;
+
+@Data
+public class ReportDetailInquiry {
+    private String reportId;
+    private String reportUrl;
+    private String patientId;
+}

+ 15 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/request/jy/ReportIndexInquiry.java

@@ -0,0 +1,15 @@
+package org.thyy.thirdpartapi.inspection.request.jy;
+
+import lombok.Data;
+import org.thyy.thirdpartapi.inspection.config.Category;
+import org.thyy.thirdpartapi.inspection.config.PatientNumType;
+
+@Data
+public class ReportIndexInquiry {
+    private PatientNumType patType;
+    private Category reportCategory;
+    private String patNo;
+    private String socialNo;
+    private String reqStartTime;
+    private String reqEndTime;
+}

+ 22 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/AntibioticItem.java

@@ -0,0 +1,22 @@
+package org.thyy.thirdpartapi.inspection.response.jy;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class AntibioticItem {
+    @JSONField(name = "anti_id")
+    private Integer antiId;
+    @JSONField(name = "anti_name_uk")
+    private String antiNameUk;
+    @JSONField(name = "anti_name_cn")
+    private String antiNameCn;
+    @JSONField(name = "anti_abb")
+    private String antiAbb;
+    @JSONField(name = "anti_mic")
+    private String antiMic;
+    @JSONField(name = "anti_value")
+    private String antiValue;
+    @JSONField(name = "anti_str")
+    private String antiStr;
+}

+ 35 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyDetailBacterias.java

@@ -0,0 +1,35 @@
+package org.thyy.thirdpartapi.inspection.response.jy;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class JyDetailBacterias {
+    @JSONField(name = "itm_id")
+    private Integer itmId;
+    @JSONField(name = "itm_code")
+    private String itmCode;
+    @JSONField(name = "itm_name")
+    private String itmName;
+    @JSONField(name = "itm_ordr")
+    private Integer itmOrdr;
+    @JSONField(name = "rslt_strs")
+    private String rsltStrs;
+    @JSONField(name = "bac_id")
+    private Integer bacId;
+    @JSONField(name = "bac_name_uk")
+    private String bacNameUk;
+    @JSONField(name = "bac_name_cn")
+    private String bacNameCn;
+    @JSONField(name = "bac_abb")
+    private String bacAbb;
+    @JSONField(name = "iden_no")
+    private String idenNo;
+    @JSONField(name = "itm_calg")
+    private Integer itmCalg;
+    @JSONField(name = "test_mthd")
+    private Integer testMthd;
+    private List<AntibioticItem> antiList;
+}

+ 90 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyDetailItem.java

@@ -0,0 +1,90 @@
+package org.thyy.thirdpartapi.inspection.response.jy;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class JyDetailItem {
+    @JSONField(name = "itm_id")
+    private Integer itmId;
+    @JSONField(name = "itm_code")
+    private String itmCode;
+    @JSONField(name = "itm_name")
+    private String itmName;
+    @JSONField(name = "itm_unit")
+    private String itmUnit;
+    @JSONField(name = "itm_ordr")
+    private Integer itmOrdr;
+    @JSONField(name = "itm_value")
+    private String itmValue;
+    @JSONField(name = "itm_src_value")
+    private String itmSrcValue;
+    @JSONField(name = "rslt_list_id")
+    private Integer rsltListId;
+    @JSONField(name = "rslt_id")
+    private Integer rsltId;
+    @JSONField(name = "rslt_strs")
+    private String rsltStrs;
+    @JSONField(name = "itm_str_value")
+    private String itmStrValue;
+    @JSONField(name = "itm_str_src_value")
+    private String itmStrSrcValue;
+    @JSONField(name = "res_type")
+    private Integer resType;
+    @JSONField(name = "item_src_flow_id")
+    private Long itemSrcFlowId;
+    @JSONField(name = "defl_rslt_id")
+    private Integer deflRsltId;
+    @JSONField(name = "rslt_name")
+    private String rsltName;
+    @JSONField(name = "range_low")
+    private String rangeLow;
+    @JSONField(name = "range_high")
+    private String rangeHigh;
+    @JSONField(name = "range")
+    private String range;
+    @JSONField(name = "range_rslt_id")
+    private Integer rangeRsltId;
+    @JSONField(name = "ran_ge_str")
+    private String ranGeStr;
+    @JSONField(name = "itm_alert")
+    private String itmAlert;
+    @JSONField(name = "critical_low")
+    private String criticalLow;
+    @JSONField(name = "critical_high")
+    private String criticalHigh;
+    @JSONField(name = "critical")
+    private String critical;
+    @JSONField(name = "critical_alert")
+    private String criticalAlert;
+    @JSONField(name = "calc_type")
+    private Integer calcType;
+    @JSONField(name = "calc_fomula")
+    private String calcFomula;
+    @JSONField(name = "calc_fomula_items")
+    private String calcFomulaItems;
+    @JSONField(name = "dec_bit")
+    private Integer decBit;
+    @JSONField(name = "is_null")
+    private Integer isNull;
+    @JSONField(name = "is_num")
+    private Integer isNum;
+    @JSONField(name = "prnt_grup")
+    private Integer prntGrup;
+    @JSONField(name = "other_flag_a")
+    private Integer otherFlagA;
+    @JSONField(name = "other_flag_b")
+    private Integer otherFlagB;
+    @JSONField(name = "other_flag_c")
+    private Integer otherFlagC;
+    @JSONField(name = "mthd_name")
+    private String mthdName;
+    @JSONField(name = "critical_exec_flag")
+    private Integer criticalExecFlag;
+    @JSONField(name = "critical_exec_info")
+    private String criticalExecInfo;
+    @JSONField(name = "critical_exec_time")
+    private String criticalExecTime;
+    @JSONField(name = "map_pis_code")
+    private String mapPisCode;
+}

+ 84 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyDetailOrder.java

@@ -0,0 +1,84 @@
+package org.thyy.thirdpartapi.inspection.response.jy;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class JyDetailOrder {
+    @JSONField(name = "ordr_id")
+    private Integer ordrId;
+    @JSONField(name = "aply_date")
+    private String aplyDate;
+    @JSONField(name = "ordr_create_date")
+    private String ordrCreateDate;
+    @JSONField(name = "inspect_time")
+    private String inspectTime;
+    @JSONField(name = "sign_time")
+    private String signTime;
+    @JSONField(name = "ordr_date")
+    private String ordrDate;
+    @JSONField(name = "audt_time")
+    private String audtTime;
+    @JSONField(name = "prnt_status")
+    private Integer prntStatus;
+    @JSONField(name = "smpl_num")
+    private String smplNum;
+    @JSONField(name = "smpl_name")
+    private String smplName;
+    @JSONField(name = "aply_cntn")
+    private String aplyCntn;
+    @JSONField(name = "test_usr_id")
+    private Integer testUsrId;
+    @JSONField(name = "test_usr_name")
+    private String testUsrName;
+    @JSONField(name = "ordr_usr_id")
+    private Integer ordrUsrId;
+    @JSONField(name = "ordr_usr_name")
+    private String ordrUsrName;
+    @JSONField(name = "audt_usr_id")
+    private Integer audtUsrId;
+    @JSONField(name = "audt_usr_name")
+    private String audtUsrName;
+    @JSONField(name = "aply_flow_num")
+    private String aplyFlowNum;
+    @JSONField(name = "emcy_mrk")
+    private Integer emcyMrk;
+    @JSONField(name = "dept_name")
+    private String deptName;
+    @JSONField(name = "doc_name")
+    private String docName;
+    @JSONField(name = "id_card")
+    private String idCard;
+    @JSONField(name = "ic_card")
+    private String icCard;
+    @JSONField(name = "ptnt_no")
+    private String ptntNo;
+    @JSONField(name = "ptnt_no_type")
+    private Integer ptntNoType;
+    @JSONField(name = "ptnt_name")
+    private String ptntName;
+    @JSONField(name = "ptnt_sex")
+    private Integer ptntSex;
+    @JSONField(name = "ptnt_age_first")
+    private String ptntAgeFirst;
+    @JSONField(name = "ptnt_age_second")
+    private Integer ptntAgeSecond;
+    @JSONField(name = "ptnt_age")
+    private String ptntAge;
+    @JSONField(name = "ptnt_age_unit")
+    private Integer ptntAgeUnit;
+    @JSONField(name = "ptnt_bed_no")
+    private String ptntBedNo;
+    @JSONField(name = "diag_info")
+    private String diagInfo;
+    @JSONField(name = "ctat_addr")
+    private String ctatAddr;
+    @JSONField(name = "phone_num")
+    private String phoneNum;
+    @JSONField(name = "ordr_remark")
+    private String ordrRemark;
+    @JSONField(name = "sqnc_num")
+    private Integer sqncNum;
+    @JSONField(name = "dvce_name")
+    private String dvceName;
+}

+ 12 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyDetailResponse.java

@@ -0,0 +1,12 @@
+package org.thyy.thirdpartapi.inspection.response.jy;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class JyDetailResponse {
+    private JyDetailOrder order;
+    private List<JyDetailItem> items;
+    private List<JyDetailBacterias> bacterias;
+}

+ 23 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/response/jy/JyIndexResponse.java

@@ -0,0 +1,23 @@
+package org.thyy.thirdpartapi.inspection.response.jy;
+
+import lombok.Data;
+
+@Data
+public class JyIndexResponse {
+    private String reportId;
+    private String reportType;
+    private String icCard;
+    private String idCard;
+    private String patientNumType;
+    private String patientNum;
+    private String patientName;
+    private String patientGender;
+    private String patientAge;
+    private String departName;
+    private String doctorName;
+    private String sampleNum;
+    private String printStatus;
+    private String trscDate;
+    private String barCode;
+    private String examPurpose;
+}

+ 1 - 11
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/tts/TtsController.java

@@ -1,34 +1,24 @@
 package org.thyy.thirdpartapi.tts;
 
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.ObjectProvider;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import org.thyy.utils.exception.ExceptionEnum;
-import org.thyy.utils.result.R;
 import org.thyy.utils.result.ResultVo;
 
 
 @RestController
-@RequestMapping("/xfTtsApi")
+@RequestMapping("/ttsApi")
 @Slf4j
 public class TtsController {
 
     private final Tts ttsService;
-    private DefaultTgetObject defaultTgetObject;
 
     public TtsController(Tts ttsService) {
         this.ttsService = ttsService;
     }
 
-    static class DefaultTgetObject implements Tts {
-        @Override
-        public ResultVo<String> textToSpeech(TtsRequest request) {
-            return R.fail(ExceptionEnum.NOT_SERVICE);
-        }
-    }
 
     @PostMapping("/textToSpeech")
     public ResultVo<String> textToSpeech(@RequestBody TtsRequest request) {

+ 3 - 1
thyy-thirdpart-api/src/main/resources/application.yml

@@ -6,7 +6,6 @@ server:
   servlet:
     context-path: /thyy/thirdpart/api
 
-
 thyy:
   tts:
     service: xfyun
@@ -15,3 +14,6 @@ thyy:
     app-id: fdde4cef
     api-key: 95a78dd3cfcc4863e3c003352ca8ec65
     api-secret: OWZjZGE4NjI3MDdkYzg4ZjllY2VjNGQ0
+  inspection:
+    jy: http://172.16.32.178/apis/third/report/query
+    service: shanghaihaotai

+ 1 - 1
thyy-scheduled/src/main/java/org/thyy/scheduled/config/RestTemplateConfig.java → thyy-utils/src/main/java/org/thyy/utils/config/RestTemplateConfig.java

@@ -1,4 +1,4 @@
-package org.thyy.scheduled.config;
+package org.thyy.utils.config;
 
 import org.springframework.boot.web.client.RestTemplateBuilder;
 import org.springframework.context.annotation.Bean;