瀏覽代碼

开发吉大大学长春二院的his

vothin 1 年之前
父節點
當前提交
645fa8bcd3
共有 54 個文件被更改,包括 4134 次插入58 次删除
  1. 2088 0
      log/wdkl.log
  2. 7 0
      ncs-entrace-service/src/main/java/com/wdklian/ncs/ms/entrace/controller/DoctorAdviceController.java
  3. 7 0
      ncs-entrace-service/src/main/java/com/wdklian/ncs/ms/entrace/controller/PatientController.java
  4. 4 0
      ncs-ms-feign/src/main/java/com/wdklian/ncs/ms/feignclient/entrace/EntraceDoctorAdviceFeignClient.java
  5. 4 0
      ncs-ms-feign/src/main/java/com/wdklian/ncs/ms/feignclient/entrace/EntracePatientFeignClient.java
  6. 1 1
      ncs-ms-framework/pom.xml
  7. 1 0
      pom.xml
  8. 1 1
      sign-gather/pom.xml
  9. 1 1
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-common/1.0-SNAPSHOT/_remote.repositories
  10. 0 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-common/1.0-SNAPSHOT/datax-common-1.0-SNAPSHOT.jar.lastUpdated
  11. 0 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-common/1.0-SNAPSHOT/datax-common-1.0-SNAPSHOT.pom.lastUpdated
  12. 2 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-common/1.0-SNAPSHOT/resolver-status.properties
  13. 1 1
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-core/1.0-SNAPSHOT/_remote.repositories
  14. 0 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-core/1.0-SNAPSHOT/datax-core-1.0-SNAPSHOT.jar.lastUpdated
  15. 0 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-core/1.0-SNAPSHOT/datax-core-1.0-SNAPSHOT.pom.lastUpdated
  16. 2 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-core/1.0-SNAPSHOT/resolver-status.properties
  17. 1 1
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/1.0-SNAPSHOT/_remote.repositories
  18. 0 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/1.0-SNAPSHOT/datax-transformer-1.0-SNAPSHOT.jar.lastUpdated
  19. 0 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/1.0-SNAPSHOT/datax-transformer-1.0-SNAPSHOT.pom.lastUpdated
  20. 2 4
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/1.0-SNAPSHOT/resolver-status.properties
  21. 0 6
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/datax-transformer-.jar.lastUpdated
  22. 0 6
      synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/datax-transformer-.pom.lastUpdated
  23. 1 1
      synchrony-scheduled-task/pom.xml
  24. 193 0
      third-part-ccey/pom.xml
  25. 26 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/CCEYApplication.java
  26. 108 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/ConfigSwagger2.java
  27. 24 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/ScheduleRunner.java
  28. 29 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/config/CCEYConfig.java
  29. 41 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/config/RestTemplateConfig.java
  30. 91 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/controller/CCEYSyncController.java
  31. 64 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/enums/CCEYTranCodeEnum.java
  32. 76 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYCustomerAdviceItem.java
  33. 74 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYCustomerInfoItem.java
  34. 56 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYCustomerNursingItem.java
  35. 26 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYQuery.java
  36. 25 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYQueryRequest.java
  37. 26 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYQueryResponse.java
  38. 56 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYRequestBody.java
  39. 34 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYResponseAdvice.java
  40. 36 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYResponseInfo.java
  41. 34 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYResponseNursing.java
  42. 27 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYSOAPBody.java
  43. 27 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYSOAPEnvelope.java
  44. 77 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYCustomerAdviceService.java
  45. 161 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYCustomerInfoService.java
  46. 104 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYCustomerNursingService.java
  47. 284 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYMainDataQueryService.java
  48. 192 0
      third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/utils/CCEYUtils.java
  49. 44 0
      third-part-ccey/src/main/resources/bootstrap.yml
  50. 72 0
      third-part-ccey/src/main/resources/logback-ccey.xml
  51. 1 1
      third-part-wn-hl7/pom.xml
  52. 1 1
      third-part-zldata/pom.xml
  53. 1 1
      third-party-common/pom.xml
  54. 1 1
      third-party-gateway/pom.xml

File diff suppressed because it is too large
+ 2088 - 0
log/wdkl.log


+ 7 - 0
ncs-entrace-service/src/main/java/com/wdklian/ncs/ms/entrace/controller/DoctorAdviceController.java

@@ -34,6 +34,13 @@ public class DoctorAdviceController {
         return CommonResult.success(doctorAdviceService.saveDoctorAdvice(doctoradvices));
     }
 
+
+    @PostMapping("/sync-list-no-back")
+    @ApiOperation(value = "批量新增或更新医嘱,返回更新成功的医嘱列表",response = ListDoctorAdviceResponse.class)
+    public CommonResult syncDoctorAdviceNoBack(@RequestBody @NotEmpty(message = "医嘱列表不能为空") @Valid List<DoctorAdviceDO> doctoradvices) {
+        return CommonResult.success(doctorAdviceService.saveDoctorAdvice(doctoradvices));
+    }
+
     @PostMapping("/sync-single")
     @ApiOperation(value = "新增或更新单个医嘱信息,返回更新后的医嘱",response = SingleDoctorAdviceResponse.class)
     public CommonResult<DoctorAdviceDO> syncSingleDoctorAdvice(@RequestBody @NotNull(message = "医嘱数据不能为null") @Valid DoctorAdviceDO doctorAdvice) {

+ 7 - 0
ncs-entrace-service/src/main/java/com/wdklian/ncs/ms/entrace/controller/PatientController.java

@@ -35,6 +35,13 @@ public class PatientController {
 
     }
 
+    @PostMapping("/sync-list-no-back")
+    @ApiOperation(value = "新增或更新患者信息,返回更新成功的患者列表", response = ListPatientResponse.class)
+    public CommonResult syncPatientNoBack(@RequestBody @NotEmpty(message = "患者列表不能为空") @Valid List<PatientDO> patients) {
+        return CommonResult.success(patientService.savePatient(patients));
+
+    }
+
     @PostMapping("/sync-single")
     @ApiOperation(value = "新增或更新单个患者信息,返回更新成功的患者", response = SinglePatientResponse.class)
     public CommonResult<PatientDO> syncSinglePatient(@RequestBody @NotNull(message = "患者数据不能为null") @Valid PatientDO patient) {

+ 4 - 0
ncs-ms-feign/src/main/java/com/wdklian/ncs/ms/feignclient/entrace/EntraceDoctorAdviceFeignClient.java

@@ -2,6 +2,7 @@ package com.wdklian.ncs.ms.feignclient.entrace;
 
 import com.wdklian.ncs.ms.common.entity.open.dos.DoctorAdviceDO;
 import com.wdklian.ncs.ms.exception.CustomizedConfiguration;
+import com.wdklian.ncs.ms.framework.mvc.CommonResult;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.stereotype.Component;
 import org.springframework.validation.annotation.Validated;
@@ -26,6 +27,9 @@ public interface EntraceDoctorAdviceFeignClient {
     @PostMapping("/sync-list")
     List<DoctorAdviceDO> syncDoctorAdvice(@RequestBody @NotEmpty(message = "医嘱列表不能为空") @Valid List<DoctorAdviceDO> doctoradvices);
 
+    @PostMapping("/sync-list-no-back")
+    CommonResult syncDoctorAdviceNoBack(@RequestBody @NotEmpty(message = "医嘱列表不能为空") @Valid List<DoctorAdviceDO> doctoradvices);
+
     @PostMapping("/sync-single")
     DoctorAdviceDO syncSingleDoctorAdvice(@RequestBody @NotNull(message = "医嘱数据不能为null") @Valid DoctorAdviceDO doctorAdvice);
 

+ 4 - 0
ncs-ms-feign/src/main/java/com/wdklian/ncs/ms/feignclient/entrace/EntracePatientFeignClient.java

@@ -1,6 +1,7 @@
 package com.wdklian.ncs.ms.feignclient.entrace;
 
 import com.wdklian.ncs.ms.common.entity.open.dos.PatientDO;
+import com.wdklian.ncs.ms.framework.mvc.CommonResult;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.stereotype.Component;
 import org.springframework.validation.annotation.Validated;
@@ -25,6 +26,9 @@ public interface EntracePatientFeignClient {
     @PostMapping("/sync-list")
     List<PatientDO> syncPatient(@RequestBody @NotEmpty(message = "患者列表不能为空") @Valid List<PatientDO> patients);
 
+    @PostMapping("/sync-list-no-back")
+    CommonResult syncPatientNoBack(@RequestBody @NotEmpty(message = "患者列表不能为空") @Valid List<PatientDO> patients);
+
     @PostMapping("/sync-single")
     PatientDO syncSinglePatient(@RequestBody @NotNull(message = "患者数据不能为null") @Valid PatientDO patient);
 

+ 1 - 1
ncs-ms-framework/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>ncs-ms</artifactId>
         <groupId>com.wdklian</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>jar</packaging>

+ 1 - 0
pom.xml

@@ -27,6 +27,7 @@
         <module>ncs-system-service</module>
         <module>ncs-ms-feign</module>
         <module>ncs-entrace-service</module>
+        <module>third-part-ccey</module>
     </modules>
 
 

+ 1 - 1
sign-gather/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>ncs-ms</artifactId>
         <groupId>com.wdklian</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>jar</packaging>

+ 1 - 1
synchrony-scheduled-task/maven/com/alibaba/datax/datax-common/1.0-SNAPSHOT/_remote.repositories

@@ -1,4 +1,4 @@
 #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
-#Sat Jan 27 17:32:43 CST 2024
+#Thu Mar 28 16:56:45 CST 2024
 datax-common-1.0-SNAPSHOT.jar>local-project-repositor=
 datax-common-1.0-SNAPSHOT.pom>local-project-repositor=

+ 0 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-common/1.0-SNAPSHOT/datax-common-1.0-SNAPSHOT.jar.lastUpdated

@@ -1,4 +0,0 @@
-#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
-#Mon Jan 29 11:08:46 CST 2024
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.error=
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.lastUpdated=1706497726031

+ 0 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-common/1.0-SNAPSHOT/datax-common-1.0-SNAPSHOT.pom.lastUpdated

@@ -1,4 +0,0 @@
-#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
-#Mon Jan 29 11:08:45 CST 2024
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.error=
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.lastUpdated=1706497725785

+ 2 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-common/1.0-SNAPSHOT/resolver-status.properties

@@ -1,6 +1,4 @@
 #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
-#Thu Mar 28 16:49:45 CST 2024
-maven-metadata-local-project-repository.xml.lastUpdated=1706497725776
-maven-metadata-local-project-repository.xml.error=
-maven-metadata-local-project-repositor.xml.lastUpdated=1711615785565
+#Thu Mar 28 16:56:44 CST 2024
+maven-metadata-local-project-repositor.xml.lastUpdated=1711616204727
 maven-metadata-local-project-repositor.xml.error=

+ 1 - 1
synchrony-scheduled-task/maven/com/alibaba/datax/datax-core/1.0-SNAPSHOT/_remote.repositories

@@ -1,4 +1,4 @@
 #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
-#Sat Jan 27 17:32:42 CST 2024
+#Thu Mar 28 16:56:45 CST 2024
 datax-core-1.0-SNAPSHOT.pom>local-project-repositor=
 datax-core-1.0-SNAPSHOT.jar>local-project-repositor=

+ 0 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-core/1.0-SNAPSHOT/datax-core-1.0-SNAPSHOT.jar.lastUpdated

@@ -1,4 +0,0 @@
-#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
-#Mon Jan 29 11:08:46 CST 2024
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.error=
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.lastUpdated=1706497726031

+ 0 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-core/1.0-SNAPSHOT/datax-core-1.0-SNAPSHOT.pom.lastUpdated

@@ -1,4 +0,0 @@
-#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
-#Mon Jan 29 11:08:45 CST 2024
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.error=
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.lastUpdated=1706497725766

+ 2 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-core/1.0-SNAPSHOT/resolver-status.properties

@@ -1,6 +1,4 @@
 #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
-#Thu Mar 28 16:49:45 CST 2024
-maven-metadata-local-project-repository.xml.lastUpdated=1706497725749
-maven-metadata-local-project-repository.xml.error=
-maven-metadata-local-project-repositor.xml.lastUpdated=1711615785557
+#Thu Mar 28 16:56:44 CST 2024
+maven-metadata-local-project-repositor.xml.lastUpdated=1711616204448
 maven-metadata-local-project-repositor.xml.error=

+ 1 - 1
synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/1.0-SNAPSHOT/_remote.repositories

@@ -1,4 +1,4 @@
 #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
-#Sat Jan 27 17:32:42 CST 2024
+#Thu Mar 28 16:56:45 CST 2024
 datax-transformer-1.0-SNAPSHOT.pom>local-project-repositor=
 datax-transformer-1.0-SNAPSHOT.jar>local-project-repositor=

+ 0 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/1.0-SNAPSHOT/datax-transformer-1.0-SNAPSHOT.jar.lastUpdated

@@ -1,4 +0,0 @@
-#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
-#Mon Jan 29 11:08:46 CST 2024
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.error=
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.lastUpdated=1706497726032

+ 0 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/1.0-SNAPSHOT/datax-transformer-1.0-SNAPSHOT.pom.lastUpdated

@@ -1,4 +0,0 @@
-#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
-#Mon Jan 29 11:08:45 CST 2024
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.error=
-file\:////Volumes/mac/projects/ncs/nc.database.sync/maven/.lastUpdated=1706497725832

+ 2 - 4
synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/1.0-SNAPSHOT/resolver-status.properties

@@ -1,6 +1,4 @@
 #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
-#Thu Mar 28 16:49:45 CST 2024
-maven-metadata-local-project-repository.xml.lastUpdated=1706497725797
-maven-metadata-local-project-repository.xml.error=
-maven-metadata-local-project-repositor.xml.lastUpdated=1711615785574
+#Thu Mar 28 16:56:44 CST 2024
+maven-metadata-local-project-repositor.xml.lastUpdated=1711616204755
 maven-metadata-local-project-repositor.xml.error=

+ 0 - 6
synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/datax-transformer-.jar.lastUpdated

@@ -1,6 +0,0 @@
-#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
-#Sat Jan 27 17:33:12 CST 2024
-http\://maven.aliyun.com/nexus/content/groups/public/.error=
-file\:////Volumes/mac/projects/ncs-ms/synchrony-scheduled-task/maven/.error=
-http\://maven.aliyun.com/nexus/content/groups/public/.lastUpdated=1706347992072
-file\:////Volumes/mac/projects/ncs-ms/synchrony-scheduled-task/maven/.lastUpdated=1706347991702

+ 0 - 6
synchrony-scheduled-task/maven/com/alibaba/datax/datax-transformer/datax-transformer-.pom.lastUpdated

@@ -1,6 +0,0 @@
-#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
-#Sat Jan 27 17:33:11 CST 2024
-http\://maven.aliyun.com/nexus/content/groups/public/.error=
-file\:////Volumes/mac/projects/ncs-ms/synchrony-scheduled-task/maven/.error=
-http\://maven.aliyun.com/nexus/content/groups/public/.lastUpdated=1706347991503
-file\:////Volumes/mac/projects/ncs-ms/synchrony-scheduled-task/maven/.lastUpdated=1706347991141

+ 1 - 1
synchrony-scheduled-task/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>ncs-ms</artifactId>
         <groupId>com.wdklian</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <version>1.0.0</version>

+ 193 - 0
third-part-ccey/pom.xml

@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>ncs-ms</artifactId>
+        <groupId>com.wdklian</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>third-part-ccey</artifactId>
+    <description>吉林大学长春二院数据对接</description>
+    <version>1.0.0</version>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.springboot</groupId>
+                <artifactId>camel-spring-boot-bom</artifactId>
+                <version>3.14.1</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.wdklian</groupId>
+            <artifactId>ncs-ms-framework</artifactId>
+            <version>1.0.0</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-alibaba-commons</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.78</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.apache.camel.springboot</groupId>
+            <artifactId>camel-stream-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.springboot</groupId>
+            <artifactId>camel-mllp-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.springboot</groupId>
+            <artifactId>camel-hl7-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.springboot</groupId>
+            <artifactId>camel-bean-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ca.uhn.hapi</groupId>
+            <artifactId>hapi-structures-v24</artifactId>
+            <version>2.3</version>
+            <!-- use the same version as your hapi-base version -->
+        </dependency>
+        <!-- JAXB dependecies -->
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-core</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.13.4.2</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-loadbalancer</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.ben-manes.caffeine</groupId>
+            <artifactId>caffeine</artifactId>
+            <version>3.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.12</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-test</artifactId>
+            <version>2.1.8.RELEASE</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <version>5.1.9.RELEASE</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>3.11.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.wdklian</groupId>
+            <artifactId>ncs-ms-feign</artifactId>
+            <version>1.0.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>de.siegmar</groupId>
+            <artifactId>logback-gelf</artifactId>
+            <version>3.0.0</version>
+        </dependency>
+
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.7.10</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>

+ 26 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/CCEYApplication.java

@@ -0,0 +1,26 @@
+package com.wdklian.ncs.ms.ccey;
+
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.FilterType;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/2 17:38
+ */
+@SpringBootApplication(exclude = {DruidDataSourceAutoConfigure.class, DataSourceAutoConfiguration.class})
+@EnableDiscoveryClient
+@ComponentScan(basePackages = "com.wdklian.ncs.ms",excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX,pattern = "com.wdklian.ncs.ms.common.service.*"))
+@EnableFeignClients(basePackages ="com.wdklian.ncs.ms.feignclient")
+public class CCEYApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(CCEYApplication.class,args);
+    }
+}

+ 108 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/ConfigSwagger2.java

@@ -0,0 +1,108 @@
+package com.wdklian.ncs.ms.ccey;
+
+
+import org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties;
+import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
+import org.springframework.boot.actuate.autoconfigure.web.server.ManagementPortType;
+import org.springframework.boot.actuate.endpoint.ExposableEndpoint;
+import org.springframework.boot.actuate.endpoint.web.*;
+import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier;
+import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpointsSupplier;
+import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.Environment;
+import org.springframework.util.StringUtils;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+@Configuration
+@EnableSwagger2
+public class ConfigSwagger2 implements WebMvcConfigurer {
+    /**
+     * 创建RESTFUL API文档内容
+     * @return
+     */
+    @Bean
+    public Docket createRestApi(){
+        return new Docket(DocumentationType.SWAGGER_2)
+                //此处参数为ApiInfo对象
+                //指定构建api文档的详细信息的方法
+                .apiInfo(apiInfo())
+                .select()
+                //指定构建api接口的包路径-指定具体包路径
+//                .apis(RequestHandlerSelectors.basePackage("com.provider.controller"))
+                //指定构建api接口的包路径-此处为所有包(未指定)
+                .apis(RequestHandlerSelectors.any())
+                //访问路径下面的接口
+//                .paths(PathSelectors.any())
+//                .paths(PathSelectors.ant("/libai/**"))
+//                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+                //可根据url路径设置那些请求加入文档,忽略哪些请求
+                .paths(PathSelectors.any())
+                .build()
+                //分组管理可以与哪个访问路径结合使用
+//                .groupName("用户管理")
+                ;
+    }
+
+    /**
+     * 创建API界面的基本信息
+     * @return 返回一个构建好的ApiInfo对象
+     */
+    private ApiInfo apiInfo(){
+        return new ApiInfoBuilder()
+                //界面标题
+                .title("Swagger2构建Restful API文档")
+                //接口描述
+                .description("后端API接口文档展示")
+                //联系方式,联系人-网址-邮箱
+                .contact(new Contact("WDKL", "http://www.wdklian.com", "service@wdklian.com"))
+                //版本信息
+                .version("1.0.0")
+                //证书描述
+                .license("访问主页")
+                //以上全部,开始构建
+                .build();
+    }
+
+    @Bean
+    public WebMvcEndpointHandlerMapping webEndpointServletHandlerMapping(WebEndpointsSupplier webEndpointsSupplier,
+                                                                         ServletEndpointsSupplier servletEndpointsSupplier, ControllerEndpointsSupplier controllerEndpointsSupplier,
+                                                                         EndpointMediaTypes endpointMediaTypes, CorsEndpointProperties corsProperties,
+                                                                         WebEndpointProperties webEndpointProperties, Environment environment) {
+        List<ExposableEndpoint<?>> allEndpoints = new ArrayList<>();
+        Collection<ExposableWebEndpoint> webEndpoints = webEndpointsSupplier.getEndpoints();
+        allEndpoints.addAll(webEndpoints);
+        allEndpoints.addAll(servletEndpointsSupplier.getEndpoints());
+        allEndpoints.addAll(controllerEndpointsSupplier.getEndpoints());
+        String basePath = webEndpointProperties.getBasePath();
+        EndpointMapping endpointMapping = new EndpointMapping(basePath);
+        boolean shouldRegisterLinksMapping =
+                webEndpointProperties.getDiscovery().isEnabled() && (StringUtils.hasText(basePath)
+                        || ManagementPortType.get(environment).equals(ManagementPortType.DIFFERENT));
+        return new WebMvcEndpointHandlerMapping(endpointMapping, webEndpoints, endpointMediaTypes,
+                corsProperties.toCorsConfiguration(), new EndpointLinksResolver(allEndpoints, basePath),
+                shouldRegisterLinksMapping, null);
+    }
+
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
+    }
+
+
+}

+ 24 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/ScheduleRunner.java

@@ -0,0 +1,24 @@
+package com.wdklian.ncs.ms.ccey;
+
+import com.wdklian.ncs.ms.ccey.service.CCEYMainDataQueryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+
+@Component
+@Order(value = 2)
+public class ScheduleRunner implements ApplicationRunner {
+
+    @Autowired
+    private CCEYMainDataQueryService cceyMainDataQueryService;
+
+    @Override
+    public void run(ApplicationArguments args) throws Exception {
+        //开启主数据查询任务
+        cceyMainDataQueryService.scheduleMainDataSyncTask();
+
+    }
+}

+ 29 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/config/CCEYConfig.java

@@ -0,0 +1,29 @@
+package com.wdklian.ncs.ms.ccey.config;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/3 10:02
+ */
+@Component
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class CCEYConfig {
+
+    @Value("${ccey.requestUrl:#{'http://172.20.2.31:18888/services/FinanceSystemService?wsdl'}}")
+    private String requestUrl;
+
+    @Value("${ccey.syncTime:#{1}}")
+    private int syncTime;
+
+    @Value("${ccey.syncPeriod:#{'0 */10 * * * ?'}}")
+    private String syncPeriod;
+}

+ 41 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/config/RestTemplateConfig.java

@@ -0,0 +1,41 @@
+package com.wdklian.ncs.ms.ccey.config;
+
+import okhttp3.OkHttpClient;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.client.ClientHttpRequestFactory;
+import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.concurrent.TimeUnit;
+
+@Configuration
+public class RestTemplateConfig {
+
+    @ConditionalOnMissingBean(RestTemplate.class)
+    @Bean
+    public RestTemplate restTemplate() {
+        RestTemplate restTemplate = new RestTemplate();
+        restTemplate.getMessageConverters().add(new StringHttpMessageConverter());
+        return restTemplate;
+    }
+
+    /**
+     * 使用HttpClient作为底层客户端
+     *
+     * @return
+     */
+    private ClientHttpRequestFactory getClientHttpRequestFactory() {
+        OkHttpClient okHttpClient = new OkHttpClient.Builder()
+                .connectTimeout(5, TimeUnit.SECONDS)
+                .writeTimeout(5, TimeUnit.SECONDS)
+                .readTimeout(5, TimeUnit.SECONDS)
+                .build();
+        return new OkHttp3ClientHttpRequestFactory(okHttpClient);
+    }
+
+}

+ 91 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/controller/CCEYSyncController.java

@@ -0,0 +1,91 @@
+package com.wdklian.ncs.ms.ccey.controller;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.wdklian.ncs.ms.ccey.service.CCEYCustomerAdviceService;
+import com.wdklian.ncs.ms.ccey.service.CCEYCustomerInfoService;
+import com.wdklian.ncs.ms.ccey.service.CCEYCustomerNursingService;
+import com.wdklian.ncs.ms.common.entity.open.dos.DoctorAdviceDO;
+import com.wdklian.ncs.ms.common.entity.open.dos.PatientDO;
+import com.wdklian.ncs.ms.feignclient.entrace.EntraceDoctorAdviceFeignClient;
+import com.wdklian.ncs.ms.feignclient.entrace.EntracePatientFeignClient;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.catalina.LifecycleState;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.xml.bind.JAXBException;
+import java.util.List;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/3 14:43
+ */
+@RestController
+@Slf4j
+@Validated
+@RequestMapping("/changchueryuan")
+@Api(description = "长春二院数据查询并同步", tags = "长春二院数据查询并同步")
+public class CCEYSyncController {
+
+    @Autowired
+    private CCEYCustomerInfoService cceyCustomerInfoService;
+    @Autowired
+    private CCEYCustomerAdviceService cceyCustomerAdviceService;
+    @Autowired
+    private CCEYCustomerNursingService cceyCustomerNursingService;
+    @Autowired
+    private EntracePatientFeignClient entracePatientFeignClient;
+    @Autowired
+    private EntraceDoctorAdviceFeignClient entraceDoctorAdviceFeignClient;
+
+
+    @PostMapping(value = "/get_patients_by_dqks")
+    @ApiOperation(value = "查询科室下的所有用户", response = PatientDO.class)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "dqks", value = "科室代码", required = true, dataType = "string", paramType = "form"),
+    })
+    public List<PatientDO> getPatientsByDqks(@RequestParam("dqks") String dqks) throws JAXBException {
+        List<PatientDO> patientDOS = this.cceyCustomerInfoService.CCEYCustomerInfo(dqks);
+//        this.entracePatientFeignClient.syncPatient(patientDOS);
+        return patientDOS;
+    }
+
+    @PostMapping(value = "/get_nursings_by_brzyid")
+    @ApiOperation(value = "查询某个用户的所有护理数据", response = PatientDO.class)
+    @ApiImplicitParams({
+           @ApiImplicitParam(name = "name", value = "用户的名称", required = true, dataType = "string", paramType = "form"),
+            @ApiImplicitParam(name = "partkey", value = "科室的键值", required = true, dataType = "string", paramType = "form"),
+            @ApiImplicitParam(name = "brzyid", value = "用户的键值", required = true, dataType = "string", paramType = "form"),
+    })
+    public List<DoctorAdviceDO> getNursingsByBrzyid(@RequestParam("name") String name, @RequestParam("partkey") String partkey, @RequestParam("brzyid") String brzyid) throws JAXBException {
+        List<DoctorAdviceDO> doctorAdviceDOS = this.cceyCustomerNursingService.CCEYCustomerNursing(name,partkey, brzyid);
+        this.entraceDoctorAdviceFeignClient.syncDoctorAdvice(doctorAdviceDOS);
+        return doctorAdviceDOS;
+    }
+
+    @PostMapping(value = "/get_advices_by_brzyid")
+    @ApiOperation(value = "查询某个用户的所有医嘱数据", response = PatientDO.class)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "name", value = "用户的名称", required = true, dataType = "string", paramType = "form"),
+            @ApiImplicitParam(name = "partkey", value = "科室的键值", required = true, dataType = "string", paramType = "form"),
+            @ApiImplicitParam(name = "brzyid", value = "用户的键值", required = true, dataType = "string", paramType = "form"),
+    })
+    public List<DoctorAdviceDO> getDoctorAdvicesByBrzyid(@RequestParam("name") String name, @RequestParam("partkey") String partkey, @RequestParam("brzyid") String brzyid) throws JAXBException {
+        List<DoctorAdviceDO> doctorAdviceDOS = this.cceyCustomerAdviceService.CCEYCustomerAdvice(name, partkey, brzyid);
+        this.entraceDoctorAdviceFeignClient.syncDoctorAdvice(doctorAdviceDOS);
+        return doctorAdviceDOS;
+    }
+
+
+
+}

+ 64 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/enums/CCEYTranCodeEnum.java

@@ -0,0 +1,64 @@
+package com.wdklian.ncs.ms.ccey.enums;
+
+import java.util.Objects;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/3/29 11:37
+ */
+public enum CCEYTranCodeEnum {
+    CUSTOMER_INFO("CP0001", "在院患者基本信息"),
+    CUSTOMER_ADVICE("CP0002", "在院患者医嘱信息"),
+    CUSTOMER_NURSING("CP0006", "在院患者护理信息"),
+    ;
+    private final String value;
+    private final String typeName;
+
+
+    CCEYTranCodeEnum(String value, String typeName) {
+        this.value = value;
+        this.typeName = typeName;
+    }
+
+    public String value() {
+        return this.value;
+    }
+
+    public String typeName() {
+        return this.typeName;
+    }
+
+    /**
+     * 通过typeName 转换成枚举
+     *
+     * @param typeName
+     * @return
+     */
+    public static CCEYTranCodeEnum parseTypeName(String typeName) {
+        CCEYTranCodeEnum[] values = CCEYTranCodeEnum.values();
+        for (CCEYTranCodeEnum value : values) {
+            if (value.typeName().equals(typeName)) {
+                return value;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * 通过value值转换成枚举
+     *
+     * @param value
+     * @return
+     */
+    public static CCEYTranCodeEnum parseValue(String value) {
+        CCEYTranCodeEnum[] values = CCEYTranCodeEnum.values();
+        for (CCEYTranCodeEnum CCEYTranCodeEnum : values) {
+            if (Objects.equals(CCEYTranCodeEnum.value(), value)) {
+                return CCEYTranCodeEnum;
+            }
+        }
+        return null;
+    }
+}

+ 76 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYCustomerAdviceItem.java

@@ -0,0 +1,76 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/3/29 16:57
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+public class CCEYCustomerAdviceItem {
+    // 病区ID
+    @XmlElement(name = "NURSE_UNIT_CODE")
+    private String nurseUnitCode;
+
+    // 科室名称
+    @XmlElement(name = "DEPT_NAME")
+    private String deptName;
+
+    // 住院ID
+    @XmlElement(name = "PATIENT_ID")
+    private String patientId;
+
+    // 入院次数
+    @XmlElement(name = "IN_FQCY")
+    private String inFqcy;
+
+    // 医嘱ID
+    @XmlElement(name = "ADVICE_ID")
+    private String adviceId;
+
+    // 医嘱开始时间
+    @XmlElement(name = "ADVICE_TIME")
+    private String adviceTime;
+
+    // 医嘱类别
+    @XmlElement(name = "ADVICE_TYPE")
+    private String adviceType;
+
+    // 开嘱医生
+    @XmlElement(name = "ADVICE_DOCTOR")
+    private String adviceDoctor;
+
+    // 医嘱名称
+    @XmlElement(name = "ADVICE_TEXT")
+    private String adviceText;
+
+    // 频次
+    @XmlElement(name = "ADVICE_EXE_FQCY")
+    private String adviceExeFqcy;
+
+    @XmlElement(name = "UPDATE_FLAG")
+    private String updateFlag;
+
+    // 父医嘱ID
+    @XmlElement(name = "FUYIZID")
+    private String fuyizid;
+
+    // 是否抗菌药
+    @XmlElement(name = "SFKJY")
+    private String sfkjy;
+
+    // 医嘱状态
+    @XmlElement(name = "STATUS")
+    private String status;
+}

+ 74 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYCustomerInfoItem.java

@@ -0,0 +1,74 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/3/29 15:47
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+public class CCEYCustomerInfoItem {
+    // 住院ID
+    @XmlElement(name = "PATIENT_ID")
+    private String patientId;
+
+    // 床号
+    @XmlElement(name = "BED_NO")
+    private String bedNo;
+
+    // 住院号
+    @XmlElement(name = "INP_NO")
+    private String inpNo;
+
+    // 科室ID
+    @XmlElement(name = "DEPT_ID")
+    private String deptId;
+
+    // 病区ID
+    @XmlElement(name = "NURSE_UNIT_CODE")
+    private String nurseUnitCode;
+
+    // 用户姓名
+    @XmlElement(name = "PATIENT_NAME")
+    private String patientName;
+
+    // 用户性别
+    @XmlElement(name = "PATIENT_SEX")
+    private String patientSex;
+
+    // 出生日期
+    @XmlElement(name = "PATIENT_BIRTHDAY")
+    private String patientBirthday;
+
+    // 费用类别
+    @XmlElement(name = "CHARGE_TYPE")
+    private String chargeType;
+
+    // 入院日期
+    @XmlElement(name = "IN_TIME")
+    private String inTime;
+
+    @XmlElement(name = "TRANSFE_IN")
+    private String transfeIn;
+
+    // 主治医生
+    @XmlElement(name = "ZHUZHIYSXM")
+    private String doctor;
+
+    // 责任护士
+    @XmlElement(name = "ZERENHS")
+    private String nurse;
+
+}

+ 56 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYCustomerNursingItem.java

@@ -0,0 +1,56 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/3/29 17:32
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class CCEYCustomerNursingItem {
+    // 住院ID
+    @XmlElement(name = "PATIENT_ID")
+    private String patientId;
+
+    @XmlElement(name = "VISIT_ID")
+    private String visitId;
+
+    // 护理等级
+    @XmlElement(name = "NURSE_LEVEL")
+    private String nurseLevel;
+
+    // 跌倒坠床风险
+    @XmlElement(name = "FALL_RISK")
+    private String fallRisk;
+
+    // 压疮风险
+    @XmlElement(name = "PRESSURE_RISK")
+    private String pressureRisk;
+
+    // 烫伤风险
+    @XmlElement(name = "EMPYROSIS_RISK")
+    private String empyrosisRisk;
+
+    // 导管滑脱风险
+    @XmlElement(name = "PIPE_SLIPPING_RISK")
+    private String pipeSlippingRisk;
+
+    // 自理能力风险
+    @XmlElement(name = "SELF_CARE_RISK")
+    private String selfCareRisk;
+
+    // 走失风险
+    @XmlElement(name = "LOSE_RISK")
+    private String loseRisk;
+}

+ 26 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYQuery.java

@@ -0,0 +1,26 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/1 18:00
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "Query", namespace = "http://www.djhealthunion.com/")
+public class CCEYQuery {
+    @XmlElement(name = "query", namespace = "http://www.djhealthunion.com/")
+    private CCEYQueryRequest query;
+}

+ 25 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYQueryRequest.java

@@ -0,0 +1,25 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/1 18:00
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+public class CCEYQueryRequest {
+    @XmlElement(name = "request", namespace = "http://www.djhealthunion.com/")
+    private String request;
+}

+ 26 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYQueryResponse.java

@@ -0,0 +1,26 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/3/29 16:47
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+public class CCEYQueryResponse {
+
+    @XmlElement(name = "response", namespace = "http://www.djhealthunion.com/")
+    private String response;
+}

+ 56 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYRequestBody.java

@@ -0,0 +1,56 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/3/29 11:25
+ */
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlRootElement(name = "Request")
+public class CCEYRequestBody {
+
+    private String tranCode;
+    private String startTime;
+    private String endTime;
+    private String dqks;
+    private String brzyid;
+
+    @XmlElement(name = "TranCode")
+    public String getTranCode() {
+        return tranCode;
+    }
+
+    public void setTranCode(String tranCode) {
+        this.tranCode = tranCode;
+    }
+
+    @XmlElement(name = "Dqks")
+    public String getDqks() {
+        return dqks;
+    }
+
+    public void setDqks(String dqks) {
+        this.dqks = dqks;
+    }
+
+    @XmlElement(name = "Brzyid")
+    public String getBrzyid() {
+        return brzyid;
+    }
+
+    public void setBrzyid(String brzyid) {
+        this.brzyid = brzyid;
+    }
+}

+ 34 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYResponseAdvice.java

@@ -0,0 +1,34 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.*;
+import java.util.List;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/14 20:34
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "Response")
+public class CCEYResponseAdvice {
+    @XmlElement(name = "TranCode")
+    private String tranCode;
+
+    @XmlElement(name = "ResultCode")
+    private String resultCode;
+
+    @XmlElement(name = "ErrorMsg")
+    private String errorMsg;
+
+    @XmlElementWrapper(name = "Items")
+    @XmlElement(name = "Item")
+    private List<CCEYCustomerAdviceItem> CCEYCustomerAdviceItems;
+}

+ 36 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYResponseInfo.java

@@ -0,0 +1,36 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.*;
+import java.util.List;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/3/29 17:32
+ */
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "Response")
+public class CCEYResponseInfo {
+    @XmlElement(name = "TranCode")
+    private String tranCode;
+
+    @XmlElement(name = "ResultCode")
+    private String resultCode;
+
+    @XmlElement(name = "ErrorMsg")
+    private String errorMsg;
+
+    @XmlElementWrapper(name = "Items")
+    @XmlElement(name = "Item")
+    private List<CCEYCustomerInfoItem> CCEYCustomerInfoItems;
+
+}

+ 34 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYResponseNursing.java

@@ -0,0 +1,34 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.*;
+import java.util.List;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/14 20:34
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "Response")
+public class CCEYResponseNursing {
+    @XmlElement(name = "TranCode")
+    private String tranCode;
+
+    @XmlElement(name = "ResultCode")
+    private String resultCode;
+
+    @XmlElement(name = "ErrorMsg")
+    private String errorMsg;
+
+    @XmlElementWrapper(name = "Items")
+    @XmlElement(name = "Item")
+    private List<CCEYCustomerNursingItem> CCEYCustomerNursingItems;
+}

+ 27 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYSOAPBody.java

@@ -0,0 +1,27 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/1 14:47
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+public class CCEYSOAPBody {
+    @XmlElement(name = "QueryResponse", namespace = "http://www.djhealthunion.com/")
+    private CCEYQueryResponse queryResponse;
+
+    @XmlElement(name = "Query", namespace = "http://www.djhealthunion.com/")
+    private CCEYQuery query;
+}

+ 27 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/model/CCEYSOAPEnvelope.java

@@ -0,0 +1,27 @@
+package com.wdklian.ncs.ms.ccey.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.xml.bind.annotation.*;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/1 14:49
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Envelope")
+@XmlType(propOrder = {"header", "body"})
+public class CCEYSOAPEnvelope {
+    @XmlElement(name = "Header", required = false)
+    private String header;
+
+    @XmlElement(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Body")
+    private CCEYSOAPBody body;
+}

+ 77 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYCustomerAdviceService.java

@@ -0,0 +1,77 @@
+package com.wdklian.ncs.ms.ccey.service;
+
+import com.wdklian.ncs.ms.ccey.enums.CCEYTranCodeEnum;
+import com.wdklian.ncs.ms.ccey.model.CCEYCustomerAdviceItem;
+import com.wdklian.ncs.ms.ccey.model.CCEYResponseAdvice;
+import com.wdklian.ncs.ms.ccey.model.CCEYResponseInfo;
+import com.wdklian.ncs.ms.ccey.utils.CCEYUtils;
+import com.wdklian.ncs.ms.common.entity.open.dos.DoctorAdviceDO;
+import com.wdklian.ncs.ms.common.entity.open.dos.PatientDO;
+import com.wdklian.ncs.ms.feignclient.entrace.EntraceDoctorAdviceFeignClient;
+import com.wdklian.ncs.ms.feignclient.entrace.EntracePatientFeignClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.xml.bind.JAXBException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/2 14:44
+ */
+@Slf4j
+@Service
+public class CCEYCustomerAdviceService {
+
+    @Autowired
+    private CCEYUtils cceyUtils;
+    @Autowired
+    private EntracePatientFeignClient entracePatientFeignClient;
+    @Autowired
+    private EntraceDoctorAdviceFeignClient entraceDoctorAdviceFeignClient;
+
+    public List<DoctorAdviceDO> CCEYCustomerAdvice(String patientName, String partKey, String brzyid) throws JAXBException {
+        List<DoctorAdviceDO> doctorAdvices = new ArrayList<>();
+
+        String responseXml = this.cceyUtils.sendRequest(CCEYTranCodeEnum.CUSTOMER_ADVICE.value(), brzyid, null);
+        if (responseXml.equals("")) {
+            return doctorAdvices;
+        }
+        CCEYResponseAdvice response = this.cceyUtils.getCCEYResponseAdvice(responseXml);
+        if (response != null) {
+            DoctorAdviceDO doctorAdviceDO;
+            if (response.getCCEYCustomerAdviceItems().isEmpty()) {
+                return doctorAdvices;
+            }
+            for (CCEYCustomerAdviceItem item : response.getCCEYCustomerAdviceItems()) {
+                if (item.getAdviceId() != null && !item.getAdviceId().equals("")) {
+                    doctorAdviceDO = new DoctorAdviceDO();
+                    doctorAdviceDO.setHisKey(item.getAdviceId());
+                    doctorAdviceDO.setPatientKey(brzyid);
+                    doctorAdviceDO.setState(this.adviceStatus(item.getStatus()));
+                    doctorAdviceDO.setAdviceContent(item.getAdviceText());
+                    doctorAdviceDO.setAdviceTime(item.getAdviceTime());
+                    doctorAdviceDO.setPatientName(patientName);
+                    doctorAdviceDO.setHisPartKey(partKey);
+                    doctorAdvices.add(doctorAdviceDO);
+                }
+            }
+        }
+        return doctorAdvices;
+    }
+
+
+    private String adviceStatus(String status) {
+        switch (status) {
+            case "已停止":
+            case "已完成":
+                return "0";
+            default:
+                return "1";
+        }
+    }
+}

+ 161 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYCustomerInfoService.java

@@ -0,0 +1,161 @@
+package com.wdklian.ncs.ms.ccey.service;
+
+import com.wdklian.ncs.ms.ccey.enums.CCEYTranCodeEnum;
+import com.wdklian.ncs.ms.ccey.model.CCEYCustomerInfoItem;
+import com.wdklian.ncs.ms.ccey.model.CCEYResponseInfo;
+import com.wdklian.ncs.ms.ccey.utils.CCEYUtils;
+import com.wdklian.ncs.ms.common.entity.open.dos.EmployeeDO;
+import com.wdklian.ncs.ms.common.entity.open.dos.PatientDO;
+import com.wdklian.ncs.ms.feignclient.entrace.EntraceEmployeeFeignClient;
+import com.wdklian.ncs.ms.feignclient.entrace.EntracePatientFeignClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.xml.bind.JAXBException;
+import java.time.LocalDate;
+import java.time.Period;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/2 14:43
+ */
+@Slf4j
+@Service
+public class CCEYCustomerInfoService {
+
+    @Autowired
+    private CCEYUtils cceyUtils;
+    @Autowired
+    private EntraceEmployeeFeignClient entraceEmployeeFeignClient;
+    @Autowired
+    private EntracePatientFeignClient entracePatientFeignClient;
+
+    private final List<EmployeeDO> employees = new ArrayList<>();
+
+    public List<PatientDO> CCEYCustomerInfo(String dqks) throws JAXBException {
+        List<PatientDO> patients = new ArrayList<>();
+        String responseXml = this.cceyUtils.sendRequest(CCEYTranCodeEnum.CUSTOMER_INFO.value(), null, dqks);
+        if (responseXml.equals("")) {
+            return patients;
+        }
+        CCEYResponseInfo response = this.cceyUtils.getCCEYResponse(responseXml);
+        if (response != null) {
+            PatientDO patientDO = null;
+            List<PatientDO> syncPs = new ArrayList<>();
+            EmployeeDO employeeDO;
+            boolean result = false;
+            if (response.getCCEYCustomerInfoItems().isEmpty()) {
+                return patients;
+            }
+            for (CCEYCustomerInfoItem item : response.getCCEYCustomerInfoItems()) {
+                if (item.getPatientId() != null && !item.getPatientId().equals("")) {
+                    patientDO = new PatientDO();
+
+                    patientDO.setKeyval(item.getPatientId());
+                    patientDO.setPartKeyval(dqks);
+                    if (item.getBedNo() == null) {
+                        log.info("患者 ====> " + item.getPatientId() + " 没有床位,床位不能为空");
+                        continue;
+                    }
+                    else {
+                        patientDO.setBedNo(item.getBedNo());
+                    }
+                    if (item.getPatientName() == null) {
+                        log.info("患者 ====> " + item.getPatientId() + " 没有名字,年龄不能为空");
+                        continue;
+                    }
+                    else {
+                        patientDO.setName(item.getPatientName());
+                    }
+                    if (item.getPatientSex() == null) {
+                        log.info("患者 ====> " + item.getPatientId() + " 没有性别,性别不能为空");
+                        continue;
+                    }
+                    else {
+                        patientDO.setSex(item.getPatientSex());
+                    }
+
+                    if (item.getPatientBirthday() == null) {
+                        log.info("患者 ====> " + item.getPatientId() + " 没有出生日期,出生日期不能为空");
+                        continue;
+                    }
+                    else {
+                        patientDO.setBirthday(item.getPatientBirthday());
+                        patientDO.setAge(this.getAgeByBirthday(item.getPatientBirthday()));
+                    }
+                    if (item.getInTime() != null) {
+                        patientDO.setIndate(item.getInTime());
+                    }
+                    if (item.getInpNo() != null) {
+                        patientDO.setCardNo(item.getInpNo());
+                    }
+                    patientDO.setStatus("0");
+
+                    if (item.getDoctor() != null && !"".equals(item.getDoctor())) {
+                        patientDO.setDoctorKeyval(item.getDoctor() + "_keyval");
+                        if (!employees.isEmpty()) {
+                            result = employees.stream().anyMatch(p -> p.getKeyval().equals(item.getDoctor() + "_keyval"));
+                        }
+                        if (!result) {
+                            employeeDO = new EmployeeDO();
+                            employeeDO.setKeyval(item.getDoctor() + "_keyval");
+                            employeeDO.setPartKeyval(item.getDeptId());
+                            employeeDO.setName(item.getDoctor());
+                            employeeDO.setSex("未知");
+                            employeeDO.setType("医生");
+//                            this.entraceEmployeeFeignClient.syncSingleEmployee(employeeDO);
+                            log.info("同步医生数据 ======> " + item.getDoctor());
+                            employees.add(employeeDO);
+                        }
+                    }
+
+                    if (item.getNurse() != null && !"".equals(item.getNurse()) && !"-".equals(item.getNurse())) {
+                        patientDO.setNurseKeyval(item.getNurse() + "_keyval");
+
+                        if (!employees.isEmpty()) {
+                            result = employees.stream().anyMatch(p -> p.getKeyval().equals(item.getNurse() + "_keyval"));
+                        }
+                        if (!result) {
+                            employeeDO = new EmployeeDO();
+                            employeeDO.setKeyval(item.getNurse() + "_keyval");
+                            employeeDO.setPartKeyval(item.getDeptId());
+                            employeeDO.setName(item.getNurse());
+                            employeeDO.setSex("未知");
+                            employeeDO.setType("护士");
+//                            this.entraceEmployeeFeignClient.syncSingleEmployee(employeeDO);
+                            log.info("同步护士数据 ======> " + item.getDoctor());
+                            employees.add(employeeDO);
+                        }
+                    }
+//                    log.info(patientDO.toString());
+//                    syncPs.add(patientDO);
+                    patients.add(patientDO);
+                }
+//                if (syncPs.size() >= 30) {
+//                    this.entracePatientFeignClient.syncPatientNoBack(syncPs);
+//                    syncPs = new ArrayList<>();
+//                }
+            }
+//            if (!syncPs.isEmpty()) {
+//                this.entracePatientFeignClient.syncPatientNoBack(syncPs);
+//            }
+        }
+        return patients;
+    }
+
+
+
+    private String getAgeByBirthday(String birthday) {
+        LocalDate birthDate = LocalDate.parse(birthday, java.time.format.DateTimeFormatter.ISO_LOCAL_DATE);
+        LocalDate currentDate = LocalDate.now();
+        Period period = Period.between(birthDate, currentDate);
+        int age = period.getYears();
+        return String.valueOf(age);
+    }
+
+}

+ 104 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYCustomerNursingService.java

@@ -0,0 +1,104 @@
+package com.wdklian.ncs.ms.ccey.service;
+
+import com.wdklian.ncs.ms.ccey.enums.CCEYTranCodeEnum;
+import com.wdklian.ncs.ms.ccey.model.CCEYCustomerNursingItem;
+import com.wdklian.ncs.ms.ccey.model.CCEYResponseInfo;
+import com.wdklian.ncs.ms.ccey.model.CCEYResponseNursing;
+import com.wdklian.ncs.ms.ccey.utils.CCEYUtils;
+import com.wdklian.ncs.ms.common.entity.open.dos.DoctorAdviceDO;
+import com.wdklian.ncs.ms.common.entity.open.dos.PatientDO;
+import com.wdklian.ncs.ms.feignclient.entrace.EntraceDoctorAdviceFeignClient;
+import com.wdklian.ncs.ms.feignclient.entrace.EntracePatientFeignClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.xml.bind.JAXBException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/2 14:44
+ */
+@Slf4j
+@Service
+public class CCEYCustomerNursingService {
+
+    @Autowired
+    private CCEYUtils cceyUtils;
+    @Autowired
+    private EntracePatientFeignClient entracePatientFeignClient;
+    @Autowired
+    private EntraceDoctorAdviceFeignClient entraceDoctorAdviceFeignClient;
+
+    public List<DoctorAdviceDO> CCEYCustomerNursing(String patientName, String partKey, String brzyid) throws JAXBException {
+        List<DoctorAdviceDO> doctorAdvices = new ArrayList<>();
+
+        String responseXml = this.cceyUtils.sendRequest(CCEYTranCodeEnum.CUSTOMER_NURSING.value(), brzyid, null);
+        if (responseXml.equals("")) {
+            return doctorAdvices;
+        }
+        CCEYResponseNursing response = this.cceyUtils.getCCEYResponseNursing(responseXml);
+        if (response != null) {
+            DoctorAdviceDO doctorAdviceDO;
+            if (response.getCCEYCustomerNursingItems().isEmpty()) {
+                return doctorAdvices;
+            }
+            for (CCEYCustomerNursingItem item : response.getCCEYCustomerNursingItems()) {
+                if (item.getVisitId() != null && !item.getVisitId().equals("")) {
+                    doctorAdviceDO = new DoctorAdviceDO();
+                    doctorAdviceDO.setHisPartKey(partKey);
+                    doctorAdviceDO.setPatientKey(brzyid);
+                    doctorAdviceDO.setPatientName(patientName);
+                    doctorAdviceDO.setState("1");
+
+                    if (item.getNurseLevel() != null && !item.getNurseLevel().equals("")) {
+                        doctorAdviceDO.setHisKey("NURSE_LEVEL_" + item.getVisitId());
+                        doctorAdviceDO.setAdviceContent("护理等级: " + item.getNurseLevel());
+                        doctorAdvices.add(doctorAdviceDO);
+                    }
+
+                    if (item.getFallRisk() != null && !item.getFallRisk().equals("")) {
+                        doctorAdviceDO.setHisKey("FALL_RISK_" + item.getVisitId());
+                        doctorAdviceDO.setAdviceContent("跌倒坠床风险: " + item.getFallRisk());
+                        doctorAdvices.add(doctorAdviceDO);
+                    }
+
+                    if (item.getPressureRisk() != null && !item.getPressureRisk().equals("")) {
+                        doctorAdviceDO.setHisKey("PRESSURE_RISK_" + item.getVisitId());
+                        doctorAdviceDO.setAdviceContent("压疮风险: " + item.getPressureRisk());
+                        doctorAdvices.add(doctorAdviceDO);
+                    }
+
+                    if (item.getEmpyrosisRisk() != null && !item.getEmpyrosisRisk().equals("")) {
+                        doctorAdviceDO.setHisKey("EMPYROSIS_RISK_" + item.getVisitId());
+                        doctorAdviceDO.setAdviceContent("烫伤风险: " + item.getEmpyrosisRisk());
+                        doctorAdvices.add(doctorAdviceDO);
+                    }
+
+                    if (item.getPipeSlippingRisk() != null && !item.getPipeSlippingRisk().equals("")) {
+                        doctorAdviceDO.setHisKey("PIPE_SLIPPING_RISK_" + item.getVisitId());
+                        doctorAdviceDO.setAdviceContent("导管滑脱风险: " + item.getPipeSlippingRisk());
+                        doctorAdvices.add(doctorAdviceDO);
+                    }
+
+                    if (item.getSelfCareRisk() != null && !item.getSelfCareRisk().equals("")) {
+                        doctorAdviceDO.setHisKey("SELF_CARE_RISK_" + item.getVisitId());
+                        doctorAdviceDO.setAdviceContent("自理能力风险: " + item.getSelfCareRisk());
+                        doctorAdvices.add(doctorAdviceDO);
+                    }
+
+                    if (item.getLoseRisk() != null && !item.getLoseRisk().equals("")) {
+                        doctorAdviceDO.setHisKey("LOSE_RISK_" + item.getVisitId());
+                        doctorAdviceDO.setAdviceContent("走失风险: " + item.getLoseRisk());
+                        doctorAdvices.add(doctorAdviceDO);
+                    }
+                }
+            }
+        }
+        return doctorAdvices;
+    }
+}

+ 284 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/service/CCEYMainDataQueryService.java

@@ -0,0 +1,284 @@
+package com.wdklian.ncs.ms.ccey.service;
+
+import cn.hutool.json.JSONArray;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.wdklian.ncs.ms.ccey.config.CCEYConfig;
+import com.wdklian.ncs.ms.ccey.model.*;
+import com.wdklian.ncs.ms.common.entity.open.dos.DoctorAdviceDO;
+import com.wdklian.ncs.ms.common.entity.open.dos.PatientDO;
+import com.wdklian.ncs.ms.common.entity.system.dos.ShopDO;
+import com.wdklian.ncs.ms.common.enums.ShopTypeEnum;
+import com.wdklian.ncs.ms.feignclient.entrace.EntraceDoctorAdviceFeignClient;
+import com.wdklian.ncs.ms.feignclient.entrace.EntracePatientFeignClient;
+import com.wdklian.ncs.ms.feignclient.open.DoctorAdviceFeignClient;
+import com.wdklian.ncs.ms.feignclient.open.PatientFeignClient;
+import com.wdklian.ncs.ms.feignclient.system.CustomerFeignClient;
+import com.wdklian.ncs.ms.feignclient.system.ShopFeignClient;
+import com.wdklian.ncs.ms.framework.config.TaskSchedule;
+import lombok.extern.slf4j.Slf4j;
+import org.checkerframework.checker.units.qual.A;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.Trigger;
+import org.springframework.scheduling.support.CronTrigger;
+import org.springframework.stereotype.Service;
+import springfox.documentation.spring.web.json.Json;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import java.io.StringWriter;
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/3/29 15:32
+ */
+@Slf4j
+@Service
+public class CCEYMainDataQueryService {
+
+    @Autowired
+    private CCEYConfig cceyConfig;
+    @Autowired
+    private TaskSchedule taskSchedule; //任务调度器
+
+    @Autowired
+    private CCEYCustomerInfoService cceyCustomerInfoService;
+    @Autowired
+    private CCEYCustomerAdviceService cceyCustomerAdviceService;
+    @Autowired
+    private CCEYCustomerNursingService cceyCustomerNursingService;
+    @Autowired
+    private EntracePatientFeignClient entracePatientFeignClient;
+    @Autowired
+    private EntraceDoctorAdviceFeignClient entraceDoctorAdviceFeignClient;
+    @Autowired
+    private CustomerFeignClient customerFeignClient;
+    @Autowired
+    private DoctorAdviceFeignClient doctorAdviceFeignClient;
+    @Autowired
+    private ShopFeignClient shopFeignClient;
+
+    public void scheduleMainDataSyncTask() {
+        Runnable syncMainDataRunnable = () -> {
+            log.info("开始执行同步任务");
+            // 同步用户信息
+            try {
+                List<ShopDO> shops = this.shopFeignClient.listShopByType(ShopTypeEnum.PART.value()).getData();
+                if (shops.isEmpty()) {
+                    log.info("未找到科室,任务结束");
+                    return;
+                }
+                shops = shops.stream().filter(p -> p.getHisCode() != null && !p.getHisCode().equals("")).collect(Collectors.toList());
+                if (shops.isEmpty()) {
+                    log.info("未找到带有 his_code 的科室,任务结束");
+                    return;
+                }
+                this.syncMain(shops);
+
+            } catch (JAXBException e) {
+                e.printStackTrace();
+            }
+        };
+        new Thread(syncMainDataRunnable).start();
+        Trigger triggerPatient = triggerContext -> new CronTrigger(cceyConfig.getSyncPeriod()).nextExecutionTime(triggerContext);
+        this.taskSchedule.scheduleTask("SYNC_CCEY_MAIN_DATA", syncMainDataRunnable, triggerPatient);
+    }
+
+
+    private void syncMain(List<ShopDO> shops) throws JAXBException {
+        List<PatientDO> patients = new ArrayList<>();
+        List<DoctorAdviceDO> advices = new ArrayList<>();
+        List<PatientDO> patientsByShop = new ArrayList<>();
+        List<DoctorAdviceDO> advicesByPatient = new ArrayList<>();
+
+
+        ObjectMapper mapper = new ObjectMapper();
+        String jsonStr = "";
+        for (ShopDO shopDO : shops) {
+            log.info("目前同步科室的键值 ===================> " + shopDO.getHisCode());
+            patientsByShop = this.cceyCustomerInfoService.CCEYCustomerInfo(shopDO.getHisCode());
+            if (!patientsByShop.isEmpty()) {
+                patients.addAll(patientsByShop);
+            }
+        }
+        if (!patients.isEmpty()) {
+            try {
+                this.entracePatientFeignClient.syncPatientNoBack(patients);
+//                jsonStr = mapper.writeValueAsString(patients);
+//                log.info(jsonStr);
+            }
+            catch (Exception e) {
+                log.error(e.getMessage());
+            }
+            log.info("同步患者数据");
+        }
+        else {
+            log.info("没有需要同步的患者数据");
+            return;
+        }
+
+        for (PatientDO patientDO : patients) {
+            advicesByPatient = this.cceyCustomerAdviceService.CCEYCustomerAdvice(patientDO.getName(), patientDO.getPartKeyval(), patientDO.getKeyval());
+            if (!advicesByPatient.isEmpty()) {
+                advices.addAll(advicesByPatient);
+            }
+
+            advicesByPatient = this.cceyCustomerNursingService.CCEYCustomerNursing(patientDO.getName(), patientDO.getPartKeyval(), patientDO.getKeyval());
+            if (!advicesByPatient.isEmpty()) {
+                advices.addAll(advicesByPatient);
+            }
+        }
+        if (!advices.isEmpty()) {
+            try {
+                this.entraceDoctorAdviceFeignClient.syncDoctorAdviceNoBack(advices);
+//                jsonStr = mapper.writeValueAsString(patients);
+//                log.info(jsonStr);
+            }
+            catch (Exception e) {
+                log.error(e.getMessage());
+            }
+            log.info("同步医嘱数据");
+        }
+        else {
+            log.info("没有需要同步医嘱数据");
+        }
+    }
+
+
+
+
+
+
+    public static void main(String[] args) throws JAXBException {
+        String requestXML = "";
+        CCEYRequestBody requestBody = new CCEYRequestBody();
+        requestBody.setTranCode("CP0001");
+        requestBody.setStartTime("2022-08-11");
+        requestBody.setEndTime("2022-08-11");
+        requestBody.setBrzyid("1");
+        requestBody.setDqks("1");
+
+        JAXBContext jaxbContext = JAXBContext.newInstance(CCEYRequestBody.class);
+        Marshaller marshaller = jaxbContext.createMarshaller();
+        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
+
+        StringWriter writer = new StringWriter();
+        marshaller.marshal(requestBody, writer);
+
+        requestXML = writer.toString();
+        String cdataWrappedRequestXML = "<![CDATA[" + requestXML + "]]>";
+        System.out.println(cdataWrappedRequestXML);
+//        System.out.println(requestXML);
+        System.out.println("================================================");
+//
+//        CCEYSOAPEnvelope envelope = new CCEYSOAPEnvelope();
+//        CCEYSOAPBody body = new CCEYSOAPBody();
+//        CCEYQuery query = new CCEYQuery();
+//        CCEYQueryRequest request = new CCEYQueryRequest();
+//        request.setRequest(requestXML);
+//        query.setQuery(request);
+//        body.setQuery(query);
+//        envelope.setBody(body);
+//
+//        JAXBContext jaxbContext2 = JAXBContext.newInstance(CCEYSOAPEnvelope.class);
+//        Marshaller marshaller2 = jaxbContext2.createMarshaller();
+//        marshaller2.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+//        marshaller2.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
+//
+//        StringWriter writer2 = new StringWriter();
+//        marshaller2.marshal(envelope, writer2);
+//
+//        System.out.println(writer2.toString());
+
+
+
+        String xml = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:djh=\"http://www.djhealthunion.com/\">\n" +
+                "   <soapenv:Header/>\n" +
+                "   <soapenv:Body>\n" +
+                "      <djh:Query>\n" +
+                "         <!--Optional:-->\n" +
+                "         <djh:query>\n" +
+                "            <djh:request>\n" +
+                "             <![CDATA[\n" +
+                                requestXML+
+                "             ]]>\n" +
+                "            </djh:request>\n" +
+                "         </djh:query>\n" +
+                "      </djh:Query>\n" +
+                "   </soapenv:Body>\n" +
+                "</soapenv:Envelope> ";
+        System.out.println(xml);
+
+//        String xml = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
+//                "   <soapenv:Body>\n" +
+//                "      <djh:QueryResponse xmlns:djh=\"http://www.djhealthunion.com/\">\n" +
+//                "         <djh:response><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+//                "<Response>\n" +
+//                "    <TranCode>CW1011</TranCode>\n" +
+//                "    <ResultCode>0</ResultCode>\n" +
+//                "    <ErrorMsg/>\n" +
+//                "    <Items>\n" +
+//                "        <Item>\n" +
+//                "            <PATIENT_ID>101493391</PATIENT_ID>\n" +
+//                "            <BED_NO>K06</BED_NO>\n" +
+//                "            <INP_NO>01491520</INP_NO>\n" +
+//                "            <IN_FQCY>3</IN_FQCY>\n" +
+//                "            <DEPT_ID>01541</DEPT_ID>\n" +
+//                "            <NURSE_UNIT_CODE>174</NURSE_UNIT_CODE>\n" +
+//                "            <PATIENT_NAME>吴春宇</PATIENT_NAME>\n" +
+//                "            <PATIENT_SEX>男</PATIENT_SEX>\n" +
+//                "            <PATIENT_BIRTHDAY>1963-03-20</PATIENT_BIRTHDAY>\n" +
+//                "            <CHARGE_TYPE>国家省医保</CHARGE_TYPE>\n" +
+//                "            <IN_TIME>2022-08-11</IN_TIME>\n" +
+//                "            <TRANSFE_IN>2022-08-11</TRANSFE_IN>\n" +
+//                "            <ZHUZHIYSXM>贾晓晶</ZHUZHIYSXM>\n" +
+//                "        </Item>\n" +
+//                "        <Item>\n" +
+//                "           ...\n" +
+//                "        </Item>\n" +
+//                "    </Items>\n" +
+//                "</Response>]]></djh:response>\n" +
+//                "      </djh:QueryResponse>\n" +
+//                "   </soapenv:Body>\n" +
+//                "</soapenv:Envelope> ";
+//
+//
+//        // 创建 JAXB 上下文
+//        JAXBContext jaxbContext = JAXBContext.newInstance(CCEYSOAPEnvelope.class);
+//
+//        // 创建 Unmarshaller 实例
+//        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+//
+//        // 将 XML 字符串转换为 Java 对象
+//        CCEYSOAPEnvelope envelope = (CCEYSOAPEnvelope) unmarshaller.unmarshal(new StringReader(xml));
+//
+//        // 从 SOAPEnvelope 获取 Response 对象
+//        CCEYQueryResponse queryResponse = envelope.getBody().getQueryResponse();
+//        String responseXml = queryResponse.getResponse();
+//
+//        // 再次使用 JAXB 解析嵌套的 XML
+//        JAXBContext responseContext = JAXBContext.newInstance(CCEYResponseInfo.class);
+//        Unmarshaller responseUnmarshaller = responseContext.createUnmarshaller();
+//        CCEYResponseInfo cceyResponse = (CCEYResponseInfo) responseUnmarshaller.unmarshal(new StringReader(responseXml));
+//
+//        if (cceyResponse != null) {
+//            // 输出解析结果
+//            System.out.println("TranCode: " + cceyResponse.getTranCode());
+//            System.out.println("ResultCode: " + cceyResponse.getResultCode());
+//            for (CCEYCustomerInfoItem item : cceyResponse.getCCEYCustomerInfoItems()) {
+//                System.out.println("Patient ID: " + item.getPatientId());
+//                System.out.println("Bed No: " + item.getBedNo());
+//                // 输出其他字段...
+//            }
+//        }
+    }
+}

+ 192 - 0
third-part-ccey/src/main/java/com/wdklian/ncs/ms/ccey/utils/CCEYUtils.java

@@ -0,0 +1,192 @@
+package com.wdklian.ncs.ms.ccey.utils;
+
+import com.sun.istack.Nullable;
+import com.wdklian.ncs.ms.ccey.config.CCEYConfig;
+import com.wdklian.ncs.ms.ccey.model.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.*;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * @author z
+ * @title
+ * @projectName ncs-ms
+ * @date 2024/4/2 10:42
+ */
+@Service
+public class CCEYUtils {
+    @Autowired
+    private CCEYConfig cceyConfig;
+    @Autowired
+    private RestTemplate restTemplate;
+
+    public String getCCEYRequestXml(String tranCode, @Nullable String brzyid, @Nullable String dqks) throws JAXBException {
+        String requestXML = "";
+        CCEYRequestBody requestBody = new CCEYRequestBody();
+        requestBody.setTranCode(tranCode);
+        if (brzyid != null) {
+            requestBody.setBrzyid(brzyid);
+        }
+        if (dqks != null) {
+            requestBody.setDqks(dqks);
+        }
+
+        JAXBContext jaxbContext = JAXBContext.newInstance(CCEYRequestBody.class);
+        Marshaller marshaller = jaxbContext.createMarshaller();
+        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
+
+        StringWriter writer = new StringWriter();
+        marshaller.marshal(requestBody, writer);
+
+        requestXML = writer.toString();
+
+        String xml = "";
+        if (!requestXML.equals("")) {
+            xml = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:djh=\"http://www.djhealthunion.com/\">\n" +
+                    "   <soapenv:Header/>\n" +
+                    "   <soapenv:Body>\n" +
+                    "      <djh:Query>\n" +
+                    "         <!--Optional:-->\n" +
+                    "         <djh:query>\n" +
+                    "            <djh:request>\n" +
+                    "             <![CDATA[" + requestXML + "]]>\n" +
+                    "            </djh:request>\n" +
+                    "         </djh:query>\n" +
+                    "      </djh:Query>\n" +
+                    "   </soapenv:Body>\n" +
+                    "</soapenv:Envelope> ";
+
+        }
+        return xml;
+    }
+
+
+
+    public CCEYResponseInfo getCCEYResponse(String xml) {
+        CCEYResponseInfo cceyResponseInfo = null;
+        try {
+            // 创建 JAXB 上下文
+            JAXBContext jaxbContext = JAXBContext.newInstance(CCEYSOAPEnvelope.class);
+
+            // 创建 Unmarshaller 实例
+            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+
+            // 将 XML 字符串转换为 Java 对象
+            CCEYSOAPEnvelope envelope = (CCEYSOAPEnvelope) unmarshaller.unmarshal(new StringReader(xml));
+
+            // 从 SOAPEnvelope 获取 Response 对象
+            CCEYQueryResponse queryResponse = envelope.getBody().getQueryResponse();
+            String responseXml = queryResponse.getResponse();
+
+            // 再次使用 JAXB 解析嵌套的 XML
+            JAXBContext responseContext = JAXBContext.newInstance(CCEYResponseInfo.class);
+            Unmarshaller responseUnmarshaller = responseContext.createUnmarshaller();
+            cceyResponseInfo = (CCEYResponseInfo) responseUnmarshaller.unmarshal(new StringReader(responseXml));
+        }
+        catch (JAXBException e) {
+            e.printStackTrace();
+        }
+
+        return cceyResponseInfo;
+    }
+
+
+    public CCEYResponseAdvice getCCEYResponseAdvice(String xml) {
+        CCEYResponseAdvice cceyResponseAdvice = null;
+        try {
+            // 创建 JAXB 上下文
+            JAXBContext jaxbContext = JAXBContext.newInstance(CCEYSOAPEnvelope.class);
+
+            // 创建 Unmarshaller 实例
+            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+
+            // 将 XML 字符串转换为 Java 对象
+            CCEYSOAPEnvelope envelope = (CCEYSOAPEnvelope) unmarshaller.unmarshal(new StringReader(xml));
+
+            // 从 SOAPEnvelope 获取 Response 对象
+            CCEYQueryResponse queryResponse = envelope.getBody().getQueryResponse();
+            String responseXml = queryResponse.getResponse();
+
+            // 再次使用 JAXB 解析嵌套的 XML
+            JAXBContext responseContext = JAXBContext.newInstance(CCEYResponseAdvice.class);
+            Unmarshaller responseUnmarshaller = responseContext.createUnmarshaller();
+            cceyResponseAdvice = (CCEYResponseAdvice) responseUnmarshaller.unmarshal(new StringReader(responseXml));
+        }
+        catch (JAXBException e) {
+            e.printStackTrace();
+        }
+
+        return cceyResponseAdvice;
+    }
+
+
+
+
+    public CCEYResponseNursing getCCEYResponseNursing(String xml) {
+        CCEYResponseNursing cceyResponseNursing = null;
+        try {
+            // 创建 JAXB 上下文
+            JAXBContext jaxbContext = JAXBContext.newInstance(CCEYSOAPEnvelope.class);
+
+            // 创建 Unmarshaller 实例
+            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+
+            // 将 XML 字符串转换为 Java 对象
+            CCEYSOAPEnvelope envelope = (CCEYSOAPEnvelope) unmarshaller.unmarshal(new StringReader(xml));
+
+            // 从 SOAPEnvelope 获取 Response 对象
+            CCEYQueryResponse queryResponse = envelope.getBody().getQueryResponse();
+            String responseXml = queryResponse.getResponse();
+
+            // 再次使用 JAXB 解析嵌套的 XML
+            JAXBContext responseContext = JAXBContext.newInstance(CCEYResponseNursing.class);
+            Unmarshaller responseUnmarshaller = responseContext.createUnmarshaller();
+            cceyResponseNursing = (CCEYResponseNursing) responseUnmarshaller.unmarshal(new StringReader(responseXml));
+        }
+        catch (JAXBException e) {
+            e.printStackTrace();
+        }
+
+        return cceyResponseNursing;
+    }
+
+
+
+    public String sendRequest(String tranCode,  @Nullable String brzyid, @Nullable String dqks) throws JAXBException {
+//        String url = "http://172.20.2.31:18888/services/FinanceSystemServer?wsdl";
+        String url = this.cceyConfig.getRequestUrl();
+        String xml = this.getCCEYRequestXml(tranCode, brzyid, dqks);
+
+        HttpHeaders httpHeaders = new HttpHeaders();
+//        httpHeaders.setContentType(new MediaType("application", "xml", StandardCharsets.UTF_8));
+//        httpHeaders.setContentType(MediaType.TEXT_HTML);
+        httpHeaders.setContentType(new MediaType("text", "html", StandardCharsets.UTF_8));
+//        httpHeaders.setCharset(StandardCharsets.UTF_8);
+//        httpHeaders.set("SOAPAction", "");
+        HttpEntity<String> entity = new HttpEntity<String>(xml, httpHeaders);
+
+        ResponseEntity<String> responseEntity = this.restTemplate.postForEntity(url, entity, String.class);
+        String response = "";
+        if (responseEntity.getStatusCode() == HttpStatus.OK) {
+            response = responseEntity.getBody();
+//            System.out.println(response);
+        } else {
+            System.out.println("Failed to send XML with status code: " + responseEntity.getStatusCode());
+        }
+//        String response = this.restTemplate.postForObject(url, xml, String.class);
+
+
+        return response;
+    }
+}

+ 44 - 0
third-part-ccey/src/main/resources/bootstrap.yml

@@ -0,0 +1,44 @@
+spring:
+  mvc:
+    pathmatch:
+      matching-strategy: ant_path_matcher
+  main:
+    allow-bean-definition-overriding: true
+    allow-circular-references: true
+  cloud:
+    loadbalancer:
+      cache:
+        enabled: true
+      enabled: true
+    nacos:
+      config:
+        server-addr: 192.168.1.198:8848
+        file-extension: yaml
+        username: nacos
+        password: nacos
+        context-path: /nacos
+        shared-configs:
+          - application-common.yaml #公共配置
+      discovery:
+        server-addr: 192.168.1.198:8848
+        username: nacos
+        password: nacos
+        namespace: public
+  config:
+    import: nacos:${spring.application.name}-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}?refresh=true
+  application:
+    name: changchueryuan-wdkl
+  profiles:
+    active: dev
+  jackson:
+    parser:
+      allow-unquoted-control-chars: true
+server:
+  port: 9030
+
+logging:
+  config: classpath:logback-ccey.xml
+
+graylog:
+  host: 192.168.1.198
+  port: 12201

+ 72 - 0
third-part-ccey/src/main/resources/logback-ccey.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<configuration scan="true" scanPeriod="10 seconds">
+    <contextName>logback</contextName>
+    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
+    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
+    <springProperty scope="context" name="GRAY_LOG_HOST" source="graylog.host" defaultValue="172.28.100.100"/>
+    <springProperty scope="context" name="GRAY_LOG_PORT" source="graylog.port" defaultValue="12201"/>
+    <!--    <property name="LOG_PATTERN"-->
+    <!--              value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger) - %cyan(%msg%n)"/>-->
+    <!-- 定义日志存储的路径,不要配置相对路径 -->
+    <!--    <property name="FILE_PATH" value="C:/Users/NineSun/Desktop/log/identity-log.%d{yyyy-MM-dd}.%i.log"/>-->
+    <!--0. 日志格式和颜色渲染 -->
+    <!-- 彩色日志依赖的渲染类 -->
+    <conversionRule conversionWord="clr"
+                    converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
+    <conversionRule conversionWord="wex"
+                    converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
+    <conversionRule conversionWord="wEx"
+                    converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
+    <!-- 彩色日志格式 -->
+    <property name="CONSOLE_LOG_PATTERN"
+              value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
+    <appender name="GELF" class="de.siegmar.logbackgelf.GelfUdpAppender">
+        <graylogHost>${GRAY_LOG_HOST}</graylogHost>
+        <graylogPort>${GRAY_LOG_PORT}</graylogPort>
+        <!-- 最大GELF数据块大小(单位:字节),508为建议最小值,最大值为65467 -->
+        <maxChunkSize>508</maxChunkSize>
+        <!-- 是否使用压缩 -->
+        <useCompression>true</useCompression>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>error</level>
+        </filter>
+        <encoder class="de.siegmar.logbackgelf.GelfEncoder">
+            <!-- 是否发送原生的日志信息 -->
+            <includeRawMessage>true</includeRawMessage>
+            <includeMarker>true</includeMarker>
+            <includeMdcData>true</includeMdcData>
+            <includeCallerData>true</includeCallerData>
+            <includeRootCauseData>true</includeRootCauseData>
+            <!-- 是否发送日志级别的名称,否则默认以数字代表日志级别 -->
+            <includeLevelName>true</includeLevelName>
+            <shortPatternLayout class="ch.qos.logback.classic.PatternLayout">
+                <pattern>%m%nopex</pattern>
+            </shortPatternLayout>
+            <fullPatternLayout class="ch.qos.logback.classic.PatternLayout">
+                <pattern>%d - [%thread] %-5level %logger{35} - %msg%n</pattern>
+            </fullPatternLayout>
+
+            <!-- 配置应用名称(服务名称),通过staticField标签可以自定义一些固定的日志字段 -->
+            <staticField>app_name:zl-data</staticField>
+        </encoder>
+    </appender>
+
+    <!-- 控制台输出日志 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- 日志级别过滤INFO以下 -->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>info</level>
+        </filter>
+        <encoder>
+            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
+            <pattern>${CONSOLE_LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- 日志输出级别 -->
+    <root level="info">
+        <appender-ref ref="GELF"/>
+        <appender-ref ref="console"/>
+    </root>
+</configuration>

+ 1 - 1
third-part-wn-hl7/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>ncs-ms</artifactId>
         <groupId>com.wdklian</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
third-part-zldata/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>ncs-ms</artifactId>
         <groupId>com.wdklian</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>

+ 1 - 1
third-party-common/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>ncs-ms</artifactId>
         <groupId>com.wdklian</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
third-party-gateway/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>ncs-ms</artifactId>
         <groupId>com.wdklian</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>