Ver Fonte

“提交项目”

wangqian há 2 meses atrás
pai
commit
fedf8256b3
90 ficheiros alterados com 13790 adições e 0 exclusões
  1. 9 0
      HELP.md
  2. 183 0
      data.iml
  3. 1460 0
      data.ipr
  4. 445 0
      data.iws
  5. 0 0
      mvn
  6. 310 0
      mvnw
  7. 182 0
      mvnw.cmd
  8. 149 0
      pom.xml
  9. 15 0
      src/main/java/cn/gov/customs/data/DataApplication.java
  10. 57 0
      src/main/java/cn/gov/customs/data/config/AppConfig.java
  11. 81 0
      src/main/java/cn/gov/customs/data/config/DataSourceConfig.java
  12. 52 0
      src/main/java/cn/gov/customs/data/config/H2018AppConfig.java
  13. 55 0
      src/main/java/cn/gov/customs/data/config/H2018Config.java
  14. 52 0
      src/main/java/cn/gov/customs/data/config/IedgConfig.java
  15. 55 0
      src/main/java/cn/gov/customs/data/config/InspectConfig.java
  16. 61 0
      src/main/java/cn/gov/customs/data/config/PrimaryConfig.java
  17. 55 0
      src/main/java/cn/gov/customs/data/config/Rh2kConfig.java
  18. 55 0
      src/main/java/cn/gov/customs/data/config/ZmqdConfig.java
  19. 32 0
      src/main/java/cn/gov/customs/data/dm/DM8GetGeneratedKeysDelegate.java
  20. 36 0
      src/main/java/cn/gov/customs/data/dm/DM8IdentityColumnSupport.java
  21. 683 0
      src/main/java/cn/gov/customs/data/dm/Dm8Dialect.java
  22. 41 0
      src/main/java/cn/gov/customs/data/dm/SequenceInformationExtractorDMDatabaseImpl.java
  23. 29 0
      src/main/java/cn/gov/customs/data/entity/app/EntityObject.java
  24. 21 0
      src/main/java/cn/gov/customs/data/entity/h2010/EntityObject.java
  25. 29 0
      src/main/java/cn/gov/customs/data/entity/h2018app/EntityObject.java
  26. 29 0
      src/main/java/cn/gov/customs/data/entity/iedg/EntityObject.java
  27. 29 0
      src/main/java/cn/gov/customs/data/entity/inspect/EntityObject.java
  28. 29 0
      src/main/java/cn/gov/customs/data/entity/rh2k/EntityObject.java
  29. 27 0
      src/main/java/cn/gov/customs/data/entity/wxjy/EntityObject.java
  30. 0 0
      src/main/java/cn/gov/customs/data/entity/wxjy/bus/CustomMonthlyStat.java
  31. 0 0
      src/main/java/cn/gov/customs/data/entity/wxjy/bus/CustomMonthlyStatFinal.java
  32. 0 0
      src/main/java/cn/gov/customs/data/entity/wxjy/bus/EntryHead.java
  33. 0 0
      src/main/java/cn/gov/customs/data/entity/wxjy/bus/EntryList.java
  34. 1 0
      src/main/java/cn/gov/customs/data/entity/wxjy/bus/MiddleDataMainStatus.java
  35. 0 0
      src/main/java/cn/gov/customs/data/entity/wxjy/bus/NewDeclaredGoods.java
  36. 35 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/BusiType.java
  37. 60 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/Country.java
  38. 39 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/Customs.java
  39. 45 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/Port.java
  40. 35 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/PubCustomsMapping.java
  41. 35 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/StepCode.java
  42. 39 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/Trade.java
  43. 34 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/Transf.java
  44. 46 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/TrnVeTypeRel.java
  45. 47 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/Unit.java
  46. 36 0
      src/main/java/cn/gov/customs/data/entity/wxjy/common/Wrap.java
  47. 29 0
      src/main/java/cn/gov/customs/data/entity/zmqd/EntityObject.java
  48. 80 0
      src/main/java/cn/gov/customs/data/repository/app/AppRepository.java
  49. 81 0
      src/main/java/cn/gov/customs/data/repository/h2018/H2018Repository.java
  50. 79 0
      src/main/java/cn/gov/customs/data/repository/h2018app/H2018appRepository.java
  51. 92 0
      src/main/java/cn/gov/customs/data/repository/iedg/IedgRepository.java
  52. 80 0
      src/main/java/cn/gov/customs/data/repository/inspect/InspectRepository.java
  53. 81 0
      src/main/java/cn/gov/customs/data/repository/rh2k/Rh2kRepository.java
  54. 104 0
      src/main/java/cn/gov/customs/data/repository/wxjy/WxjyRepository.java
  55. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/bus/CustomMonthlyStatFinalRepository.java
  56. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/bus/CustomMonthlyStatRepository.java
  57. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/bus/EntryHeadRepository.java
  58. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/bus/EntryListRepository.java
  59. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/bus/MiddleDataMainStatusRepository.java
  60. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/bus/NewDeclaredGoodsRepository.java
  61. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/BusiTypeRepository.java
  62. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/CountryRepository.java
  63. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/CustomsRepository.java
  64. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/PortRepository.java
  65. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/PubCustomsMappingRepository.java
  66. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/StepCodeRepository.java
  67. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/TradeRepository.java
  68. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/TransfRepository.java
  69. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/TrnVeTypeRelRepository.java
  70. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/UnitRepository.java
  71. 10 0
      src/main/java/cn/gov/customs/data/repository/wxjy/common/WrapRepository.java
  72. 80 0
      src/main/java/cn/gov/customs/data/repository/zmqd/ZmqdRepository.java
  73. 278 0
      src/main/java/cn/gov/customs/data/timer/AppBaseDataTask.java
  74. 370 0
      src/main/java/cn/gov/customs/data/timer/H2018NewDeclaredGoodsUtil.java
  75. 3391 0
      src/main/java/cn/gov/customs/data/timer/H2018ZhDangerGoodsUtil.java
  76. 3394 0
      src/main/java/cn/gov/customs/data/timer/H2018ZhOldDangerGoodsUtil.java
  77. 298 0
      src/main/java/cn/gov/customs/data/timer/ZhDataRunTask.java
  78. 114 0
      src/main/java/cn/gov/customs/data/util/BeanRefUtil.java
  79. 132 0
      src/main/java/cn/gov/customs/data/util/DataUtils.java
  80. 20 0
      src/main/java/cn/gov/customs/data/util/JasyptUtils.java
  81. 25 0
      src/main/java/cn/gov/customs/data/util/ScheduleConfig.java
  82. 49 0
      src/main/java/cn/gov/customs/data/util/ThreadConfig.java
  83. 107 0
      src/main/resources/application.yml
  84. 10 0
      src/main/resources/data-acquisition.properties
  85. BIN
      src/main/resources/lib/DmDialect-for-hibernate5.3-8.1.2.141.jar
  86. BIN
      src/main/resources/lib/DmJdbcDriver18-8.1.2.94.jar
  87. BIN
      src/main/resources/lib/GBaseHibernate4.3.1-Dialect-8.3.81.51.jar
  88. BIN
      src/main/resources/lib/gbase-connector-java-8.3.81.53-build54.4.7-bin-cutlog.jar
  89. BIN
      src/main/resources/lib/ojdbc6.jar
  90. 13 0
      src/test/java/cn/gov/customs/data/MqApplicationTests.java

+ 9 - 0
HELP.md

@@ -0,0 +1,9 @@
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/maven-plugin/reference/html/)
+* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/maven-plugin/reference/html/#build-image)
+

+ 183 - 0
data.iml

@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id="$MODULE_DIR$/pom.xml" external.system.module.type="SINGLE_MODULE" external.system.module.version="223-2" org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" relativePaths="false" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet external-system-id="Maven" type="web" name="Web">
+      <configuration>
+        <webroots />
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/main/resources" />
+          <root url="file://$MODULE_DIR$/target/generated-sources/annotations" />
+        </sourceRoots>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/target/generated-test-sources/test-annotations" isTestSource="true" generated="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.36" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.36" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.9.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.16.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.transaction:jakarta.transaction-api:1.3.3" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.persistence:jakarta.persistence-api:2.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.6.11.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.11" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss:jandex:2.4.2.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.1.2.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.3" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.3" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.11" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle.database.jdbc:ojdbc6:11.2.0.4" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle.database.jdbc:ucp:19.3.0.0" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle.database.security:oraclepki:19.3.0.0" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle.database.security:osdt_cert:19.3.0.0" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle.database.security:osdt_core:19.3.0.0" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle.database.ha:simplefan:19.3.0.0" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle.database.ha:ons:19.3.0.0" level="project" />
+    <orderEntry type="module-library">
+      <library name="Maven: com.dameng:DmJdbcDriver18:8.1.2.94" type="java-imported">
+        <properties groupId="com.dameng" artifactId="DmJdbcDriver18" version="8.1.2.94" baseVersion="8.1.2.94" />
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/resources/lib/DmJdbcDriver18-8.1.2.94.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="Maven: com.dameng:DmDialect-for-hibernate5.3:8.1.2.141" type="java-imported">
+        <properties groupId="com.dameng" artifactId="DmDialect-for-hibernate5.3" version="8.1.2.141" baseVersion="8.1.2.141" />
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/resources/lib/DmDialect-for-hibernate5.3-8.1.2.141.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="Maven: com.gbase.jdbc:gbase-connector-java:8.3.81.53" type="java-imported">
+        <properties groupId="com.gbase.jdbc" artifactId="gbase-connector-java" version="8.3.81.53" baseVersion="8.3.81.53" />
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/resources/lib/gbase-connector-java-8.3.81.53-build54.4.7-bin-cutlog.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="Maven: com.gbasedbt.hibernate:ifxhibernate:8.3.81.51" type="java-imported">
+        <properties groupId="com.gbasedbt.hibernate" artifactId="ifxhibernate" version="8.3.81.51" baseVersion="8.3.81.51" />
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/resources/lib/GBaseHibernate4.3.1-Dialect-8.3.81.51.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.16" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:2.3" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-support:2.3" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:2.3" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-generate:2.3" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot:3.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.jasypt:jasypt:1.9.3" level="project" />
+  </component>
+</module>

+ 1460 - 0
data.ipr

@@ -0,0 +1,1460 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AntConfiguration">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="FILTER_TARGETS" value="false" />
+  </component>
+  <component name="CodeStyleManager">
+    <option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" />
+    <option name="CODE_STYLE_SCHEME" value="" />
+  </component>
+  <component name="CompilerConfiguration">
+    <wildcardResourcePatterns>
+      <entry name="!?*.java" />
+    </wildcardResourcePatterns>
+    <annotationProcessing>
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="data" />
+      </profile>
+    </annotationProcessing>
+    <bytecodeTargetLevel>
+      <module name="data" target="1.8" />
+    </bytecodeTargetLevel>
+  </component>
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
+  </component>
+  <component name="ExportToHTMLSettings">
+    <option name="PRINT_LINE_NUMBERS" value="false" />
+    <option name="OPEN_IN_BROWSER" value="false" />
+    <option name="OUTPUT_DIRECTORY" />
+  </component>
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="ImportConfiguration">
+    <option name="VENDOR" />
+    <option name="RELEASE_TAG" />
+    <option name="LOG_MESSAGE" />
+    <option name="CHECKOUT_AFTER_IMPORT" value="true" />
+  </component>
+  <component name="InspectionProjectProfileManager">
+    <profile version="1.0">
+      <option name="myName" value="Project Default" />
+    </profile>
+    <version value="1.0" />
+  </component>
+  <component name="JUnitProjectSettings">
+    <option name="TEST_RUNNER" value="UI" />
+  </component>
+  <component name="JavacSettings">
+    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
+      <module name="data" options="-parameters" />
+    </option>
+  </component>
+  <component name="JavadocGenerationManager">
+    <option name="OUTPUT_DIRECTORY" />
+    <option name="OPTION_SCOPE" value="protected" />
+    <option name="OPTION_HIERARCHY" value="false" />
+    <option name="OPTION_NAVIGATOR" value="false" />
+    <option name="OPTION_INDEX" value="false" />
+    <option name="OPTION_SEPARATE_INDEX" value="false" />
+    <option name="OPTION_USE_1_1" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="false" />
+    <option name="OPTION_DEPRECATED_LIST" value="false" />
+    <option name="OTHER_OPTIONS" />
+    <option name="HEAP_SIZE" />
+    <option name="OPEN_IN_BROWSER" value="false" />
+  </component>
+  <component name="JikesSettings">
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="DEPRECATION" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="GENERATE_MAKE_FILE_DEPENDENCIES" value="false" />
+    <option name="DO_FULL_DEPENDENCE_CHECK" value="false" />
+    <option name="IS_INCREMENTAL_MODE" value="false" />
+    <option name="IS_EMACS_ERRORS_MODE" value="true" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+    <option name="MAXIMUM_HEAP_SIZE" value="128" />
+  </component>
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectModuleManager">
+    <modules>
+      <module filepath="$PROJECT_DIR$/data.iml" />
+    </modules>
+  </component>
+  <component name="ProjectRootManager" version="2" project-jdk-name="1.8" />
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+  </component>
+  <component name="libraryTable">
+    <library name="Maven: antlr:antlr:2.7.7" type="java-imported" external-system-id="Maven">
+      <properties groupId="antlr" artifactId="antlr" version="2.7.7" baseVersion="2.7.7" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/antlr/antlr/2.7.7/antlr-2.7.7.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/antlr/antlr/2.7.7/antlr-2.7.7-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: ch.qos.logback:logback-classic:1.2.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="ch.qos.logback" artifactId="logback-classic" version="1.2.3" baseVersion="1.2.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: ch.qos.logback:logback-core:1.2.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="ch.qos.logback" artifactId="logback-core" version="1.2.3" baseVersion="1.2.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.baomidou:mybatis-plus-core:2.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.baomidou" artifactId="mybatis-plus-core" version="2.3" baseVersion="2.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-core/2.3/mybatis-plus-core-2.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-core/2.3/mybatis-plus-core-2.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-core/2.3/mybatis-plus-core-2.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.baomidou:mybatis-plus-generate:2.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.baomidou" artifactId="mybatis-plus-generate" version="2.3" baseVersion="2.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-generate/2.3/mybatis-plus-generate-2.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-generate/2.3/mybatis-plus-generate-2.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-generate/2.3/mybatis-plus-generate-2.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.baomidou:mybatis-plus-support:2.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.baomidou" artifactId="mybatis-plus-support" version="2.3" baseVersion="2.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-support/2.3/mybatis-plus-support-2.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-support/2.3/mybatis-plus-support-2.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus-support/2.3/mybatis-plus-support-2.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.baomidou:mybatis-plus:2.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.baomidou" artifactId="mybatis-plus" version="2.3" baseVersion="2.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus/2.3/mybatis-plus-2.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus/2.3/mybatis-plus-2.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/baomidou/mybatis-plus/2.3/mybatis-plus-2.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.fasterxml.jackson.core" artifactId="jackson-annotations" version="2.11.0" baseVersion="2.11.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-annotations/2.11.0/jackson-annotations-2.11.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-annotations/2.11.0/jackson-annotations-2.11.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-annotations/2.11.0/jackson-annotations-2.11.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.fasterxml.jackson.core" artifactId="jackson-core" version="2.11.0" baseVersion="2.11.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-core/2.11.0/jackson-core-2.11.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-core/2.11.0/jackson-core-2.11.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-core/2.11.0/jackson-core-2.11.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.fasterxml.jackson.core" artifactId="jackson-databind" version="2.11.0" baseVersion="2.11.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-databind/2.11.0/jackson-databind-2.11.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-databind/2.11.0/jackson-databind-2.11.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/core/jackson-databind/2.11.0/jackson-databind-2.11.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.fasterxml.jackson.datatype" artifactId="jackson-datatype-jdk8" version="2.11.0" baseVersion="2.11.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.0/jackson-datatype-jdk8-2.11.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.0/jackson-datatype-jdk8-2.11.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.0/jackson-datatype-jdk8-2.11.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.fasterxml.jackson.datatype" artifactId="jackson-datatype-jsr310" version="2.11.0" baseVersion="2.11.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.0/jackson-datatype-jsr310-2.11.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.0/jackson-datatype-jsr310-2.11.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.0/jackson-datatype-jsr310-2.11.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.fasterxml.jackson.module" artifactId="jackson-module-parameter-names" version="2.11.0" baseVersion="2.11.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.0/jackson-module-parameter-names-2.11.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.0/jackson-module-parameter-names-2.11.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.0/jackson-module-parameter-names-2.11.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.fasterxml:classmate:1.5.1" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.fasterxml" artifactId="classmate" version="1.5.1" baseVersion="1.5.1" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/classmate/1.5.1/classmate-1.5.1-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/fasterxml/classmate/1.5.1/classmate-1.5.1-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.github.jsqlparser:jsqlparser:1.1" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.github.jsqlparser" artifactId="jsqlparser" version="1.1" baseVersion="1.1" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/jsqlparser/jsqlparser/1.1/jsqlparser-1.1.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/jsqlparser/jsqlparser/1.1/jsqlparser-1.1-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/jsqlparser/jsqlparser/1.1/jsqlparser-1.1-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.github.ulisesbocchio" artifactId="jasypt-spring-boot-starter" version="3.0.3" baseVersion="3.0.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/ulisesbocchio/jasypt-spring-boot-starter/3.0.3/jasypt-spring-boot-starter-3.0.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/ulisesbocchio/jasypt-spring-boot-starter/3.0.3/jasypt-spring-boot-starter-3.0.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/ulisesbocchio/jasypt-spring-boot-starter/3.0.3/jasypt-spring-boot-starter-3.0.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.github.ulisesbocchio:jasypt-spring-boot:3.0.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.github.ulisesbocchio" artifactId="jasypt-spring-boot" version="3.0.3" baseVersion="3.0.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/ulisesbocchio/jasypt-spring-boot/3.0.3/jasypt-spring-boot-3.0.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/ulisesbocchio/jasypt-spring-boot/3.0.3/jasypt-spring-boot-3.0.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/github/ulisesbocchio/jasypt-spring-boot/3.0.3/jasypt-spring-boot-3.0.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.jayway.jsonpath:json-path:2.4.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.jayway.jsonpath" artifactId="json-path" version="2.4.0" baseVersion="2.4.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.oracle.database.ha:ons:19.3.0.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.oracle.database.ha" artifactId="ons" version="19.3.0.0" baseVersion="19.3.0.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/ha/ons/19.3.0.0/ons-19.3.0.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/ha/ons/19.3.0.0/ons-19.3.0.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/ha/ons/19.3.0.0/ons-19.3.0.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.oracle.database.ha:simplefan:19.3.0.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.oracle.database.ha" artifactId="simplefan" version="19.3.0.0" baseVersion="19.3.0.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/ha/simplefan/19.3.0.0/simplefan-19.3.0.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/ha/simplefan/19.3.0.0/simplefan-19.3.0.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/ha/simplefan/19.3.0.0/simplefan-19.3.0.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.oracle.database.jdbc:ojdbc6:11.2.0.4" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.oracle.database.jdbc" artifactId="ojdbc6" version="11.2.0.4" baseVersion="11.2.0.4" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/jdbc/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/jdbc/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/jdbc/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.oracle.database.jdbc:ucp:19.3.0.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.oracle.database.jdbc" artifactId="ucp" version="19.3.0.0" baseVersion="19.3.0.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/jdbc/ucp/19.3.0.0/ucp-19.3.0.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/jdbc/ucp/19.3.0.0/ucp-19.3.0.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/jdbc/ucp/19.3.0.0/ucp-19.3.0.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.oracle.database.security:oraclepki:19.3.0.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.oracle.database.security" artifactId="oraclepki" version="19.3.0.0" baseVersion="19.3.0.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/oraclepki/19.3.0.0/oraclepki-19.3.0.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/oraclepki/19.3.0.0/oraclepki-19.3.0.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/oraclepki/19.3.0.0/oraclepki-19.3.0.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.oracle.database.security:osdt_cert:19.3.0.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.oracle.database.security" artifactId="osdt_cert" version="19.3.0.0" baseVersion="19.3.0.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/osdt_cert/19.3.0.0/osdt_cert-19.3.0.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/osdt_cert/19.3.0.0/osdt_cert-19.3.0.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/osdt_cert/19.3.0.0/osdt_cert-19.3.0.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.oracle.database.security:osdt_core:19.3.0.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.oracle.database.security" artifactId="osdt_core" version="19.3.0.0" baseVersion="19.3.0.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/osdt_core/19.3.0.0/osdt_core-19.3.0.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/osdt_core/19.3.0.0/osdt_core-19.3.0.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/oracle/database/security/osdt_core/19.3.0.0/osdt_core-19.3.0.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.rabbitmq:amqp-client:5.9.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.rabbitmq" artifactId="amqp-client" version="5.9.0" baseVersion="5.9.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/rabbitmq/amqp-client/5.9.0/amqp-client-5.9.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/rabbitmq/amqp-client/5.9.0/amqp-client-5.9.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/rabbitmq/amqp-client/5.9.0/amqp-client-5.9.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.sun.activation:jakarta.activation:1.2.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.sun.activation" artifactId="jakarta.activation" version="1.2.2" baseVersion="1.2.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.sun.istack:istack-commons-runtime:3.0.11" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.sun.istack" artifactId="istack-commons-runtime" version="3.0.11" baseVersion="3.0.11" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/sun/istack/istack-commons-runtime/3.0.11/istack-commons-runtime-3.0.11.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/sun/istack/istack-commons-runtime/3.0.11/istack-commons-runtime-3.0.11-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/sun/istack/istack-commons-runtime/3.0.11/istack-commons-runtime-3.0.11-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.vaadin.external.google" artifactId="android-json" version="0.0.20131108.vaadin1" baseVersion="0.0.20131108.vaadin1" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: com.zaxxer:HikariCP:3.4.5" type="java-imported" external-system-id="Maven">
+      <properties groupId="com.zaxxer" artifactId="HikariCP" version="3.4.5" baseVersion="3.4.5" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="jakarta.activation" artifactId="jakarta.activation-api" version="1.2.2" baseVersion="1.2.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" type="java-imported" external-system-id="Maven">
+      <properties groupId="jakarta.annotation" artifactId="jakarta.annotation-api" version="1.3.5" baseVersion="1.3.5" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: jakarta.persistence:jakarta.persistence-api:2.2.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="jakarta.persistence" artifactId="jakarta.persistence-api" version="2.2.3" baseVersion="2.2.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: jakarta.transaction:jakarta.transaction-api:1.3.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="jakarta.transaction" artifactId="jakarta.transaction-api" version="1.3.3" baseVersion="1.3.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/transaction/jakarta.transaction-api/1.3.3/jakarta.transaction-api-1.3.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/transaction/jakarta.transaction-api/1.3.3/jakarta.transaction-api-1.3.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/transaction/jakarta.transaction-api/1.3.3/jakarta.transaction-api-1.3.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="jakarta.xml.bind" artifactId="jakarta.xml.bind-api" version="2.3.3" baseVersion="2.3.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: javax.activation:javax.activation-api:1.2.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="javax.activation" artifactId="javax.activation-api" version="1.2.0" baseVersion="1.2.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: javax.persistence:javax.persistence-api:2.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="javax.persistence" artifactId="javax.persistence-api" version="2.2" baseVersion="2.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/persistence/javax.persistence-api/2.2/javax.persistence-api-2.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/persistence/javax.persistence-api/2.2/javax.persistence-api-2.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/persistence/javax.persistence-api/2.2/javax.persistence-api-2.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: javax.xml.bind:jaxb-api:2.3.1" type="java-imported" external-system-id="Maven">
+      <properties groupId="javax.xml.bind" artifactId="jaxb-api" version="2.3.1" baseVersion="2.3.1" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: log4j:log4j:1.2.16" type="java-imported" external-system-id="Maven">
+      <properties groupId="log4j" artifactId="log4j" version="1.2.16" baseVersion="1.2.16" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/log4j/log4j/1.2.16/log4j-1.2.16.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/log4j/log4j/1.2.16/log4j-1.2.16-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/log4j/log4j/1.2.16/log4j-1.2.16-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: net.bytebuddy:byte-buddy-agent:1.10.11" type="java-imported" external-system-id="Maven">
+      <properties groupId="net.bytebuddy" artifactId="byte-buddy-agent" version="1.10.11" baseVersion="1.10.11" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/bytebuddy/byte-buddy-agent/1.10.11/byte-buddy-agent-1.10.11.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/bytebuddy/byte-buddy-agent/1.10.11/byte-buddy-agent-1.10.11-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/bytebuddy/byte-buddy-agent/1.10.11/byte-buddy-agent-1.10.11-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: net.bytebuddy:byte-buddy:1.10.11" type="java-imported" external-system-id="Maven">
+      <properties groupId="net.bytebuddy" artifactId="byte-buddy" version="1.10.11" baseVersion="1.10.11" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/bytebuddy/byte-buddy/1.10.11/byte-buddy-1.10.11.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/bytebuddy/byte-buddy/1.10.11/byte-buddy-1.10.11-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/bytebuddy/byte-buddy/1.10.11/byte-buddy-1.10.11-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: net.minidev:accessors-smart:1.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="net.minidev" artifactId="accessors-smart" version="1.2" baseVersion="1.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/minidev/accessors-smart/1.2/accessors-smart-1.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/minidev/accessors-smart/1.2/accessors-smart-1.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: net.minidev:json-smart:2.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="net.minidev" artifactId="json-smart" version="2.3" baseVersion="2.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/minidev/json-smart/2.3/json-smart-2.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/minidev/json-smart/2.3/json-smart-2.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/net/minidev/json-smart/2.3/json-smart-2.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.apache.logging.log4j" artifactId="log4j-api" version="2.13.3" baseVersion="2.13.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.apache.logging.log4j" artifactId="log4j-to-slf4j" version="2.13.3" baseVersion="2.13.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.36" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.apache.tomcat.embed" artifactId="tomcat-embed-core" version="9.0.36" baseVersion="9.0.36" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/tomcat/embed/tomcat-embed-core/9.0.36/tomcat-embed-core-9.0.36.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/tomcat/embed/tomcat-embed-core/9.0.36/tomcat-embed-core-9.0.36-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/tomcat/embed/tomcat-embed-core/9.0.36/tomcat-embed-core-9.0.36-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.36" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.apache.tomcat.embed" artifactId="tomcat-embed-websocket" version="9.0.36" baseVersion="9.0.36" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.36/tomcat-embed-websocket-9.0.36.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.36/tomcat-embed-websocket-9.0.36-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.36/tomcat-embed-websocket-9.0.36-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.apiguardian:apiguardian-api:1.1.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.apiguardian" artifactId="apiguardian-api" version="1.1.0" baseVersion="1.1.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.aspectj:aspectjweaver:1.9.5" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.aspectj" artifactId="aspectjweaver" version="1.9.5" baseVersion="1.9.5" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/aspectj/aspectjweaver/1.9.5/aspectjweaver-1.9.5.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/aspectj/aspectjweaver/1.9.5/aspectjweaver-1.9.5-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/aspectj/aspectjweaver/1.9.5/aspectjweaver-1.9.5-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.assertj:assertj-core:3.16.1" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.assertj" artifactId="assertj-core" version="3.16.1" baseVersion="3.16.1" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/assertj/assertj-core/3.16.1/assertj-core-3.16.1.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/assertj/assertj-core/3.16.1/assertj-core-3.16.1-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/assertj/assertj-core/3.16.1/assertj-core-3.16.1-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.glassfish.jaxb" artifactId="jaxb-runtime" version="2.3.3" baseVersion="2.3.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jaxb/jaxb-runtime/2.3.3/jaxb-runtime-2.3.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jaxb/jaxb-runtime/2.3.3/jaxb-runtime-2.3.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jaxb/jaxb-runtime/2.3.3/jaxb-runtime-2.3.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.glassfish.jaxb:txw2:2.3.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.glassfish.jaxb" artifactId="txw2" version="2.3.3" baseVersion="2.3.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jaxb/txw2/2.3.3/txw2-2.3.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jaxb/txw2/2.3.3/txw2-2.3.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jaxb/txw2/2.3.3/txw2-2.3.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.glassfish:jakarta.el:3.0.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.glassfish" artifactId="jakarta.el" version="3.0.3" baseVersion="3.0.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.hamcrest:hamcrest:2.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.hamcrest" artifactId="hamcrest" version="2.2" baseVersion="2.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hamcrest/hamcrest/2.2/hamcrest-2.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hamcrest/hamcrest/2.2/hamcrest-2.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.hibernate.common:hibernate-commons-annotations:5.1.2.Final" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.hibernate.common" artifactId="hibernate-commons-annotations" version="5.1.2.Final" baseVersion="5.1.2.Final" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hibernate/common/hibernate-commons-annotations/5.1.2.Final/hibernate-commons-annotations-5.1.2.Final.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hibernate/common/hibernate-commons-annotations/5.1.2.Final/hibernate-commons-annotations-5.1.2.Final-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hibernate/common/hibernate-commons-annotations/5.1.2.Final/hibernate-commons-annotations-5.1.2.Final-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.hibernate:hibernate-core:5.6.11.Final" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.hibernate" artifactId="hibernate-core" version="5.6.11.Final" baseVersion="5.6.11.Final" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hibernate/hibernate-core/5.6.11.Final/hibernate-core-5.6.11.Final.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hibernate/hibernate-core/5.6.11.Final/hibernate-core-5.6.11.Final-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/hibernate/hibernate-core/5.6.11.Final/hibernate-core-5.6.11.Final-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.jasypt:jasypt:1.9.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.jasypt" artifactId="jasypt" version="1.9.3" baseVersion="1.9.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jasypt/jasypt/1.9.3/jasypt-1.9.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.jboss.logging" artifactId="jboss-logging" version="3.4.1.Final" baseVersion="3.4.1.Final" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.jboss.spec.javax.transaction" artifactId="jboss-transaction-api_1.2_spec" version="1.1.1.Final" baseVersion="1.1.1.Final" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.1.1.Final/jboss-transaction-api_1.2_spec-1.1.1.Final.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.1.1.Final/jboss-transaction-api_1.2_spec-1.1.1.Final-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.1.1.Final/jboss-transaction-api_1.2_spec-1.1.1.Final-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.jboss:jandex:2.4.2.Final" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.jboss" artifactId="jandex" version="2.4.2.Final" baseVersion="2.4.2.Final" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/jandex/2.4.2.Final/jandex-2.4.2.Final.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/jandex/2.4.2.Final/jandex-2.4.2.Final-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/jboss/jandex/2.4.2.Final/jandex-2.4.2.Final-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.junit.jupiter" artifactId="junit-jupiter-api" version="5.6.2" baseVersion="5.6.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-api/5.6.2/junit-jupiter-api-5.6.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-api/5.6.2/junit-jupiter-api-5.6.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-api/5.6.2/junit-jupiter-api-5.6.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.junit.jupiter" artifactId="junit-jupiter-engine" version="5.6.2" baseVersion="5.6.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-engine/5.6.2/junit-jupiter-engine-5.6.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-engine/5.6.2/junit-jupiter-engine-5.6.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-engine/5.6.2/junit-jupiter-engine-5.6.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.junit.jupiter" artifactId="junit-jupiter-params" version="5.6.2" baseVersion="5.6.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-params/5.6.2/junit-jupiter-params-5.6.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-params/5.6.2/junit-jupiter-params-5.6.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter-params/5.6.2/junit-jupiter-params-5.6.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.junit.jupiter:junit-jupiter:5.6.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.junit.jupiter" artifactId="junit-jupiter" version="5.6.2" baseVersion="5.6.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter/5.6.2/junit-jupiter-5.6.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter/5.6.2/junit-jupiter-5.6.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/jupiter/junit-jupiter/5.6.2/junit-jupiter-5.6.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.junit.platform:junit-platform-commons:1.6.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.junit.platform" artifactId="junit-platform-commons" version="1.6.2" baseVersion="1.6.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/platform/junit-platform-commons/1.6.2/junit-platform-commons-1.6.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/platform/junit-platform-commons/1.6.2/junit-platform-commons-1.6.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/platform/junit-platform-commons/1.6.2/junit-platform-commons-1.6.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.junit.platform:junit-platform-engine:1.6.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.junit.platform" artifactId="junit-platform-engine" version="1.6.2" baseVersion="1.6.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/platform/junit-platform-engine/1.6.2/junit-platform-engine-1.6.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/platform/junit-platform-engine/1.6.2/junit-platform-engine-1.6.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/junit/platform/junit-platform-engine/1.6.2/junit-platform-engine-1.6.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.mockito:mockito-core:3.3.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.mockito" artifactId="mockito-core" version="3.3.3" baseVersion="3.3.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mockito/mockito-core/3.3.3/mockito-core-3.3.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mockito/mockito-core/3.3.3/mockito-core-3.3.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mockito/mockito-core/3.3.3/mockito-core-3.3.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.mockito" artifactId="mockito-junit-jupiter" version="3.3.3" baseVersion="3.3.3" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mockito/mockito-junit-jupiter/3.3.3/mockito-junit-jupiter-3.3.3.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mockito/mockito-junit-jupiter/3.3.3/mockito-junit-jupiter-3.3.3-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mockito/mockito-junit-jupiter/3.3.3/mockito-junit-jupiter-3.3.3-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.mybatis:mybatis-spring:1.3.2" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.mybatis" artifactId="mybatis-spring" version="1.3.2" baseVersion="1.3.2" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mybatis/mybatis-spring/1.3.2/mybatis-spring-1.3.2.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mybatis/mybatis-spring/1.3.2/mybatis-spring-1.3.2-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mybatis/mybatis-spring/1.3.2/mybatis-spring-1.3.2-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.mybatis:mybatis:3.4.6" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.mybatis" artifactId="mybatis" version="3.4.6" baseVersion="3.4.6" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mybatis/mybatis/3.4.6/mybatis-3.4.6.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mybatis/mybatis/3.4.6/mybatis-3.4.6-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/mybatis/mybatis/3.4.6/mybatis-3.4.6-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.objenesis:objenesis:2.6" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.objenesis" artifactId="objenesis" version="2.6" baseVersion="2.6" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/objenesis/objenesis/2.6/objenesis-2.6.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/objenesis/objenesis/2.6/objenesis-2.6-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/objenesis/objenesis/2.6/objenesis-2.6-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.opentest4j:opentest4j:1.2.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.opentest4j" artifactId="opentest4j" version="1.2.0" baseVersion="1.2.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.ow2.asm:asm:5.0.4" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.ow2.asm" artifactId="asm" version="5.0.4" baseVersion="5.0.4" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/ow2/asm/asm/5.0.4/asm-5.0.4-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/ow2/asm/asm/5.0.4/asm-5.0.4-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.projectlombok:lombok:1.18.12" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.projectlombok" artifactId="lombok" version="1.18.12" baseVersion="1.18.12" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/projectlombok/lombok/1.18.12/lombok-1.18.12.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/projectlombok/lombok/1.18.12/lombok-1.18.12-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/projectlombok/lombok/1.18.12/lombok-1.18.12-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.skyscreamer:jsonassert:1.5.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.skyscreamer" artifactId="jsonassert" version="1.5.0" baseVersion="1.5.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.slf4j:jul-to-slf4j:1.7.30" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.slf4j" artifactId="jul-to-slf4j" version="1.7.30" baseVersion="1.7.30" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.slf4j:slf4j-api:1.7.30" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.slf4j" artifactId="slf4j-api" version="1.7.30" baseVersion="1.7.30" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.amqp:spring-amqp:2.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.amqp" artifactId="spring-amqp" version="2.2.7.RELEASE" baseVersion="2.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/amqp/spring-amqp/2.2.7.RELEASE/spring-amqp-2.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/amqp/spring-amqp/2.2.7.RELEASE/spring-amqp-2.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/amqp/spring-amqp/2.2.7.RELEASE/spring-amqp-2.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.amqp:spring-rabbit:2.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.amqp" artifactId="spring-rabbit" version="2.2.7.RELEASE" baseVersion="2.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/amqp/spring-rabbit/2.2.7.RELEASE/spring-rabbit-2.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/amqp/spring-rabbit/2.2.7.RELEASE/spring-rabbit-2.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/amqp/spring-rabbit/2.2.7.RELEASE/spring-rabbit-2.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-autoconfigure" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-autoconfigure/2.3.1.RELEASE/spring-boot-autoconfigure-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-autoconfigure/2.3.1.RELEASE/spring-boot-autoconfigure-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-autoconfigure/2.3.1.RELEASE/spring-boot-autoconfigure-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-amqp" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-amqp/2.3.1.RELEASE/spring-boot-starter-amqp-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-amqp/2.3.1.RELEASE/spring-boot-starter-amqp-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-amqp/2.3.1.RELEASE/spring-boot-starter-amqp-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-aop:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-aop" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-aop/2.3.1.RELEASE/spring-boot-starter-aop-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-aop/2.3.1.RELEASE/spring-boot-starter-aop-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-aop/2.3.1.RELEASE/spring-boot-starter-aop-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-data-jpa" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-data-jpa/2.3.1.RELEASE/spring-boot-starter-data-jpa-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-data-jpa/2.3.1.RELEASE/spring-boot-starter-data-jpa-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-data-jpa/2.3.1.RELEASE/spring-boot-starter-data-jpa-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-jdbc" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-jdbc/2.3.1.RELEASE/spring-boot-starter-jdbc-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-jdbc/2.3.1.RELEASE/spring-boot-starter-jdbc-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-jdbc/2.3.1.RELEASE/spring-boot-starter-jdbc-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-json" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-json/2.3.1.RELEASE/spring-boot-starter-json-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-json/2.3.1.RELEASE/spring-boot-starter-json-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-json/2.3.1.RELEASE/spring-boot-starter-json-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-logging" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-logging/2.3.1.RELEASE/spring-boot-starter-logging-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-logging/2.3.1.RELEASE/spring-boot-starter-logging-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-logging/2.3.1.RELEASE/spring-boot-starter-logging-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-test" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-test/2.3.1.RELEASE/spring-boot-starter-test-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-test/2.3.1.RELEASE/spring-boot-starter-test-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-test/2.3.1.RELEASE/spring-boot-starter-test-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-tomcat" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-tomcat/2.3.1.RELEASE/spring-boot-starter-tomcat-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-tomcat/2.3.1.RELEASE/spring-boot-starter-tomcat-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-tomcat/2.3.1.RELEASE/spring-boot-starter-tomcat-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter-web:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter-web" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-web/2.3.1.RELEASE/spring-boot-starter-web-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-web/2.3.1.RELEASE/spring-boot-starter-web-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter-web/2.3.1.RELEASE/spring-boot-starter-web-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-starter:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-starter" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter/2.3.1.RELEASE/spring-boot-starter-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter/2.3.1.RELEASE/spring-boot-starter-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-starter/2.3.1.RELEASE/spring-boot-starter-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-test-autoconfigure" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-test-autoconfigure/2.3.1.RELEASE/spring-boot-test-autoconfigure-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-test-autoconfigure/2.3.1.RELEASE/spring-boot-test-autoconfigure-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-test-autoconfigure/2.3.1.RELEASE/spring-boot-test-autoconfigure-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot-test:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot-test" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-test/2.3.1.RELEASE/spring-boot-test-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-test/2.3.1.RELEASE/spring-boot-test-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot-test/2.3.1.RELEASE/spring-boot-test-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.boot:spring-boot:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.boot" artifactId="spring-boot" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot/2.3.1.RELEASE/spring-boot-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot/2.3.1.RELEASE/spring-boot-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/boot/spring-boot/2.3.1.RELEASE/spring-boot-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.data:spring-data-commons:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.data" artifactId="spring-data-commons" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/data/spring-data-commons/2.3.1.RELEASE/spring-data-commons-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/data/spring-data-commons/2.3.1.RELEASE/spring-data-commons-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/data/spring-data-commons/2.3.1.RELEASE/spring-data-commons-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.data:spring-data-jpa:2.3.1.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.data" artifactId="spring-data-jpa" version="2.3.1.RELEASE" baseVersion="2.3.1.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/data/spring-data-jpa/2.3.1.RELEASE/spring-data-jpa-2.3.1.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/data/spring-data-jpa/2.3.1.RELEASE/spring-data-jpa-2.3.1.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/data/spring-data-jpa/2.3.1.RELEASE/spring-data-jpa-2.3.1.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework.retry" artifactId="spring-retry" version="1.2.5.RELEASE" baseVersion="1.2.5.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/retry/spring-retry/1.2.5.RELEASE/spring-retry-1.2.5.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/retry/spring-retry/1.2.5.RELEASE/spring-retry-1.2.5.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/retry/spring-retry/1.2.5.RELEASE/spring-retry-1.2.5.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-aop:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-aop" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-aop/5.2.7.RELEASE/spring-aop-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-aop/5.2.7.RELEASE/spring-aop-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-aop/5.2.7.RELEASE/spring-aop-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-aspects:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-aspects" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-aspects/5.2.7.RELEASE/spring-aspects-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-aspects/5.2.7.RELEASE/spring-aspects-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-aspects/5.2.7.RELEASE/spring-aspects-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-beans:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-beans" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-beans/5.2.7.RELEASE/spring-beans-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-beans/5.2.7.RELEASE/spring-beans-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-beans/5.2.7.RELEASE/spring-beans-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-context:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-context" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-context/5.2.7.RELEASE/spring-context-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-context/5.2.7.RELEASE/spring-context-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-context/5.2.7.RELEASE/spring-context-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-core:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-core" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-core/5.2.7.RELEASE/spring-core-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-core/5.2.7.RELEASE/spring-core-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-core/5.2.7.RELEASE/spring-core-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-expression:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-expression" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-expression/5.2.7.RELEASE/spring-expression-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-expression/5.2.7.RELEASE/spring-expression-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-expression/5.2.7.RELEASE/spring-expression-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-jcl:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-jcl" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-jcl/5.2.7.RELEASE/spring-jcl-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-jcl/5.2.7.RELEASE/spring-jcl-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-jcl/5.2.7.RELEASE/spring-jcl-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-jdbc:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-jdbc" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-jdbc/5.2.7.RELEASE/spring-jdbc-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-jdbc/5.2.7.RELEASE/spring-jdbc-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-jdbc/5.2.7.RELEASE/spring-jdbc-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-messaging:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-messaging" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-messaging/5.2.7.RELEASE/spring-messaging-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-messaging/5.2.7.RELEASE/spring-messaging-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-messaging/5.2.7.RELEASE/spring-messaging-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-orm:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-orm" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-orm/5.2.7.RELEASE/spring-orm-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-orm/5.2.7.RELEASE/spring-orm-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-orm/5.2.7.RELEASE/spring-orm-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-test:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-test" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-test/5.2.7.RELEASE/spring-test-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-test/5.2.7.RELEASE/spring-test-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-test/5.2.7.RELEASE/spring-test-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-tx:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-tx" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-tx/5.2.7.RELEASE/spring-tx-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-tx/5.2.7.RELEASE/spring-tx-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-tx/5.2.7.RELEASE/spring-tx-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-web:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-web" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-web/5.2.7.RELEASE/spring-web-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-web/5.2.7.RELEASE/spring-web-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-web/5.2.7.RELEASE/spring-web-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.springframework:spring-webmvc:5.2.7.RELEASE" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.springframework" artifactId="spring-webmvc" version="5.2.7.RELEASE" baseVersion="5.2.7.RELEASE" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-webmvc/5.2.7.RELEASE/spring-webmvc-5.2.7.RELEASE.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-webmvc/5.2.7.RELEASE/spring-webmvc-5.2.7.RELEASE-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/springframework/spring-webmvc/5.2.7.RELEASE/spring-webmvc-5.2.7.RELEASE-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.xmlunit:xmlunit-core:2.7.0" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.xmlunit" artifactId="xmlunit-core" version="2.7.0" baseVersion="2.7.0" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/xmlunit/xmlunit-core/2.7.0/xmlunit-core-2.7.0.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/xmlunit/xmlunit-core/2.7.0/xmlunit-core-2.7.0-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/xmlunit/xmlunit-core/2.7.0/xmlunit-core-2.7.0-sources.jar!/" />
+      </SOURCES>
+    </library>
+    <library name="Maven: org.yaml:snakeyaml:1.26" type="java-imported" external-system-id="Maven">
+      <properties groupId="org.yaml" artifactId="snakeyaml" version="1.26" baseVersion="1.26" />
+      <CLASSES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar!/" />
+      </CLASSES>
+      <JAVADOC>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/yaml/snakeyaml/1.26/snakeyaml-1.26-javadoc.jar!/" />
+      </JAVADOC>
+      <SOURCES>
+        <root url="jar://$PROJECT_DIR$/../../apache-maven-3.6.3-bin/m2/org/yaml/snakeyaml/1.26/snakeyaml-1.26-sources.jar!/" />
+      </SOURCES>
+    </library>
+  </component>
+</project>

+ 445 - 0
data.iws

@@ -0,0 +1,445 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AutoImportSettings">
+    <option name="autoReloadType" value="SELECTIVE" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="3a565e63-71eb-41fd-b0a8-6e019ff3104a" name="Changes" comment="" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="Commander">
+    <leftPanel view="Project" />
+    <rightPanel view="Project" />
+    <splitter proportion="0.5" />
+  </component>
+  <component name="Cvs2Configuration">
+    <option name="ON_FILE_ADDING" value="0" />
+    <option name="ON_FILE_REMOVING" value="0" />
+    <option name="PRUNE_EMPTY_DIRECTORIES" value="true" />
+    <option name="SHOW_UPDATE_OPTIONS" value="true" />
+    <option name="SHOW_ADD_OPTIONS" value="true" />
+    <option name="SHOW_REMOVE_OPTIONS" value="true" />
+    <option name="MERGING_MODE" value="0" />
+    <option name="MERGE_WITH_BRANCH1_NAME" value="HEAD" />
+    <option name="MERGE_WITH_BRANCH2_NAME" value="HEAD" />
+    <option name="RESET_STICKY" value="false" />
+    <option name="CREATE_NEW_DIRECTORIES" value="true" />
+    <option name="DEFAULT_TEXT_FILE_SUBSTITUTION" value="kv" />
+    <option name="PROCESS_UNKNOWN_FILES" value="false" />
+    <option name="PROCESS_DELETED_FILES" value="false" />
+    <option name="SHOW_EDIT_DIALOG" value="true" />
+    <option name="RESERVED_EDIT" value="false" />
+    <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+    <option name="SHOW_CHECKOUT_OPTIONS" value="true" />
+    <option name="CHECKOUT_DATE_OR_REVISION_SETTINGS">
+      <value>
+        <option name="BRANCH" value="" />
+        <option name="DATE" value="" />
+        <option name="USE_BRANCH" value="false" />
+        <option name="USE_DATE" value="false" />
+      </value>
+    </option>
+    <option name="UPDATE_DATE_OR_REVISION_SETTINGS">
+      <value>
+        <option name="BRANCH" value="" />
+        <option name="DATE" value="" />
+        <option name="USE_BRANCH" value="false" />
+        <option name="USE_DATE" value="false" />
+      </value>
+    </option>
+    <option name="SHOW_CHANGES_REVISION_SETTINGS">
+      <value>
+        <option name="BRANCH" value="" />
+        <option name="DATE" value="" />
+        <option name="USE_BRANCH" value="false" />
+        <option name="USE_DATE" value="false" />
+      </value>
+    </option>
+    <option name="SHOW_OUTPUT" value="false" />
+    <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+    <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+    <option name="ADD_WATCH_INDEX" value="0" />
+    <option name="REMOVE_WATCH_INDEX" value="0" />
+    <option name="UPDATE_KEYWORD_SUBSTITUTION" />
+    <option name="MAKE_NEW_FILES_READONLY" value="false" />
+    <option name="SHOW_CORRUPTED_PROJECT_FILES" value="0" />
+    <option name="TAG_AFTER_FILE_COMMIT" value="false" />
+    <option name="TAG_AFTER_FILE_COMMIT_NAME" value="" />
+    <option name="TAG_AFTER_PROJECT_COMMIT" value="false" />
+    <option name="TAG_AFTER_PROJECT_COMMIT_NAME" value="" />
+    <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
+    <option name="SHOW_CHECKIN_OPTIONS" value="true" />
+    <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+    <option name="LAST_COMMIT_MESSAGE" value="" />
+    <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
+    <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
+    <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+    <option name="OPTIMIZE_IMPORTS_BEFORE_FILE_COMMIT" value="false" />
+    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+    <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+    <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+    <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+  </component>
+  <component name="DaemonCodeAnalyzer">
+    <disable_hints />
+  </component>
+  <component name="DebuggerManager">
+    <line_breakpoints converted="true" />
+    <exception_breakpoints converted="true">
+      <breakpoint_any>
+        <option name="NOTIFY_CAUGHT" value="true" />
+        <option name="NOTIFY_UNCAUGHT" value="true" />
+        <option name="ENABLED" value="false" />
+        <option name="SUSPEND_VM" value="true" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CONDITION" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="LOG_MESSAGE" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INVERSE_CLASS_FILLTERS" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+      </breakpoint_any>
+    </exception_breakpoints>
+    <field_breakpoints converted="true" />
+    <method_breakpoints converted="true" />
+  </component>
+  <component name="DebuggerSettings">
+    <option name="TRACING_FILTERS_ENABLED" value="true" />
+    <option name="TOSTRING_CLASSES_ENABLED" value="false" />
+    <option name="VALUE_LOOKUP_DELAY" value="700" />
+    <option name="DEBUGGER_TRANSPORT" value="0" />
+    <option name="FORCE_CLASSIC_VM" value="true" />
+    <option name="HIDE_DEBUGGER_ON_PROCESS_TERMINATION" value="false" />
+    <option name="SKIP_SYNTHETIC_METHODS" value="true" />
+    <option name="SKIP_CONSTRUCTORS" value="false" />
+    <option name="STEP_THREAD_SUSPEND_POLICY" value="SuspendThread" />
+    <default_breakpoint_settings>
+      <option name="NOTIFY_CAUGHT" value="true" />
+      <option name="NOTIFY_UNCAUGHT" value="true" />
+      <option name="WATCH_MODIFICATION" value="true" />
+      <option name="WATCH_ACCESS" value="true" />
+      <option name="WATCH_ENTRY" value="true" />
+      <option name="WATCH_EXIT" value="true" />
+      <option name="ENABLED" value="true" />
+      <option name="SUSPEND_VM" value="true" />
+      <option name="COUNT_FILTER_ENABLED" value="false" />
+      <option name="COUNT_FILTER" value="0" />
+      <option name="CONDITION_ENABLED" value="false" />
+      <option name="CONDITION" />
+      <option name="LOG_ENABLED" value="false" />
+      <option name="LOG_EXPRESSION_ENABLED" value="false" />
+      <option name="LOG_MESSAGE" />
+      <option name="CLASS_FILTERS_ENABLED" value="false" />
+      <option name="INVERSE_CLASS_FILLTERS" value="false" />
+      <option name="SUSPEND_POLICY" value="SuspendAll" />
+    </default_breakpoint_settings>
+    <filter>
+      <option name="PATTERN" value="com.sun.*" />
+      <option name="ENABLED" value="true" />
+    </filter>
+    <filter>
+      <option name="PATTERN" value="java.*" />
+      <option name="ENABLED" value="true" />
+    </filter>
+    <filter>
+      <option name="PATTERN" value="javax.*" />
+      <option name="ENABLED" value="true" />
+    </filter>
+    <filter>
+      <option name="PATTERN" value="org.omg.*" />
+      <option name="ENABLED" value="true" />
+    </filter>
+    <filter>
+      <option name="PATTERN" value="sun.*" />
+      <option name="ENABLED" value="true" />
+    </filter>
+    <filter>
+      <option name="PATTERN" value="junit.*" />
+      <option name="ENABLED" value="true" />
+    </filter>
+  </component>
+  <component name="EjbViewSettings">
+    <EjbView showMembers="false" autoscrollToSource="false" />
+  </component>
+  <component name="ErrorTreeViewConfiguration">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="HIDE_WARNINGS" value="false" />
+  </component>
+  <component name="HierarchyBrowserManager">
+    <option name="SHOW_PACKAGES" value="false" />
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="SORT_ALPHABETICALLY" value="false" />
+  </component>
+  <component name="InspectionManager">
+    <option name="AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="SPLITTER_PROPORTION" value="0.5" />
+    <profile name="Default" />
+  </component>
+  <component name="LvcsProjectConfiguration">
+    <option name="ADD_LABEL_ON_PROJECT_OPEN" value="true" />
+    <option name="ADD_LABEL_ON_PROJECT_COMPILATION" value="true" />
+    <option name="ADD_LABEL_ON_FILE_PACKAGE_COMPILATION" value="true" />
+    <option name="ADD_LABEL_ON_PROJECT_MAKE" value="true" />
+    <option name="ADD_LABEL_ON_RUNNING" value="true" />
+    <option name="ADD_LABEL_ON_DEBUGGING" value="true" />
+    <option name="ADD_LABEL_ON_UNIT_TEST_PASSED" value="true" />
+    <option name="ADD_LABEL_ON_UNIT_TEST_FAILED" value="true" />
+  </component>
+  <component name="MavenImportPreferences">
+    <option name="generalSettings">
+      <MavenGeneralSettings>
+        <option name="customMavenHome" value="F:\apache-maven-3.6.3-bin\apache-maven-3.6.3" />
+        <option name="localRepository" value="F:\apache-maven-3.6.3-bin\m2" />
+        <option name="mavenHomeTypeForPersistence" value="CUSTOM" />
+        <option name="userSettingsFile" value="F:\apache-maven-3.6.3-bin\apache-maven-3.6.3\conf\settings.xml" />
+      </MavenGeneralSettings>
+    </option>
+  </component>
+  <component name="PerforceConfiguration">
+    <option name="PORT" value="magic:1666" />
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="CLIENT" value="" />
+    <option name="TRACE" value="false" />
+    <option name="PERFORCE_STATUS" value="true" />
+    <option name="CHANGELIST_OPTION" value="false" />
+    <option name="SYSTEMROOT" value="" />
+    <option name="P4_EXECUTABLE" value="p4" />
+    <option name="SHOW_BRANCH_HISTORY" value="false" />
+    <option name="GENERATE_COMMENT" value="false" />
+    <option name="SYNC_OPTION" value="Sync" />
+    <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
+    <option name="SHOW_CHECKIN_OPTIONS" value="true" />
+    <option name="FORCE_NON_EMPTY_COMMENT" value="true" />
+    <option name="LAST_COMMIT_MESSAGE" value="" />
+    <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
+    <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
+    <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+    <option name="OPTIMIZE_IMPORTS_BEFORE_FILE_COMMIT" value="false" />
+    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+    <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+    <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+    <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+  </component>
+  <component name="ProjectColorInfo">{
+  &quot;associatedIndex&quot;: 4
+}</component>
+  <component name="ProjectId" id="34gUuM4FNMHlhGxaH8HF6cqMr6X" />
+  <component name="ProjectViewSettings">
+    <navigator currentView="ProjectPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" />
+    <view id="ProjectPane">
+      <expanded_node type="directory" url="file://$PROJECT_DIR$" />
+    </view>
+    <view id="SourcepathPane" />
+    <view id="ClasspathPane" />
+  </component>
+  <component name="ProjectViewState">
+    <option name="hideEmptyMiddlePackages" value="true" />
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "Maven.data [install].executor": "Run",
+    "RequestMappingsPanelOrder0": "0",
+    "RequestMappingsPanelOrder1": "1",
+    "RequestMappingsPanelWidth0": "75",
+    "RequestMappingsPanelWidth1": "75",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "Spring Boot.MqApplication.executor": "Debug",
+    "kotlin-language-version-configured": "true",
+    "last_opened_file_path": "F:/wuhan/zhsj-data-service",
+    "node.js.detected.package.eslint": "true",
+    "node.js.detected.package.tslint": "true",
+    "node.js.selected.package.eslint": "(autodetect)",
+    "node.js.selected.package.tslint": "(autodetect)",
+    "nodejs_package_manager_path": "npm",
+    "project.structure.last.edited": "Project",
+    "project.structure.proportion": "0.15",
+    "project.structure.side.proportion": "0.41954023",
+    "settings.editor.selected.configurable": "MavenSettings",
+    "vue.rearranger.settings.migration": "true"
+  }
+}]]></component>
+  <component name="RunManager">
+    <configuration selected="false" default="true" type="Applet" factoryName="Applet">
+      <module name="" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="HTML_FILE_NAME" />
+      <option name="HTML_USED" value="false" />
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+      <option name="VM_PARAMETERS" />
+    </configuration>
+    <configuration default="true" type="Application" factoryName="Application">
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
+    <configuration default="true" type="JUnit" factoryName="JUnit">
+      <option name="TEST_OBJECT" value="class" />
+      <option name="VM_PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="wholeProject" />
+      </option>
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
+    <configuration name="MqApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
+      <module name="data" />
+      <option name="SPRING_BOOT_MAIN_CLASS" value="cn.gov.customs.data.MqApplication" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
+  </component>
+  <component name="SharedIndexes">
+    <attachedChunks>
+      <set>
+        <option value="bundled-jdk-9823dce3aa75-125ca727e0f0-intellij.indexing.shared.core-IU-243.24978.46" />
+        <option value="bundled-js-predefined-d6986cc7102b-76f8388c3a79-JavaScript-IU-243.24978.46" />
+      </set>
+    </attachedChunks>
+  </component>
+  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
+  <component name="StarteamConfiguration">
+    <option name="SERVER" value="" />
+    <option name="PORT" value="49201" />
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="PROJECT" value="" />
+    <option name="VIEW" value="" />
+    <option name="ALTERNATIVE_WORKING_PATH" value="" />
+    <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
+    <option name="SHOW_CHECKIN_OPTIONS" value="true" />
+    <option name="LAST_COMMIT_MESSAGE" value="" />
+    <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
+  </component>
+  <component name="StructureViewFactory">
+    <option name="SORT_MODE" value="0" />
+    <option name="GROUP_INHERITED" value="true" />
+    <option name="AUTOSCROLL_MODE" value="true" />
+    <option name="SHOW_FIELDS" value="true" />
+    <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
+    <option name="GROUP_GETTERS_AND_SETTERS" value="true" />
+    <option name="SHOW_INHERITED" value="false" />
+    <option name="HIDE_NOT_PUBLIC" value="false" />
+  </component>
+  <component name="SvnConfiguration">
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="AUTO_ADD_FILES" value="0" />
+    <option name="AUTO_DEL_FILES" value="0" />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="3a565e63-71eb-41fd-b0a8-6e019ff3104a" name="Changes" comment="" />
+      <created>1761634930313</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1761634930313</updated>
+      <workItem from="1761634934036" duration="1968000" />
+    </task>
+    <option name="localTasksCounter" value="2" />
+    <servers />
+  </component>
+  <component name="TodoView" selected-index="0">
+    <todo-panel id="selected-file">
+      <are-packages-shown value="false" />
+      <flatten-packages value="false" />
+      <is-autoscroll-to-source value="true" />
+    </todo-panel>
+    <todo-panel id="all">
+      <are-packages-shown value="true" />
+      <flatten-packages value="false" />
+      <is-autoscroll-to-source value="true" />
+    </todo-panel>
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="-4" y="-4" width="1032" height="746" extended-state="6" />
+    <editor active="false" />
+    <layout>
+      <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="-1" />
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="0" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="1" />
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="-1" />
+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="6" />
+      <window_info id="Aspects" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="-1" />
+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="2" />
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="4" />
+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" />
+      <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
+      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="0" />
+      <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="3" />
+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="5" />
+    </layout>
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="3" />
+  </component>
+  <component name="VssConfiguration">
+    <CheckoutOptions>
+      <option name="COMMENT" value="" />
+      <option name="DO_NOT_GET_LATEST_VERSION" value="false" />
+      <option name="REPLACE_WRITABLE" value="false" />
+      <option name="RECURSIVE" value="false" />
+    </CheckoutOptions>
+    <CheckinOptions>
+      <option name="COMMENT" value="" />
+      <option name="KEEP_CHECKED_OUT" value="false" />
+      <option name="RECURSIVE" value="false" />
+    </CheckinOptions>
+    <AddOptions>
+      <option name="COMMENT" value="" />
+      <option name="STORE_ONLY_LATEST_VERSION" value="false" />
+      <option name="CHECK_OUT_IMMEDIATELY" value="false" />
+      <option name="FILE_TYPE" value="0" />
+    </AddOptions>
+    <UndocheckoutOptions>
+      <option name="MAKE_WRITABLE" value="false" />
+      <option name="REPLACE_LOCAL_COPY" value="0" />
+      <option name="RECURSIVE" value="false" />
+    </UndocheckoutOptions>
+    <DiffOptions>
+      <option name="IGNORE_WHITE_SPACE" value="false" />
+      <option name="IGNORE_CASE" value="false" />
+    </DiffOptions>
+    <GetOptions>
+      <option name="REPLACE_WRITABLE" value="0" />
+      <option name="MAKE_WRITABLE" value="false" />
+      <option name="RECURSIVE" value="false" />
+    </GetOptions>
+    <option name="CLIENT_PATH" value="" />
+    <option name="SRCSAFEINI_PATH" value="" />
+    <option name="USER_NAME" value="" />
+    <option name="PWD" value="" />
+    <option name="SHOW_CHECKOUT_OPTIONS" value="true" />
+    <option name="SHOW_ADD_OPTIONS" value="true" />
+    <option name="SHOW_UNDOCHECKOUT_OPTIONS" value="true" />
+    <option name="SHOW_DIFF_OPTIONS" value="true" />
+    <option name="SHOW_GET_OPTIONS" value="true" />
+    <option name="USE_EXTERNAL_DIFF" value="false" />
+    <option name="EXTERNAL_DIFF_PATH" value="" />
+    <option name="REUSE_LAST_COMMENT" value="false" />
+    <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
+    <option name="SHOW_CHECKIN_OPTIONS" value="true" />
+    <option name="LAST_COMMIT_MESSAGE" value="" />
+    <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
+  </component>
+  <component name="WebViewSettings">
+    <webview flattenPackages="false" showMembers="false" autoscrollToSource="false" />
+  </component>
+</project>

+ 0 - 0
mvn


+ 310 - 0
mvnw

@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 182 - 0
mvnw.cmd

@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%

+ 149 - 0
pom.xml

@@ -0,0 +1,149 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.3.1.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+    <groupId>cn.gov.customs</groupId>
+    <artifactId>wxjy-data-serivce</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>wxjy-data-service</name>
+    <description>Data Service project for Spring Boot</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!--lombok-->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+
+        <!-- hibernate  -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.hibernate</groupId>
+                    <artifactId>hibernate-core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!--升级hibernate-core的版本为5.6.11.Final,解决hibernate建表时采用默认设置,hibernate会把表名大写统一转换成下划线加小写,dm表名为大写-->
+        <!--或者添加spring.jpa.hibernate.naming.physicalstrategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl-->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-core</artifactId>
+            <version>5.6.11.Final</version>
+        </dependency>
+        <!-- oracle  -->
+        <dependency>
+            <groupId>com.oracle.database.jdbc</groupId>
+            <artifactId>ojdbc6</artifactId>
+            <version>11.2.0.4</version>
+        </dependency>
+        <!-- dm -->
+        <dependency>
+            <groupId>com.dameng</groupId>
+            <artifactId>DmJdbcDriver18</artifactId>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/src/main/resources/lib/DmJdbcDriver18-8.1.2.94.jar</systemPath>
+            <version>8.1.2.94</version>
+        </dependency>
+        <!-- 引入本地 hibernate gbase8s JAR-->
+        <dependency>
+            <groupId>com.dameng</groupId>
+            <artifactId>DmDialect-for-hibernate5.3</artifactId>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/src/main/resources/lib/DmDialect-for-hibernate5.3-8.1.2.141.jar</systemPath>
+            <version>8.1.2.141</version>
+        </dependency>
+
+        <!-- gbase  -->
+        <dependency>
+            <groupId>com.gbase.jdbc</groupId>
+            <artifactId>gbase-connector-java</artifactId>
+            <!--<artifactId>gbase-connector-java-8.3.81.53-build54.4.7-bin-cutlog</artifactId>-->
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/src/main/resources/lib/gbase-connector-java-8.3.81.53-build54.4.7-bin-cutlog.jar</systemPath>
+            <version>8.3.81.53</version>
+        </dependency>
+        <!-- 引入本地 hibernate gbase8s JAR-->
+        <dependency>
+            <groupId>com.gbasedbt.hibernate</groupId>
+            <artifactId>ifxhibernate</artifactId>
+            <!--<artifactId>GBaseHibernate4.3.1-Dialect</artifactId>-->
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/src/main/resources/lib/GBaseHibernate4.3.1-Dialect-8.3.81.51.jar</systemPath>
+            <version>8.3.81.51</version>
+        </dependency>
+        <!-- log4j  -->
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.16</version>
+            <scope>compile</scope>
+        </dependency>
+
+		<!-- mp ���� -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus</artifactId>
+            <version>2.3</version>
+        </dependency>
+
+        <!--jasypt加密-->
+        <dependency>
+            <groupId>com.github.ulisesbocchio</groupId>
+            <artifactId>jasypt-spring-boot-starter</artifactId>
+            <version>3.0.3</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <!--<resources>
+            <resource>
+                <directory>src/main/resources/lib</directory>
+                <targetPath>/BOOT-INF/lib</targetPath>
+            </resource>
+        </resources>-->
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 15 - 0
src/main/java/cn/gov/customs/data/DataApplication.java

@@ -0,0 +1,15 @@
+package cn.gov.customs.data;
+
+import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@EnableEncryptableProperties
+@SpringBootApplication
+public class DataApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(DataApplication.class, args);
+    }
+
+}

+ 57 - 0
src/main/java/cn/gov/customs/data/config/AppConfig.java

@@ -0,0 +1,57 @@
+package cn.gov.customs.data.config;
+
+import javax.sql.DataSource;
+
+/*
+ * @Description:
+ * @Author: wq
+ * @Date: 2025/11/3.
+ */
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.Database;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * transactionManagerRef 事务管理工厂引用名称,对应到@Bean注解对应的方法
+ * entityManagerFactoryRef 实体管理工厂引用名称,对应到@Bean注解对应的方法
+ */
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef="entityManagerApp",
+        transactionManagerRef="transactionManagerApp",
+        basePackages= {"cn.gov.customs.data.repository.app"}) //设置Repository所在位置  dao 文件的路径
+public class AppConfig {
+
+    @Autowired
+    @Qualifier("appDataSource")
+    private DataSource appDataSource;
+
+
+    @Bean
+    PlatformTransactionManager transactionManagerApp() {
+        return new JpaTransactionManager(entityManagerApp().getObject());
+    }
+
+    @Bean
+    public LocalContainerEntityManagerFactoryBean entityManagerApp() {
+        HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+        vendorAdapter.setDatabase(Database.MYSQL);
+        vendorAdapter.setShowSql(true);
+
+        LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
+        factoryBean.setDataSource(appDataSource);
+        factoryBean.setJpaVendorAdapter(vendorAdapter);
+        factoryBean.setPackagesToScan("cn.gov.customs.data.entity.app*");//jpa对应的实体的位置
+        return factoryBean;
+    }
+}

+ 81 - 0
src/main/java/cn/gov/customs/data/config/DataSourceConfig.java

@@ -0,0 +1,81 @@
+package cn.gov.customs.data.config;
+
+import javax.sql.DataSource;
+
+/*
+ * @Description:
+ * @Author: wq
+ * @Date: 2025/12/3.
+ */
+
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.jdbc.DataSourceBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.PropertySource;
+
+@Configuration
+@PropertySource("classpath:application.yml")
+public class DataSourceConfig {
+	//个人理解该注解主要用于表明优先性,当使用@Autowired时没有特殊标明的话,默认使用这个bean
+    @Bean(name = "primaryDataSource")
+    @Primary
+    @Qualifier("primaryDataSource")
+    @ConfigurationProperties(prefix = "spring.primary.datasource")
+    public DataSource primaryDatasource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    //个人理解该注解主要用于表明优先性,当使用@Autowired时没有特殊标明的话,默认使用这个bean
+    @Bean(name = "iedgDataSource")
+    @Qualifier("iedgDataSource")
+    @ConfigurationProperties(prefix = "spring.iedg.datasource")
+    public DataSource iedgDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "appDataSource")
+    @Qualifier("appDataSource")
+    @ConfigurationProperties(prefix = "spring.app.datasource")
+    public DataSource appDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "h2018appDataSource")
+    @Qualifier("h2018appDataSource")
+    @ConfigurationProperties(prefix = "spring.h2018app.datasource")
+    public DataSource h2018appDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "h2018DataSource")
+    @Qualifier("h2018DataSource")
+    @ConfigurationProperties(prefix = "spring.h2018.datasource")
+    public DataSource h2018DataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "rh2kDataSource")
+    @Qualifier("rh2kDataSource")
+    @ConfigurationProperties(prefix = "spring.rh2k.datasource")
+    public DataSource rh2kDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "inspectDataSource")
+    @Qualifier("inspectDataSource")
+    @ConfigurationProperties(prefix = "spring.inspect.datasource")
+    public DataSource inspectDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "zmqdDataSource")
+    @Qualifier("zmqdDataSource")
+    @ConfigurationProperties(prefix = "spring.zmqd.datasource")
+    public DataSource zmqdDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+    
+}

+ 52 - 0
src/main/java/cn/gov/customs/data/config/H2018AppConfig.java

@@ -0,0 +1,52 @@
+package cn.gov.customs.data.config;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.Database;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+
+/**
+ * transactionManagerRef 事务管理工厂引用名称,对应到@Bean注解对应的方法
+ * entityManagerFactoryRef 实体管理工厂引用名称,对应到@Bean注解对应的方法
+ */
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef="entityManagerH2018app",
+        transactionManagerRef="transactionManagerH2018app",
+        basePackages= {"cn.gov.customs.data.repository.h2018app"}) //设置Repository所在位置  dao 文件的路径
+public class H2018AppConfig {
+
+    @Autowired
+    @Qualifier("h2018appDataSource")
+    private DataSource h2018appDataSource;
+
+
+    @Bean
+    PlatformTransactionManager transactionManagerH2018app() {
+        return new JpaTransactionManager(entityManagerH2018app().getObject());
+    }
+
+    @Bean
+    public LocalContainerEntityManagerFactoryBean entityManagerH2018app() {
+        HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+        vendorAdapter.setDatabase(Database.MYSQL);
+        vendorAdapter.setShowSql(true);
+
+        LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
+        factoryBean.setDataSource(h2018appDataSource);
+        factoryBean.setJpaVendorAdapter(vendorAdapter);
+        factoryBean.setPackagesToScan("cn.gov.customs.data.entity.h2018app*");//jpa对应的实体的位置
+        return factoryBean;
+    }
+}

+ 55 - 0
src/main/java/cn/gov/customs/data/config/H2018Config.java

@@ -0,0 +1,55 @@
+package cn.gov.customs.data.config;
+
+import cn.gov.customs.data.repository.h2018.H2018Repository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.Database;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+
+/*
+ * @Description:
+ * @Author: wq
+ * @Date: 2025/11/3.
+ */
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef="entityManagerH2018",
+        transactionManagerRef="transactionManagerH2018",
+        basePackages= {"cn.gov.customs.data.repository.h2018"},
+        basePackageClasses = {H2018Repository.class}) //设置Repository所在位置  dao 文件的路径
+public class H2018Config {
+
+    @Autowired
+    @Qualifier("h2018DataSource")
+    private DataSource h2018DataSource;
+
+
+    @Bean
+    PlatformTransactionManager transactionManagerH2018() {
+        return new JpaTransactionManager(entityManagerH2018().getObject());
+    }
+
+    @Bean
+    public LocalContainerEntityManagerFactoryBean entityManagerH2018() {
+        HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+        vendorAdapter.setDatabase(Database.MYSQL);
+        vendorAdapter.setShowSql(true);
+
+        LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
+        factoryBean.setDataSource(h2018DataSource);
+        factoryBean.setJpaVendorAdapter(vendorAdapter);
+        factoryBean.setPackagesToScan("cn.gov.customs.data.entity.h2018*");//jpa对应的实体的位置
+        return factoryBean;
+    }
+}

+ 52 - 0
src/main/java/cn/gov/customs/data/config/IedgConfig.java

@@ -0,0 +1,52 @@
+package cn.gov.customs.data.config;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.Database;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+
+/**
+ * transactionManagerRef 事务管理工厂引用名称,对应到@Bean注解对应的方法
+ * entityManagerFactoryRef 实体管理工厂引用名称,对应到@Bean注解对应的方法
+ */
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef="entityManagerIedg",
+        transactionManagerRef="transactionManagerIedg",
+        basePackages= {"cn.gov.customs.data.repository.iedg"}) //设置Repository所在位置  dao 文件的路径
+public class IedgConfig {
+
+    @Autowired
+    @Qualifier("iedgDataSource")
+    private DataSource iedgDataSource;
+
+
+    @Bean
+    PlatformTransactionManager transactionManagerIedg() {
+        return new JpaTransactionManager(entityManagerIedg().getObject());
+    }
+
+    @Bean
+    public LocalContainerEntityManagerFactoryBean entityManagerIedg() {
+        HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+        vendorAdapter.setDatabase(Database.ORACLE);
+        vendorAdapter.setShowSql(true);
+
+        LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
+        factoryBean.setDataSource(iedgDataSource);
+        factoryBean.setJpaVendorAdapter(vendorAdapter);
+        factoryBean.setPackagesToScan("cn.gov.customs.data.entity.iedg*"); //jpa对应的实体的位置
+        return factoryBean;
+    }
+}

+ 55 - 0
src/main/java/cn/gov/customs/data/config/InspectConfig.java

@@ -0,0 +1,55 @@
+package cn.gov.customs.data.config;
+
+import cn.gov.customs.data.repository.inspect.InspectRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.Database;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+
+/*
+ * @Description:
+ * @Author: wq
+ * @Date: 2025/11/3.
+ */
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef="entityManagerInspect",
+        transactionManagerRef="transactionManagerInspect",
+        basePackages= {"cn.gov.customs.data.repository.inspect"},
+        basePackageClasses = {InspectRepository.class}) //设置Repository所在位置  dao 文件的路径
+public class InspectConfig {
+
+    @Autowired
+    @Qualifier("inspectDataSource")
+    private DataSource inspectDataSource;
+
+
+    @Bean
+    PlatformTransactionManager transactionManagerInspect() {
+        return new JpaTransactionManager(entityManagerInspect().getObject());
+    }
+
+    @Bean
+    public LocalContainerEntityManagerFactoryBean entityManagerInspect() {
+        HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+        vendorAdapter.setDatabase(Database.MYSQL);
+        vendorAdapter.setShowSql(true);
+
+        LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
+        factoryBean.setDataSource(inspectDataSource);
+        factoryBean.setJpaVendorAdapter(vendorAdapter);
+        factoryBean.setPackagesToScan("cn.gov.customs.data.entity.inspect*");//jpa对应的实体的位置
+        return factoryBean;
+    }
+}

+ 61 - 0
src/main/java/cn/gov/customs/data/config/PrimaryConfig.java

@@ -0,0 +1,61 @@
+package cn.gov.customs.data.config;
+
+/*
+ * @Description:
+ * @Author: wq
+ * @Date: 2025/11/3.
+ */
+
+/**第一个数据源对应的配置文件
+ **/
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.Database;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef="entityManagerPrimary",
+        transactionManagerRef="transactionManagerPrimary",
+        basePackages= {"cn.gov.customs.data.repository.wxjy"}) //设置Repository所在位置  dao 文件的路径
+public class PrimaryConfig {
+
+    @Autowired
+    @Qualifier("primaryDataSource")
+    private DataSource primaryDataSource;
+
+    @Primary
+    @Bean
+    PlatformTransactionManager transactionManagerPrimary() {
+        return new JpaTransactionManager(entityManagerPrimary().getObject());
+    }
+
+    @Primary
+    @Bean(name = "entityManagerPrimary")
+    public LocalContainerEntityManagerFactoryBean entityManagerPrimary() {
+        HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+        vendorAdapter.setDatabase(Database.ORACLE);
+//        vendorAdapter.setDatabasePlatform("org.hibernate.dialect.DmDialect");
+        vendorAdapter.setShowSql(true);
+
+        LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
+        factoryBean.setDataSource(primaryDataSource);
+        factoryBean.setJpaVendorAdapter(vendorAdapter);
+        factoryBean.setPackagesToScan("cn.gov.customs.data.entity.wxjy*"); //jpa对应的实体的位置
+        return factoryBean;
+    }
+    
+     
+
+}

+ 55 - 0
src/main/java/cn/gov/customs/data/config/Rh2kConfig.java

@@ -0,0 +1,55 @@
+package cn.gov.customs.data.config;
+
+import cn.gov.customs.data.repository.rh2k.Rh2kRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.Database;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+
+/*
+ * @Description:
+ * @Author: wq
+ * @Date: 2025/11/3.
+ */
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef="entityManagerRh2k",
+        transactionManagerRef="transactionManagerRh2k",
+        basePackages= {"cn.gov.customs.data.repository.rh2k"},
+        basePackageClasses = {Rh2kRepository.class}) //设置Repository所在位置  dao 文件的路径
+public class Rh2kConfig {
+
+    @Autowired
+    @Qualifier("rh2kDataSource")
+    private DataSource rh2kDataSource;
+
+
+    @Bean
+    PlatformTransactionManager transactionManagerRh2k() {
+        return new JpaTransactionManager(entityManagerRh2k().getObject());
+    }
+
+    @Bean
+    public LocalContainerEntityManagerFactoryBean entityManagerRh2k() {
+        HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+        vendorAdapter.setDatabase(Database.MYSQL);
+        vendorAdapter.setShowSql(true);
+
+        LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
+        factoryBean.setDataSource(rh2kDataSource);
+        factoryBean.setJpaVendorAdapter(vendorAdapter);
+        factoryBean.setPackagesToScan("cn.gov.customs.data.entity.rh2k*");//jpa对应的实体的位置
+        return factoryBean;
+    }
+}

+ 55 - 0
src/main/java/cn/gov/customs/data/config/ZmqdConfig.java

@@ -0,0 +1,55 @@
+package cn.gov.customs.data.config;
+
+import cn.gov.customs.data.repository.zmqd.ZmqdRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.Database;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+
+/*
+ * @Description:
+ * @Author: wq
+ * @Date: 2025/11/3.
+ */
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef="entityManagerZmqd",
+        transactionManagerRef="transactionManagerZmqd",
+        basePackages= {"cn.gov.customs.data.repository.zmqd"},
+        basePackageClasses = {ZmqdRepository.class}) //设置Repository所在位置  dao 文件的路径
+public class ZmqdConfig {
+
+    @Autowired
+    @Qualifier("zmqdDataSource")
+    private DataSource zmqdDataSource;
+
+
+    @Bean
+    PlatformTransactionManager transactionManagerZmqd() {
+        return new JpaTransactionManager(entityManagerZmqd().getObject());
+    }
+
+    @Bean
+    public LocalContainerEntityManagerFactoryBean entityManagerZmqd() {
+        HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+        vendorAdapter.setDatabase(Database.MYSQL);
+        vendorAdapter.setShowSql(true);
+
+        LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
+        factoryBean.setDataSource(zmqdDataSource);
+        factoryBean.setJpaVendorAdapter(vendorAdapter);
+        factoryBean.setPackagesToScan("cn.gov.customs.data.entity.zmqd*");//jpa对应的实体的位置
+        return factoryBean;
+    }
+}

+ 32 - 0
src/main/java/cn/gov/customs/data/dm/DM8GetGeneratedKeysDelegate.java

@@ -0,0 +1,32 @@
+package cn.gov.customs.data.dm;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import org.hibernate.HibernateException;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.identity.GetGeneratedKeysDelegate;
+import org.hibernate.engine.spi.SharedSessionContractImplementor;
+import org.hibernate.id.PostInsertIdentityPersister;
+
+
+public class DM8GetGeneratedKeysDelegate extends GetGeneratedKeysDelegate {
+
+    private String[] keyColumns;
+
+
+    public DM8GetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect) {
+        super(persister, dialect);
+        this.keyColumns = getPersister().getRootTableKeyColumnNames();
+        if ( keyColumns.length > 1 ) {
+            throw new HibernateException( "Identity generator cannot be used with multi-column keys" );
+        }
+    }
+
+    @Override
+    protected PreparedStatement prepare(String insertSQL, SharedSessionContractImplementor session) throws SQLException {
+        return session
+                .getJdbcCoordinator()
+                .getStatementPreparer()
+                .prepareStatement( insertSQL, keyColumns );
+    }
+}

+ 36 - 0
src/main/java/cn/gov/customs/data/dm/DM8IdentityColumnSupport.java

@@ -0,0 +1,36 @@
+package cn.gov.customs.data.dm;
+
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.identity.GetGeneratedKeysDelegate;
+import org.hibernate.dialect.identity.IdentityColumnSupportImpl;
+import org.hibernate.id.PostInsertIdentityPersister;
+
+
+public class DM8IdentityColumnSupport extends IdentityColumnSupportImpl {
+    @Override
+    public boolean supportsIdentityColumns() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsInsertSelectIdentity() {
+        return true;
+    }
+
+    @Override
+    public String getIdentityColumnString(int type) {
+        return "";
+    }
+
+    @Override
+    public GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(
+            PostInsertIdentityPersister persister, Dialect dialect) {
+        return new DM8GetGeneratedKeysDelegate( persister, dialect );
+    }
+
+    @Override
+    public String getIdentityInsertString() {
+        return "default";
+    }
+
+}

+ 683 - 0
src/main/java/cn/gov/customs/data/dm/Dm8Dialect.java

@@ -0,0 +1,683 @@
+package cn.gov.customs.data.dm;
+
+import java.sql.CallableStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+import org.hibernate.LockMode;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.function.CastFunction;
+import org.hibernate.dialect.function.NoArgSQLFunction;
+import org.hibernate.dialect.function.SQLFunctionTemplate;
+import org.hibernate.dialect.function.StandardSQLFunction;
+import org.hibernate.dialect.function.VarArgsSQLFunction;
+import org.hibernate.dialect.identity.IdentityColumnSupport;
+import org.hibernate.dialect.pagination.AbstractLimitHandler;
+import org.hibernate.dialect.pagination.LimitHandler;
+import org.hibernate.dialect.pagination.LimitHelper;
+import org.hibernate.engine.spi.RowSelection;
+import org.hibernate.exception.internal.SQLStateConverter;
+import org.hibernate.exception.spi.SQLExceptionConverter;
+import org.hibernate.exception.spi.ViolatedConstraintNameExtracter;
+import org.hibernate.hql.spi.id.IdTableSupportStandardImpl;
+import org.hibernate.hql.spi.id.MultiTableBulkIdStrategy;
+import org.hibernate.hql.spi.id.global.GlobalTemporaryTableBulkIdStrategy;
+import org.hibernate.hql.spi.id.local.AfterUseAction;
+import org.hibernate.internal.util.ReflectHelper;
+import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
+import org.hibernate.type.StandardBasicTypes;
+
+
+public class Dm8Dialect extends Dialect {
+    private static final AbstractLimitHandler LIMIT_HANDLER = new AbstractLimitHandler() {
+        public String processSql(String sql, RowSelection selection) {
+            boolean hasOffset = LimitHelper.hasFirstRow(selection);
+
+            for(sql = sql.trim(); sql.endsWith(";"); sql = sql.substring(0, sql.length() - 1)) {
+            }
+
+            boolean isForUpdate = false;
+            if (sql.toLowerCase().endsWith(" for update")) {
+                sql = sql.substring(0, sql.length() - 11);
+                isForUpdate = true;
+            }
+
+            StringBuilder pagingSelect = new StringBuilder(sql.length() + 100);
+            if (hasOffset) {
+                pagingSelect.append(sql).append(" limit ? offset ? ");
+            } else {
+                pagingSelect.append(sql).append(" limit ? ");
+            }
+
+            if (isForUpdate) {
+                pagingSelect.append(" for update");
+            }
+
+            return pagingSelect.toString();
+        }
+
+        public boolean supportsLimit() {
+            return true;
+        }
+
+        public boolean supportsLimitOffset() {
+            return this.supportsLimit();
+        }
+
+        public boolean supportsVariableLimit() {
+            return this.supportsLimit();
+        }
+
+        public boolean bindLimitParametersInReverseOrder() {
+            return true;
+        }
+
+        public boolean bindLimitParametersFirst() {
+            return false;
+        }
+
+        public boolean useMaxForLimit() {
+            return false;
+        }
+
+        public boolean forceLimitUsage() {
+            return false;
+        }
+
+        public int convertToFirstRowValue(int zeroBasedFirstResult) {
+            return zeroBasedFirstResult;
+        }
+    };
+    int dmdbtype_cursor = 0;
+    private static final ViolatedConstraintNameExtracter EXTRACTER = new ViolatedConstraintNameExtracter() {
+        public String extractConstraintName(SQLException sqle) {
+            return null;
+        }
+    };
+
+    public Dm8Dialect() {
+        this.registerColumnType(-7, "bit");
+        this.registerColumnType(16, "bit");
+        this.registerColumnType(-6, "tinyint");
+        this.registerColumnType(5, "smallint");
+        this.registerColumnType(4, "integer");
+        this.registerColumnType(-5, "bigint");
+        this.registerColumnType(6, "float");
+        this.registerColumnType(8, "double");
+        this.registerColumnType(2, "numeric($p,$s)");
+        this.registerColumnType(7, "real");
+        this.registerColumnType(3, "decimal($p,$s)");
+        this.registerColumnType(91, "date");
+        this.registerColumnType(92, "time");
+        this.registerColumnType(93, "datetime");
+        this.registerColumnType(-2, "binary($l)");
+        this.registerColumnType(-3, "varbinary($l)");
+        this.registerColumnType(-4, "image");
+        this.registerColumnType(2004, "blob");
+        this.registerColumnType(1, "char(1)");
+        this.registerColumnType(12, "varchar($l)");
+        this.registerColumnType(-1, "text");
+        this.registerColumnType(2005, "clob");
+        this.registerColumnType(-15, "char(1)");
+        this.registerColumnType(-9, "varchar($l)");
+        this.registerColumnType(-16, "text");
+        this.registerColumnType(2011, "clob");
+        this.registerHibernateType(Types.OTHER, StandardBasicTypes.TIMESTAMP.getName());
+        this.registerKeyword("last");
+        this.registerKeyword("size");
+        this.registerHibernateType(5, StandardBasicTypes.SHORT.getName());
+        this.registerFunction("substring", new SQLFunctionTemplate(StandardBasicTypes.STRING, "substring(?1, ?2, ?3)"));
+        this.registerFunction("locate", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "locate(?1, ?2, ?3)"));
+        this.registerFunction("trim", new SQLFunctionTemplate(StandardBasicTypes.STRING, "trim(?1 ?2 ?3 ?4)"));
+        this.registerFunction("length", new StandardSQLFunction("length", StandardBasicTypes.INTEGER));
+        this.registerFunction("bit_length", new StandardSQLFunction("bit_length", StandardBasicTypes.INTEGER));
+        this.registerFunction("coalesce", new StandardSQLFunction("coalesce"));
+        this.registerFunction("nullif", new StandardSQLFunction("nullif"));
+        this.registerFunction("abs", new StandardSQLFunction("abs"));
+        this.registerFunction("mod", new StandardSQLFunction("mod", StandardBasicTypes.LONG));
+        this.registerFunction("sqrt", new StandardSQLFunction("sqrt", StandardBasicTypes.DOUBLE));
+        this.registerFunction("upper", new StandardSQLFunction("upper"));
+        this.registerFunction("lower", new StandardSQLFunction("lower"));
+        this.registerFunction("cast", new CastFunction());
+        this.registerFunction("extract", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "extract(?1 ?2 ?3)"));
+        this.registerFunction("second", new StandardSQLFunction("second", StandardBasicTypes.INTEGER));
+        this.registerFunction("minute", new StandardSQLFunction("minute", StandardBasicTypes.INTEGER));
+        this.registerFunction("hour", new StandardSQLFunction("hour", StandardBasicTypes.INTEGER));
+        this.registerFunction("day", new StandardSQLFunction("day", StandardBasicTypes.INTEGER));
+        this.registerFunction("month", new StandardSQLFunction("month", StandardBasicTypes.INTEGER));
+        this.registerFunction("year", new StandardSQLFunction("year", StandardBasicTypes.INTEGER));
+        this.registerFunction("str", new StandardSQLFunction("to_char", StandardBasicTypes.STRING));
+        this.registerFunction("asin", new StandardSQLFunction("asin", StandardBasicTypes.DOUBLE));
+        this.registerFunction("acos", new StandardSQLFunction("acos", StandardBasicTypes.DOUBLE));
+        this.registerFunction("atan", new StandardSQLFunction("atan", StandardBasicTypes.DOUBLE));
+        this.registerFunction("atan2", new StandardSQLFunction("atan2", StandardBasicTypes.DOUBLE));
+        this.registerFunction("ceil", new StandardSQLFunction("ceil", StandardBasicTypes.INTEGER));
+        this.registerFunction("ceiling", new StandardSQLFunction("ceiling", StandardBasicTypes.INTEGER));
+        this.registerFunction("cos", new StandardSQLFunction("cos", StandardBasicTypes.DOUBLE));
+        this.registerFunction("cot", new StandardSQLFunction("cot", StandardBasicTypes.DOUBLE));
+        this.registerFunction("cosh", new StandardSQLFunction("cosh", StandardBasicTypes.DOUBLE));
+        this.registerFunction("degrees", new StandardSQLFunction("degrees"));
+        this.registerFunction("exp", new StandardSQLFunction("exp", StandardBasicTypes.DOUBLE));
+        this.registerFunction("GREATEST", new StandardSQLFunction("GREATEST", StandardBasicTypes.DOUBLE));
+        this.registerFunction("floor", new StandardSQLFunction("floor", StandardBasicTypes.INTEGER));
+        this.registerFunction("ln", new StandardSQLFunction("ln", StandardBasicTypes.DOUBLE));
+        this.registerFunction("log", new StandardSQLFunction("log", StandardBasicTypes.DOUBLE));
+        this.registerFunction("log10", new StandardSQLFunction("log10", StandardBasicTypes.DOUBLE));
+        this.registerFunction("pi", new NoArgSQLFunction("pi", StandardBasicTypes.DOUBLE));
+        this.registerFunction("power", new StandardSQLFunction("power", StandardBasicTypes.DOUBLE));
+        this.registerFunction("radians", new StandardSQLFunction("radians"));
+        this.registerFunction("rand", new NoArgSQLFunction("rand", StandardBasicTypes.DOUBLE));
+        this.registerFunction("round", new StandardSQLFunction("round"));
+        this.registerFunction("sign", new StandardSQLFunction("sign", StandardBasicTypes.INTEGER));
+        this.registerFunction("sin", new StandardSQLFunction("sin", StandardBasicTypes.DOUBLE));
+        this.registerFunction("sinh", new StandardSQLFunction("sinh", StandardBasicTypes.DOUBLE));
+        this.registerFunction("tan", new StandardSQLFunction("tan", StandardBasicTypes.DOUBLE));
+        this.registerFunction("tanh", new StandardSQLFunction("tanh", StandardBasicTypes.DOUBLE));
+        this.registerFunction("trunc", new StandardSQLFunction("trunc"));
+        this.registerFunction("truncate", new StandardSQLFunction("truncate"));
+        this.registerFunction("stddev", new StandardSQLFunction("stddev", StandardBasicTypes.DOUBLE));
+        this.registerFunction("variance", new StandardSQLFunction("variance", StandardBasicTypes.DOUBLE));
+        this.registerFunction("concat", new VarArgsSQLFunction(StandardBasicTypes.STRING, "", "||", ""));
+        this.registerFunction("ascii", new StandardSQLFunction("ascii", StandardBasicTypes.INTEGER));
+        this.registerFunction("char", new StandardSQLFunction("char", StandardBasicTypes.CHARACTER));
+        this.registerFunction("difference", new StandardSQLFunction("difference", StandardBasicTypes.INTEGER));
+        this.registerFunction("char_length", new StandardSQLFunction("char_length", StandardBasicTypes.LONG));
+        this.registerFunction("character_length", new StandardSQLFunction("character_length", StandardBasicTypes.LONG));
+        this.registerFunction("chr", new StandardSQLFunction("chr", StandardBasicTypes.CHARACTER));
+        this.registerFunction("initcap", new StandardSQLFunction("initcap", StandardBasicTypes.STRING));
+        this.registerFunction("insert", new StandardSQLFunction("insert", StandardBasicTypes.STRING));
+        this.registerFunction("insstr", new StandardSQLFunction("insstr", StandardBasicTypes.STRING));
+        this.registerFunction("instr", new StandardSQLFunction("instr", StandardBasicTypes.LONG));
+        this.registerFunction("instrb", new StandardSQLFunction("instrb", StandardBasicTypes.LONG));
+        this.registerFunction("lcase", new StandardSQLFunction("lcase", StandardBasicTypes.STRING));
+        this.registerFunction("left", new StandardSQLFunction("left", StandardBasicTypes.STRING));
+        this.registerFunction("leftstr", new StandardSQLFunction("leftstr", StandardBasicTypes.STRING));
+        this.registerFunction("len", new StandardSQLFunction("len", StandardBasicTypes.INTEGER));
+        this.registerFunction("LENGTHB", new StandardSQLFunction("LENGTHB", StandardBasicTypes.INTEGER));
+        this.registerFunction("octet_length", new StandardSQLFunction("octet_length", StandardBasicTypes.LONG));
+        this.registerFunction("lpad", new StandardSQLFunction("lpad", StandardBasicTypes.STRING));
+        this.registerFunction("ltrim", new StandardSQLFunction("ltrim", StandardBasicTypes.STRING));
+        this.registerFunction("position", new StandardSQLFunction("position", StandardBasicTypes.INTEGER));
+        this.registerFunction("INS", new StandardSQLFunction("INS", StandardBasicTypes.STRING));
+        this.registerFunction("repeat", new StandardSQLFunction("repeat", StandardBasicTypes.STRING));
+        this.registerFunction("REPLICATE", new StandardSQLFunction("REPLICATE", StandardBasicTypes.STRING));
+        this.registerFunction("STUFF", new StandardSQLFunction("STUFF", StandardBasicTypes.STRING));
+        this.registerFunction("repeatstr", new StandardSQLFunction("repeatstr", StandardBasicTypes.STRING));
+        this.registerFunction("replace", new StandardSQLFunction("replace", StandardBasicTypes.STRING));
+        this.registerFunction("reverse", new StandardSQLFunction("reverse", StandardBasicTypes.STRING));
+        this.registerFunction("right", new StandardSQLFunction("right", StandardBasicTypes.STRING));
+        this.registerFunction("rightstr", new StandardSQLFunction("rightstr", StandardBasicTypes.STRING));
+        this.registerFunction("rpad", new StandardSQLFunction("rpad", StandardBasicTypes.STRING));
+        this.registerFunction("TO_NUMBER", new StandardSQLFunction("TO_NUMBER"));
+        this.registerFunction("rtrim", new StandardSQLFunction("rtrim", StandardBasicTypes.STRING));
+        this.registerFunction("soundex", new StandardSQLFunction("soundex", StandardBasicTypes.STRING));
+        this.registerFunction("space", new StandardSQLFunction("space", StandardBasicTypes.STRING));
+        this.registerFunction("substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING));
+        this.registerFunction("substrb", new StandardSQLFunction("substrb", StandardBasicTypes.STRING));
+        this.registerFunction("to_char", new StandardSQLFunction("to_char", StandardBasicTypes.STRING));
+        this.registerFunction("STRPOSDEC", new StandardSQLFunction("STRPOSDEC", StandardBasicTypes.STRING));
+        this.registerFunction("STRPOSINC", new StandardSQLFunction("STRPOSINC", StandardBasicTypes.STRING));
+        this.registerFunction("VSIZE", new StandardSQLFunction("VSIZE", StandardBasicTypes.INTEGER));
+        this.registerFunction("translate", new StandardSQLFunction("translate", StandardBasicTypes.STRING));
+        this.registerFunction("ucase", new StandardSQLFunction("ucase", StandardBasicTypes.STRING));
+        this.registerFunction("OVERLAPS", new StandardSQLFunction("OVERLAPS"));
+        this.registerFunction("DATEPART", new StandardSQLFunction("DATEPART"));
+        this.registerFunction("DATE_PART", new StandardSQLFunction("DATE_PART"));
+        this.registerFunction("add_days", new StandardSQLFunction("add_days"));
+        this.registerFunction("add_months", new StandardSQLFunction("add_months"));
+        this.registerFunction("add_weeks", new StandardSQLFunction("add_weeks"));
+        this.registerFunction("curdate", new NoArgSQLFunction("curdate", StandardBasicTypes.DATE));
+        this.registerFunction("curtime", new NoArgSQLFunction("curtime", StandardBasicTypes.TIME));
+        this.registerFunction("current_date", new NoArgSQLFunction("current_date", StandardBasicTypes.DATE));
+        this.registerFunction("current_time", new NoArgSQLFunction("current_time", StandardBasicTypes.TIME));
+        this.registerFunction("current_timestamp", new NoArgSQLFunction("current_timestamp", StandardBasicTypes.TIMESTAMP));
+        this.registerFunction("dateadd", new StandardSQLFunction("dateadd", StandardBasicTypes.TIMESTAMP));
+        this.registerFunction("CUR_TICK_TIME", new StandardSQLFunction("CUR_TICK_TIME"));
+        this.registerFunction("datediff", new StandardSQLFunction("datediff", StandardBasicTypes.INTEGER));
+        this.registerFunction("datepart", new StandardSQLFunction("datepart", StandardBasicTypes.INTEGER));
+        this.registerFunction("dayname", new StandardSQLFunction("dayname", StandardBasicTypes.STRING));
+        this.registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth", StandardBasicTypes.INTEGER));
+        this.registerFunction("dayofweek", new StandardSQLFunction("dayofweek", StandardBasicTypes.INTEGER));
+        this.registerFunction("dayofyear", new StandardSQLFunction("dayofyear", StandardBasicTypes.INTEGER));
+        this.registerFunction("days_between", new StandardSQLFunction("days_between", StandardBasicTypes.INTEGER));
+        this.registerFunction("getdate", new StandardSQLFunction("getdate", StandardBasicTypes.TIMESTAMP));
+        this.registerFunction("LOCALTIMESTAMP", new StandardSQLFunction("LOCALTIMESTAMP"));
+        this.registerFunction("NOW", new StandardSQLFunction("NOW"));
+        this.registerFunction("last_day", new StandardSQLFunction("last_day"));
+        this.registerFunction("month", new StandardSQLFunction("month", StandardBasicTypes.INTEGER));
+        this.registerFunction("monthname", new StandardSQLFunction("monthname", StandardBasicTypes.STRING));
+        this.registerFunction("months_between", new StandardSQLFunction("months_between"));
+        this.registerFunction("GREATEST", new StandardSQLFunction("GREATEST", StandardBasicTypes.DATE));
+        this.registerFunction("TO_DATETIME", new StandardSQLFunction("TO_DATETIME"));
+        this.registerFunction("next_day", new StandardSQLFunction("next_day"));
+        this.registerFunction("quarter", new StandardSQLFunction("quarter", StandardBasicTypes.INTEGER));
+        this.registerFunction("round", new StandardSQLFunction("round"));
+        this.registerFunction("timestampadd", new StandardSQLFunction("timestampadd", StandardBasicTypes.TIMESTAMP));
+        this.registerFunction("timestampdiff", new StandardSQLFunction("timestampdiff", StandardBasicTypes.INTEGER));
+        this.registerFunction("BIGDATEDIFF", new StandardSQLFunction("BIGDATEDIFF", StandardBasicTypes.BIG_INTEGER));
+        this.registerFunction("sysdate", new StandardSQLFunction("sysdate", StandardBasicTypes.TIME));
+        this.registerFunction("LEAST", new StandardSQLFunction("LEAST"));
+        this.registerFunction("trunc", new StandardSQLFunction("trunc"));
+        this.registerFunction("week", new StandardSQLFunction("week", StandardBasicTypes.INTEGER));
+        this.registerFunction("weekday", new StandardSQLFunction("weekday", StandardBasicTypes.INTEGER));
+        this.registerFunction("weeks_between", new StandardSQLFunction("weeks_between", StandardBasicTypes.INTEGER));
+        this.registerFunction("year", new StandardSQLFunction("year", StandardBasicTypes.INTEGER));
+        this.registerFunction("years_between", new StandardSQLFunction("years_between", StandardBasicTypes.INTEGER));
+        this.registerFunction("to_date", new StandardSQLFunction("to_date", StandardBasicTypes.TIMESTAMP));
+        this.registerFunction("systimestamp", new NoArgSQLFunction("systimestamp", StandardBasicTypes.TIMESTAMP));
+        this.registerFunction("ifnull", new StandardSQLFunction("ifnull"));
+        this.registerFunction("isnull", new StandardSQLFunction("isnull"));
+        this.registerFunction("nvl", new StandardSQLFunction("nvl"));
+        this.registerFunction("decode", new StandardSQLFunction("decode"));
+        this.registerFunction("cur_database", new StandardSQLFunction("cur_database", StandardBasicTypes.STRING));
+        this.registerFunction("page", new StandardSQLFunction("page", StandardBasicTypes.INTEGER));
+        this.registerFunction("sessid", new StandardSQLFunction("sessid", StandardBasicTypes.LONG));
+        this.registerFunction("uid", new StandardSQLFunction("uid", StandardBasicTypes.LONG));
+        this.registerFunction("user", new StandardSQLFunction("user", StandardBasicTypes.STRING));
+        this.registerFunction("vsize", new StandardSQLFunction("vsize", StandardBasicTypes.INTEGER));
+        this.registerFunction("tabledef", new StandardSQLFunction("tabledef", StandardBasicTypes.STRING));
+        this.getDefaultProperties().setProperty("hibernate.use_outer_join", "true");
+        this.getDefaultProperties().setProperty("hibernate.jdbc.batch_size", "0");
+    }
+
+    public IdentityColumnSupport getIdentityColumnSupport() {
+        return new DM8IdentityColumnSupport();
+    }
+
+    public boolean supportsSequences() {
+        return true;
+    }
+
+    public boolean supportsPooledSequences() {
+        return true;
+    }
+
+    public String getSequenceNextValString(String sequenceName) {
+        return "select " + this.getSelectSequenceNextValString(sequenceName);
+    }
+
+    public String getSelectSequenceNextValString(String sequenceName) {
+        return sequenceName + ".nextval";
+    }
+
+    /** @deprecated */
+    public String[] getCreateSequenceStrings(String sequenceName) {
+        return new String[]{this.getCreateSequenceString(sequenceName)};
+    }
+
+    public String[] getCreateSequenceStrings(String sequenceName, int initialValue, int incrementSize) {
+        return new String[]{this.getCreateSequenceString(sequenceName, initialValue, incrementSize)};
+    }
+
+    protected String getCreateSequenceString(String sequenceName) {
+        return "create sequence " + sequenceName;
+    }
+
+    protected String getCreateSequenceString(String sequenceName, int initialValue, int incrementSize) {
+        return this.getCreateSequenceString(sequenceName) + " increment by " + incrementSize + " start with " + initialValue;
+    }
+
+    public String[] getDropSequenceStrings(String sequenceName) {
+        return new String[]{this.getDropSequenceString(sequenceName)};
+    }
+
+    protected String getDropSequenceString(String sequenceName) {
+        return "drop sequence " + sequenceName;
+    }
+
+    public String getQuerySequencesString() {
+        return "select * from all_sequences";
+    }
+
+    public SequenceInformationExtractor getSequenceInformationExtractor() {
+        return SequenceInformationExtractorDMDatabaseImpl.INSTANCE;
+    }
+
+    public String getSelectGUIDString() {
+        return "select GUID()";
+    }
+
+    public LimitHandler getLimitHandler() {
+        return LIMIT_HANDLER;
+    }
+
+    static int getAfterSelectInsertPoint(String sql) {
+        int selectIndex = sql.toLowerCase().indexOf("select");
+        int selectDistinctIndex = sql.toLowerCase().indexOf("select distinct");
+        return selectIndex + (selectDistinctIndex != selectIndex ? 6 : 15);
+    }
+
+    public boolean supportsLockTimeouts() {
+        return true;
+    }
+
+    public boolean isLockTimeoutParameterized() {
+        return false;
+    }
+
+    public String getForUpdateString() {
+        return " for update";
+    }
+
+    public String getWriteLockString(int timeout) {
+        if (timeout == 0) {
+            return " for update nowait";
+        } else if (timeout > 0) {
+            float seconds = (float)timeout / 1000.0F;
+            timeout = Math.round(seconds);
+            return " for update wait " + timeout;
+        } else {
+            return " for update";
+        }
+    }
+
+    public String getReadLockString(int timeout) {
+        return this.getWriteLockString(timeout);
+    }
+
+    public boolean forUpdateOfColumns() {
+        return true;
+    }
+
+    public boolean supportsOuterJoinForUpdate() {
+        return true;
+    }
+
+    public String getForUpdateString(String aliases) {
+        return this.getForUpdateString() + " of " + aliases;
+    }
+
+    public String getForUpdateNowaitString() {
+        return this.getForUpdateString() + " nowait";
+    }
+
+    public String getForUpdateNowaitString(String aliases) {
+        return this.getForUpdateString() + " of " + aliases + " nowait";
+    }
+
+    public String appendLockHint(LockMode mode, String tableName) {
+        return tableName;
+    }
+
+    public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException {
+        if (this.dmdbtype_cursor == 0) {
+            try {
+                Class types = ReflectHelper.classForName("dm.jdbc.driver.DmdbType");
+                this.dmdbtype_cursor = types.getField("CURSOR").getInt(types.newInstance());
+            } catch (Exception var4) {
+                throw new SQLException("Problem while trying to load or access DmdbType.CURSOR value", var4);
+            }
+        }
+
+        statement.registerOutParameter(col, this.dmdbtype_cursor);
+        ++col;
+        return col;
+    }
+
+    public ResultSet getResultSet(CallableStatement statement) throws SQLException {
+        statement.execute();
+        return (ResultSet)statement.getObject(1);
+    }
+
+    public boolean supportsCurrentTimestampSelection() {
+        return true;
+    }
+
+    public boolean isCurrentTimestampSelectStringCallable() {
+        return false;
+    }
+
+    public String getCurrentTimestampSelectString() {
+        return "select current_timestamp()";
+    }
+
+    public String getCurrentTimestampSQLFunctionName() {
+        return "current_timestamp";
+    }
+
+    public SQLExceptionConverter buildSQLExceptionConverter() {
+        return new SQLStateConverter(this.getViolatedConstraintNameExtracter());
+    }
+
+    public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter() {
+        return EXTRACTER;
+    }
+
+    public String getSelectClauseNullString(int sqlType) {
+        return "null";
+    }
+
+    public boolean supportsUnionAll() {
+        return true;
+    }
+
+    public String getLowercaseFunction() {
+        return "lower";
+    }
+
+    public String transformSelectString(String select) {
+        return select;
+    }
+
+    public String toBooleanValueString(boolean bool) {
+        return bool ? "1" : "0";
+    }
+
+    public char openQuote() {
+        return '"';
+    }
+
+    public char closeQuote() {
+        return '"';
+    }
+
+    public boolean hasAlterTable() {
+        return true;
+    }
+
+    public boolean dropConstraints() {
+        return false;
+    }
+
+    public boolean qualifyIndexName() {
+        return true;
+    }
+
+    public boolean supportsUnique() {
+        return true;
+    }
+
+    public boolean supportsUniqueConstraintInCreateAlterTable() {
+        return true;
+    }
+
+    public String getAddColumnString() {
+        return " add column ";
+    }
+
+    public String getDropForeignKeyString() {
+        return " drop constraint ";
+    }
+
+    public String getTableTypeString() {
+        return "";
+    }
+
+    public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey) {
+        StringBuffer res = new StringBuffer(30);
+        res.append(" add constraint ").append(constraintName).append(" foreign key (").append(this.join(", ", foreignKey)).append(") references ").append(referencedTable);
+        if (!referencesPrimaryKey) {
+            res.append(" (").append(this.join(", ", primaryKey)).append(')');
+        }
+
+        return res.toString();
+    }
+
+    public String getAddPrimaryKeyConstraintString(String constraintName) {
+        return " add constraint " + constraintName + " primary key ";
+    }
+
+    public boolean hasSelfReferentialForeignKeyBug() {
+        return false;
+    }
+
+    public String getNullColumnString() {
+        return "";
+    }
+
+    public boolean supportsCommentOn() {
+        return false;
+    }
+
+    public String getTableComment(String comment) {
+        return "";
+    }
+
+    public String getColumnComment(String comment) {
+        return "";
+    }
+
+    public boolean supportsIfExistsBeforeTableName() {
+        return false;
+    }
+
+    public boolean supportsIfExistsAfterTableName() {
+        return false;
+    }
+
+    public boolean supportsColumnCheck() {
+        return true;
+    }
+
+    public boolean supportsTableCheck() {
+        return true;
+    }
+
+    public boolean supportsCascadeDelete() {
+        return true;
+    }
+
+    public boolean supportsNotNullUnique() {
+        return true;
+    }
+
+    public String getCascadeConstraintsString() {
+        return " cascade ";
+    }
+
+    public String getCrossJoinSeparator() {
+        return " cross join ";
+    }
+
+    public boolean supportsEmptyInList() {
+        return false;
+    }
+
+    public boolean supportsRowValueConstructorSyntax() {
+        return false;
+    }
+
+    public boolean supportsRowValueConstructorSyntaxInInList() {
+        return true;
+    }
+
+    public boolean useInputStreamToInsertBlob() {
+        return true;
+    }
+
+    public boolean replaceResultVariableInOrderByClauseWithPosition() {
+        return false;
+    }
+
+    public boolean requiresCastingOfParametersInSelectClause() {
+        return false;
+    }
+
+    public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor() {
+        return true;
+    }
+
+    public boolean supportsCircularCascadeDeleteConstraints() {
+        return false;
+    }
+
+    public boolean supportsSubselectAsInPredicateLHS() {
+        return true;
+    }
+
+    public boolean supportsExpectedLobUsagePattern() {
+        return true;
+    }
+
+    public boolean supportsLobValueChangePropogation() {
+        return false;
+    }
+
+    public boolean supportsUnboundedLobLocatorMaterialization() {
+        return false;
+    }
+
+    public boolean supportsSubqueryOnMutatingTable() {
+        return true;
+    }
+
+    public boolean supportsExistsInSelect() {
+        return false;
+    }
+
+    public boolean doesReadCommittedCauseWritersToBlockReaders() {
+        return false;
+    }
+
+    public boolean doesRepeatableReadCauseReadersToBlockWriters() {
+        return false;
+    }
+
+    public boolean supportsBindAsCallableArgument() {
+        return true;
+    }
+
+    public boolean supportsTupleCounts() {
+        return false;
+    }
+
+    public boolean supportsTupleDistinctCounts() {
+        return false;
+    }
+
+    public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy() {
+        return new GlobalTemporaryTableBulkIdStrategy(new IdTableSupportStandardImpl() {
+            public String generateIdTableName(String baseName) {
+                String name = super.generateIdTableName(baseName);
+                return name.length() > 30 ? name.substring(0, 30) : name;
+            }
+
+            public String getCreateIdTableCommand() {
+                return "create global temporary table";
+            }
+
+            public String getCreateIdTableStatementOptions() {
+                return "on commit delete rows";
+            }
+        }, AfterUseAction.CLEAN);
+    }
+
+    public boolean supportsPartitionBy() {
+        return true;
+    }
+
+    private String join(String seperator, String[] strings) {
+        int length = strings.length;
+        if (length == 0) {
+            return "";
+        } else {
+            StringBuffer buf = (new StringBuffer(length * strings[0].length())).append(strings[0]);
+
+            for(int i = 1; i < length; ++i) {
+                buf.append(seperator).append(strings[i]);
+            }
+
+            return buf.toString();
+        }
+    }
+}

+ 41 - 0
src/main/java/cn/gov/customs/data/dm/SequenceInformationExtractorDMDatabaseImpl.java

@@ -0,0 +1,41 @@
+package cn.gov.customs.data.dm;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl;
+
+
+public class SequenceInformationExtractorDMDatabaseImpl extends SequenceInformationExtractorLegacyImpl {
+
+    public static final SequenceInformationExtractorDMDatabaseImpl INSTANCE = new SequenceInformationExtractorDMDatabaseImpl();
+
+    @Override
+    protected String sequenceCatalogColumn() {
+        return null;
+    }
+
+    @Override
+    protected String sequenceSchemaColumn() {
+        return null;
+    }
+
+    @Override
+    protected String sequenceStartValueColumn() {
+        return null;
+    }
+
+    @Override
+    protected String sequenceMinValueColumn() {
+        return "min_value";
+    }
+
+    @Override
+    protected Long resultSetMaxValue(ResultSet resultSet) throws SQLException {
+        return resultSet.getBigDecimal( "max_value" ).longValue();
+    }
+
+    @Override
+    protected String sequenceIncrementColumn() {
+        return "increment_by";
+    }
+}

+ 29 - 0
src/main/java/cn/gov/customs/data/entity/app/EntityObject.java

@@ -0,0 +1,29 @@
+package cn.gov.customs.data.entity.app;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public  class EntityObject  implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6122282857637625069L;
+
+	@Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    Long id;
+	
+	
+    //公共基础表前缀:PUB 如:基础数据字典类型 PUB_DATA_TYPE、基础数据字典选项 PUB_DATA_ITEM
+	//系统管理前缀:SM(system_management)
+	//人员管理前缀:P(person)
+	//车辆管理前缀:M(motor)
+	//单车管理前缀:B(bicycle)
+	//考勤管理前缀:ATD(attendance)
+	//消费管理前缀:CSM(consume)
+	//访客管理前缀:V(visitor)
+}

+ 21 - 0
src/main/java/cn/gov/customs/data/entity/h2010/EntityObject.java

@@ -0,0 +1,21 @@
+package cn.gov.customs.data.entity.h2010;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+public  class EntityObject {
+
+	@Id
+    Long id;
+	
+	
+    //公共基础表前缀:PUB 如:基础数据字典类型 PUB_DATA_TYPE、基础数据字典选项 PUB_DATA_ITEM
+	//系统管理前缀:SM(system_management)
+	//人员管理前缀:P(person)
+	//车辆管理前缀:M(motor)
+	//单车管理前缀:B(bicycle)
+	//考勤管理前缀:ATD(attendance)
+	//消费管理前缀:CSM(consume)
+	//访客管理前缀:V(visitor)
+}

+ 29 - 0
src/main/java/cn/gov/customs/data/entity/h2018app/EntityObject.java

@@ -0,0 +1,29 @@
+package cn.gov.customs.data.entity.h2018app;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public  class EntityObject implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6122282857637625069L;
+
+	@Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    Long id;
+	
+	
+    //公共基础表前缀:PUB 如:基础数据字典类型 PUB_DATA_TYPE、基础数据字典选项 PUB_DATA_ITEM
+	//系统管理前缀:SM(system_management)
+	//人员管理前缀:P(person)
+	//车辆管理前缀:M(motor)
+	//单车管理前缀:B(bicycle)
+	//考勤管理前缀:ATD(attendance)
+	//消费管理前缀:CSM(consume)
+	//访客管理前缀:V(visitor)
+}

+ 29 - 0
src/main/java/cn/gov/customs/data/entity/iedg/EntityObject.java

@@ -0,0 +1,29 @@
+package cn.gov.customs.data.entity.iedg;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public  class EntityObject implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6122282857637625069L;
+
+	@Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    Long id;
+	
+	
+    //公共基础表前缀:PUB 如:基础数据字典类型 PUB_DATA_TYPE、基础数据字典选项 PUB_DATA_ITEM
+	//系统管理前缀:SM(system_management)
+	//人员管理前缀:P(person)
+	//车辆管理前缀:M(motor)
+	//单车管理前缀:B(bicycle)
+	//考勤管理前缀:ATD(attendance)
+	//消费管理前缀:CSM(consume)
+	//访客管理前缀:V(visitor)
+}

+ 29 - 0
src/main/java/cn/gov/customs/data/entity/inspect/EntityObject.java

@@ -0,0 +1,29 @@
+package cn.gov.customs.data.entity.inspect;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public  class EntityObject implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6122282857637625069L;
+
+	@Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    Long id;
+	
+	
+    //公共基础表前缀:PUB 如:基础数据字典类型 PUB_DATA_TYPE、基础数据字典选项 PUB_DATA_ITEM
+	//系统管理前缀:SM(system_management)
+	//人员管理前缀:P(person)
+	//车辆管理前缀:M(motor)
+	//单车管理前缀:B(bicycle)
+	//考勤管理前缀:ATD(attendance)
+	//消费管理前缀:CSM(consume)
+	//访客管理前缀:V(visitor)
+}

+ 29 - 0
src/main/java/cn/gov/customs/data/entity/rh2k/EntityObject.java

@@ -0,0 +1,29 @@
+package cn.gov.customs.data.entity.rh2k;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public  class EntityObject  implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6122282857637625069L;
+
+	@Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    Long id;
+	
+	
+    //公共基础表前缀:PUB 如:基础数据字典类型 PUB_DATA_TYPE、基础数据字典选项 PUB_DATA_ITEM
+	//系统管理前缀:SM(system_management)
+	//人员管理前缀:P(person)
+	//车辆管理前缀:M(motor)
+	//单车管理前缀:B(bicycle)
+	//考勤管理前缀:ATD(attendance)
+	//消费管理前缀:CSM(consume)
+	//访客管理前缀:V(visitor)
+}

+ 27 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/EntityObject.java

@@ -0,0 +1,27 @@
+package cn.gov.customs.data.entity.wxjy;
+
+import javax.persistence.*;
+
+@Entity
+public  class EntityObject  implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6122282857637625069L;
+
+	@Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+	@Column(name = "ID")
+	Long id;
+	
+	
+    //公共基础表前缀:PUB 如:基础数据字典类型 PUB_DATA_TYPE、基础数据字典选项 PUB_DATA_ITEM
+	//系统管理前缀:SM(system_management)
+	//人员管理前缀:P(person)
+	//车辆管理前缀:M(motor)
+	//单车管理前缀:B(bicycle)
+	//考勤管理前缀:ATD(attendance)
+	//消费管理前缀:CSM(consume)
+	//访客管理前缀:V(visitor)
+}

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/bus/CustomMonthlyStat.java


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/bus/CustomMonthlyStatFinal.java


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/bus/EntryHead.java


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/bus/EntryList.java


+ 1 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/bus/MiddleDataMainStatus.java

@@ -0,0 +1 @@
+package cn.gov.customs.data.entity.wxjy.bus;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 中间表数据维护状态登记:年度、月度统计中间数据各自在定时维护完成之后插入一条数据
 * <p>
 * 为了确保定时任务完成了执行,兼容绝大多数异常,定时任务每次执行时,先检测要维护的数据是否已完成维护。若没有完成维护,则先清理该统计周期的中间数据重新维护对应数据
 *
 * @author YJL
 * @Sep 25, 2019
 */
@Entity
@Data
@Table(name = "WXJY_MID_D_M_STATUS")
public class MiddleDataMainStatus implements Serializable {
    private static final long serialVersionUID = 6122282857637625069L;

    @Id
    @Column(name = "ID", length = 100)
    private String id;

	// 数据类型:5类统计中间表持久类名称
	@Column(name = "DATA_TYPE", length = 50, nullable = false)
	private String dataType;

	// 统计周期:如年度统计2018、月度统计2019-08、每日中间数据20190928
	@Column(name = "STAT_PERIOD", length = 10, nullable = false)
	private String statPeriod;

	// 数据类型:5类统计中间表持久类名称
	@Column(name = "BUSINESS_TYPE", length = 10, nullable = false)
	private String businessType;

	// 维护完成时间
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME")
	private Date createTime;
}

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/bus/NewDeclaredGoods.java


+ 35 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/BusiType.java

@@ -0,0 +1,35 @@
+package cn.gov.customs.data.entity.wxjy.common;
+
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP行业种类代码表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_BUSI_TYPE")
+public class BusiType implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 行业种类代码
+	*/
+	@Id
+	@Column(name = "BUSI_CODE", length = 2)
+	private String busiCode;
+	/**
+	* 行业种类名称
+	*/
+	@Column(name = "BUSI_NAME", length = 32)
+	private String busiName;
+}

+ 60 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/Country.java

@@ -0,0 +1,60 @@
+package cn.gov.customs.data.entity.wxjy.common;
+
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP国别(地区)代码表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_COUNTRY")
+public class Country implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 国家(地区)代码
+	*/
+	@Id
+	@Column(name = "COUNTRY_CODE", length = 3)
+	private String countryCode;
+	/**
+	* 国际标准英文简称
+	*/
+	@Column(name = "ISO_E", length = 3)
+	private String isoE;
+	/**
+	* 中文国家(地区)名称
+	*/
+	@Column(name = "COUN_C_NAME", length = 255)
+	private String counCName;
+	/**
+	* 英文国家(地区)名称
+	*/
+	@Column(name = "COUN_E_NAME", length = 255)
+	private String counEName;
+	/**
+	* 中文简称
+	*/
+	@Column(name = "ABBR_C", length = 32)
+	private String abbrC;
+	/**
+	* 查验标记
+	*/
+	@Column(name = "EXAM_MARK", length = 1)
+	private String examMark;
+	/**
+	* 优惠/普通税率标记
+	*/
+	@Column(name = "HIGH_LOW", length = 1)
+	private String highLow;
+}

+ 39 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/Customs.java

@@ -0,0 +1,39 @@
+package cn.gov.customs.data.entity.wxjy.common;
+
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP关区代码表
+ *
+ * @author BladeX
+ * @since 2021-11-04
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_CUSTOMS")
+public class Customs implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+	/**
+	 *关区代码
+	 */
+	@Id
+	@Column(name = "CUSTOMS_CODE", length = 4)
+	private String customsCode;
+	/**
+	 *关区名称
+	 */
+	@Column(name = "CUSTOMS_NAME", length = 255)
+	private String customsName;
+	/**
+	 *关区简称
+	 */
+	@Column(name = "ABBR_CUST", length = 32)
+	private String abbrCust;
+}

+ 45 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/Port.java

@@ -0,0 +1,45 @@
+package cn.gov.customs.data.entity.wxjy.common;
+
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP港口代码表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_PORT")
+public class Port implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 港口代码
+	*/
+	@Id
+	@Column(name = "PORT_CODE", length = 6)
+	private String portCode;
+	/**
+	* 国别代码
+	*/
+	@Column(name = "COUNTRY_CODE", length = 10)
+	private String countryCode;
+	/**
+	* 港口中文名
+	*/
+	@Column(name = "PORT_C_NAME", length = 32)
+	private String portCName;
+	/**
+	* 港口英文名
+	*/
+	@Column(name = "PORT_E_NAME", length = 32)
+	private String portEName;
+}

+ 35 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/PubCustomsMapping.java

@@ -0,0 +1,35 @@
+package cn.gov.customs.data.entity.wxjy.common;
+
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * 业务现场映射海关实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name = "WXJY_PUB_CUSTOMS_MAPPING")
+public class PubCustomsMapping implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 业务现场代码
+	*/
+	@Id
+	@Column(name = "CUSTOMS_CODE", length = 10)
+	private String customsCode;
+	/**
+	* 映射海关代码
+	*/
+	@Column(name = "MAPPING_CODE", length = 10)
+	private String mappingCode;
+}

+ 35 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/StepCode.java

@@ -0,0 +1,35 @@
+package cn.gov.customs.data.entity.wxjy.common;
+
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP环节代码表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_STEP_CODE")
+public class StepCode implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 环节代码
+	*/
+	@Id
+	@Column(name = "STEP_CODE", length = 8)
+	private String stepCode;
+	/**
+	* 环节名称
+	*/
+	@Column(name = "STEP_MESS", length = 256)
+	private String stepMess;
+}

+ 39 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/Trade.java

@@ -0,0 +1,39 @@
+package cn.gov.customs.data.entity.wxjy.common;
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP监管方式代码表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_TRADE")
+public class Trade implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 监管方式代码
+	*/
+	@Id
+	@Column(name = "TRADE_MODE", length = 4)
+	private String tradeMode;
+	/**
+	* 监管方式简称
+	*/
+	@Column(name = "ABBR_TRADE", length = 255)
+	private String abbrTrade;
+	/**
+	* 监管方式全称
+	*/
+	@Column(name = "FULL_TRADE", length = 255)
+	private String fullTrade;
+}

+ 34 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/Transf.java

@@ -0,0 +1,34 @@
+package cn.gov.customs.data.entity.wxjy.common;
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP运输方式代码表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_TRANSF")
+public class Transf implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 运输方式代码
+	*/
+	@Id
+	@Column(name = "TRAF_CODE", length = 1)
+	private String trafCode;
+	/**
+	* 运输方式名称
+	*/
+	@Column(name = "TRAF_SPEC", length = 32)
+	private String trafSpec;
+}

+ 46 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/TrnVeTypeRel.java

@@ -0,0 +1,46 @@
+package cn.gov.customs.data.entity.wxjy.common;
+
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP运输工具类型代码表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name="WXJY_APP_TRN_VE_TYPE_REL")
+public class TrnVeTypeRel implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 运输工具类型代码
+	*/
+	@Id
+	@Column(name = "VE_TYPE", length = 1)
+	private String veType;
+	/**
+	* 类型描述
+	*/
+	@Column(name = "VE_TYPE_NOTE", length = 256)
+	private String veTypeNote;
+	/**
+	* 运输方式
+	*/
+	@Column(name = "VE_MODE", length = 1)
+	private String veMode;
+	/**
+	* 备用字段
+	*/
+	@Column(name = "VE_UNUSE", length = 20)
+	private String veUnuse;
+
+}

+ 47 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/Unit.java

@@ -0,0 +1,47 @@
+package cn.gov.customs.data.entity.wxjy.common;
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * APP计量单位代码表实体类
+ *
+ * @author BladeX
+ * @since 2022-01-04
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_UNIT")
+public class Unit implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 计量单位代码
+	*/
+	@Id
+	@Column(name = "UNIT_CODE", length = 3)
+	private String unitCode;
+	/**
+	* 计量单位名称
+	*/
+		@Column(name = "UNIT_NAME", length = 32)
+	private String unitName;
+	/**
+	* 对应统计计量单位代码
+	*/
+		@Column(name = "CONV_CODE", length = 3)
+	private String convCode;
+	/**
+	* 换算率
+	*/
+		@Column(name = "CONV_RATIO", precision = 19, scale = 4)
+	private BigDecimal convRatio;
+
+
+}

+ 36 - 0
src/main/java/cn/gov/customs/data/entity/wxjy/common/Wrap.java

@@ -0,0 +1,36 @@
+package cn.gov.customs.data.entity.wxjy.common;
+
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * APP包装种类代码表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Entity
+@Data
+@Table(name = "WXJY_APP_WRAP")
+public class Wrap implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 包装种类代码
+	*/
+	@Id
+	@Column(name = "WRAP_CODE", length = 2)
+	private String wrapCode;
+	/**
+	* 包装种类名称
+	*/
+	@Column(name = "WRAP_NAME", length = 32)
+	private String wrapName;
+
+}

+ 29 - 0
src/main/java/cn/gov/customs/data/entity/zmqd/EntityObject.java

@@ -0,0 +1,29 @@
+package cn.gov.customs.data.entity.zmqd;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public  class EntityObject implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6122282857637625069L;
+
+	@Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    Long id;
+	
+	
+    //公共基础表前缀:PUB 如:基础数据字典类型 PUB_DATA_TYPE、基础数据字典选项 PUB_DATA_ITEM
+	//系统管理前缀:SM(system_management)
+	//人员管理前缀:P(person)
+	//车辆管理前缀:M(motor)
+	//单车管理前缀:B(bicycle)
+	//考勤管理前缀:ATD(attendance)
+	//消费管理前缀:CSM(consume)
+	//访客管理前缀:V(visitor)
+}

+ 80 - 0
src/main/java/cn/gov/customs/data/repository/app/AppRepository.java

@@ -0,0 +1,80 @@
+package cn.gov.customs.data.repository.app;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+
+import org.hibernate.query.internal.NativeQueryImpl;
+import org.hibernate.transform.Transformers;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+@Transactional(value = "transactionManagerApp", propagation=Propagation.NOT_SUPPORTED, readOnly=true)
+@Repository
+public class AppRepository {
+
+
+	@PersistenceContext(unitName = "entityManagerApp")
+	 EntityManager em;
+
+   /**
+    * 返回map结果集
+    * @param sql
+    * @param args
+    * @return
+    */
+	public List<?> getQueryMapBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+
+		 query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+
+
+		return query.getResultList();
+	}
+
+	/**
+	 * 返回指定的持久实例
+	 * @param sql
+	 * @param
+	 * @return
+	 */
+	public Object getObjectBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		 if (args != null) {
+				for (int i = 0; i < args.length; i++) {
+					query.setParameter(i+1, args[i]);
+				}
+			}
+	        List list = query.getResultList();
+       if (list != null && list.size() > 0) {
+           return list.get(0);
+       }
+       return null;
+   }
+
+	/**
+	 * 用sql语句去查询,返回查询结果集合
+	 * @param sql
+	 * @param args
+	 * @return
+	 */
+	public List<?> getQueryBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+		return query.getResultList();
+	}
+
+}

+ 81 - 0
src/main/java/cn/gov/customs/data/repository/h2018/H2018Repository.java

@@ -0,0 +1,81 @@
+package cn.gov.customs.data.repository.h2018;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+
+import org.hibernate.query.internal.NativeQueryImpl;
+import org.hibernate.transform.Transformers;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+@Transactional(value = "transactionManagerH2018", propagation=Propagation.NOT_SUPPORTED, readOnly=true)
+@Repository
+public class H2018Repository {
+
+
+	@PersistenceContext(unitName="entityManagerH2018")
+	 EntityManager em;
+
+   /**
+    * 返回map结果集
+    * @param sql
+    * @param args
+    * @return
+    */
+
+	public List<?> getQueryMapBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+
+		 query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+
+
+		return query.getResultList();
+	}
+
+	/**
+	 * 返回指定的持久实例
+	 * @param sql
+	 * @param
+	 * @return
+	 */
+	public Object getObjectBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		 if (args != null) {
+				for (int i = 0; i < args.length; i++) {
+					query.setParameter(i+1, args[i]);
+				}
+			}
+	        List list = query.getResultList();
+       if (list != null && list.size() > 0) {
+           return list.get(0);
+       }
+       return null;
+   }
+
+	/**
+	 * 用sql语句去查询,返回查询结果集合
+	 * @param sql
+	 * @param args
+	 * @return
+	 */
+	public List<?> getQueryBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+		return query.getResultList();
+	}
+
+}

+ 79 - 0
src/main/java/cn/gov/customs/data/repository/h2018app/H2018appRepository.java

@@ -0,0 +1,79 @@
+package cn.gov.customs.data.repository.h2018app;
+
+import org.hibernate.query.internal.NativeQueryImpl;
+import org.hibernate.transform.Transformers;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import java.util.List;
+
+@Transactional(value = "transactionManagerH2018app", propagation=Propagation.NOT_SUPPORTED, readOnly=true)
+@Repository
+public class H2018appRepository {
+
+
+	@PersistenceContext(unitName = "entityManagerH2018app")
+	 EntityManager em;
+
+   /**
+    * 返回map结果集
+    * @param sql
+    * @param args
+    * @return
+    */
+	public List<?> getQueryMapBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+
+		 query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+
+
+		return query.getResultList();
+	}
+
+	/**
+	 * 返回指定的持久实例
+	 * @param sql
+	 * @param
+	 * @return
+	 */
+	public Object getObjectBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		 if (args != null) {
+				for (int i = 0; i < args.length; i++) {
+					query.setParameter(i+1, args[i]);
+				}
+			}
+	        List list = query.getResultList();
+       if (list != null && list.size() > 0) {
+           return list.get(0);
+       }
+       return null;
+   }
+
+	/**
+	 * 用sql语句去查询,返回查询结果集合
+	 * @param sql
+	 * @param args
+	 * @return
+	 */
+	public List<?> getQueryBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+		return query.getResultList();
+	}
+
+}

+ 92 - 0
src/main/java/cn/gov/customs/data/repository/iedg/IedgRepository.java

@@ -0,0 +1,92 @@
+package cn.gov.customs.data.repository.iedg;
+
+import org.hibernate.query.internal.NativeQueryImpl;
+import org.hibernate.transform.Transformers;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import java.util.List;
+
+@Transactional(value = "transactionManagerIedg", propagation=Propagation.NOT_SUPPORTED )
+@Repository
+public class IedgRepository {
+
+
+	@PersistenceContext(unitName="entityManagerIedg")
+	 EntityManager em;
+
+   /**
+    * 返回map结果集
+    * @param sql
+    * @param args
+    * @return
+    */
+	public List<?> getQueryMapBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+
+		 query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+
+
+		return query.getResultList();
+	}
+
+	/**
+	 * 返回指定的持久实例
+	 * @param sql
+	 * @param object
+	 * @return
+	 */
+	public Object getObjectBySql(String sql, Object... object) {
+		 Query query = em.createNativeQuery(sql);
+		 if (object != null) {
+				for (int i = 0; i < object.length; i++) {
+					query.setParameter(i+1, object[i]);
+				}
+			}
+
+	    List list = query.getResultList();
+       if (list != null && list.size() > 0) {
+           return list.get(0);
+       }
+       return null;
+   }
+
+	/**
+	 * 用sql语句去查询,返回查询结果集合
+	 * @param sql
+	 * @param args
+	 * @return
+	 */
+	public List<?> getQueryBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+		return query.getResultList();
+	}
+
+	@Transactional
+	public int executeUpdate(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+        if (args != null) {
+            for (int i = 0; i < args.length; i++) {
+            	query.setParameter(i+1, args[i]);
+            }
+        }
+        int result = query.executeUpdate();
+        return result;
+    }
+
+}

+ 80 - 0
src/main/java/cn/gov/customs/data/repository/inspect/InspectRepository.java

@@ -0,0 +1,80 @@
+package cn.gov.customs.data.repository.inspect;
+
+import org.hibernate.query.internal.NativeQueryImpl;
+import org.hibernate.transform.Transformers;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import java.util.List;
+
+@Transactional(value = "transactionManagerInspect", propagation=Propagation.NOT_SUPPORTED, readOnly=true)
+@Repository
+public class InspectRepository {
+
+
+	@PersistenceContext(unitName="entityManagerInspect")
+	 EntityManager em;
+
+   /**
+    * 返回map结果集
+    * @param sql
+    * @param args
+    * @return
+    */
+
+	public List<?> getQueryMapBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+
+		 query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+
+
+		return query.getResultList();
+	}
+
+	/**
+	 * 返回指定的持久实例
+	 * @param sql
+	 * @param
+	 * @return
+	 */
+	public Object getObjectBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		 if (args != null) {
+				for (int i = 0; i < args.length; i++) {
+					query.setParameter(i+1, args[i]);
+				}
+			}
+	        List list = query.getResultList();
+       if (list != null && list.size() > 0) {
+           return list.get(0);
+       }
+       return null;
+   }
+
+	/**
+	 * 用sql语句去查询,返回查询结果集合
+	 * @param sql
+	 * @param args
+	 * @return
+	 */
+	public List<?> getQueryBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+		return query.getResultList();
+	}
+
+}

+ 81 - 0
src/main/java/cn/gov/customs/data/repository/rh2k/Rh2kRepository.java

@@ -0,0 +1,81 @@
+package cn.gov.customs.data.repository.rh2k;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+
+import org.hibernate.query.internal.NativeQueryImpl;
+import org.hibernate.transform.Transformers;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+@Transactional(value = "transactionManagerRh2k", propagation=Propagation.NOT_SUPPORTED, readOnly=true)
+@Repository
+public class Rh2kRepository {
+
+
+	@PersistenceContext(unitName="entityManagerRh2k")
+	 EntityManager em;
+
+   /**
+    * 返回map结果集
+    * @param sql
+    * @param args
+    * @return
+    */
+
+	public List<?> getQueryMapBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+
+		 query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+
+
+		return query.getResultList();
+	}
+
+	/**
+	 * 返回指定的持久实例
+	 * @param sql
+	 * @param
+	 * @return
+	 */
+	public Object getObjectBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		 if (args != null) {
+				for (int i = 0; i < args.length; i++) {
+					query.setParameter(i+1, args[i]);
+				}
+			}
+	        List list = query.getResultList();
+       if (list != null && list.size() > 0) {
+           return list.get(0);
+       }
+       return null;
+   }
+
+	/**
+	 * 用sql语句去查询,返回查询结果集合
+	 * @param sql
+	 * @param args
+	 * @return
+	 */
+	public List<?> getQueryBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+		return query.getResultList();
+	}
+
+}

+ 104 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/WxjyRepository.java

@@ -0,0 +1,104 @@
+package cn.gov.customs.data.repository.wxjy;//package cn.gov.customs.data.repository.riskh2000;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+
+import org.hibernate.query.internal.NativeQueryImpl;
+import org.hibernate.transform.Transformers;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+@Transactional(value = "transactionManagerPrimary", propagation=Propagation.NOT_SUPPORTED)
+@Repository
+public class WxjyRepository {
+
+    @PersistenceContext(unitName="entityManagerPrimary")
+    EntityManager em;
+
+    /**
+     * 返回map结果集
+     * @param sql
+     * @param args
+     * @return
+     */
+    public List<?> getQueryMapBySql(String sql, Object... args) {
+        Query query = em.createNativeQuery(sql);
+
+        query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+
+        if (args != null) {
+            for (int i = 0; i < args.length; i++) {
+                query.setParameter(i+1, args[i]);
+            }
+        }
+
+
+        return query.getResultList();
+    }
+
+    /**
+     * 返回指定的持久实例
+     * @param sql
+     * @param object
+     * @return
+     */
+    public Object getObjectBySql(String sql, Object... object) {
+        Query query = em.createNativeQuery(sql);
+        if (object != null) {
+            for (int i = 0; i < object.length; i++) {
+                query.setParameter(i+1, object[i]);
+            }
+        }
+
+        List list = query.getResultList();
+        if (list != null && list.size() > 0) {
+            return list.get(0);
+        }
+        return null;
+    }
+
+    /**
+     * 用sql语句去查询,返回查询结果集合
+     * @param sql
+     * @param args
+     * @return
+     */
+    public List<?> getQueryBySql(String sql, Object... args) {
+        Query query = em.createNativeQuery(sql);
+        if (args != null) {
+            for (int i = 0; i < args.length; i++) {
+                query.setParameter(i+1, args[i]);
+            }
+        }
+        return query.getResultList();
+    }
+
+    @Transactional
+    public int executeUpdate(String sql, Object... args) {
+        Query query = em.createNativeQuery(sql);
+        if (args != null) {
+            for (int i = 0; i < args.length; i++) {
+                query.setParameter(i+1, args[i]);
+            }
+        }
+        int result = query.executeUpdate();
+        return result;
+    }
+
+    /**
+     * 返回指定的持久实例
+     * @return
+     */
+    public String getGuidStringBySql() {
+        Query query = em.createNativeQuery("select GUID()");
+        List list = query.getResultList();
+        if (list != null && list.size() > 0) {
+            return (String)list.get(0);
+        }
+        return null;
+    }
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/bus/CustomMonthlyStatFinalRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.bus;
+
+import cn.gov.customs.data.entity.wxjy.bus.CustomMonthlyStatFinal;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CustomMonthlyStatFinalRepository extends JpaRepository<CustomMonthlyStatFinal, String>, JpaSpecificationExecutor<CustomMonthlyStatFinal> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/bus/CustomMonthlyStatRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.bus;
+
+import cn.gov.customs.data.entity.wxjy.bus.CustomMonthlyStat;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CustomMonthlyStatRepository extends JpaRepository<CustomMonthlyStat, String>, JpaSpecificationExecutor<CustomMonthlyStat> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/bus/EntryHeadRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.bus;
+
+import cn.gov.customs.data.entity.wxjy.bus.EntryHead;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface EntryHeadRepository extends JpaRepository<EntryHead, String>, JpaSpecificationExecutor<EntryHead> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/bus/EntryListRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.bus;
+
+import cn.gov.customs.data.entity.wxjy.bus.EntryList;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface EntryListRepository extends JpaRepository<EntryList, String>, JpaSpecificationExecutor<EntryList> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/bus/MiddleDataMainStatusRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.bus;
+
+import cn.gov.customs.data.entity.wxjy.bus.MiddleDataMainStatus;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface MiddleDataMainStatusRepository extends JpaRepository<MiddleDataMainStatus, String>, JpaSpecificationExecutor<MiddleDataMainStatus> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/bus/NewDeclaredGoodsRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.bus;
+
+import cn.gov.customs.data.entity.wxjy.bus.NewDeclaredGoods;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface NewDeclaredGoodsRepository extends JpaRepository<NewDeclaredGoods, String>, JpaSpecificationExecutor<NewDeclaredGoods> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/BusiTypeRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.BusiType;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface BusiTypeRepository extends JpaRepository<BusiType, String>, JpaSpecificationExecutor<BusiType> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/CountryRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.Country;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CountryRepository extends JpaRepository<Country, String>, JpaSpecificationExecutor<Country> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/CustomsRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.Customs;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CustomsRepository extends JpaRepository<Customs, String>, JpaSpecificationExecutor<Customs> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/PortRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.Port;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface PortRepository extends JpaRepository<Port, String>, JpaSpecificationExecutor<Port> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/PubCustomsMappingRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.PubCustomsMapping;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface PubCustomsMappingRepository extends JpaRepository<PubCustomsMapping, String>, JpaSpecificationExecutor<PubCustomsMapping> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/StepCodeRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.StepCode;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface StepCodeRepository extends JpaRepository<StepCode, String>, JpaSpecificationExecutor<StepCode> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/TradeRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.Trade;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface TradeRepository extends JpaRepository<Trade, String>, JpaSpecificationExecutor<Trade> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/TransfRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.Transf;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface TransfRepository extends JpaRepository<Transf, String>, JpaSpecificationExecutor<Transf> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/TrnVeTypeRelRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.TrnVeTypeRel;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface TrnVeTypeRelRepository extends JpaRepository<TrnVeTypeRel, String>, JpaSpecificationExecutor<TrnVeTypeRel> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/UnitRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.Unit;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface UnitRepository extends JpaRepository<Unit, String>, JpaSpecificationExecutor<Unit> {
+}

+ 10 - 0
src/main/java/cn/gov/customs/data/repository/wxjy/common/WrapRepository.java

@@ -0,0 +1,10 @@
+package cn.gov.customs.data.repository.wxjy.common;
+
+import cn.gov.customs.data.entity.wxjy.common.Wrap;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface WrapRepository extends JpaRepository<Wrap, String>, JpaSpecificationExecutor<Wrap> {
+}

+ 80 - 0
src/main/java/cn/gov/customs/data/repository/zmqd/ZmqdRepository.java

@@ -0,0 +1,80 @@
+package cn.gov.customs.data.repository.zmqd;
+
+import org.hibernate.query.internal.NativeQueryImpl;
+import org.hibernate.transform.Transformers;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import java.util.List;
+
+@Transactional(value = "transactionManagerZmqd", propagation=Propagation.NOT_SUPPORTED, readOnly=true)
+@Repository
+public class ZmqdRepository {
+
+
+	@PersistenceContext(unitName="entityManagerZmqd")
+	 EntityManager em;
+
+   /**
+    * 返回map结果集
+    * @param sql
+    * @param args
+    * @return
+    */
+
+	public List<?> getQueryMapBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+
+		 query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+
+
+		return query.getResultList();
+	}
+
+	/**
+	 * 返回指定的持久实例
+	 * @param sql
+	 * @param
+	 * @return
+	 */
+	public Object getObjectBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		 if (args != null) {
+				for (int i = 0; i < args.length; i++) {
+					query.setParameter(i+1, args[i]);
+				}
+			}
+	        List list = query.getResultList();
+       if (list != null && list.size() > 0) {
+           return list.get(0);
+       }
+       return null;
+   }
+
+	/**
+	 * 用sql语句去查询,返回查询结果集合
+	 * @param sql
+	 * @param args
+	 * @return
+	 */
+	public List<?> getQueryBySql(String sql, Object... args) {
+		 Query query = em.createNativeQuery(sql);
+		if (args != null) {
+			for (int i = 0; i < args.length; i++) {
+				query.setParameter(i+1, args[i]);
+			}
+		}
+		return query.getResultList();
+	}
+
+}

+ 278 - 0
src/main/java/cn/gov/customs/data/timer/AppBaseDataTask.java

@@ -0,0 +1,278 @@
+package cn.gov.customs.data.timer;
+
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.util.List;
+
+import cn.gov.customs.data.repository.app.AppRepository;
+import cn.gov.customs.data.repository.wxjy.common.*;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+import cn.gov.customs.data.entity.wxjy.common.*;
+
+@Component
+@PropertySource("classpath:data-acquisition.properties")
+public class AppBaseDataTask {
+
+	private Logger log = Logger.getLogger(AppBaseDataTask.class);
+	@Autowired
+	private AppRepository appDao;
+	@Autowired
+	private CountryRepository countryRepository;
+	@Autowired
+	private CustomsRepository customsRepository;
+	@Autowired
+	private TradeRepository tradeRepository;
+	@Autowired
+	private TransfRepository transfRepository;
+	@Autowired
+	private UnitRepository unitRepository;
+	@Autowired
+	private TrnVeTypeRelRepository trnVeTypeRelRepository;
+	@Autowired
+	private WrapRepository wrapRepository;
+	@Autowired
+	private BusiTypeRepository busiTypeRepository;
+	@Autowired
+	private StepCodeRepository stepCodeRepository;
+	@Autowired
+	private PortRepository portRepository;
+
+	/**
+	 * 基础表同步
+	 * @throws ParseException
+	 */
+	@Scheduled(cron = "${schedule.cron.month.baseData}")
+	public void baseInfoTask() throws ParseException{
+		smCountrySynchro();
+		smCustomsSynchro();
+		smTransfSynchro();
+		smTradeSynchro();
+		smUnitData();
+		smTrnVeTypeRelSynchro();
+		smWrapSynchro();
+		smPortSynchro();
+		smBusiTypeSynchro();
+		smStepCodeSynchro();
+	}
+
+	/**
+	 * @throws ParseException
+	 * @Description:国家表定时任务
+	 */
+	public void smCountrySynchro() {
+		log.info("===国家基础表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "SELECT COUNTRY_CODE,COUN_C_NAME,ISO_E,COUN_E_NAME,ABBR_C,EXAM_MARK,HIGH_LOW FROM COUNTRY ";
+		List<Object[]> countryList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != countryList && countryList.size() > 0) {
+			// 直接删除
+			countryRepository.deleteAll();
+			for (int i = 0; i < countryList.size(); i++) {
+				Country smCountry = new Country();
+				smCountry.setCountryCode(countryList.get(i)[0]==null?"":countryList.get(i)[0]+"");
+				smCountry.setCounCName(countryList.get(i)[1]==null?"":countryList.get(i)[1]+"");
+				smCountry.setIsoE(countryList.get(i)[2]==null?"":countryList.get(i)[2]+"");
+				smCountry.setCounEName(countryList.get(i)[3]==null?"":countryList.get(i)[3]+"");
+				smCountry.setAbbrC(countryList.get(i)[4]==null?"":countryList.get(i)[4]+"");
+				smCountry.setExamMark(countryList.get(i)[5]==null?"":countryList.get(i)[5]+"");
+				smCountry.setHighLow(countryList.get(i)[6]==null?"":countryList.get(i)[6]+"");
+				countryRepository.save(smCountry);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===国家基础表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	public void smCustomsSynchro() {
+		// TODO Auto-generated method stub
+		log.info("===海关基础表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "select CUSTOMS_CODE,CUSTOMS_NAME,ABBR_CUST from CUSTOMS order by CUSTOMS_CODE;";
+		List<Object[]> customsList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != customsList && customsList.size() > 0) {
+			customsRepository.deleteAll();
+			for (int i = 0; i < customsList.size(); i++) {
+				Customs sc = new Customs();
+				sc.setCustomsCode(customsList.get(i)[0] != null ? customsList.get(i)[0].toString() : null);
+				sc.setCustomsName(customsList.get(i)[1] != null ? customsList.get(i)[1].toString() : null);
+				sc.setAbbrCust(customsList.get(i)[2] != null ? customsList.get(i)[2].toString() : null);
+				customsRepository.save(sc);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===海关基础表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	/**
+	 * @throws ParseException
+	 * @Description:运输方式表同步
+	 */
+	public void smTransfSynchro() throws ParseException{
+		log.info("===运输方式表基础表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "SELECT TRAF_CODE,TRAF_SPEC FROM TRANSF ";
+		List<Object[]> transfList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != transfList && transfList.size() > 0) {
+			// 直接删除
+			transfRepository.deleteAll();
+			// 减免税份数有则插入,没有则往下继续判断减免税货值
+			for (int i = 0; i < transfList.size(); i++) {
+				Transf trans = new Transf();
+				trans.setTrafCode(transfList.get(i)[0]==null?"":transfList.get(i)[0]+"");
+				trans.setTrafSpec(transfList.get(i)[1]==null?"":transfList.get(i)[1]+"");
+				transfRepository.save(trans);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===运输方式表基础表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	/**
+	 * @throws ParseException
+	 * @Description:监管方式表同步
+	 */
+	public void smTradeSynchro() {
+		log.info("===监管方式表基础表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "SELECT TRADE_MODE,ABBR_TRADE,FULL_TRADE FROM TRADE ";
+		List<Object[]> tradeList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != tradeList && tradeList.size() > 0) {
+			// 直接删除SM_TRANSF
+			tradeRepository.deleteAll();
+			for (int i = 0; i < tradeList.size(); i++) {
+				Trade trans = new Trade();
+				trans.setTradeMode(tradeList.get(i)[0]==null?"":tradeList.get(i)[0]+"");
+				trans.setAbbrTrade(tradeList.get(i)[1]==null?"":tradeList.get(i)[1]+"");
+				trans.setFullTrade(tradeList.get(i)[2]==null?"":tradeList.get(i)[2]+"");
+				tradeRepository.save(trans);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===监管方式表基础表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	public void smUnitData(){
+		log.info("===计量单位基础表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "select UNIT_CODE,UNIT_NAME,CONV_CODE,CONV_RATIO from UNIT";
+		List<Object[]> unitList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != unitList && unitList.size() > 0) {
+			// 直接删除
+			unitRepository.deleteAll();
+			// 减免税份数有则插入,没有则往下继续判断减免税货值
+			for (int i = 0; i < unitList.size(); i++) {
+				Unit sc = new Unit();
+				sc.setUnitCode(unitList.get(i)[0] != null ? unitList.get(i)[0].toString() : null);
+				sc.setUnitName(unitList.get(i)[1] != null ? unitList.get(i)[1].toString() : null);
+				sc.setConvCode(unitList.get(i)[2] != null ? unitList.get(i)[2].toString() : null);
+				sc.setConvRatio(unitList.get(i)[3] != null ? (BigDecimal)unitList.get(i)[3] : new BigDecimal(0));
+				unitRepository.save(sc);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===计量单位基础表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	public void smTrnVeTypeRelSynchro() {
+		// TODO Auto-generated method stub
+		log.info("===运输工具类型代码表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "select VE_TYPE,VE_TYPE_NOTE,VE_MODE,VE_UNUSE from TRN_VE_TYPE_REL;";
+		List<Object[]> customsList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != customsList && customsList.size() > 0) {
+			trnVeTypeRelRepository.deleteAll();
+			for (int i = 0; i < customsList.size(); i++) {
+				TrnVeTypeRel sc = new TrnVeTypeRel();
+				sc.setVeType(customsList.get(i)[0] != null ? customsList.get(i)[0].toString() : null);
+				sc.setVeTypeNote(customsList.get(i)[1] != null ? customsList.get(i)[1].toString() : null);
+				sc.setVeMode(customsList.get(i)[2] != null ? customsList.get(i)[2].toString() : null);
+				sc.setVeUnuse(customsList.get(i)[3] != null ? customsList.get(i)[3].toString() : null);
+				trnVeTypeRelRepository.save(sc);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===运输工具类型代码表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	public void smWrapSynchro() {
+		// TODO Auto-generated method stub
+		log.info("===包装种类代码表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "select WRAP_CODE,WRAP_NAME from WRAP ;";
+		List<Object[]> customsList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != customsList && customsList.size() > 0) {
+			wrapRepository.deleteAll();
+			for (int i = 0; i < customsList.size(); i++) {
+				Wrap sc = new Wrap();
+				sc.setWrapCode(customsList.get(i)[0] != null ? customsList.get(i)[0].toString() : null);
+				sc.setWrapName(customsList.get(i)[1] != null ? customsList.get(i)[1].toString() : null);
+				wrapRepository.save(sc);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===包装种类代码表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	public void smPortSynchro() {
+		// TODO Auto-generated method stub
+		log.info("===包装种类代码表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "select PORT_CODE,COUNTRY_CODE,PORT_C_NAME,PORT_E_NAME from WRAP ;";
+		List<Object[]> customsList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != customsList && customsList.size() > 0) {
+			portRepository.deleteAll();
+			for (int i = 0; i < customsList.size(); i++) {
+				Port sc = new Port();
+				sc.setPortCode(customsList.get(i)[0] != null ? customsList.get(i)[0].toString() : null);
+				sc.setCountryCode(customsList.get(i)[1] != null ? customsList.get(i)[1].toString() : null);
+				sc.setPortCName(customsList.get(i)[2] != null ? customsList.get(i)[2].toString() : null);
+				sc.setPortEName(customsList.get(i)[3] != null ? customsList.get(i)[3].toString() : null);
+				portRepository.save(sc);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===包装种类代码表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	public void smBusiTypeSynchro() {
+		// TODO Auto-generated method stub
+		log.info("===行业种类代码表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "select BUSI_CODE,BUSI_NAME from BUSI_TYPE;";
+		List<Object[]> customsList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != customsList && customsList.size() > 0) {
+			busiTypeRepository.deleteAll();
+			for (int i = 0; i < customsList.size(); i++) {
+				BusiType sc = new BusiType();
+				sc.setBusiCode(customsList.get(i)[0] != null ? customsList.get(i)[0].toString() : null);
+				sc.setBusiName(customsList.get(i)[1] != null ? customsList.get(i)[1].toString() : null);
+				busiTypeRepository.save(sc);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===行业种类代码表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+
+	public void smStepCodeSynchro() {
+		// TODO Auto-generated method stub
+		log.info("===环节代码表同步,并存储到本地库中,开始执行===");
+		long b = System.currentTimeMillis();
+		String sql = "select STEP_CODE,STEP_MESS from STEP_CODE;";
+		List<Object[]> customsList = (List<Object[]>) appDao.getQueryBySql(sql);
+		if (null != customsList && customsList.size() > 0) {
+			stepCodeRepository.deleteAll();
+			for (int i = 0; i < customsList.size(); i++) {
+				StepCode sc = new StepCode();
+				sc.setStepCode(customsList.get(i)[0] != null ? customsList.get(i)[0].toString() : null);
+				sc.setStepMess(customsList.get(i)[1] != null ? customsList.get(i)[1].toString() : null);
+				stepCodeRepository.save(sc);
+			}
+		}
+		long e = System.currentTimeMillis();
+		log.info("===环节代码表同步,并存储到本地库中,执行结束,执行==="+(e-b)+" ms===");
+	}
+}

+ 370 - 0
src/main/java/cn/gov/customs/data/timer/H2018NewDeclaredGoodsUtil.java

@@ -0,0 +1,370 @@
+package cn.gov.customs.data.timer;
+
+
+import cn.gov.customs.data.entity.wxjy.bus.NewDeclaredGoods;
+import cn.gov.customs.data.repository.h2018.H2018Repository;
+import cn.gov.customs.data.repository.wxjy.WxjyRepository;
+import cn.gov.customs.data.repository.wxjy.bus.NewDeclaredGoodsRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.util.*;
+
+/**
+* @Description: * 1、危险货物:
+ *  * 匹配字段:进口(经营单位)或出口(生产单位)、CIQ编码、UN编码
+ *  * 提取维度:申报日期(进一年内、只提取命中查检的数据,ungid不为空)
+ *  * 2、危化品:
+ *  * 匹配字段:进口(经营单位)或出口(生产单位)、CIQ编码、规格型号提取CAS号(有就提取)
+ *  * 提取维度:申报日期(进一年内、只提取命中查检的数据)、货物属性(31或32)
+ *  * 新申报商品
+* @Author wq
+* @Date 2025-10-16 14:31:11
+* @Version 1.0
+*/
+@Component
+@Configuration
+@PropertySource("classpath:data-acquisition.properties")
+public class H2018NewDeclaredGoodsUtil {
+
+   Logger logger = LoggerFactory.getLogger(H2018NewDeclaredGoodsUtil.class);
+
+   @Autowired
+   private H2018Repository h2018Dao;
+
+   @Autowired
+   private WxjyRepository dao;
+
+    @Autowired
+    private NewDeclaredGoodsRepository newDeclaredGoodsRepository;
+
+   @SuppressWarnings("unchecked")
+   public void toDoDataMain(Date statBegin, List<String> list) {
+       Date date = new Date();
+       List<Object[]> custMapping = (List<Object[]>) dao.getQueryBySql("select customs_code,mapping_code from BUS_PUB_CUSTOMS_MAPPING");
+       Map<String,String> map = new HashMap<String,String>();
+       for (Object[] m : custMapping) {
+           String pCustomCode = (String)m[1];
+           map.put((String)m[0], pCustomCode);
+       }
+       dao.executeUpdate("delete from WXJY_NEW_DECLARED_GOODS");
+       //危险货物
+        toDoGoods(statBegin,date, list,map);
+        //危化品
+        toDoChemical(statBegin,date, list,map);
+   }
+
+   private void toDoGoods(Date statBegin, Date date, List<String> casList, Map<String,String> map){
+       //危险货物可以直接sql语句捞取第一次申报商品,无须去重
+       String sql = "select d.d_date,d.i_e_flag,d.i_e_port,d.decl_port,d.CONSIGN_SCC,d.CONSIGN_CODE,d.CONSIGN_NAME,l.ENTRY_ID,l.G_NO,l.CODE_TS," +
+               "l.IQ_CODE,l.G_NAME,l.G_MODEL,l.IQ_G_NAME,l.G_NAME_FN,l.IQ_G_MODEL,l.G_COMPOSITION,l.PROD_VALIDATY,l.PROD_WARRANTY,l.DUTY_MODE,l.GTIN," +
+               "l.G_QTY,l.G_UNIT,l.QTY_1,l.UNIT_1,l.QTY_2,l.UNIT_2,l.DECL_PRICE,l.DECL_TOTAL,l.TRADE_CURR,l.TRADE_TOTAL,l.DUTY_VALUE,l.RMB_PRICE,l.USD_PRICE," +
+               "l.EXCHANGE_RATE,l.ORIGIN_COUNTRY,l.ORIGIN_REGION_CODE,l.DEST_COUNTRY,l.I_E_DISTRICT_CODE,l.IQ_I_E_DISTRICT_CODE,l.FRN_PRODUCER_NAME,l.PRODUCT_DATE," +
+               "l.PRODUCT_BATCH,l.UNGID,PRODUCT_MODEL,l.PRODUCT_BRAND,l.UNG_FLAG,l.UNG_MODEL,l.UNG_CLASSIFY,l.UNG_G_NAME,l.PRODUCT_CHAR_CODE,l.GOODS_ID,l.USE_TO," +
+               "l.G_CERT_FLAG,l.MNUFCTR_REG_NO from ENTRY_HEAD d, ENTRY_LIST l, `g_whdb_customs_inspection`.RSK_CHECK_FORM f,(" +
+               "select h.CONSIGN_CODE,l.IQ_CODE,l.UNGID,count(h.CONSIGN_CODE),count(l.IQ_CODE),count(l.UNGID) from " +
+               "ENTRY_HEAD h, ENTRY_LIST l, `g_whdb_customs_inspection`.RSK_CHECK_FORM f where h.ENTRY_ID = l.ENTRY_ID and h.ENTRY_ID = f.ENTRY_ID " +
+               "and h.ENTRY_ID like '47%' and h.D_DATE >= ? and l.UNGID is not null group by h.CONSIGN_CODE,l.IQ_CODE,l.UNGID " +
+               "having count(h.CONSIGN_CODE) = 1 and count(l.IQ_CODE) = 1 and count(l.UNGID) = 1) m " +
+               "where d.ENTRY_ID = l.ENTRY_ID and d.ENTRY_ID = f.ENTRY_ID and d.CONSIGN_CODE = m.CONSIGN_CODE and l.IQ_CODE = m.IQ_CODE and l.UNGID = m.UNGID " +
+               "and d.ENTRY_ID like '47%' and d.D_DATE >= ? and l.UNGID is not null and not exists(select d.entry_id from `g_whdb_riskh2000`.ENTRY_OP_LOG o " +
+               "where substr(o.OP_TYPE,1,1) = '0' and d.ENTRY_ID = o.ENTRY_ID) and not exists(select d.entry_id from `g_whdb_riskh2000`.SPECIAL_ENTRY s " +
+               "where d.ENTRY_ID = s.ENTRY_ID) ;";
+       List<Object[]> list = (List<Object[]>) h2018Dao.getQueryBySql(sql,statBegin,statBegin);
+       for (Object[] d : list) {
+           Date dDate = (Date)d[0];//申报日期
+           String ieFlag = (String)d[1];//进出口标识
+           String iePort = (String)d[2];//进出境口岸
+           String declPort = (String)d[3];//申报口岸
+           String customsCode = map.get(declPort);
+           String consignScc = (String)d[4];//申报口岸
+           String consignCode = (String) d[5];
+           String consignName = (String) d[6];
+           String entryId = (String)d[7];//报关单编号
+           BigDecimal gNo = (BigDecimal)d[8];//商品序号
+           String codeTs = (String)d[9];//商品编号
+           String iqCode = (String)d[10];//检验检疫编码
+           String gName = (String)d[11];//商品名称
+           String gModel = (String)d[12];//商品规格型号
+           String iqGName = (String)d[13];//报检名称
+           String gNameFn = (String)d[14];//商品英文名称
+           String iqGModel = (String)d[15];//检验检疫货物规格
+           String gComposition = (String)d[16];//产品保质期
+           String prodValidaty = (String)d[17];//产品有效期
+           BigDecimal prodWarranty = (BigDecimal)d[18];//产品保质期
+           String dutyMode = (String)d[19];//征免方式
+           String gtin = (String)d[20];//条形码
+           BigDecimal gQty = (BigDecimal)d[21];//申报数量
+           String gUnit = (String)d[22];//申报计量单位
+           BigDecimal qty1 = (BigDecimal)d[23];//法定第一数量
+           String unit1 = (String)d[24];//法定第一数量
+           BigDecimal qty2 = (BigDecimal)d[25];//第二数量
+           String unit2 = (String)d[26];//法定第二数量
+           BigDecimal declPrice = (BigDecimal)d[27];//申报单价
+           BigDecimal declTotal = (BigDecimal)d[28];//申报总价
+           String tradeCurr = (String)d[29];//成交币制
+           BigDecimal tradeTotal = (BigDecimal)d[30];//成交总价
+           BigDecimal dutyValue = (BigDecimal)d[31];//完税价格
+           BigDecimal rmbPrice = (BigDecimal)d[32];//统计人民币价
+           BigDecimal usdPrice = (BigDecimal)d[33];//统计美元价
+           BigDecimal exchangeRate = (BigDecimal)d[34];//成交汇率
+           String originCountry = (String)d[35];//原产国(地区)
+           String originRegionCode = (String)d[36];//原产地区代码
+           String destCountry = (String)d[37];//最终目的国(地区)
+           String ieDistrictCode = (String)d[38];//境内目的地/境内货源地
+           String iqIeDistrictCode = (String)d[39];//目的地/货源地
+           String frnProducerName = (String)d[40];//境外生产企业名称
+           String productDate = (String)d[41];//生产日期
+           String productBatch = (String)d[42];//生产日期
+           String ungid = (String)d[43];//UN编码
+           String productModel = (String)d[44];//货物型号
+           String productBrand = (String)d[45];//境内目的地/境内货源地
+           String ungFlag = (String)d[46];//非危险化学品
+           String ungModel = (String)d[47];//危包规格
+           String ungClassify = (String)d[48];//危包类别
+           String ungGName = (String)d[49];//危险货物名称
+           String productCharCode = (String)d[50];//货物属性代码
+           String goodsId = (String)d[51];//货号
+           String useTo = (String)d[52];//用途代码
+           String gCertFlag = (String)d[53];//每项商品需要监管证件
+           String mnufctrRegNo = (String)d[54];//生产单位注册号
+           //使用java8 stream查找list中是否包含gModel的cas号,有返回cas号,无返回null
+           String cas = casList.stream().filter(u -> gModel.contains(u)).findFirst().orElse(null);
+           NewDeclaredGoods bus = new NewDeclaredGoods();
+           bus.setDeclDate(dDate);
+           bus.setIeFlag(ieFlag);
+           bus.setIePort(iePort);
+           bus.setDeclPort(declPort);
+           bus.setCustomsCode(customsCode);
+           bus.setConsignScc(consignScc);
+           bus.setConsignCode(consignCode);
+           bus.setConsignName(consignName);
+           bus.setEntryId(entryId);
+           bus.setGNo(gNo);
+           bus.setCodeTs(codeTs);
+           bus.setIqCode(iqCode);
+           bus.setGName(gName);
+           bus.setGModel(gModel);
+           bus.setIqGName(iqGName);
+           bus.setGNameFn(gNameFn);
+           bus.setIqGModel(iqGModel);
+           bus.setGComposition(gComposition);
+           bus.setProdValidaty(prodValidaty);
+           bus.setProdWarranty(prodWarranty);
+           bus.setDutyMode(dutyMode);
+           bus.setGtin(gtin);
+           bus.setGQty(gQty);
+           bus.setGUnit(gUnit);
+           bus.setQty1(qty1);
+           bus.setUnit1(unit1);
+           bus.setQty2(qty2);
+           bus.setUnit2(unit2);
+           bus.setDeclPrice(declPrice);
+           bus.setDeclTotal(declTotal);
+           bus.setTradeCurr(tradeCurr);
+           bus.setTradeTotal(tradeTotal);
+           bus.setDutyValue(dutyValue);
+           bus.setRmbPrice(rmbPrice);
+           bus.setUsdPrice(usdPrice);
+           bus.setExchangeRate(exchangeRate);
+           bus.setOriginCountry(originCountry);
+           bus.setOriginRegionCode(originRegionCode);
+           bus.setDestCountry(destCountry);
+           bus.setIeDistrictCode(ieDistrictCode);
+           bus.setIqIeDistrictCode(iqIeDistrictCode);
+           bus.setFrnProducerName(frnProducerName);
+           bus.setProductDate(productDate);
+           bus.setProductBatch(productBatch);
+           bus.setUngid(ungid);
+           bus.setProductModel(productModel);
+           bus.setProductBrand(productBrand);
+           bus.setUngFlag(ungFlag);
+           bus.setUngModel(ungModel);
+           bus.setUngClassify(ungClassify);
+           bus.setUngGName(ungGName);
+           bus.setProductCharCode(productCharCode);
+           bus.setGoodsId(goodsId);
+           bus.setUseTo(useTo);
+           bus.setGCertFlag(gCertFlag);
+           bus.setMnufctrRegNo(mnufctrRegNo);
+           bus.setCas(cas);
+           bus.setCreateTime(date);
+           bus.setGoodsType("2");
+           bus.setId(dao.getGuidStringBySql());
+           newDeclaredGoodsRepository.save(bus);
+       }
+   }
+
+    private void toDoChemical(Date statBegin, Date date, List<String> casList, Map<String,String> map){
+        //危险化学品需要查询出来后再做进一步是否第一次申报判断,查出来的危化品可能也是危险货物
+        String sql = "select d.d_date,d.i_e_flag,d.i_e_port,d.decl_port,d.CONSIGN_SCC,d.CONSIGN_CODE,d.CONSIGN_NAME,l.ENTRY_ID,l.G_NO,l.CODE_TS," +
+                "l.IQ_CODE,l.G_NAME,l.G_MODEL,l.IQ_G_NAME,l.G_NAME_FN,l.IQ_G_MODEL,l.G_COMPOSITION,l.PROD_VALIDATY,l.PROD_WARRANTY,l.DUTY_MODE,l.GTIN," +
+                "l.G_QTY,l.G_UNIT,l.QTY_1,l.UNIT_1,l.QTY_2,l.UNIT_2,l.DECL_PRICE,l.DECL_TOTAL,l.TRADE_CURR,l.TRADE_TOTAL,l.DUTY_VALUE,l.RMB_PRICE,l.USD_PRICE," +
+                "l.EXCHANGE_RATE,l.ORIGIN_COUNTRY,l.ORIGIN_REGION_CODE,l.DEST_COUNTRY,l.I_E_DISTRICT_CODE,l.IQ_I_E_DISTRICT_CODE,l.FRN_PRODUCER_NAME,l.PRODUCT_DATE," +
+                "l.PRODUCT_BATCH,l.UNGID,PRODUCT_MODEL,l.PRODUCT_BRAND,l.UNG_FLAG,l.UNG_MODEL,l.UNG_CLASSIFY,l.UNG_G_NAME,l.PRODUCT_CHAR_CODE,l.GOODS_ID,l.USE_TO," +
+                "l.G_CERT_FLAG,l.MNUFCTR_REG_NO from ENTRY_HEAD d, ENTRY_LIST l, `g_whdb_customs_inspection`.RSK_CHECK_FORM f,(" +
+                "select h.CONSIGN_CODE,l.IQ_CODE,l.PRODUCT_CHAR_CODE,count(h.CONSIGN_CODE),count(l.IQ_CODE),count(l.PRODUCT_CHAR_CODE) from " +
+                "ENTRY_HEAD h, ENTRY_LIST l, `g_whdb_customs_inspection`.RSK_CHECK_FORM f where h.ENTRY_ID = l.ENTRY_ID and h.ENTRY_ID = f.ENTRY_ID " +
+                "and h.ENTRY_ID like '47%' and h.D_DATE >= ? and (l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%31%') group by h.CONSIGN_CODE,l.IQ_CODE,l.PRODUCT_CHAR_CODE " +
+                "having count(h.CONSIGN_CODE) = 1 and count(l.IQ_CODE) = 1 and count(l.PRODUCT_CHAR_CODE) = 1) m " +
+                "where d.ENTRY_ID = l.ENTRY_ID and d.ENTRY_ID = f.ENTRY_ID and d.CONSIGN_CODE = m.CONSIGN_CODE and l.IQ_CODE = m.IQ_CODE and l.PRODUCT_CHAR_CODE = m.PRODUCT_CHAR_CODE " +
+                "and d.ENTRY_ID like '47%' and d.D_DATE >= ? and (l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%31%') and not exists(select d.entry_id from `g_whdb_riskh2000`.ENTRY_OP_LOG o " +
+                "where substr(o.OP_TYPE,1,1) = '0' and d.ENTRY_ID = o.ENTRY_ID) and not exists(select d.entry_id from `g_whdb_riskh2000`.SPECIAL_ENTRY s " +
+                "where d.ENTRY_ID = s.ENTRY_ID) ;";
+        List<Object[]> list = (List<Object[]>) h2018Dao.getQueryBySql(sql,statBegin,statBegin);
+        for (Object[] d : list) {
+            Date dDate = (Date)d[0];//申报日期
+            String ieFlag = (String)d[1];//进出口标识
+            String iePort = (String)d[2];//进出境口岸
+            String declPort = (String)d[3];//申报口岸
+            String customsCode = map.get(declPort);
+            String consignScc = (String)d[4];//申报口岸
+            String consignCode = (String) d[5];
+            String consignName = (String) d[6];
+            String entryId = (String)d[7];//报关单编号
+            BigDecimal gNo = (BigDecimal)d[8];//商品序号
+            String codeTs = (String)d[9];//商品编号
+            String iqCode = (String)d[10];//检验检疫编码
+            String gName = (String)d[11];//商品名称
+            String gModel = (String)d[12];//商品规格型号
+            String iqGName = (String)d[13];//报检名称
+            String gNameFn = (String)d[14];//商品英文名称
+            String iqGModel = (String)d[15];//检验检疫货物规格
+            String gComposition = (String)d[16];//产品保质期
+            String prodValidaty = (String)d[17];//产品有效期
+            BigDecimal prodWarranty = (BigDecimal)d[18];//产品保质期
+            String dutyMode = (String)d[19];//征免方式
+            String gtin = (String)d[20];//条形码
+            BigDecimal gQty = (BigDecimal)d[21];//申报数量
+            String gUnit = (String)d[22];//申报计量单位
+            BigDecimal qty1 = (BigDecimal)d[23];//法定第一数量
+            String unit1 = (String)d[24];//法定第一数量
+            BigDecimal qty2 = (BigDecimal)d[25];//第二数量
+            String unit2 = (String)d[26];//法定第二数量
+            BigDecimal declPrice = (BigDecimal)d[27];//申报单价
+            BigDecimal declTotal = (BigDecimal)d[28];//申报总价
+            String tradeCurr = (String)d[29];//成交币制
+            BigDecimal tradeTotal = (BigDecimal)d[30];//成交总价
+            BigDecimal dutyValue = (BigDecimal)d[31];//完税价格
+            BigDecimal rmbPrice = (BigDecimal)d[32];//统计人民币价
+            BigDecimal usdPrice = (BigDecimal)d[33];//统计美元价
+            BigDecimal exchangeRate = (BigDecimal)d[34];//成交汇率
+            String originCountry = (String)d[35];//原产国(地区)
+            String originRegionCode = (String)d[36];//原产地区代码
+            String destCountry = (String)d[37];//最终目的国(地区)
+            String ieDistrictCode = (String)d[38];//境内目的地/境内货源地
+            String iqIeDistrictCode = (String)d[39];//目的地/货源地
+            String frnProducerName = (String)d[40];//境外生产企业名称
+            String productDate = (String)d[41];//生产日期
+            String productBatch = (String)d[42];//生产日期
+            String ungid = (String)d[43];//UN编码
+            String productModel = (String)d[44];//货物型号
+            String productBrand = (String)d[45];//境内目的地/境内货源地
+            String ungFlag = (String)d[46];//非危险化学品
+            String ungModel = (String)d[47];//危包规格
+            String ungClassify = (String)d[48];//危包类别
+            String ungGName = (String)d[49];//危险货物名称
+            String productCharCode = (String)d[50];//货物属性代码
+            String goodsId = (String)d[51];//货号
+            String useTo = (String)d[52];//用途代码
+            String gCertFlag = (String)d[53];//每项商品需要监管证件
+            String mnufctrRegNo = (String)d[54];//生产单位注册号
+            //使用java8 stream查找list中是否包含gModel的cas号,有返回cas号,无返回null
+            String cas = casList.stream().filter(u -> gModel.contains(u)).findFirst().orElse(null);
+            NewDeclaredGoods bus = new NewDeclaredGoods();
+            bus.setDeclDate(dDate);
+            bus.setIeFlag(ieFlag);
+            bus.setIePort(iePort);
+            bus.setDeclPort(declPort);
+            bus.setCustomsCode(customsCode);
+            bus.setConsignScc(consignScc);
+            bus.setConsignCode(consignCode);
+            bus.setConsignName(consignName);
+            bus.setEntryId(entryId);
+            bus.setGNo(gNo);
+            bus.setCodeTs(codeTs);
+            bus.setIqCode(iqCode);
+            bus.setGName(gName);
+            bus.setGModel(gModel);
+            bus.setIqGName(iqGName);
+            bus.setGNameFn(gNameFn);
+            bus.setIqGModel(iqGModel);
+            bus.setGComposition(gComposition);
+            bus.setProdValidaty(prodValidaty);
+            bus.setProdWarranty(prodWarranty);
+            bus.setDutyMode(dutyMode);
+            bus.setGtin(gtin);
+            bus.setGQty(gQty);
+            bus.setGUnit(gUnit);
+            bus.setQty1(qty1);
+            bus.setUnit1(unit1);
+            bus.setQty2(qty2);
+            bus.setUnit2(unit2);
+            bus.setDeclPrice(declPrice);
+            bus.setDeclTotal(declTotal);
+            bus.setTradeCurr(tradeCurr);
+            bus.setTradeTotal(tradeTotal);
+            bus.setDutyValue(dutyValue);
+            bus.setRmbPrice(rmbPrice);
+            bus.setUsdPrice(usdPrice);
+            bus.setExchangeRate(exchangeRate);
+            bus.setOriginCountry(originCountry);
+            bus.setOriginRegionCode(originRegionCode);
+            bus.setDestCountry(destCountry);
+            bus.setIeDistrictCode(ieDistrictCode);
+            bus.setIqIeDistrictCode(iqIeDistrictCode);
+            bus.setFrnProducerName(frnProducerName);
+            bus.setProductDate(productDate);
+            bus.setProductBatch(productBatch);
+            bus.setUngid(ungid);
+            bus.setProductModel(productModel);
+            bus.setProductBrand(productBrand);
+            bus.setUngFlag(ungFlag);
+            bus.setUngModel(ungModel);
+            bus.setUngClassify(ungClassify);
+            bus.setUngGName(ungGName);
+            bus.setProductCharCode(productCharCode);
+            bus.setGoodsId(goodsId);
+            bus.setUseTo(useTo);
+            bus.setGCertFlag(gCertFlag);
+            bus.setMnufctrRegNo(mnufctrRegNo);
+            bus.setCas(cas);
+            bus.setCreateTime(date);
+            if(cas != null){
+                //consignCode+IQ_CODE+cas号判断库里是否存在
+                //危险货物是以consignCode+IQ_CODE+ungid唯一查询后续再讲解析的cas插入,所以可能存在consignCode+IQ_CODE+cas有相同情况但ungid不同
+                //cas不为空此时consignCode+IQ_CODE+cas若查到数据说明既是危化品又是危险货物
+                List<Object[]> obj = (List<Object[]>)dao.getQueryBySql("select entry_id,G_NO from WXJY_NEW_DECLARED_GOODS where CONSIGN_CODE = ? and IQ_CODE = ? and CAS = ? and UNGID is not null",bus.getConsignCode(),bus.getIqCode(),bus.getCas());
+                //如果库中已存在并且g_no能对应上,此时将goods_type改为1,2,3,否则删除代表重复了
+                if(obj != null && obj.size() >0){
+                    dao.executeUpdate("update WXJY_NEW_DECLARED_GOODS set GOODS_TYPE = '1,2,3' where CONSIGN_CODE = ? and IQ_CODE = ? and CAS = ? and UNGID is not null",bus.getConsignCode(),bus.getIqCode(),bus.getCas());
+                } else {
+                    //只是危化品但存在相同cas号则删掉
+                    List<Object[]> chemList = (List<Object[]>)dao.getQueryBySql("select entry_id,G_NO from WXJY_NEW_DECLARED_GOODS where CONSIGN_CODE = ? and IQ_CODE = ? and CAS = ? and UNGID is null",bus.getConsignCode(),bus.getIqCode(),bus.getCas());
+                    if(chemList != null && chemList.size() >0){
+                        dao.executeUpdate("delete from WXJY_NEW_DECLARED_GOODS where CONSIGN_CODE = ? and IQ_CODE = ? and CAS = ? and UNGID is null",bus.getConsignCode(),bus.getIqCode(),bus.getCas());
+                    } else {
+                        bus.setGoodsType("1");
+                        bus.setId(dao.getGuidStringBySql());
+                        newDeclaredGoodsRepository.save(bus);
+                    }
+                }
+            } else {
+                //危化品的填写不规范,很多规格型号中cas号为空,危化品31和32都属于危化品这时重复的consignCode+IQ_CODE删掉
+                List<Object[]> obj = (List<Object[]>)dao.getQueryBySql("select * from WXJY_NEW_DECLARED_GOODS where CONSIGN_CODE = ? and IQ_CODE = ? and CAS is null and UNGID is null",bus.getConsignCode(),bus.getIqCode());
+                if(obj !=null && obj.size() >0){
+                    dao.executeUpdate("delete from WXJY_NEW_DECLARED_GOODS where CONSIGN_CODE = ? and IQ_CODE = ? and CAS is null and UNGID is null",bus.getConsignCode(),bus.getIqCode());
+                } else {
+                    bus.setGoodsType("1");
+                    bus.setId(dao.getGuidStringBySql());
+                    newDeclaredGoodsRepository.save(bus);
+                }
+            }
+        }
+    }
+}

+ 3391 - 0
src/main/java/cn/gov/customs/data/timer/H2018ZhDangerGoodsUtil.java

@@ -0,0 +1,3391 @@
+package cn.gov.customs.data.timer;
+
+
+import cn.gov.customs.data.entity.wxjy.bus.*;
+import cn.gov.customs.data.entity.wxjy.common.PubCustomsMapping;
+import cn.gov.customs.data.repository.h2018.H2018Repository;
+import cn.gov.customs.data.repository.iedg.IedgRepository;
+import cn.gov.customs.data.repository.inspect.InspectRepository;
+import cn.gov.customs.data.repository.rh2k.Rh2kRepository;
+import cn.gov.customs.data.repository.wxjy.WxjyRepository;
+import cn.gov.customs.data.repository.wxjy.bus.CustomMonthlyStatFinalRepository;
+import cn.gov.customs.data.repository.wxjy.bus.CustomMonthlyStatRepository;
+import cn.gov.customs.data.repository.wxjy.bus.EntryHeadRepository;
+import cn.gov.customs.data.repository.wxjy.bus.EntryListRepository;
+import cn.gov.customs.data.repository.wxjy.common.PubCustomsMappingRepository;
+import cn.gov.customs.data.repository.zmqd.ZmqdRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: H2018危险品
+ * @Author wq
+ * @Date 2025-09-30 14:31:11
+ * @Version 1.0
+ */
+@Component
+@Configuration
+@PropertySource("classpath:data-acquisition.properties")
+public class H2018ZhDangerGoodsUtil {
+
+	Logger logger = LoggerFactory.getLogger(H2018ZhDangerGoodsUtil.class);
+	private static SimpleDateFormat yearSdf = new SimpleDateFormat("yyyy");
+
+	private static SimpleDateFormat monthSdf = new SimpleDateFormat("yyyyMM");
+	private static SimpleDateFormat daySdf = new SimpleDateFormat("yyyyMMdd");
+	private static SimpleDateFormat fullSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+	private static final String IE_DATE_ADAPT = "12:00:00";//下发的报关单I_E_DATE丢失时分精度
+	private static boolean reGenerateAllData = false;
+	private static final String noRelStatMonth = "201812"; // 该月及之前月份月度统计中间数据不用维护所有字段内容,比如相对差值字段,去年/前年xx平均值
+
+	private static final BigDecimal zero = new BigDecimal(0);
+	private static HashMap<String, String> rootCustomsMap = new HashMap<String, String>();// 根据关区代码获得所隶属的一级关区代码
+
+	private static List<String> hasMultipleCustomList = new ArrayList<String>(); // 拥有下级关区的关区代码
+
+	private static Set<String> firstClassCustoms = new HashSet<String>(); // 一级关区代码集合
+
+	@Autowired
+	private H2018Repository h2018Dao;
+
+	@Autowired
+	private WxjyRepository dao;
+
+	@Autowired
+	private IedgRepository iedgRepository;
+
+	@Autowired
+	private InspectRepository inspDao;
+
+	@Autowired
+	private ZmqdRepository zmqdRepository;
+
+	@Autowired
+	private Rh2kRepository rh2kRepository;
+
+	@Autowired
+	private PubCustomsMappingRepository mappingRepository;
+
+	@Autowired
+	private EntryHeadRepository entryHeadRepository;
+
+	@Autowired
+	private EntryListRepository entryListRepository;
+
+	@Autowired
+	private CustomMonthlyStatFinalRepository customMonthlyStatFinalRepository;
+
+	@Autowired
+	private CustomMonthlyStatRepository customMonthlyStatRepository;
+    @Autowired
+    private PubCustomsMappingRepository pubCustomsMappingRepository;
+
+	/**
+	 * @description: H2018危险品报关单信息
+	 * @param: hsCodes
+	 * endTime
+	 * @return: void
+	 * @author zoumin
+	 * @date: 2021-11-09 16:06:48
+	 * @version 1.0
+	 */
+	public void h2018Business(List<String> ciqCodeList, Calendar c, String type) {
+		/**H2018已结关报关单危险品信息*/
+		logger.info("=================同步H2018已结关(80)报关单危险品信息======start==========");
+		SimpleDateFormat daySdf = new SimpleDateFormat("yyyy-MM-dd");
+		Date today = c.getTime();
+		c.add(Calendar.DATE, -1);
+		Date yesterday = c.getTime();
+		String yesterdayStr = "";
+		Date statBegin = null;
+		Date statEnd = null;
+		try {
+			yesterdayStr = daySdf.format(yesterday);
+			statBegin = daySdf.parse(yesterdayStr);
+			statEnd = daySdf.parse(daySdf.format(today));
+		} catch (ParseException e) {
+			e.printStackTrace();
+			return;
+		}
+		dao.executeUpdate("delete from WXJY_ENTRY_HEAD where RELEASE_DATE >= ? and RELEASE_DATE < ?", statBegin, statEnd);
+		dao.executeUpdate("delete from WXJY_ENTRY_LIST where RELEASE_DATE >= ? and RELEASE_DATE < ?", statBegin, statEnd);//根据结关时间同步删除通过报关单号关联的商品编码表  zoumin 2020-11-11
+		dao.executeUpdate("delete from WXJY_MID_D_M_STATUS where DATA_TYPE = 'EntryHead' and BUSINESS_TYPE = ? and STAT_PERIOD = ?", type, yesterdayStr);
+		//获取危险品的ciq编码
+		List<String> allCiqCodeList = (List<String>) iedgRepository.getQueryBySql("select distinct c.ciq_code from iedg_sync_chemicals_ciq c");
+		try {
+			// 一体化通关
+			ythDeclMain(statBegin, statEnd, ciqCodeList, allCiqCodeList);
+
+			// 口岸清关(直接进出口)
+			kaqgDeclMain(statBegin, statEnd, ciqCodeList, allCiqCodeList);
+
+			// 转关(因为需求不要求出境的,只考虑维护入境转关类型报关的转关数据发送时间、转关数据核销时间)
+			zgDeclMain(statBegin, statEnd, ciqCodeList, allCiqCodeList);
+//
+			// 运维时可以查询MiddleDataMainStatus对应记录来分析哪些时间的定时任务没有正确执行,届时进行维护
+			MiddleDataMainStatus mStatus = new MiddleDataMainStatus();
+			mStatus.setCreateTime(new Date());
+			mStatus.setDataType(EntryHead.class.getSimpleName());
+			mStatus.setStatPeriod(yesterdayStr);
+			mStatus.setBusinessType(type);
+			dao.executeUpdate("insert into WXJY_MID_D_M_STATUS (ID,DATA_TYPE, STAT_PERIOD,BUSINESS_TYPE, CREATE_TIME) " +
+					"values(sys_guid(),?,?,?) ", mStatus.getDataType(), mStatus.getStatPeriod(), mStatus.getBusinessType(), new Date());
+		} catch (Exception e) {
+			logger.error("危险品报关单通关时长统计每日中间表数据维护异常", e);
+		}
+		try {
+			//删除中间表中涉案和删单的
+			delSpecialAndDelHeadLogData(statEnd);
+			logger.info("每日中间表涉案和删单的数据删除成功!");
+		} catch (Exception e1) {
+			logger.error("删除危险品报关单通关时长统计每日中间表涉案和删单数据异常", e1);
+		}
+		// 2019-11-19 增加每天维护当月的月度统计数据
+		// reGenerateAllData 生产环境正式代码设置为false;清空所有中间数据重新生成时设置为true以提升效率,这时会全新生成所有月度统计;
+		if (!reGenerateAllData) {
+			// 月度统计维护关区合并的FINAL表用到,需要先初始化,否则首次执行时无法维护几个FINAL后缀的表数据
+			if (firstClassCustoms.size() == 0) {// 还没有初始化过
+				rootCustomsMap.clear();
+				hasMultipleCustomList.clear();
+				List<PubCustomsMapping> custMapping = mappingRepository.findAll();
+				for (PubCustomsMapping m : custMapping) {
+					String pCustomCode = m.getMappingCode();
+					if (rootCustomsMap.containsValue(pCustomCode)) {
+						hasMultipleCustomList.add(pCustomCode);
+					}
+					rootCustomsMap.put(m.getCustomsCode(), pCustomCode);
+					firstClassCustoms.add(pCustomCode);
+				}
+			}
+
+			String dataPeriod = monthSdf.format(yesterday);// 当天凌晨维护的是昨天的数据,故月度统计是昨天所在月度
+			// 维护月度之前尝试删除可能未删除的月度维护日志,便于月度维护开展
+			// 月度统计定时维护触发时间晚于每日中间数据维护,需要维护好月度统计日志
+			dao.executeUpdate("delete from WXJY_MID_D_M_STATUS where STAT_PERIOD = ?", dataPeriod);
+
+			Date monthStatBegin = statBegin;// 随意初始化为昨日0点
+			try {
+				monthStatBegin = monthSdf.parse(dataPeriod);// 昨日所在月份1日0点
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+			monthlyDataMaintance(dataPeriod, monthStatBegin, statEnd);
+			// 维护完当月月度统计临时数值后删除维护日志,便于月度统计定时维护持续工作,每月初月度定时任务重新执行一次不碍事
+			dao.executeUpdate("delete from WXJY_MID_D_M_STATUS where STAT_PERIOD = ?", dataPeriod);
+
+		}
+	}
+
+	public void ythDeclMain(Date statBegin, Date statEnd, List<String> code, List<String> allCode) {
+		Map<String, Object[]> tmpMap1 = new HashMap<String, Object[]>();
+		Map<String, Date[]> tmpMap2 = new HashMap<String, Date[]>();
+		Map<String, Date> tmpMap9 = new HashMap<String, Date>();
+		Map<String, Object[]> tmpMap10 = new HashMap<String, Object[]>();
+		Map<String, Object[]> tmpMap11 = new HashMap<String, Object[]>();
+		Map<String, Date> tmpMap12 = new HashMap<String, Date>();
+		if (code != null && code.size() > 0) {
+			List<String> entryH2018IdList = new ArrayList<>();//存放所有
+			StringBuilder codeSb = new StringBuilder();
+			int j = 1;
+			for (Iterator itera = code.iterator(); itera.hasNext(); ) {
+				String ciqCode = (String) itera.next();
+
+				codeSb.append("'").append(ciqCode).append("',");
+				if ((j % 600 == 0 || !itera.hasNext()) && codeSb.length() > 0) {
+					codeSb.deleteCharAt(codeSb.length() - 1);
+					String codes = codeSb.toString();
+					//存在后续查出的报关单前面已经有,所以需要处理去重
+					//出口按编码、ungid不为空和货物属性包含31或32
+					//进口按ungid不为空或货物属性包含31或32
+					String sql = "select distinct(d.ENTRY_ID) from ENTRY_HEAD d, ENTRY_WORKFLOW w,ENTRY_LIST l where " +
+							"d.ENTRY_ID like '47%' and (substr(d.EDI_REMARK,7,1)!='C' or substr(d.EDI_REMARK,15,1)!='1') " +
+							"and (substr(d.EDI_REMARK,17,1) in ('a','c','d','e','f') " +
+							"or substr(d.EDI_REMARK,17,1) = 'C' and substr(d.EDI_REMARK,8,1) = 'G' ) " +
+							"and d.ENTRY_ID = w.ENTRY_ID and d.ENTRY_ID = l.ENTRY_ID and w.STEP_ID = '80000000' and w.CREATE_DATE >= ? and w.CREATE_DATE < ? " +
+							"and ((d.I_E_FLAG = 'E' and (l.IQ_CODE in (" + codes + ") or l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%')) or (d.I_E_FLAG = 'I' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%'))) order by d.ENTRY_ID;";
+					List<String> entryIdList = (List<String>) h2018Dao.getQueryBySql(sql, statBegin, statEnd);
+					entryH2018IdList.addAll(entryIdList);
+					codeSb.delete(0, codeSb.length());
+				}
+				j++;
+			}
+			//用JDK1.8 Stream中对List进行去重:list.stream().distinct();
+			entryH2018IdList = (List) entryH2018IdList.stream().distinct().collect(Collectors.toList());
+			if (entryH2018IdList != null && entryH2018IdList.size() > 0) {
+				StringBuilder sb = new StringBuilder();
+				int i = 1;
+				for (Iterator iterator = entryH2018IdList.iterator(); iterator.hasNext(); ) {
+					String id = (String) iterator.next();
+
+					sb.append("'").append(id).append("',");
+
+					if ((i % 300 == 0 || !iterator.hasNext()) && sb.length() > 0) {
+						List<String> impIdList2 = new ArrayList<String>();//20191210 进口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_LIST_NEW查到精确I_E_DATE
+						List<String> impIdList3 = new ArrayList<String>();//20211210 出口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_MONITOR_NEW查到精确ARRIVAL_DATE
+						Map<String, Object> map = new HashMap<String, Object>();
+						sb.deleteCharAt(sb.length() - 1);
+						String ids = sb.toString();
+						String entryIds = sb.toString();
+						String sql = "select h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY,"
+								+ " TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),nvl(count(c.ENTRY_ID),0),substr(EDI_REMARK,53,1) "
+								+ "from ENTRY_HEAD h left join ENTRY_CONTAINER c on h.ENTRY_ID = c.ENTRY_ID where h.ENTRY_ID in ("
+								+ ids + ") group by h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY," +
+								"TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),substr(EDI_REMARK,53,1);";
+						List<Object[]> list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							String idH = (String) d[0];
+							String iEFlag = (String) d[3];
+							String traMode = (String) d[4];
+							if ("I".equals(iEFlag)) {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList2.add(idH);
+								}
+							} else {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList3.add(idH);
+								}
+							}
+							tmpMap1.put((String) d[0],
+									new Object[]{(Date) d[1], (String) d[2], (String) d[3], (String) d[4], (Date) d[5], (String) d[6], (String) d[7], (String) d[8], (String) d[9], (String) d[10], (String) d[11],
+											(BigDecimal) d[12], (BigDecimal) d[13], (String) d[14], (String) d[15], (BigInteger) d[16], (String) d[17]});
+						}
+
+						sql = "select h.ENTRY_ID,(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='10000000' AND h.ENTRY_ID = a.ENTRY_ID) as authDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='80000000' AND h.ENTRY_ID = a.ENTRY_ID) as releaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='81000000' AND h.ENTRY_ID = b.ENTRY_ID) as preReleaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='70000000' AND h.ENTRY_ID = c.ENTRY_ID) as certRlsDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='82000000' AND h.ENTRY_ID = c.ENTRY_ID) as passDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='30000000' AND h.ENTRY_ID = c.ENTRY_ID) as orderDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='30000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as orderReceiveDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='00200000' AND h.ENTRY_ID = c.ENTRY_ID) as compEleDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='33000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as profVerifyDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='00000000' AND h.ENTRY_ID = b.ENTRY_ID) as eleDeclDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%M%') as assessStartDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%') as assessEndDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID in ('10000000','10200000','20000000') AND h.ENTRY_ID = b.ENTRY_ID and substr(b.status_code,4,1) = 5 and b.proc_result like '%E%') as refundDate "
+								+ "from ENTRY_HEAD h where h.ENTRY_ID in (" + ids
+								+ ") group by ENTRY_ID;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap2.put((String) d[0], new Date[]{(Date) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (Date) d[5], (Date) d[6], (Date) d[7], (Date) d[8], (Date) d[9],
+									(Date) d[10], (Date) d[11], (Date) d[12], (Date) d[13]});
+						}
+
+						sql = "select h.ENTRY_ID,substr(h.CHECK_REQUEST_TOTAL,-1,1),h.CREATE_TIME,h.MAN_CHK_TIME_START,h.MAN_CHK_TIME_END,MAN_PROC_RESULT,MAN_PROC_IDEA,CHECK_CUSTOMS_CODE "
+								+ "from CI_CHECK_MAN_WORK_HEAD h where h.CHECK_STATE = 'M' and h.MODIFY_TIME = "
+								+ "(select max(d.MODIFY_TIME) from CI_CHECK_MAN_WORK_HEAD d where d.ID = h.ID) and h.ENTRY_ID in(" + ids + ") ;";
+						list = (List<Object[]>) inspDao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap11.put((String) d[0], new Object[]{(String) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (String) d[5], (String) d[6], (String) d[7]});
+						}
+
+						//货运量毛重、净重、货运值人民币、美元、集装箱数量GROUP_CONCAT方法放在此处当传一个报关单id并且没有随附单证时会报错,所以加上nvl()
+						sql = "select h.ENTRY_ID,sum(nvl(l.RMB_PRICE,0)),sum(nvl(l.USD_PRICE,0)),h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,"
+								+ "h.OWNER_CODE,h.OWNER_NAME,h.FRN_CONSIGN_CODE,h.FRN_CONSIGN_NAME from ENTRY_HEAD h left join ENTRY_LIST l on h.ENTRY_ID=l.ENTRY_ID "
+								+ "where h.ENTRY_ID in("
+								+ ids + ") group by h.ENTRY_ID,h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,h.OWNER_CODE,h.OWNER_NAME,h.FRN_CONSIGN_CODE,h.FRN_CONSIGN_NAME;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap10.put((String) d[0], new Object[]{(BigDecimal) d[1], (BigDecimal) d[2], (String) d[3], (String) d[4], (String) d[5], (String) d[6], (String) d[7]
+									, (String) d[8], (String) d[9]});
+						}
+						if (impIdList2.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList2) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 进口新舱单水运、空运的I_E_DATE精准值由MANIFEST_LIST_NEW的REAL_ARRIVE_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号
+							sql = "select a.ENTRY_ID, b.REAL_ARRIVE_DATE from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_LIST_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE and to_char(a.I_E_DATE,'yyyyMMdd') = to_char(b.REAL_ARRIVE_DATE,'yyyyMMdd')";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap9.put(entryId, (Date) d[1]);
+							}
+							impIdList2.clear();
+						}
+						//出口舱单
+						if (impIdList3.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList3) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 出口新舱单水运、空运可能提前但航班晚到,无法用时间去精准定位哪一条会卸载很多次,精准值由MANIFEST_MONITOR_NEW的ARRIVAL_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号,ARRIVAL_DATE为00:00:00的赋值12:00:00
+							//20210508舱单只获取和武汉海关有关的数据进行时间赋值,所以a.I_E_PORT = b.CUSTOMS_CODE
+							sql = "select a.ENTRY_ID, min(b.ARRIVAL_DATE) from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_MONITOR_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE group by a.ENTRY_ID";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap12.put(entryId, (Date) d[1]);
+							}
+							impIdList3.clear();
+						}
+						for (Map.Entry<String, Object[]> d : tmpMap1.entrySet()) {
+							String entryId = d.getKey();
+							Object[] v = d.getValue();
+							Date ieDate = (Date) v[0];// 货物运抵时间
+							String iePort = (String) v[1];
+							String ieFlag = (String) v[2];
+							String trafMode = (String) v[3];
+							Date declDate = (Date) v[4];// 申报时间
+							String declPort = (String) v[5];// 申报口岸
+							String consignScc = (String) v[6];
+							String consignCode = (String) v[7];
+							String consignName = (String) v[8];
+							String tradeCountry = (String) v[9];
+							String tradeMode = (String) v[10];
+							BigDecimal grossWt = (BigDecimal) v[11];//毛重
+							BigDecimal netWt = (BigDecimal) v[12];//净重
+							String advanceDecl = (String) v[13];//判断是否是提前申报
+							//两步申报都下发到了h2018所以使用00200000节点判断只属于两步申报其中一种类型,
+							//应当使用edi_remark41位判断是否有值(edi_remark41值为1,2,3均为两步申报)
+							String twoStep = (String) v[14];//判断是否是两步申报
+							//2018存在twoStepValue截取出来值为' '情况,需要单独处理
+							String twoStepDecl = (" ").equals(twoStep) ? "" : twoStep;
+							BigInteger container = (BigInteger) v[15];// 集装箱数量
+							String newTwoStep = (String) v[16];//判断是否是新两步申报
+
+							Date[] all = tmpMap2.get(entryId);
+							Date authDate = null;
+							Date releaseDate = null;
+							Date preReleaseDate = null;
+							Date certRlsDate = null;
+							Date passDate = null;
+							Date orderDate = null;
+							Date orderReceiveDate = null;
+							Date compEleDate = null;
+							Date profVerifyDate = null;
+							Date eleDeclDate = null;
+							Date assessStartDate = null;
+							Date assessEndDate = null;
+							Date refundDate = null;
+							if (all != null) {
+								authDate = all[0];// 10审单受理时间
+								releaseDate = all[1];// 80结关时间
+								preReleaseDate = all[2];// 81担保放行时间
+								certRlsDate = all[3];// 70单证放行时间
+								passDate = all[4];// 82000000通道验放
+								orderDate = all[5];// 30000000现场接单
+								orderReceiveDate = all[6];// 30现场接单时间
+								compEleDate = all[7];// 00200000完整申报电子申报时间
+								profVerifyDate = all[8];// 33专业审证单核时间
+								eleDeclDate = all[9];// 00电子申报时间
+								assessStartDate = all[10];// 26排查处置/现场验估时间
+								assessEndDate = all[11];// 26验估处置完毕时间
+								refundDate = all[12];// 退单时间
+							}
+
+							Date realArriveDate = tmpMap9.get(entryId);
+							Object[] obj = tmpMap10.get(entryId);
+							BigDecimal rmbPrice = zero;
+							BigDecimal usdPrice = zero;
+							String agentCode = null;
+							String agentName = null;
+							String noteS = null;
+							String ownerCode = null;
+							String ownerName = null;
+							String frnConsignCode = null;
+							String frnConsignName = null;
+							if (obj != null) {
+								rmbPrice = (BigDecimal) obj[0];//人民币
+								usdPrice = (BigDecimal) obj[1];//美元
+								agentCode = (String) obj[2];//申报单位代码
+								agentName = (String) obj[3];//申报单位名称
+								noteS = (String) obj[4];//备注
+								ownerCode = (String) obj[5];//生产销售单位代码
+								ownerName = (String) obj[6];//生产销售单位名称
+								frnConsignCode = (String) obj[7];//生产销售单位代码
+								frnConsignName = (String) obj[8];//生产销售单位名称
+							}
+
+							Object[] man = tmpMap11.get(entryId);
+							String checkFlag = null;
+							Date manCreateTime = null;
+							Date manChkTimeStart = null;
+							Date manChkTimeEnd = null;
+							String manProcResult = null;
+							String manProcIdea = null;
+							String checkCustomsCode = null;
+							if (man != null) {
+								checkFlag = (String) man[0];//是否查验送检
+								manCreateTime = (Date) man[1];//指令下达时间
+								manChkTimeStart = (Date) man[2];//查验开始时间
+								manChkTimeEnd = (Date) man[3];//查验结束时间
+								manProcResult = (String) man[4];//处理结果
+								manProcIdea = (String) man[5];//处理意见
+								checkCustomsCode = (String) man[6];//查验关区
+							}
+
+							if ("I".equals(ieFlag)) {
+								if (realArriveDate != null) {
+									ieDate = realArriveDate;
+								} else {
+									if (ieDate != null) {
+										// 由于报关单表中I_E_DATE精度不够,需要做(非精准)修正(用户给的建议应该是错的,模糊处理下好了,时分为0的设置为12点)
+										if ("I".equals(ieFlag)) {// 入境
+											String ieDateStr = fullSdf.format(ieDate);
+											if (ieDateStr.endsWith("00:00:00")) {
+												ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+												try {
+													ieDate = fullSdf.parse(ieDateStr);
+												} catch (ParseException e1) {
+													// TODO Auto-generated catch block
+													e1.printStackTrace();
+												}
+											}
+										}
+									}
+								}
+							} else {
+								realArriveDate = tmpMap12.get(entryId);
+								//ARRIVAL_DATE为00:00:00时赋值12:00:00
+								if (realArriveDate != null) {
+									String ieDateStr = fullSdf.format(realArriveDate);
+									if (ieDateStr.endsWith("00:00:00")) {
+										ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+										try {
+											realArriveDate = fullSdf.parse(ieDateStr);
+										} catch (ParseException e1) {
+											// TODO Auto-generated catch block
+											e1.printStackTrace();
+										}
+									}
+								}
+							}
+
+							EntryHead e = new EntryHead();
+							e.setEntryId(entryId);
+							e.setAcceptDate(authDate != null ? authDate : orderDate);
+							e.setCertRlsDate(certRlsDate);// 70单证放行时间
+							e.setReleaseDate(releaseDate);//80
+							e.setPreReleaseDate(preReleaseDate);// 81时间
+							e.setPassMode("1");// 一体化通关
+							e.setDeclPort(declPort);
+							e.setIePort(iePort);
+							e.setIeDate(ieDate);
+							e.setDeclDate(declDate);
+							e.setIeFlag(ieFlag);
+							e.setTrafMode(trafMode);
+							e.setConsignScc(consignScc);
+							e.setConsignCode(consignCode);
+							e.setConsignName(consignName);
+							e.setTradeCountry(tradeCountry);
+							e.setTradeMode(tradeMode);
+							e.setOrderReceiveDate(orderReceiveDate);//30接单时间
+							e.setCompEleDate(compEleDate);// 00200000完整申报电子申报时间
+							e.setProfVerifyFlag(profVerifyDate != null ? "1" : "0");
+							e.setNewTwoStepFlag((null != newTwoStep && !"".equals(newTwoStep) && newTwoStep.equals("1")) ? "1" : "0");
+							e.setEleDeclDate(eleDeclDate);
+							e.setAssessStartDate(assessStartDate);
+							e.setAssessEndDate(assessEndDate);
+							e.setRefundDate(refundDate);
+							e.setRefundFlag(refundDate != null ? "1" : "0");
+							e.setCheckFlag(manCreateTime != null ? "1" : "0");
+							long orderReceiveCost = 0L;//接单耗时:30000000-10000000
+							//20210423新增处理10节点无时间时的赋值,避免程序报错
+							if (orderReceiveDate != null && (authDate != null || orderDate != null)) {
+								Long time = authDate != null ? authDate.getTime() : orderDate.getTime();
+								orderReceiveCost = (orderReceiveDate.getTime() - time) / 1000;
+								e.setOrderReceiveCost(orderReceiveCost);
+							} else {
+								e.setOrderReceiveCost(null);
+							}
+
+							long hgCost = 0L;
+							long totalCost = 0L;
+							//edi_remark11位为T表示提前申报
+							if ("T".equals(advanceDecl)) {
+								e.setDeclAdvanceFlag("1");
+							} else {
+								e.setDeclAdvanceFlag("0");
+							}
+							if ("I".equals(ieFlag)) {// 入境
+								/**根据综合处杨科提出的修改意见,这里将原来'电脑审单时间早于货物运抵时间'改成'申报时间早于货物运抵时间'的为提前申报*/
+							/*if (authDate.before(ieDate)) {
+								authDate = ieDate;
+								e.setDeclAdvanceFlag("1");
+							}*/
+								if (ieDate != null) {
+									if (declDate.before(ieDate)) {
+										authDate = ieDate;
+										//								e.setDeclAdvanceFlag("1");
+									} else {
+										//20210423新增处理10节点无时间时的赋值,避免程序报错
+										if (authDate == null) {
+											authDate = orderDate;
+										}
+									}
+								}
+								if (e.getPreReleaseDate() == null && e.getReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								} else if (e.getPreReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getPreReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								}
+								if (hgCost < 0) {
+									hgCost = 0L;
+								}
+								if (totalCost < 0) {
+									totalCost = hgCost;
+								}
+								//新组合查询用00-货物运抵,组合查询用10-货物运抵
+								e.setBeforeDeclCost((eleDeclDate.getTime() - e.getIeDate().getTime()) / 1000);// 申报前准备时间
+								if (e.getBeforeDeclCost() < 0) {
+									e.setBeforeDeclCost(0L);
+								}
+							} else {// 出境 海关通关时间=70/81之间较早的时间-受理时间
+								// 20191211 出口口岸清关、一体化:公路取BINDING_ROAD_TRANSPORT表GEN_DATE;铁路、邮路运输的整体通关时长=海关通关时长
+								//20210423新增处理10节点无时间时的赋值,避免程序报错
+								if (authDate == null) {
+									authDate = orderDate;
+								}
+								if (realArriveDate != null) {
+									//20211209出口舱单有时间赋值给出口货物运抵时间否则使用10审单时间,同时进行计算
+									e.setExInPortDate(realArriveDate);
+								} else {
+									// 取不到数据的统一将货物入境时间设置为受理时间
+									if ("3".equals(trafMode) || "6".equals(trafMode) || "9".equals(trafMode)) {// 其它运输方式也假设归为一类
+										e.setExInPortDate(authDate);
+									} else if ("4".equals(trafMode)) {//TODO 公路:暂时取不到数据
+										e.setExInPortDate(authDate);
+									} else {
+										e.setExInPortDate(authDate);// TODO 出口水运、空运通关时长第一个时间点数据来源还未下发,先临时赋值
+									}
+								}
+
+								if (e.getCertRlsDate() == null) {
+									if (e.getPreReleaseDate() != null) {
+										if (authDate != null) {
+											hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+
+								} else {
+									if (e.getPreReleaseDate() != null) {
+										if (e.getCertRlsDate().before(e.getPreReleaseDate())) {
+											if (authDate != null) {
+												hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										} else {
+											if (authDate != null) {
+												hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										}
+
+									} else {
+										if (authDate != null) {
+											hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+								}
+								e.setBeforeDeclCost(e.getExInPortDate() != null
+										? ((eleDeclDate.getTime() - e.getExInPortDate().getTime()) / 1000)
+										: 0L);// 申报前准备时间
+								if (e.getBeforeDeclCost() < 0) {
+									e.setBeforeDeclCost(0L);
+								}
+							}
+
+							e.setMainStatus("1");
+							e.setCuCost(hgCost);// 海关通关时间(秒)
+							e.setTotalCost(totalCost);// 总体通关时间
+							e.setGrossWt(grossWt);//净重
+							e.setNetWt(netWt);//毛重
+							e.setRmbPrice(rmbPrice);//人民币
+							e.setUsdPrice(usdPrice);//美元
+							e.setContainer(container);//集装箱数量
+							e.setAgentCode(agentCode);//申报单位代码
+							e.setAgentName(agentName);//申报单位名称
+							e.setNoteS(noteS);//备注
+							e.setOwnerCode(ownerCode);//生产销售单位代码
+							e.setOwnerName(ownerName);//生产销售单位名称
+							e.setFrnConsignCode(frnConsignCode);
+							e.setFrnConsignName(frnConsignName);
+							//报关模式
+							String mode = null;
+							//部分订单既是提前申报又是两步申报,不是两步和提前申报的单子均为一般申报,twoStepDecl:0或者空格:代表一分模式
+							if ("1".equals(e.getDeclAdvanceFlag()) && (null == twoStepDecl || "".equals(twoStepDecl) || "0".equals(twoStepDecl))) {
+								mode = "3";
+							} else if ("1".equals(e.getDeclAdvanceFlag()) && (null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2,3";
+							} else if ((null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2";
+							} else {
+								mode = "1";
+							}
+							e.setDeclMode(mode);//报关模式
+							//70000000、80000000、81000000、82000000均为空则表示未放行
+							if (preReleaseDate == null && certRlsDate == null && releaseDate == null && passDate == null) {
+								e.setDeclStatus("1");
+							} else if (releaseDate != null) {
+								//80表示已结关
+								e.setDeclStatus("3");
+							} else {
+								e.setDeclStatus("2");
+							}
+
+							e.setManCreateTime(manCreateTime);//指令下达时间
+							e.setManChkTimeStart(manChkTimeStart);//查验开始时间
+							e.setManChkTimeEnd(manChkTimeEnd);//查验结束时间
+							e.setManProcResult(manProcResult);
+							e.setManProcIdea(manProcIdea);
+							e.setCheckCustomsCode(checkCustomsCode);
+							dao.executeUpdate("delete from WXJY_ENTRY_HEAD where ENTRY_ID = ?", entryId);
+							entryHeadRepository.save(e);
+						}
+						//ciqCode存在超过600个情况,每个报关单每次查都拼接重复工作太多,所以提出来
+						//先删除这些报关单下的所有商品信息
+						dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						try {
+							StringBuilder codeListSb = new StringBuilder();
+							int x = 1;
+							for (Iterator it = allCode.iterator(); it.hasNext(); ) {
+								String iqCode = (String) it.next();
+
+								codeListSb.append("'").append(iqCode).append("',");
+								if ((x % 600 == 0 || !it.hasNext()) && codeListSb.length() > 0) {
+									codeListSb.deleteCharAt(codeListSb.length() - 1);
+									String iqCodes = codeListSb.toString();
+									//报关单表体,报关单第九位0=出口1=进口
+									sql = "select ENTRY_ID,G_NO,CODE_TS,G_NAME,QTY_1,RMB_PRICE,USD_PRICE,G_MODEL,G_CERT_FLAG," +
+											"(select max(a.CREATE_DATE) from ENTRY_WORKFLOW a where a.STEP_ID='80000000' AND l.ENTRY_ID = a.ENTRY_ID) as RELEASE_DATE," +
+											"UNGID,UNG_FLAG,UNG_MODEL,UNG_CLASSIFY,UNG_G_NAME,PRODUCT_CHAR_CODE,IQ_CODE " +
+											"from ENTRY_LIST l where l.ENTRY_ID in (" + entryIds + ") " +
+											"and ((substr(l.ENTRY_ID,9,1) ='0' and (l.IQ_CODE in (" + iqCodes + ") or l.UNGID is not null " +
+											"or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')) or " +
+											"(substr(l.ENTRY_ID,9,1) = '1' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')));";
+									List<Object[]> codeTsList = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									if (null != codeTsList && codeTsList.size() > 0) {
+										//由于新组合查询不设定某个固定节点更新数据,会存在相同报关单在后面更新流程节点时间,所以先从中间表查出数据进行更新
+										//会存在商品金额为空的情况,如果只有一条商品并商品为空则报关单头要删除
+										EntryList entity = null;
+										for (Object[] codeTs : codeTsList) {//将根据报关单编号查询到的商品编号及报关单号添加到KPI_ENTRY_HEAD_NEW_COPY表里
+											entity = new EntryList();
+											entity.setEntryId(codeTs[0] != null ? codeTs[0].toString() : "");
+											entity.setGNo(codeTs[1] != null ? (BigDecimal) codeTs[1] : new BigDecimal(0));
+											entity.setCodeTs(codeTs[2] != null ? codeTs[2].toString() : "");
+											entity.setGName(codeTs[3] != null ? codeTs[3].toString() : "");
+											entity.setQty1(codeTs[4] != null ? (BigDecimal) codeTs[4] : new BigDecimal(0));
+											entity.setRmbPrice(codeTs[5] != null ? (BigDecimal) codeTs[5] : new BigDecimal(0));
+											entity.setUsdPrice(codeTs[6] != null ? (BigDecimal) codeTs[6] : new BigDecimal(0));
+											entity.setGModel(codeTs[7] != null ? codeTs[7].toString() : "");
+											entity.setGCertFlag(codeTs[8] != null ? codeTs[8].toString() : "");
+											entity.setReleaseDate(codeTs[9] != null ? (Date) codeTs[9] : null);
+											entity.setCodeTsShort(codeTs[2] != null ? codeTs[2].toString().substring(0, 6) : "");
+											entity.setUngid(codeTs[10] != null ? codeTs[10].toString() : "");
+											entity.setUngFlag(codeTs[11] != null ? codeTs[11].toString() : "");
+											entity.setUngModel(codeTs[12] != null ? codeTs[12].toString() : "");
+											entity.setUngClassify(codeTs[13] != null ? codeTs[13].toString() : "");
+											entity.setUngGName(codeTs[14] != null ? codeTs[14].toString() : "");
+											entity.setIqCode(codeTs[16] != null ? codeTs[16].toString() : "");
+											//货物属性,判断货物属性是否是31/散装危险化学品,32/件装危险化学品
+											String goods_attr = "";
+											if (codeTs[15] != null) {
+												goods_attr = (String) codeTs[15];
+												if (goods_attr.contains("31")) {
+													goods_attr = "31";
+												} else if (goods_attr.contains("32")) {
+													goods_attr = "32";
+												} else {
+													goods_attr = "";
+												}
+											}
+											entity.setProductCharCode(goods_attr);
+											//查出的数据可能存在ciqCode或者UNGID为空的情况,报关单第九位0=出口1=进口
+											//出口按ciq编码、ungid不为空和货物属性包含31或32
+											//进口按ungid不为空或货物属性
+											String ieFlag = codeTs[0] != null ? codeTs[0].toString().substring(8, 9) : "";
+											//货物属性为不空时可以初步判定该商品是危化品,接下来只需判断该商品是否还包含危险货物的属性
+											if (entity.getProductCharCode() != null && !"".equals(entity.getProductCharCode())) {
+												if (codeTs[10] != null) {
+													entity.setGoodsType("1,2,3");
+												} else {
+													entity.setGoodsType("1");
+												}
+											} else {
+												//货物属性为空时
+												//出口
+												if (ieFlag.equals("0")) {
+													if (codeTs[16] != null) {
+														//syncChemicalsCiq只可能是包含了危化品,因为这个表的数据就是查询的系统中危险品模块里用户已经维护的包含了危化品的数据
+														Object[] obj = (Object[]) dao.getObjectBySql("select * from iedg_sync_chemicals_ciq where CIQ_CODE = ?", (String) codeTs[16]);
+														if (obj != null) {
+															if (codeTs[16] != null) {
+																entity.setGoodsType("1,2,3");
+															} else {
+																entity.setGoodsType("1");
+															}
+														} else {
+															entity.setGoodsType("2");
+														}
+													} else {
+														entity.setGoodsType("2");
+													}
+												} else {
+													//进口
+													entity.setGoodsType("2");
+												}
+											}
+											entity.setId(dao.getGuidStringBySql());
+											entryListRepository.save(entity);
+										}
+									}
+									codeListSb.delete(0, codeListSb.length());
+								}
+								x++;
+							}
+						} catch (Exception ex) {
+							// 主键可能因为多次结关跨天,导致新纪录主键重复
+							logger.error("保存危险品新维度一体化通关中间记录失败,重新保存");
+							dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						}
+						tmpMap1.clear();
+						tmpMap2.clear();
+						tmpMap9.clear();
+						tmpMap10.clear();
+						tmpMap12.clear();
+						tmpMap11.clear();
+						sb.delete(0, sb.length());
+					}
+					i++;
+				}
+			}
+		}
+	}
+
+	public void zgDeclMain(Date statBegin, Date statEnd, List<String> code, List<String> allCode) {
+		Map<String, Object[]> tmpMap1 = new HashMap<String, Object[]>();
+		Map<String, Date[]> tmpMap2 = new HashMap<String, Date[]>();
+		Map<String, Date[]> tmpMap5 = new HashMap<String, Date[]>();//转关
+		Map<String, Date> tmpMap9 = new HashMap<String, Date>();
+		Map<String, Object[]> tmpMap10 = new HashMap<String, Object[]>();
+		Map<String, Object[]> tmpMap11 = new HashMap<String, Object[]>();
+		Map<String, Date> tmpMap12 = new HashMap<String, Date>();
+		if (code != null && code.size() > 0) {
+			List<String> entryH2018IdList = new ArrayList<>();//存放所有
+			StringBuilder codeSb = new StringBuilder();
+			int j = 1;
+			for (Iterator itera = code.iterator(); itera.hasNext(); ) {
+				String ciqCode = (String) itera.next();
+
+				codeSb.append("'").append(ciqCode).append("',");
+				if ((j % 600 == 0 || !itera.hasNext()) && codeSb.length() > 0) {
+					codeSb.deleteCharAt(codeSb.length() - 1);
+					String codes = codeSb.toString();
+					//存在后续查出的报关单前面已经有,所以需要处理去重
+					//出口按编码、ungid不为空和货物属性包含31或32
+					//进口按ungid不为空或货物属性包含31或32
+					String sql = "select distinct(d.ENTRY_ID) from ENTRY_HEAD d, ENTRY_WORKFLOW w, ENTRY_LIST l where " +
+							"d.ENTRY_ID like '47%' and (substr(d.EDI_REMARK,7,1)!='C' or substr(d.EDI_REMARK,15,1)!='1') " +
+							"and (substr(d.EDI_REMARK,17,1) not in ('a','c','C','d','e','f') " +
+							"or (substr(d.EDI_REMARK,17,1) = 'C' and substr(d.EDI_REMARK,8,1) != 'G')) and substr(d.I_E_PORT,0,2)!=substr(d.DECL_PORT,0,2) " +
+							"and d.ENTRY_ID = w.ENTRY_ID and d.ENTRY_ID = l.ENTRY_ID and w.STEP_ID = '80000000' and w.CREATE_DATE >= ? and w.CREATE_DATE < ? " +
+							"and ((d.I_E_FLAG = 'E' and (l.IQ_CODE in (" + codes + ") or l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%')) or (d.I_E_FLAG = 'I' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%'))) order by d.ENTRY_ID;";
+					List<String> entryIdList = (List<String>) h2018Dao.getQueryBySql(sql, statBegin, statEnd);
+					entryH2018IdList.addAll(entryIdList);
+					codeSb.delete(0, codeSb.length());
+				}
+				j++;
+			}
+			//用JDK1.8 Stream中对List进行去重:list.stream().distinct();
+			entryH2018IdList = (List) entryH2018IdList.stream().distinct().collect(Collectors.toList());
+			if (entryH2018IdList != null && entryH2018IdList.size() > 0) {
+				StringBuilder sb = new StringBuilder();
+				int i = 1;
+				for (Iterator iterator = entryH2018IdList.iterator(); iterator.hasNext(); ) {
+					String id = (String) iterator.next();
+
+					sb.append("'").append(id).append("',");
+
+					if ((i % 300 == 0 || !iterator.hasNext()) && sb.length() > 0) {
+						List<String> impIdList = new ArrayList<String>();
+						List<String> impIdList2 = new ArrayList<String>();//20191210 进口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_LIST_NEW查到精确I_E_DATE
+						List<String> impIdList3 = new ArrayList<String>();//20211210 出口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_MONITOR_NEW查到精确ARRIVAL_DATE
+						Map<String, Object> map = new HashMap<String, Object>();
+						sb.deleteCharAt(sb.length() - 1);
+						String ids = sb.toString();
+						String entryIds = sb.toString();
+						String sql = "select h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT,CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY,"
+								+ " TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),nvl(count(c.ENTRY_ID),0),substr(EDI_REMARK,53,1) "
+								+ "from ENTRY_HEAD h left join ENTRY_CONTAINER c on h.ENTRY_ID = c.ENTRY_ID where h.ENTRY_ID in ("
+								+ ids + ")  group by h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY," +
+								"TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),substr(EDI_REMARK,53,1);";
+						List<Object[]> list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							String idH = (String) d[0];
+							String iEFlag = (String) d[3];
+							String traMode = (String) d[4];
+							if ("I".equals(iEFlag)) {
+								impIdList.add(idH);
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList2.add(idH);
+								}
+							} else {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList3.add(idH);
+								}
+							}
+							tmpMap1.put((String) d[0],
+									new Object[]{(Date) d[1], (String) d[2], (String) d[3], (String) d[4], (Date) d[5], (String) d[6], (String) d[7], (String) d[8], (String) d[9], (String) d[10], (String) d[11],
+											(BigDecimal) d[12], (BigDecimal) d[13], (String) d[14], (String) d[15], (BigInteger) d[16], (String) d[17]});
+						}
+
+						sql = "select h.ENTRY_ID,(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='10000000' AND h.ENTRY_ID = a.ENTRY_ID) as authDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='80000000' AND h.ENTRY_ID = a.ENTRY_ID) as releaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='81000000' AND h.ENTRY_ID = b.ENTRY_ID) as preReleaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='70000000' AND h.ENTRY_ID = c.ENTRY_ID) as certRlsDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='82000000' AND h.ENTRY_ID = c.ENTRY_ID) as passDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='30000000' AND h.ENTRY_ID = c.ENTRY_ID) as orderDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='30000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as orderReceiveDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='00200000' AND h.ENTRY_ID = c.ENTRY_ID) as compEleDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='33000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as profVerifyDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='00000000' AND h.ENTRY_ID = b.ENTRY_ID) as eleDeclDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%M%') as assessStartDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%') as assessEndDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID in ('10000000','10200000','20000000') AND h.ENTRY_ID = b.ENTRY_ID and substr(b.status_code,4,1) = 5 and b.proc_result like '%E%') as refundDate "
+								+ "from ENTRY_HEAD h where h.ENTRY_ID in (" + ids
+								+ ") group by ENTRY_ID;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap2.put((String) d[0], new Date[]{(Date) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (Date) d[5], (Date) d[6], (Date) d[7], (Date) d[8], (Date) d[9],
+									(Date) d[10], (Date) d[11], (Date) d[12], (Date) d[13]});
+						}
+
+						sql = "select h.ENTRY_ID,substr(h.CHECK_REQUEST_TOTAL,-1,1),h.CREATE_TIME,h.MAN_CHK_TIME_START,h.MAN_CHK_TIME_END,MAN_PROC_RESULT,MAN_PROC_IDEA,CHECK_CUSTOMS_CODE "
+								+ "from CI_CHECK_MAN_WORK_HEAD h where h.CHECK_STATE = 'M' and h.MODIFY_TIME = "
+								+ "(select max(d.MODIFY_TIME) from CI_CHECK_MAN_WORK_HEAD d where d.ID = h.ID) and h.ENTRY_ID in(" + ids + ") ;";
+						list = (List<Object[]>) inspDao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap11.put((String) d[0], new Object[]{(String) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (String) d[5], (String) d[6], (String) d[7]});
+						}
+
+						//货运量毛重、净重、货运值人民币、美元、集装箱数量GROUP_CONCAT方法放在此处当传一个报关单id并且没有随附单证时会报错,所以加上nvl()
+						sql = "select h.ENTRY_ID,sum(nvl(l.RMB_PRICE,0)),sum(nvl(l.USD_PRICE,0)),h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,"
+								+ "h.OWNER_CODE,h.OWNER_NAME,FRN_CONSIGN_CODE,FRN_CONSIGN_NAME from ENTRY_HEAD h left join ENTRY_LIST l on h.ENTRY_ID=l.ENTRY_ID "
+								+ "where h.ENTRY_ID in("
+								+ ids + ") group by h.ENTRY_ID,h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,h.OWNER_CODE,h.OWNER_NAME,FRN_CONSIGN_CODE,FRN_CONSIGN_NAME;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap10.put((String) d[0], new Object[]{(BigDecimal) d[1], (BigDecimal) d[2], (String) d[3], (String) d[4], (String) d[5], (String) d[6], (String) d[7]
+									, (String) d[8], (String) d[9]});
+						}
+						if (impIdList.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 部分转关类型的报关单需要通过新舱单系统拿到转关数据发送时间和转关数据核销时间
+							sql = "select a.ENTRY_ID, b.EXAM_TIME, b.CHECK_TIME from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.IM_DECL_CUR_HEAD b, " +
+									"`g_whdb_h2000_ims_recv`.MANIFEST_CHK_NEW c where a.ENTRY_ID in ("
+									+ ids + ") and (a.ENTRY_ID = c.FORM_ID and c.MANIFEST_ID = b.PRE_NO)";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap5.put(entryId, new Date[]{(Date) d[1], (Date) d[2]});
+								impIdList.remove(entryId);
+							}
+							// 从新舱单关联之后,剩下的再从提运单/转关单关联表查询两个时间值
+							sb.delete(0, sb.length());
+							for (String entryId : impIdList) {
+								sb.append("'").append(entryId).append("',");
+							}
+							if (sb.length() > 0) {
+								List<String> tmpIdList = new ArrayList<String>(impIdList);
+								sb.deleteCharAt(sb.length() - 1);
+								ids = sb.toString();
+								// 2019-11-07 入境报关单整体通关时间第一个时间点计算规则变更,水运和空运取报关单和提运单表中I_E_DATE时分秒不为0的,若都为0,则设置为12点;新舱单中I_E_DATE时分秒基本都为0,故不考虑。
+								// 公路的取 “进出境承运已确报”(物流监控工作流信息表)
+								// 经过数据分析,放弃上面方案,改为若I_E_DATE时分为0的改为12点
+
+								// 只考虑入境报关单的转关数据:可能查到多余报关单量的数据
+								sql = "select a.ENTRY_ID, b.EXAM_TIME, b.CHECK_TIME from ENTRY_HEAD a,`g_whdb_h2000_ims_recv`.IM_DECL_CUR_HEAD b," +
+										"`g_whdb_h2000_ims_recv`.IM_TRANS_LIST_REL c where a.ENTRY_ID in ("
+										+ ids + ") and (a.ENTRY_ID = c.ENTRY_NO and c.PRE_NO = b.PRE_NO)";
+
+								list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+								for (Object[] d : list) {
+									String entryId = (String) d[0];
+									tmpMap5.put(entryId, new Date[]{(Date) d[1], (Date) d[2]});
+									tmpIdList.remove(entryId);
+								}
+								sb.delete(0, sb.length());
+								for (String entryId : tmpIdList) {
+									sb.append("'").append(entryId).append("',");
+								}
+								if (sb.length() > 0) {
+									sb.deleteCharAt(sb.length() - 1);
+									ids = sb.toString();
+									sql = "select a.ENTRY_ID, b.EXAM_TIME, b.CHECK_TIME from ENTRY_HEAD a,`g_whdb_h2000_ims_recv`.IM_DECL_CUR_HEAD b," +
+											"`g_whdb_h2000_ims_recv`.IM_TRANS_LIST_REL c where a.ENTRY_ID in ("
+											+ ids + ") and (a.BILL_NO = c.BILL_NO and c.PRE_NO = b.PRE_NO)";
+
+									list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									for (Object[] d : list) {
+										String entryId = (String) d[0];
+										tmpMap5.put(entryId, new Date[]{(Date) d[1], (Date) d[2]});
+										tmpIdList.remove(entryId);
+									}
+								}
+								sb.delete(0, sb.length());
+								for (String entryId : tmpIdList) {
+									sb.append("'").append(entryId).append("',");
+								}
+								if (sb.length() > 0) {
+									sb.deleteCharAt(sb.length() - 1);
+									ids = sb.toString();
+									sql = "select a.ENTRY_ID, b.EXAM_TIME, b.CHECK_TIME from ENTRY_HEAD a,`g_whdb_h2000_ims_recv`.IM_DECL_CUR_HEAD b " +
+											"where a.ENTRY_ID in (" + ids + ") and instr(a.TRAF_NAME,b.PRE_NO) > 0";
+
+									list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									for (Object[] d : list) {
+										String entryId = (String) d[0];
+										tmpMap5.put(entryId, new Date[]{(Date) d[1], (Date) d[2]});
+										tmpIdList.remove(entryId);
+									}
+								}
+							}
+						}
+						if (impIdList2.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList2) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 进口新舱单水运、空运的I_E_DATE精准值由MANIFEST_LIST_NEW的REAL_ARRIVE_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号
+							sql = "select a.ENTRY_ID, b.REAL_ARRIVE_DATE from ENTRY_HEAD a,`g_whdb_h2000_ims_recv`.MANIFEST_LIST_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE and to_char(a.I_E_DATE,'yyyyMMdd') = to_char(b.REAL_ARRIVE_DATE,'yyyyMMdd')";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap9.put(entryId, (Date) d[1]);
+							}
+							impIdList2.clear();
+						}
+						//出口舱单
+						if (impIdList3.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList3) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 出口新舱单水运、空运可能提前但航班晚到,无法用时间去精准定位哪一条会卸载很多次,精准值由MANIFEST_MONITOR_NEW的ARRIVAL_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号,ARRIVAL_DATE为00:00:00的赋值12:00:00
+							//20210508舱单只获取和武汉海关有关的数据进行时间赋值,所以a.I_E_PORT = b.CUSTOMS_CODE
+							sql = "select a.ENTRY_ID, min(b.ARRIVAL_DATE) from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_MONITOR_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE group by a.ENTRY_ID";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap12.put(entryId, (Date) d[1]);
+							}
+							impIdList3.clear();
+						}
+						for (Map.Entry<String, Object[]> d : tmpMap1.entrySet()) {
+							String entryId = d.getKey();
+							Object[] v = d.getValue();
+							Date ieDate = (Date) v[0];// 货物运抵时间
+							String iePort = (String) v[1];
+							String ieFlag = (String) v[2];
+							String trafMode = (String) v[3];
+							Date declDate = (Date) v[4];// 申报时间
+							String declPort = (String) v[5];// 申报口岸
+							String consignScc = (String) v[6];
+							String consignCode = (String) v[7];
+							String consignName = (String) v[8];
+							String tradeCountry = (String) v[9];
+							String tradeMode = (String) v[10];
+							BigDecimal grossWt = (BigDecimal) v[11];//毛重
+							BigDecimal netWt = (BigDecimal) v[12];//净重
+							String advanceDecl = (String) v[13];//判断是否是提前申报
+							//两步申报都下发到了h2018所以使用00200000节点判断只属于两步申报其中一种类型,
+							//应当使用edi_remark41位判断是否有值(edi_remark41值为1,2,3均为两步申报)
+							String twoStep = (String) v[14];//判断是否是两步申报
+							//2018存在twoStepValue截取出来值为' '情况,需要单独处理
+							String twoStepDecl = (" ").equals(twoStep) ? "" : twoStep;
+							BigInteger container = (BigInteger) v[15];// 集装箱数量
+							String newTwoStep = (String) v[16];//判断是否是新两步申报
+
+							Date[] all = tmpMap2.get(entryId);
+							Date authDate = null;
+							Date releaseDate = null;
+							Date preReleaseDate = null;
+							Date certRlsDate = null;
+							Date passDate = null;
+							Date orderDate = null;
+							Date orderReceiveDate = null;
+							Date compEleDate = null;
+							Date profVerifyDate = null;
+							Date eleDeclDate = null;
+							Date assessStartDate = null;
+							Date assessEndDate = null;
+							Date refundDate = null;
+							if (all != null) {
+								authDate = all[0];// 10审单受理时间
+								releaseDate = all[1];// 80结关时间
+								preReleaseDate = all[2];// 81担保放行时间
+								certRlsDate = all[3];// 70单证放行时间
+								passDate = all[4];// 82000000通道验放
+								orderDate = all[5];// 30000000现场接单
+								orderReceiveDate = all[6];// 30现场接单时间
+								compEleDate = all[7];// 00200000完整申报电子申报时间
+								profVerifyDate = all[8];// 33专业审证单核时间
+								eleDeclDate = all[9];// 00电子申报时间
+								assessStartDate = all[10];// 26排查处置/现场验估时间
+								assessEndDate = all[11];// 26验估处置完毕时间
+								refundDate = all[12];// 退单时间
+							}
+
+							Date examDate = null;// 转关数据发送时间
+							Date checkDate = null;// 转关数据核销时间(极少数转关单该字段为空)
+							Date[] dt = tmpMap5.get(entryId);
+							if (dt != null) {
+								examDate = dt[0];// 转关数据发送时间
+								checkDate = dt[1];// 转关数据核销时间
+							}
+
+							Date realArriveDate = tmpMap9.get(entryId);
+							Object[] obj = tmpMap10.get(entryId);
+							BigDecimal rmbPrice = zero;
+							BigDecimal usdPrice = zero;
+							String agentCode = null;
+							String agentName = null;
+							String noteS = null;
+							String ownerCode = null;
+							String ownerName = null;
+							String frnConsignCode = null;
+							String frnConsignName = null;
+							if (obj != null) {
+								rmbPrice = (BigDecimal) obj[0];//人民币
+								usdPrice = (BigDecimal) obj[1];//美元
+								agentCode = (String) obj[2];//申报单位代码
+								agentName = (String) obj[3];//申报单位名称
+								noteS = (String) obj[4];//备注
+								ownerCode = (String) obj[5];//生产销售单位代码
+								ownerName = (String) obj[6];//生产销售单位名称
+								frnConsignCode = (String) obj[7];//生产销售单位代码
+								frnConsignName = (String) obj[8];//生产销售单位名称
+							}
+
+							Object[] man = tmpMap11.get(entryId);
+							String checkFlag = null;
+							Date manCreateTime = null;
+							Date manChkTimeStart = null;
+							Date manChkTimeEnd = null;
+							String manProcResult = null;
+							String manProcIdea = null;
+							String checkCustomsCode = null;
+							if (man != null) {
+								checkFlag = (String) man[0];//是否查验送检
+								manCreateTime = (Date) man[1];//指令下达时间
+								manChkTimeStart = (Date) man[2];//查验开始时间
+								manChkTimeEnd = (Date) man[3];//查验结束时间
+								manProcResult = (String) man[4];//处理结果
+								manProcIdea = (String) man[5];//处理意见
+								checkCustomsCode = (String) man[6];//查验关区
+							}
+
+							if ("I".equals(ieFlag)) {
+								if (realArriveDate != null) {
+									ieDate = realArriveDate;
+								} else {
+									if (ieDate != null) {
+										// 由于报关单表中I_E_DATE精度不够,需要做(非精准)修正(用户给的建议应该是错的,模糊处理下好了,时分为0的设置为12点)
+										if ("I".equals(ieFlag)) {// 入境
+											String ieDateStr = fullSdf.format(ieDate);
+											if (ieDateStr.endsWith("00:00:00")) {
+												ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+												try {
+													ieDate = fullSdf.parse(ieDateStr);
+												} catch (ParseException e1) {
+													// TODO Auto-generated catch block
+													e1.printStackTrace();
+												}
+											}
+										}
+									}
+								}
+							} else {
+								realArriveDate = tmpMap12.get(entryId);
+								//ARRIVAL_DATE为00:00:00时赋值12:00:00
+								if (realArriveDate != null) {
+									String ieDateStr = fullSdf.format(realArriveDate);
+									if (ieDateStr.endsWith("00:00:00")) {
+										ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+										try {
+											realArriveDate = fullSdf.parse(ieDateStr);
+										} catch (ParseException e1) {
+											// TODO Auto-generated catch block
+											e1.printStackTrace();
+										}
+									}
+								}
+							}
+
+							EntryHead e = new EntryHead();
+							e.setEntryId(entryId);
+							e.setAcceptDate(authDate != null ? authDate : orderDate);
+							e.setCertRlsDate(certRlsDate);// 70单证放行时间
+							e.setReleaseDate(releaseDate);//80
+							e.setPreReleaseDate(preReleaseDate);// 81时间
+							e.setPassMode("3");// 转关
+							if ("I".equals(ieFlag)) {
+								if (examDate != null) {
+									e.setPassMode("3");// 转关
+								} else {
+									e.setPassMode("1");// 一体化
+								}
+							} else {
+								e.setPassMode("3");// 转关
+							}
+							e.setDeclPort(declPort);
+							e.setIePort(iePort);
+							e.setIeDate(ieDate);
+							e.setDeclDate(declDate);
+							e.setIeFlag(ieFlag);
+							e.setTrafMode(trafMode);
+							e.setConsignScc(consignScc);
+							e.setConsignCode(consignCode);
+							e.setConsignName(consignName);
+							e.setTradeCountry(tradeCountry);
+							e.setTradeMode(tradeMode);
+							e.setOrderReceiveDate(orderReceiveDate);//30接单时间
+							e.setCompEleDate(compEleDate);// 00200000完整申报电子申报时间
+							e.setExamDate(examDate);// 转关数据发送时间
+							e.setCheckDate(checkDate);// 转关数据核销时间
+							e.setProfVerifyFlag(profVerifyDate != null ? "1" : "0");
+							e.setNewTwoStepFlag((null != newTwoStep && !"".equals(newTwoStep) && newTwoStep.equals("1")) ? "1" : "0");
+							e.setEleDeclDate(eleDeclDate);
+							e.setAssessStartDate(assessStartDate);
+							e.setAssessEndDate(assessEndDate);
+							e.setRefundDate(refundDate);
+							e.setRefundFlag(refundDate != null ? "1" : "0");
+							e.setCheckFlag(manCreateTime != null ? "1" : "0");
+							long orderReceiveCost = 0L;//接单耗时:30000000-10000000
+							//20210423新增处理10节点无时间时的赋值,避免程序报错
+							if (orderReceiveDate != null && (authDate != null || orderDate != null)) {
+								Long time = authDate != null ? authDate.getTime() : orderDate.getTime();
+								orderReceiveCost = (orderReceiveDate.getTime() - time) / 1000;
+								e.setOrderReceiveCost(orderReceiveCost);
+							} else {
+								e.setOrderReceiveCost(null);
+							}
+
+							long hgCost = 0L;
+							long totalCost = 0L;
+							//edi_remark11位为T表示提前申报
+							if ("T".equals(advanceDecl)) {
+								e.setDeclAdvanceFlag("1");
+							} else {
+								e.setDeclAdvanceFlag("0");
+							}
+							if ("I".equals(ieFlag)) {// 入境
+								/**根据综合处杨科提出的修改意见,这里将原来'电脑审单时间早于货物运抵时间'改成'申报时间早于货物运抵时间'的为提前申报*/
+							/*if (authDate.before(ieDate)) {
+								authDate = ieDate;
+								e.setDeclAdvanceFlag("1");
+							}*/
+								if (ieDate != null) {
+									if (declDate.before(ieDate)) {
+										authDate = ieDate;
+										//								e.setDeclAdvanceFlag("1");
+									} else {
+										//20210423新增处理10节点无时间时的赋值,避免程序报错
+										if (authDate == null) {
+											authDate = orderDate;
+										}
+									}
+								}
+								if (e.getPreReleaseDate() == null && e.getReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								} else if (e.getPreReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getPreReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								}
+								if (hgCost < 0) {
+									hgCost = 0L;
+								}
+								if (totalCost < 0) {
+									totalCost = hgCost;
+								}
+							} else {// 出境 海关通关时间=70/81之间较早的时间-受理时间
+								// 20191211 出口口岸清关、一体化:公路取BINDING_ROAD_TRANSPORT表GEN_DATE;铁路、邮路运输的整体通关时长=海关通关时长
+								//20210423新增处理10节点无时间时的赋值,避免程序报错
+								if (authDate == null) {
+									authDate = orderDate;
+								}
+								if (realArriveDate != null) {
+									//20211209出口舱单有时间赋值给出口货物运抵时间否则使用10审单时间,同时进行计算
+									e.setExInPortDate(realArriveDate);
+								} else {
+									// 取不到数据的统一将货物入境时间设置为受理时间
+									if ("3".equals(trafMode) || "6".equals(trafMode) || "9".equals(trafMode)) {// 其它运输方式也假设归为一类
+										e.setExInPortDate(authDate);
+									} else if ("4".equals(trafMode)) {//TODO 公路:暂时取不到数据
+										e.setExInPortDate(authDate);
+									} else {
+										e.setExInPortDate(authDate);// TODO 出口水运、空运通关时长第一个时间点数据来源还未下发,先临时赋值
+									}
+								}
+
+								if (e.getCertRlsDate() == null) {
+									if (e.getPreReleaseDate() != null) {
+										if (authDate != null) {
+											hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+
+								} else {
+									if (e.getPreReleaseDate() != null) {
+										if (e.getCertRlsDate().before(e.getPreReleaseDate())) {
+											if (authDate != null) {
+												hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										} else {
+											if (authDate != null) {
+												hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										}
+
+									} else {
+										if (authDate != null) {
+											hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+								}
+							}
+
+							e.setMainStatus("1");
+							e.setCuCost(hgCost);// 海关通关时间(秒)
+							e.setTotalCost(totalCost);// 总体通关时间
+							e.setGrossWt(grossWt);//净重
+							e.setNetWt(netWt);//毛重
+							e.setRmbPrice(rmbPrice);//人民币
+							e.setUsdPrice(usdPrice);//美元
+							e.setContainer(container);//集装箱数量
+							e.setAgentCode(agentCode);//申报单位代码
+							e.setAgentName(agentName);//申报单位名称
+							e.setNoteS(noteS);//备注
+							e.setOwnerCode(ownerCode);//生产销售单位代码
+							e.setOwnerName(ownerName);//生产销售单位名称
+							e.setFrnConsignCode(frnConsignCode);
+							e.setFrnConsignName(frnConsignName);
+							if ("I".equals(ieFlag)) {// 仅入境转关单有以下值
+								long beforeDeclCost = 0L;
+								if (checkDate != null && examDate != null) {
+									beforeDeclCost = (eleDeclDate.getTime() - checkDate.getTime()) / 1000;
+									if (beforeDeclCost < 0) {
+										beforeDeclCost = 0L;
+									}
+								}
+								e.setBeforeDeclCost(beforeDeclCost);// 申报前准备时间
+							} else {// TODO 20191025 出境转关单有 货物进港时间 值
+								long beforeDeclCost = e.getExInPortDate() != null
+										? (authDate.getTime() - e.getExInPortDate().getTime())
+										: 0L;
+								if (beforeDeclCost < 0) {
+									beforeDeclCost = 0L;
+								}
+								e.setBeforeDeclCost(beforeDeclCost);
+							}
+							//报关模式
+							String mode = null;
+							//部分订单既是提前申报又是两步申报,不是两步和提前申报的单子均为一般申报,twoStepDecl:0或者空格:代表一分模式
+							if ("1".equals(e.getDeclAdvanceFlag()) && (null == twoStepDecl || "".equals(twoStepDecl) || "0".equals(twoStepDecl))) {
+								mode = "3";
+							} else if ("1".equals(e.getDeclAdvanceFlag()) && (null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2,3";
+							} else if ((null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2";
+							} else {
+								mode = "1";
+							}
+							e.setDeclMode(mode);//报关模式
+							//70000000、80000000、81000000、82000000均为空则表示未放行
+							if (preReleaseDate == null && certRlsDate == null && releaseDate == null && passDate == null) {
+								e.setDeclStatus("1");
+							} else if (releaseDate != null) {
+								//80表示已结关
+								e.setDeclStatus("3");
+							} else {
+								e.setDeclStatus("2");
+							}
+
+							e.setManCreateTime(manCreateTime);//指令下达时间
+							e.setManChkTimeStart(manChkTimeStart);//查验开始时间
+							e.setManChkTimeEnd(manChkTimeEnd);//查验结束时间
+							e.setManProcResult(manProcResult);
+							e.setManProcIdea(manProcIdea);
+							e.setCheckCustomsCode(checkCustomsCode);
+							dao.executeUpdate("delete from WXJY_ENTRY_HEAD where ENTRY_ID = ?", entryId);
+							entryHeadRepository.save(e);
+						}
+						//ciqCode存在超过600个情况,每个报关单每次查都拼接重复工作太多,所以提出来
+						//先删除这些报关单下的所有商品信息
+						dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						try {
+							StringBuilder codeListSb = new StringBuilder();
+							int x = 1;
+							for (Iterator it = allCode.iterator(); it.hasNext(); ) {
+								String iqCode = (String) it.next();
+
+								codeListSb.append("'").append(iqCode).append("',");
+								if ((x % 600 == 0 || !it.hasNext()) && codeListSb.length() > 0) {
+									codeListSb.deleteCharAt(codeListSb.length() - 1);
+									String iqCodes = codeListSb.toString();
+									//报关单表体,报关单第九位0=出口1=进口
+									sql = "select ENTRY_ID,G_NO,CODE_TS,G_NAME,QTY_1,RMB_PRICE,USD_PRICE,G_MODEL,G_CERT_FLAG," +
+											"(select max(a.CREATE_DATE) from ENTRY_WORKFLOW a where a.STEP_ID='80000000' AND l.ENTRY_ID = a.ENTRY_ID) as RELEASE_DATE," +
+											"UNGID,UNG_FLAG,UNG_MODEL,UNG_CLASSIFY,UNG_G_NAME,PRODUCT_CHAR_CODE,IQ_CODE " +
+											"from ENTRY_LIST l where l.ENTRY_ID in (" + entryIds + ") " +
+											"and ((substr(l.ENTRY_ID,9,1) ='0' and (l.IQ_CODE in (" + iqCodes + ") or l.UNGID is not null " +
+											"or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')) or " +
+											"(substr(l.ENTRY_ID,9,1) = '1' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')));";
+									List<Object[]> codeTsList = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									if (null != codeTsList && codeTsList.size() > 0) {
+										//由于新组合查询不设定某个固定节点更新数据,会存在相同报关单在后面更新流程节点时间,所以先从中间表查出数据进行更新
+										//会存在商品金额为空的情况,如果只有一条商品并商品为空则报关单头要删除
+										EntryList entity = null;
+										for (Object[] codeTs : codeTsList) {//将根据报关单编号查询到的商品编号及报关单号添加到KPI_ENTRY_HEAD_NEW_COPY表里
+											entity = new EntryList();
+											entity.setEntryId(codeTs[0] != null ? codeTs[0].toString() : "");
+											entity.setGNo(codeTs[1] != null ? (BigDecimal) codeTs[1] : new BigDecimal(0));
+											entity.setCodeTs(codeTs[2] != null ? codeTs[2].toString() : "");
+											entity.setGName(codeTs[3] != null ? codeTs[3].toString() : "");
+											entity.setQty1(codeTs[4] != null ? (BigDecimal) codeTs[4] : new BigDecimal(0));
+											entity.setRmbPrice(codeTs[5] != null ? (BigDecimal) codeTs[5] : new BigDecimal(0));
+											entity.setUsdPrice(codeTs[6] != null ? (BigDecimal) codeTs[6] : new BigDecimal(0));
+											entity.setGModel(codeTs[7] != null ? codeTs[7].toString() : "");
+											entity.setGCertFlag(codeTs[8] != null ? codeTs[8].toString() : "");
+											entity.setReleaseDate(codeTs[9] != null ? (Date) codeTs[9] : null);
+											entity.setCodeTsShort(codeTs[2] != null ? codeTs[2].toString().substring(0, 6) : "");
+											entity.setUngid(codeTs[10] != null ? codeTs[10].toString() : "");
+											entity.setUngFlag(codeTs[11] != null ? codeTs[11].toString() : "");
+											entity.setUngModel(codeTs[12] != null ? codeTs[12].toString() : "");
+											entity.setUngClassify(codeTs[13] != null ? codeTs[13].toString() : "");
+											entity.setUngGName(codeTs[14] != null ? codeTs[14].toString() : "");
+											entity.setIqCode(codeTs[16] != null ? codeTs[16].toString() : "");
+											//货物属性,判断货物属性是否是31/散装危险化学品,32/件装危险化学品
+											String goods_attr = "";
+											if (codeTs[15] != null) {
+												goods_attr = (String) codeTs[15];
+												if (goods_attr.contains("31")) {
+													goods_attr = "31";
+												} else if (goods_attr.contains("32")) {
+													goods_attr = "32";
+												} else {
+													goods_attr = "";
+												}
+											}
+											entity.setProductCharCode(goods_attr);
+											//查出的数据可能存在ciqCode或者UNGID为空的情况,报关单第九位0=出口1=进口
+											//出口按ciq编码、ungid不为空和货物属性包含31或32
+											//进口按ungid不为空或货物属性
+											String ieFlag = codeTs[0] != null ? codeTs[0].toString().substring(8, 9) : "";
+											//货物属性为不空时可以初步判定该商品是危化品,接下来只需判断该商品是否还包含危险货物的属性
+											if (entity.getProductCharCode() != null && !"".equals(entity.getProductCharCode())) {
+												if (codeTs[10] != null) {
+													entity.setGoodsType("1,2,3");
+												} else {
+													entity.setGoodsType("1");
+												}
+											} else {
+												//货物属性为空时
+												//出口
+												if (ieFlag.equals("0")) {
+													if (codeTs[16] != null) {
+														//syncChemicalsCiq只可能是包含了危化品,因为这个表的数据就是查询的系统中危险品模块里用户已经维护的包含了危化品的数据
+														Object[] obj = (Object[]) dao.getObjectBySql("select * from iedg_sync_chemicals_ciq where CIQ_CODE = ?", (String) codeTs[16]);
+														if (obj != null) {
+															if (codeTs[16] != null) {
+																entity.setGoodsType("1,2,3");
+															} else {
+																entity.setGoodsType("1");
+															}
+														} else {
+															entity.setGoodsType("2");
+														}
+													} else {
+														entity.setGoodsType("2");
+													}
+												} else {
+													//进口
+													entity.setGoodsType("2");
+												}
+											}
+											entity.setId(dao.getGuidStringBySql());
+											entryListRepository.save(entity);
+										}
+									}
+									codeListSb.delete(0, codeListSb.length());
+								}
+								x++;
+							}
+						} catch (Exception ex) {
+							// 主键可能因为多次结关跨天,导致新纪录主键重复
+							logger.error("保存危险品新维度一体化通关中间记录失败,重新保存");
+							dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						}
+						tmpMap1.clear();
+						tmpMap2.clear();
+						tmpMap5.clear();
+						tmpMap9.clear();
+						tmpMap10.clear();
+						tmpMap12.clear();
+						tmpMap11.clear();
+						sb.delete(0, sb.length());
+					}
+					i++;
+				}
+			}
+		}
+	}
+
+	public void kaqgDeclMain(Date statBegin, Date statEnd, List<String> code, List<String> allCode) {
+		Map<String, Object[]> tmpMap1 = new HashMap<String, Object[]>();
+		Map<String, Date[]> tmpMap2 = new HashMap<String, Date[]>();
+		Map<String, Date> tmpMap9 = new HashMap<String, Date>();
+		Map<String, Object[]> tmpMap10 = new HashMap<String, Object[]>();
+		Map<String, Object[]> tmpMap11 = new HashMap<String, Object[]>();
+		Map<String, Date> tmpMap12 = new HashMap<String, Date>();
+		if (code != null && code.size() > 0) {
+			List<String> entryH2018IdList = new ArrayList<>();//存放所有
+			StringBuilder codeSb = new StringBuilder();
+			int j = 1;
+			for (Iterator itera = code.iterator(); itera.hasNext(); ) {
+				String ciqCode = (String) itera.next();
+
+				codeSb.append("'").append(ciqCode).append("',");
+				if ((j % 600 == 0 || !itera.hasNext()) && codeSb.length() > 0) {
+					codeSb.deleteCharAt(codeSb.length() - 1);
+					String codes = codeSb.toString();
+					//存在后续查出的报关单前面已经有,所以需要处理去重
+					//出口按编码、ungid不为空和货物属性包含31或32
+					//进口按ungid不为空或货物属性包含31或32
+					String sql = "select distinct(d.ENTRY_ID) from ENTRY_HEAD d, ENTRY_WORKFLOW w, ENTRY_LIST l where " +
+							"d.ENTRY_ID like '47%' and (substr(d.EDI_REMARK,7,1)!='C' or substr(d.EDI_REMARK,15,1)!='1') " +
+							"and (substr(d.EDI_REMARK,17,1) not in ('a','c','C','d','e','f') or " +
+							"(substr(d.EDI_REMARK,17,1) = 'C' and substr(d.EDI_REMARK,8,1) != 'G')) and substr(d.I_E_PORT,0,2)=substr(d.DECL_PORT,0,2) " +
+							"and d.ENTRY_ID = w.ENTRY_ID and d.ENTRY_ID = l.ENTRY_ID and w.STEP_ID = '80000000' and w.CREATE_DATE >= ? and w.CREATE_DATE < ? " +
+							"and ((d.I_E_FLAG = 'E' and (l.IQ_CODE in (" + codes + ") or l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%')) or (d.I_E_FLAG = 'I' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%'))) order by d.ENTRY_ID;";
+					List<String> entryIdList = (List<String>) h2018Dao.getQueryBySql(sql, statBegin, statEnd);
+					entryH2018IdList.addAll(entryIdList);
+					codeSb.delete(0, codeSb.length());
+				}
+				j++;
+			}
+			//用JDK1.8 Stream中对List进行去重:list.stream().distinct();
+			entryH2018IdList = (List) entryH2018IdList.stream().distinct().collect(Collectors.toList());
+			if (entryH2018IdList != null && entryH2018IdList.size() > 0) {
+				StringBuilder sb = new StringBuilder();
+				int i = 1;
+				for (Iterator iterator = entryH2018IdList.iterator(); iterator.hasNext(); ) {
+					String id = (String) iterator.next();
+
+					sb.append("'").append(id).append("',");
+
+					if ((i % 300 == 0 || !iterator.hasNext()) && sb.length() > 0) {
+						List<String> impIdList2 = new ArrayList<String>();//20191210 进口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_LIST_NEW查到精确I_E_DATE
+						List<String> impIdList3 = new ArrayList<String>();//20211210 出口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_MONITOR_NEW查到精确ARRIVAL_DATE
+						sb.deleteCharAt(sb.length() - 1);
+						String ids = sb.toString();
+						String entryIds = sb.toString();
+						String sql = "select h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT,CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY,"
+								+ " TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),nvl(count(c.ENTRY_ID),0),substr(EDI_REMARK,53,1) "
+								+ "from ENTRY_HEAD h left join ENTRY_CONTAINER c on h.ENTRY_ID = c.ENTRY_ID where h.ENTRY_ID in ("
+								+ ids + ")  group by h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY," +
+								"TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),substr(EDI_REMARK,53,1);";
+						List<Object[]> list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							String idH = (String) d[0];
+							String iEFlag = (String) d[3];
+							String traMode = (String) d[4];
+							if ("I".equals(iEFlag)) {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList2.add(idH);
+								}
+							} else {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList3.add(idH);
+								}
+							}
+							tmpMap1.put((String) d[0],
+									new Object[]{(Date) d[1], (String) d[2], (String) d[3], (String) d[4], (Date) d[5], (String) d[6], (String) d[7], (String) d[8], (String) d[9], (String) d[10],
+											(String) d[11], (BigDecimal) d[12], (BigDecimal) d[13], (String) d[14], (String) d[15], (BigInteger) d[16], (String) d[17]});
+						}
+
+						sql = "select h.ENTRY_ID,(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='10000000' AND h.ENTRY_ID = a.ENTRY_ID) as authDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='80000000' AND h.ENTRY_ID = a.ENTRY_ID) as releaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='81000000' AND h.ENTRY_ID = b.ENTRY_ID) as preReleaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='70000000' AND h.ENTRY_ID = c.ENTRY_ID) as certRlsDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='82000000' AND h.ENTRY_ID = c.ENTRY_ID) as passDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='30000000' AND h.ENTRY_ID = c.ENTRY_ID) as orderDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='30000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as orderReceiveDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='00200000' AND h.ENTRY_ID = c.ENTRY_ID) as compEleDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='33000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as profVerifyDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='00000000' AND h.ENTRY_ID = b.ENTRY_ID) as eleDeclDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%M%') as assessStartDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%') as assessEndDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID in ('10000000','10200000','20000000') AND h.ENTRY_ID = b.ENTRY_ID and substr(b.status_code,4,1) = 5 and b.proc_result like '%E%') as refundDate "
+								+ "from ENTRY_HEAD h where h.ENTRY_ID in (" + ids
+								+ ") group by ENTRY_ID;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap2.put((String) d[0], new Date[]{(Date) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (Date) d[5], (Date) d[6], (Date) d[7], (Date) d[8], (Date) d[9],
+									(Date) d[10], (Date) d[11], (Date) d[12], (Date) d[13]});
+						}
+
+						sql = "select h.ENTRY_ID,substr(h.CHECK_REQUEST_TOTAL,-1,1),h.CREATE_TIME,h.MAN_CHK_TIME_START,h.MAN_CHK_TIME_END,MAN_PROC_RESULT,MAN_PROC_IDEA,CHECK_CUSTOMS_CODE "
+								+ "from CI_CHECK_MAN_WORK_HEAD h where h.CHECK_STATE = 'M' and h.MODIFY_TIME = "
+								+ "(select max(d.MODIFY_TIME) from CI_CHECK_MAN_WORK_HEAD d where d.ID = h.ID) and h.ENTRY_ID in(" + ids + ") ;";
+						list = (List<Object[]>) inspDao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap11.put((String) d[0], new Object[]{(String) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (String) d[5], (String) d[6], (String) d[7]});
+						}
+
+						//货运量毛重、净重、货运值人民币、美元、集装箱数量GROUP_CONCAT方法放在此处当传一个报关单id并且没有随附单证时会报错,所以加上nvl()
+						sql = "select h.ENTRY_ID,sum(nvl(l.RMB_PRICE,0)),sum(nvl(l.USD_PRICE,0)),h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,"
+								+ "h.OWNER_CODE,h.OWNER_NAME,FRN_CONSIGN_CODE,FRN_CONSIGN_NAME from ENTRY_HEAD h left join ENTRY_LIST l on h.ENTRY_ID=l.ENTRY_ID "
+								+ "where h.ENTRY_ID in("
+								+ ids + ") group by h.ENTRY_ID,h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,h.OWNER_CODE,h.OWNER_NAME,FRN_CONSIGN_CODE,FRN_CONSIGN_NAME;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap10.put((String) d[0], new Object[]{(BigDecimal) d[1], (BigDecimal) d[2], (String) d[3], (String) d[4], (String) d[5], (String) d[6], (String) d[7],
+									(String) d[8], (String) d[9]});
+						}
+						if (impIdList2.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList2) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 进口新舱单水运、空运的I_E_DATE精准值由MANIFEST_LIST_NEW的REAL_ARRIVE_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号
+							sql = "select a.ENTRY_ID, b.REAL_ARRIVE_DATE from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_LIST_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE and to_char(a.I_E_DATE,'yyyyMMdd') = to_char(b.REAL_ARRIVE_DATE,'yyyyMMdd')";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap9.put(entryId, (Date) d[1]);
+							}
+							impIdList2.clear();
+						}
+						//出口舱单
+						if (impIdList3.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList3) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 出口新舱单水运、空运可能提前但航班晚到,无法用时间去精准定位哪一条会卸载很多次,精准值由MANIFEST_MONITOR_NEW的ARRIVAL_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号,ARRIVAL_DATE为00:00:00的赋值12:00:00
+							//20210508舱单只获取和武汉海关有关的数据进行时间赋值,所以a.I_E_PORT = b.CUSTOMS_CODE
+							sql = "select a.ENTRY_ID, min(b.ARRIVAL_DATE) from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_MONITOR_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE group by a.ENTRY_ID";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap12.put(entryId, (Date) d[1]);
+							}
+							impIdList3.clear();
+						}
+						for (Map.Entry<String, Object[]> d : tmpMap1.entrySet()) {
+							String entryId = d.getKey();
+							Object[] v = d.getValue();
+							Date ieDate = (Date) v[0];// 货物运抵时间
+							String iePort = (String) v[1];
+							String ieFlag = (String) v[2];
+							String trafMode = (String) v[3];
+							Date declDate = (Date) v[4];// 申报时间
+							String declPort = (String) v[5];// 申报口岸
+							String consignScc = (String) v[6];
+							String consignCode = (String) v[7];
+							String consignName = (String) v[8];
+							String tradeCountry = (String) v[9];
+							String tradeMode = (String) v[10];
+							BigDecimal grossWt = (BigDecimal) v[11];//毛重
+							BigDecimal netWt = (BigDecimal) v[12];//净重
+							String advanceDecl = (String) v[13];//判断是否是提前申报
+							//两步申报都下发到了h2018所以使用00200000节点判断只属于两步申报其中一种类型,
+							//应当使用edi_remark41位判断是否有值(edi_remark41值为1,2,3均为两步申报)
+							String twoStep = (String) v[14];//判断是否是两步申报
+							//2018存在twoStepValue截取出来值为' '情况,需要单独处理
+							String twoStepDecl = (" ").equals(twoStep) ? "" : twoStep;
+							BigInteger container = (BigInteger) v[15];// 集装箱数量
+							String newTwoStep = (String) v[16];//判断是否是新两步申报
+
+							Date[] all = tmpMap2.get(entryId);
+							Date authDate = null;
+							Date releaseDate = null;
+							Date preReleaseDate = null;
+							Date certRlsDate = null;
+							Date passDate = null;
+							Date orderDate = null;
+							Date orderReceiveDate = null;
+							Date compEleDate = null;
+							Date profVerifyDate = null;
+							Date eleDeclDate = null;
+							Date assessStartDate = null;
+							Date assessEndDate = null;
+							Date refundDate = null;
+							if (all != null) {
+								authDate = all[0];// 10审单受理时间
+								releaseDate = all[1];// 80结关时间
+								preReleaseDate = all[2];// 81担保放行时间
+								certRlsDate = all[3];// 70单证放行时间
+								passDate = all[4];// 82000000通道验放
+								orderDate = all[5];// 30000000现场接单
+								orderReceiveDate = all[6];// 30现场接单时间
+								compEleDate = all[7];// 00200000完整申报电子申报时间
+								profVerifyDate = all[8];// 33专业审证单核时间
+								eleDeclDate = all[9];// 00电子申报时间
+								assessStartDate = all[10];// 26排查处置/现场验估时间
+								assessEndDate = all[11];// 26验估处置完毕时间
+								refundDate = all[12];// 退单时间
+							}
+
+							Date realArriveDate = tmpMap9.get(entryId);
+							Object[] obj = tmpMap10.get(entryId);
+							BigDecimal rmbPrice = zero;
+							BigDecimal usdPrice = zero;
+							String agentCode = null;
+							String agentName = null;
+							String noteS = null;
+							String ownerCode = null;
+							String ownerName = null;
+							String frnConsignCode = null;
+							String frnConsignName = null;
+							if (obj != null) {
+								rmbPrice = (BigDecimal) obj[0];//人民币
+								usdPrice = (BigDecimal) obj[1];//美元
+								agentCode = (String) obj[2];//申报单位代码
+								agentName = (String) obj[3];//申报单位名称
+								noteS = (String) obj[4];//备注
+								ownerCode = (String) obj[7];//生产销售单位代码
+								ownerName = (String) obj[8];//生产销售单位名称
+								frnConsignCode = (String) obj[7];//生产销售单位代码
+								frnConsignName = (String) obj[8];//生产销售单位名称
+							}
+
+							Object[] man = tmpMap11.get(entryId);
+							String checkFlag = null;
+							Date manCreateTime = null;
+							Date manChkTimeStart = null;
+							Date manChkTimeEnd = null;
+							String manProcResult = null;
+							String manProcIdea = null;
+							String checkCustomsCode = null;
+							if (man != null) {
+								checkFlag = (String) man[0];//是否查验送检
+								manCreateTime = (Date) man[1];//指令下达时间
+								manChkTimeStart = (Date) man[2];//查验开始时间
+								manChkTimeEnd = (Date) man[3];//查验结束时间
+								manProcResult = (String) man[4];//处理结果
+								manProcIdea = (String) man[5];//处理意见
+								checkCustomsCode = (String) man[6];//查验关区
+							}
+
+							if ("I".equals(ieFlag)) {
+								if (realArriveDate != null) {
+									ieDate = realArriveDate;
+								} else {
+									if (ieDate != null) {
+										// 由于报关单表中I_E_DATE精度不够,需要做(非精准)修正(用户给的建议应该是错的,模糊处理下好了,时分为0的设置为12点)
+										if ("I".equals(ieFlag)) {// 入境
+											String ieDateStr = fullSdf.format(ieDate);
+											if (ieDateStr.endsWith("00:00:00")) {
+												ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+												try {
+													ieDate = fullSdf.parse(ieDateStr);
+												} catch (ParseException e1) {
+													// TODO Auto-generated catch block
+													e1.printStackTrace();
+												}
+											}
+										}
+									}
+								}
+							} else {
+								realArriveDate = tmpMap12.get(entryId);
+								//ARRIVAL_DATE为00:00:00时赋值12:00:00
+								if (realArriveDate != null) {
+									String ieDateStr = fullSdf.format(realArriveDate);
+									if (ieDateStr.endsWith("00:00:00")) {
+										ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+										try {
+											realArriveDate = fullSdf.parse(ieDateStr);
+										} catch (ParseException e1) {
+											// TODO Auto-generated catch block
+											e1.printStackTrace();
+										}
+									}
+								}
+							}
+
+							EntryHead e = new EntryHead();
+							e.setEntryId(entryId);
+							e.setAcceptDate(authDate != null ? authDate : orderDate);
+							e.setCertRlsDate(certRlsDate);// 70单证放行时间
+							e.setReleaseDate(releaseDate);//80
+							e.setPreReleaseDate(preReleaseDate);// 81时间
+							e.setPassMode("2");// 一体化通关
+							e.setDeclPort(declPort);
+							e.setIePort(iePort);
+							e.setIeDate(ieDate);
+							e.setDeclDate(declDate);
+							e.setIeFlag(ieFlag);
+							e.setTrafMode(trafMode);
+
+							e.setConsignScc(consignScc);
+							e.setConsignCode(consignCode);
+							e.setConsignName(consignName);
+							e.setTradeCountry(tradeCountry);
+							e.setTradeMode(tradeMode);
+							e.setOrderReceiveDate(orderReceiveDate);//30接单时间
+							e.setCompEleDate(compEleDate);// 00200000完整申报电子申报时间
+							e.setProfVerifyFlag(profVerifyDate != null ? "1" : "0");
+							e.setNewTwoStepFlag((null != newTwoStep && !"".equals(newTwoStep) && newTwoStep.equals("1")) ? "1" : "0");
+							e.setEleDeclDate(eleDeclDate);
+							e.setAssessStartDate(assessStartDate);
+							e.setAssessEndDate(assessEndDate);
+							e.setRefundDate(refundDate);
+							e.setRefundFlag(refundDate != null ? "1" : "0");
+							e.setCheckFlag(manCreateTime != null ? "1" : "0");
+							long orderReceiveCost = 0L;//接单耗时:30000000-10000000
+							//20210423新增处理10节点无时间时的赋值,避免程序报错
+							if (orderReceiveDate != null && (authDate != null || orderDate != null)) {
+								Long time = authDate != null ? authDate.getTime() : orderDate.getTime();
+								orderReceiveCost = (orderReceiveDate.getTime() - time) / 1000;
+								e.setOrderReceiveCost(orderReceiveCost);
+							} else {
+								e.setOrderReceiveCost(null);
+							}
+
+							long hgCost = 0L;
+							long totalCost = 0L;
+							//edi_remark11位为T表示提前申报
+							if ("T".equals(advanceDecl)) {
+								e.setDeclAdvanceFlag("1");
+							} else {
+								e.setDeclAdvanceFlag("0");
+							}
+							if ("I".equals(ieFlag)) {// 入境
+								/**根据综合处杨科提出的修改意见,这里将原来'电脑审单时间早于货物运抵时间'改成'申报时间早于货物运抵时间'的为提前申报*/
+								if (ieDate != null) {
+									if (declDate.before(ieDate)) {
+										authDate = ieDate;
+										//								e.setDeclAdvanceFlag("1");
+									} else {
+										//20210423新增处理10节点无时间时的赋值,避免程序报错
+										if (authDate == null) {
+											authDate = orderDate;
+										}
+									}
+								}
+								if (e.getPreReleaseDate() == null && e.getReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								} else if (e.getPreReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getPreReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								}
+								if (hgCost < 0) {
+									hgCost = 0L;
+								}
+								if (totalCost < 0) {
+									totalCost = hgCost;
+								}
+								//新组合查询用00-货物运抵,组合查询用10-货物运抵
+								e.setBeforeDeclCost((eleDeclDate.getTime() - e.getIeDate().getTime()) / 1000);// 申报前准备时间
+								if (e.getBeforeDeclCost() < 0) {
+									e.setBeforeDeclCost(0L);
+								}
+							} else {// 出境 海关通关时间=70/81之间较早的时间-受理时间
+								// 20191211 出口口岸清关、一体化:公路取BINDING_ROAD_TRANSPORT表GEN_DATE;铁路、邮路运输的整体通关时长=海关通关时长
+								//20210423新增处理10节点无时间时的赋值,避免程序报错
+								if (authDate == null) {
+									authDate = orderDate;
+								}
+								if (realArriveDate != null) {
+									//20211209出口舱单有时间赋值给出口货物运抵时间否则使用10审单时间,同时进行计算
+									e.setExInPortDate(realArriveDate);
+								} else {
+									// 取不到数据的统一将货物入境时间设置为受理时间
+									if ("3".equals(trafMode) || "6".equals(trafMode) || "9".equals(trafMode)) {// 其它运输方式也假设归为一类
+										e.setExInPortDate(authDate);
+									} else if ("4".equals(trafMode)) {//TODO 公路:暂时取不到数据
+										e.setExInPortDate(authDate);
+									} else {
+										e.setExInPortDate(authDate);// TODO 出口水运、空运通关时长第一个时间点数据来源还未下发,先临时赋值
+									}
+								}
+
+								if (e.getCertRlsDate() == null) {
+									if (e.getPreReleaseDate() != null) {
+										if (authDate != null) {
+											hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+
+								} else {
+									if (e.getPreReleaseDate() != null) {
+										if (e.getCertRlsDate().before(e.getPreReleaseDate())) {
+											if (authDate != null) {
+												hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										} else {
+											if (authDate != null) {
+												hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										}
+
+									} else {
+										if (authDate != null) {
+											hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+								}
+								e.setBeforeDeclCost(e.getExInPortDate() != null
+										? ((eleDeclDate.getTime() - e.getExInPortDate().getTime()) / 1000)
+										: 0L);// 申报前准备时间
+								if (e.getBeforeDeclCost() < 0) {
+									e.setBeforeDeclCost(0L);
+								}
+							}
+
+							e.setMainStatus("1");
+							e.setCuCost(hgCost);// 海关通关时间(秒)
+							e.setTotalCost(totalCost);// 总体通关时间
+							e.setGrossWt(grossWt);//净重
+							e.setNetWt(netWt);//毛重
+							e.setRmbPrice(rmbPrice);//人民币
+							e.setUsdPrice(usdPrice);//美元
+							e.setContainer(container);//集装箱数量
+							e.setAgentCode(agentCode);//申报单位代码
+							e.setAgentName(agentName);//申报单位名称
+							e.setNoteS(noteS);//备注
+							e.setOwnerCode(ownerCode);//生产销售单位代码
+							e.setOwnerName(ownerName);//生产销售单位名称
+							e.setFrnConsignCode(frnConsignCode);
+							e.setFrnConsignName(frnConsignName);
+							//报关模式
+							String mode = null;
+							//部分订单既是提前申报又是两步申报,不是两步和提前申报的单子均为一般申报,twoStepDecl:0或者空格:代表一分模式
+							if ("1".equals(e.getDeclAdvanceFlag()) && (null == twoStepDecl || "".equals(twoStepDecl) || "0".equals(twoStepDecl))) {
+								mode = "3";
+							} else if ("1".equals(e.getDeclAdvanceFlag()) && (null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2,3";
+							} else if ((null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2";
+							} else {
+								mode = "1";
+							}
+							e.setDeclMode(mode);//报关模式
+							//70000000、80000000、81000000、82000000均为空则表示未放行
+							if (preReleaseDate == null && certRlsDate == null && releaseDate == null && passDate == null) {
+								e.setDeclStatus("1");
+							} else if (releaseDate != null) {
+								//80表示已结关
+								e.setDeclStatus("3");
+							} else {
+								e.setDeclStatus("2");
+							}
+
+							e.setManCreateTime(manCreateTime);//指令下达时间
+							e.setManChkTimeStart(manChkTimeStart);//查验开始时间
+							e.setManChkTimeEnd(manChkTimeEnd);//查验结束时间
+							e.setManProcResult(manProcResult);
+							e.setManProcIdea(manProcIdea);
+							e.setCheckCustomsCode(checkCustomsCode);
+							dao.executeUpdate("delete from WXJY_ENTRY_HEAD where ENTRY_ID = ?", entryId);
+							entryHeadRepository.save(e);
+
+						}
+						//ciqCode存在超过600个情况,每个报关单每次查都拼接重复工作太多,所以提出来
+						//先删除这些报关单下的所有商品信息
+						dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						try {
+							StringBuilder codeListSb = new StringBuilder();
+							int x = 1;
+							for (Iterator it = allCode.iterator(); it.hasNext(); ) {
+								String iqCode = (String) it.next();
+
+								codeListSb.append("'").append(iqCode).append("',");
+								if ((x % 600 == 0 || !it.hasNext()) && codeListSb.length() > 0) {
+									codeListSb.deleteCharAt(codeListSb.length() - 1);
+									String iqCodes = codeListSb.toString();
+									//报关单表体,报关单第九位0=出口1=进口
+									sql = "select ENTRY_ID,G_NO,CODE_TS,G_NAME,QTY_1,RMB_PRICE,USD_PRICE,G_MODEL,G_CERT_FLAG," +
+											"(select max(a.CREATE_DATE) from ENTRY_WORKFLOW a where a.STEP_ID='80000000' AND l.ENTRY_ID = a.ENTRY_ID) as RELEASE_DATE," +
+											"UNGID,UNG_FLAG,UNG_MODEL,UNG_CLASSIFY,UNG_G_NAME,PRODUCT_CHAR_CODE,IQ_CODE " +
+											"from ENTRY_LIST l where l.ENTRY_ID in (" + entryIds + ") " +
+											"and ((substr(l.ENTRY_ID,9,1) ='0' and (l.IQ_CODE in (" + iqCodes + ") or l.UNGID is not null " +
+											"or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')) or " +
+											"(substr(l.ENTRY_ID,9,1) = '1' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')));";
+									List<Object[]> codeTsList = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									if (null != codeTsList && codeTsList.size() > 0) {
+										//由于新组合查询不设定某个固定节点更新数据,会存在相同报关单在后面更新流程节点时间,所以先从中间表查出数据进行更新
+										//会存在商品金额为空的情况,如果只有一条商品并商品为空则报关单头要删除
+										EntryList entity = null;
+										for (Object[] codeTs : codeTsList) {//将根据报关单编号查询到的商品编号及报关单号添加到KPI_ENTRY_HEAD_NEW_COPY表里
+											entity = new EntryList();
+											entity.setEntryId(codeTs[0] != null ? codeTs[0].toString() : "");
+											entity.setGNo(codeTs[1] != null ? (BigDecimal) codeTs[1] : new BigDecimal(0));
+											entity.setCodeTs(codeTs[2] != null ? codeTs[2].toString() : "");
+											entity.setGName(codeTs[3] != null ? codeTs[3].toString() : "");
+											entity.setQty1(codeTs[4] != null ? (BigDecimal) codeTs[4] : new BigDecimal(0));
+											entity.setRmbPrice(codeTs[5] != null ? (BigDecimal) codeTs[5] : new BigDecimal(0));
+											entity.setUsdPrice(codeTs[6] != null ? (BigDecimal) codeTs[6] : new BigDecimal(0));
+											entity.setGModel(codeTs[7] != null ? codeTs[7].toString() : "");
+											entity.setGCertFlag(codeTs[8] != null ? codeTs[8].toString() : "");
+											entity.setReleaseDate(codeTs[9] != null ? (Date) codeTs[9] : null);
+											entity.setCodeTsShort(codeTs[2] != null ? codeTs[2].toString().substring(0, 6) : "");
+											entity.setUngid(codeTs[10] != null ? codeTs[10].toString() : "");
+											entity.setUngFlag(codeTs[11] != null ? codeTs[11].toString() : "");
+											entity.setUngModel(codeTs[12] != null ? codeTs[12].toString() : "");
+											entity.setUngClassify(codeTs[13] != null ? codeTs[13].toString() : "");
+											entity.setUngGName(codeTs[14] != null ? codeTs[14].toString() : "");
+											entity.setIqCode(codeTs[16] != null ? codeTs[16].toString() : "");
+											//货物属性,判断货物属性是否是31/散装危险化学品,32/件装危险化学品
+											String goods_attr = "";
+											if (codeTs[15] != null) {
+												goods_attr = (String) codeTs[15];
+												if (goods_attr.contains("31")) {
+													goods_attr = "31";
+												} else if (goods_attr.contains("32")) {
+													goods_attr = "32";
+												} else {
+													goods_attr = "";
+												}
+											}
+											entity.setProductCharCode(goods_attr);
+											//查出的数据可能存在ciqCode或者UNGID为空的情况,报关单第九位0=出口1=进口
+											//出口按ciq编码、ungid不为空和货物属性包含31或32
+											//进口按ungid不为空或货物属性
+											String ieFlag = codeTs[0] != null ? codeTs[0].toString().substring(8, 9) : "";
+											//货物属性为不空时可以初步判定该商品是危化品,接下来只需判断该商品是否还包含危险货物的属性
+											if (entity.getProductCharCode() != null && !"".equals(entity.getProductCharCode())) {
+												if (codeTs[10] != null) {
+													entity.setGoodsType("1,2,3");
+												} else {
+													entity.setGoodsType("1");
+												}
+											} else {
+												//货物属性为空时
+												//出口
+												if (ieFlag.equals("0")) {
+													if (codeTs[16] != null) {
+														//syncChemicalsCiq只可能是包含了危化品,因为这个表的数据就是查询的系统中危险品模块里用户已经维护的包含了危化品的数据
+														Object[] obj = (Object[]) dao.getObjectBySql("select * from iedg_sync_chemicals_ciq where CIQ_CODE = ?", (String) codeTs[16]);
+														if (obj != null) {
+															if (codeTs[16] != null) {
+																entity.setGoodsType("1,2,3");
+															} else {
+																entity.setGoodsType("1");
+															}
+														} else {
+															entity.setGoodsType("2");
+														}
+													} else {
+														entity.setGoodsType("2");
+													}
+												} else {
+													//进口
+													entity.setGoodsType("2");
+												}
+											}
+											entity.setId(dao.getGuidStringBySql());
+											entryListRepository.save(entity);
+										}
+									}
+									codeListSb.delete(0, codeListSb.length());
+								}
+								x++;
+							}
+						} catch (Exception ex) {
+							// 主键可能因为多次结关跨天,导致新纪录主键重复
+							logger.error("保存危险品新维度一体化通关中间记录失败,重新保存");
+							dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						}
+						tmpMap1.clear();
+						tmpMap2.clear();
+						tmpMap9.clear();
+						tmpMap10.clear();
+						tmpMap12.clear();
+						tmpMap11.clear();
+						sb.delete(0, sb.length());
+					}
+					i++;
+				}
+			}
+		}
+	}
+
+	public void monthlyDataMaintance(String dataPeriod, Date statBegin, Date statEnd) {
+		try {
+			// 查询当月转关单两个时间不为空的入境转关单信息
+			List<Object[]> entryList = (List<Object[]>) dao.getQueryBySql("select DECL_PORT,i_e_flag,CHECK_FLAG,ORDER_RECEIVE_DATE,TOTAL_COST,CU_COST from WXJY_ENTRY_HEAD where RELEASE_DATE >= ? and RELEASE_DATE < ?",
+					statBegin, statEnd);
+			// 维护CustomMonthlyStat 表1
+			mainCustomMonthlyStat(dataPeriod, statBegin, statEnd, entryList);
+		} catch (Exception e) {
+			logger.error(dataPeriod + " 月通关时长月度统计中间数据维护错误:", e);
+		}
+	}
+
+	private void mainCustomMonthlyStat(String dataPeriod, Date statBegin, Date statEnd,
+									   List<Object[]> entryList) {
+		Object[] mainRcd = (Object[]) dao.getObjectBySql(
+				"select * from WXJY_MID_D_M_STATUS where DATA_TYPE = ? and STAT_PERIOD = ?", CustomMonthlyStat.class.getSimpleName(), dataPeriod);
+		if (mainRcd == null) {
+			dao.executeUpdate("delete from WXJY_CUSTOM_M_STAT where month = ?", dataPeriod);// 以往维护过程中可能出错生成了部分数据
+			dao.executeUpdate("delete from WXJY_CUSTOM_M_STAT_F where month = ?", dataPeriod);
+
+			Set<String> customCodeSet = new HashSet<String>();
+
+			Map<String, Integer> impDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impManDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impAuditDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Long> impTotalCostMap = new HashMap<String, Long>();
+			Map<String, Long> impHgCostMap = new HashMap<String, Long>();
+			Map<String, Integer> expDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expManDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expAuditDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Long> expTotalCostMap = new HashMap<String, Long>();
+			Map<String, Long> expHgCostMap = new HashMap<String, Long>();
+
+			for (Object[] e : entryList) {
+				String customCode = (String) e[0];
+				customCodeSet.add(customCode);
+				String ieFlag = (String) e[1];
+				String checkFlag = (String) e[2];
+				Date orderReceiveDate = (Date) e[3];
+				Long totalCost = ((BigDecimal) e[4]).longValue();
+				Long hgCost = ((BigDecimal) e[5]).longValue();
+
+				if ("I".equals(ieFlag)) {// 入境
+					Integer impCount = impDeclCountMap.get(customCode);
+					if (impCount == null) {
+						impCount = 1;
+					} else {
+						impCount++;
+					}
+					impDeclCountMap.put(customCode, impCount);
+
+					Integer impManCount = impManDeclCountMap.get(customCode);
+					if (impManCount == null && checkFlag.equals("0")) {
+						impManCount = 1;
+					} else {
+						if (checkFlag.equals("0")) {
+							impManCount++;
+						}
+					}
+					impManDeclCountMap.put(customCode, impManCount);
+
+					Integer impAuditCount = impAuditDeclCountMap.get(customCode);
+					if (impAuditCount == null && orderReceiveDate != null) {
+						impAuditCount = 1;
+					} else {
+						if (orderReceiveDate != null) {
+							impAuditCount++;
+						}
+					}
+					impAuditDeclCountMap.put(customCode, impAuditCount);
+
+					Long sumTotalCost = impTotalCostMap.get(customCode);
+					if (sumTotalCost == null) {
+						sumTotalCost = totalCost;
+					} else {
+						sumTotalCost += totalCost;
+					}
+					impTotalCostMap.put(customCode, sumTotalCost);
+
+					Long sumHgCost = impHgCostMap.get(customCode);
+					if (sumHgCost == null) {
+						sumHgCost = hgCost;
+					} else {
+						sumHgCost += hgCost;
+					}
+					impHgCostMap.put(customCode, sumHgCost);
+
+				} else {// 出境
+					Integer expCount = expDeclCountMap.get(customCode);
+					if (expCount == null) {
+						expCount = 1;
+					} else {
+						expCount++;
+					}
+					expDeclCountMap.put(customCode, expCount);
+
+					Integer expManCount = expManDeclCountMap.get(customCode);
+					if (expManCount == null && checkFlag.equals("0")) {
+						expManCount = 1;
+					} else {
+						if (checkFlag.equals("0")) {
+							expManCount++;
+						}
+					}
+					expManDeclCountMap.put(customCode, expManCount);
+
+					Integer expAuditCount = expAuditDeclCountMap.get(customCode);
+					if (expAuditCount == null && orderReceiveDate != null) {
+						expAuditCount = 1;
+					} else {
+						if (orderReceiveDate != null) {
+							expAuditCount++;
+						}
+					}
+					expAuditDeclCountMap.put(customCode, expAuditCount);
+
+					Long sumTotalCost = expTotalCostMap.get(customCode);
+					if (sumTotalCost == null) {
+						sumTotalCost = totalCost;
+					} else {
+						sumTotalCost += totalCost;
+					}
+					expTotalCostMap.put(customCode, sumTotalCost);
+
+					Long sumHgCost = expHgCostMap.get(customCode);
+					if (sumHgCost == null) {
+						sumHgCost = hgCost;
+					} else {
+						sumHgCost += hgCost;
+					}
+					expHgCostMap.put(customCode, sumHgCost);
+				}
+
+			}
+
+			BigDecimal impTotalCost = new BigDecimal(0);
+			BigDecimal impHgCost = new BigDecimal(0);
+			BigDecimal expTotalCost = new BigDecimal(0);
+			BigDecimal expHgCost = new BigDecimal(0);
+
+			// 当年各平均值为每个月单量x每个月对应时间累加后,除以总单量
+			Map<String, BigDecimal> impCurYearTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impCurYearHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impLastMonthTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impLastMonthHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impLastYearDecemberTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impLastYearDecemberHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impYearBeforeLastTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impYearBeforeLastHgCostMap = new HashMap<String, BigDecimal>();
+
+			Map<String, BigDecimal> expCurYearTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expCurYearHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expLastMonthTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expLastMonthHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expLastYearDecemberTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expLastYearDecemberHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expYearBeforeLastTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expYearBeforeLastHgCostMap = new HashMap<String, BigDecimal>();
+
+			Map<String, Integer> impCurYearDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impLastMonthDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impLastYearDecemberDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impYearBeforeLastDeclCountMap = new HashMap<String, Integer>();
+
+			Map<String, Integer> expCurYearDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expLastMonthDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expLastYearDecemberDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expYearBeforeLastDeclCountMap = new HashMap<String, Integer>();
+
+			if (dataPeriod.compareTo(noRelStatMonth) > 0) {
+				if (!dataPeriod.endsWith("01")) {
+					int sumImpDeclCount = 0;
+					int sumExpDeclCount = 0;
+					BigDecimal sumImpCurYearTotalCost = new BigDecimal(0);
+					BigDecimal sumImpCurYearHgCost = new BigDecimal(0);
+					BigDecimal sumExpCurYearTotalCost = new BigDecimal(0);
+					BigDecimal sumExpCurYearHgCost = new BigDecimal(0);
+
+					String indexCustCode = null;
+					String year = dataPeriod.substring(0, 4);
+					List<Object[]> curYearlist = (List<Object[]>) dao.getQueryBySql(
+							"select MONTH,CUSTOM_CODE,IMP_DECL_COUNT,IMP_MAN_DECL_COUNT,IMP_MANUAL_AUDIT_DECL_COUNT,IMP_DECL_COUNT_LM,IMP_DECL_COUNT_LY_DEC," +
+									"IMP_DECL_COUNT_CURYEAR,IMP_DECL_COUNT_YBL,IMP_TOTAL_COST,IMP_TOTAL_COST_LM,IMP_TOTAL_COST_LY_DEC,IMP_TOTAL_COST_CY,IMP_TOTAL_COST_YBL," +
+									"IMP_CU_COST,IMP_CU_COST_LM,IMP_CU_COST_LY_DEC,IMP_CU_COST_CY,IMP_CU_COST_YBL,EXP_DECL_COUNT,EXP_MAN_DECL_COUNT,EXP_MANUAL_AUDIT_DECL_COUNT," +
+									"EXP_DECL_COUNT_LM,EXP_DECL_COUNT_LY_DEC,EXP_DECL_COUNT_CURYEAR,EXP_DECL_COUNT_YBL,EXP_TOTAL_COST,EXP_TOTAL_COST_LM,EXP_TOTAL_COST_LY_DEC," +
+									"EXP_TOTAL_COST_CY,EXP_TOTAL_COST_YBL,EXP_CU_COST,EXP_CU_COST_LM,EXP_CU_COST_LY_DEC,EXP_CU_COST_CY,EXP_CU_COST_YBL " +
+									"from WXJY_CUSTOM_M_STAT where month >= ? and month < ? order by CUSTOM_CODE", year + "01", dataPeriod);
+					for (int i = 0; i < curYearlist.size(); i++) {
+						Object[] s = curYearlist.get(i);
+						String custCode = (String) s[0];
+						int impCount = s[2] != null ? ((BigDecimal) s[2]).intValue() : 0;
+						int expCount = s[19] != null ? ((BigDecimal) s[19]).intValue() : 0;
+
+						BigDecimal impMultily = new BigDecimal(impCount);
+						BigDecimal expMultily = new BigDecimal(expCount);
+						BigDecimal impTotalCostT = (BigDecimal) s[10];
+						BigDecimal impCuCostT = (BigDecimal) s[15];
+						BigDecimal expTotalCostT = (BigDecimal) s[27];
+						BigDecimal expCuCostT = (BigDecimal) s[32];
+						if (indexCustCode == null || indexCustCode.equals(custCode)) {// 同一关区,累计数据
+							indexCustCode = custCode;
+							sumImpDeclCount += impCount;
+							sumExpDeclCount += expCount;
+							sumImpCurYearTotalCost = sumImpCurYearTotalCost.add(impTotalCostT.multiply(impMultily));
+							sumImpCurYearHgCost = sumImpCurYearHgCost.add(impCuCostT.multiply(impMultily));
+							sumExpCurYearTotalCost = sumExpCurYearTotalCost.add(expTotalCostT.multiply(expMultily));
+							sumExpCurYearHgCost = sumExpCurYearHgCost.add(expCuCostT.multiply(expMultily));
+						} else {// 切换关区
+							if (sumImpDeclCount != 0) {
+								BigDecimal impDivide = new BigDecimal(sumImpDeclCount);
+								impCurYearTotalCostMap.put(indexCustCode,
+										sumImpCurYearTotalCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+								impCurYearHgCostMap.put(indexCustCode, sumImpCurYearHgCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+							} else {
+								impCurYearTotalCostMap.put(indexCustCode, zero);
+								impCurYearHgCostMap.put(indexCustCode, zero);
+							}
+							if (sumExpDeclCount != 0) {
+								BigDecimal expDivide = new BigDecimal(sumExpDeclCount);
+								expCurYearTotalCostMap.put(indexCustCode,
+										sumExpCurYearTotalCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+								expCurYearHgCostMap.put(indexCustCode, sumExpCurYearHgCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+							} else {
+								expCurYearTotalCostMap.put(indexCustCode, zero);
+								expCurYearHgCostMap.put(indexCustCode, zero);
+							}
+							impCurYearDeclCountMap.put(indexCustCode, sumImpDeclCount);
+							expCurYearDeclCountMap.put(indexCustCode, sumExpDeclCount);
+
+							sumImpDeclCount = impCount;
+							sumExpDeclCount = expCount;
+							sumImpCurYearTotalCost = new BigDecimal(0);
+							sumImpCurYearHgCost = new BigDecimal(0);
+							sumExpCurYearTotalCost = new BigDecimal(0);
+							sumExpCurYearHgCost = new BigDecimal(0);
+							indexCustCode = custCode;
+							sumImpCurYearTotalCost = sumImpCurYearTotalCost.add(impTotalCostT.multiply(impMultily));
+							sumImpCurYearHgCost = sumImpCurYearHgCost.add(impCuCostT.multiply(impMultily));
+							sumExpCurYearTotalCost = sumExpCurYearTotalCost.add(expTotalCostT.multiply(expMultily));
+							sumExpCurYearHgCost = sumExpCurYearHgCost.add(expCuCostT.multiply(expMultily));
+						}
+						if (i == curYearlist.size() - 1) {// 最后一条记录
+							BigDecimal impDivide = new BigDecimal(sumImpDeclCount);
+							BigDecimal expDivide = new BigDecimal(sumExpDeclCount);
+							if (sumImpDeclCount != 0) {
+								impCurYearTotalCostMap.put(indexCustCode,
+										sumImpCurYearTotalCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+								impCurYearHgCostMap.put(indexCustCode, sumImpCurYearHgCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+							} else {
+								impCurYearTotalCostMap.put(indexCustCode, zero);
+								impCurYearHgCostMap.put(indexCustCode, zero);
+							}
+							if (sumExpDeclCount != 0) {
+								expCurYearTotalCostMap.put(indexCustCode,
+										sumExpCurYearTotalCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+								expCurYearHgCostMap.put(indexCustCode, sumExpCurYearHgCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+							} else {
+								expCurYearTotalCostMap.put(indexCustCode, zero);
+								expCurYearHgCostMap.put(indexCustCode, zero);
+							}
+						}
+					}
+				}
+
+				// 先查询到上个月的数据备用
+				Date curMonth = null;
+				try {
+					curMonth = monthSdf.parse(dataPeriod);
+				} catch (ParseException e1) {
+				}
+				Calendar cal = Calendar.getInstance();
+				cal.setTime(curMonth);
+				cal.add(Calendar.MONTH, -1);
+				Date lastMonthDate = cal.getTime();
+				String lastMonthStr = monthSdf.format(lastMonthDate);
+				List<Object[]> lastMonthData = (List<Object[]>) dao.getQueryBySql(
+						"select CUSTOM_CODE,IMP_DECL_COUNT,IMP_TOTAL_COST,IMP_CU_COST,EXP_DECL_COUNT,EXP_TOTAL_COST,EXP_CU_COST " +
+								"from WXJY_CUSTOM_M_STAT where month = ? ", lastMonthStr);
+				for (Object[] s : lastMonthData) {
+					String customCode = (String) s[0];
+					Integer impDeclCount = Integer.valueOf(((BigDecimal) s[1]).toString());
+					BigDecimal impTotalCostT = (BigDecimal) s[2];
+					BigDecimal impCuCostT = (BigDecimal) s[3];
+					Integer expDeclCount = Integer.valueOf(((BigDecimal) s[4]).toString());
+					BigDecimal expTotalCostT = (BigDecimal) s[5];
+					BigDecimal expCuCostT = (BigDecimal) s[6];
+					impLastMonthTotalCostMap.put(customCode, impTotalCostT);
+					impLastMonthHgCostMap.put(customCode, impCuCostT);
+					expLastMonthTotalCostMap.put(customCode, expTotalCostT);
+					expLastMonthHgCostMap.put(customCode, expCuCostT);
+
+					impLastMonthDeclCountMap.put(customCode, impDeclCount);
+					expLastMonthDeclCountMap.put(customCode, expDeclCount);
+				}
+
+				// 去年12月数据
+				cal.setTime(curMonth);
+				cal.add(Calendar.YEAR, -1);
+				String lastDecember = yearSdf.format(cal.getTime()) + "12";
+				List<Object[]> lastDecData = (List<Object[]>) dao.getQueryBySql(
+						"select CUSTOM_CODE,IMP_DECL_COUNT,IMP_TOTAL_COST,IMP_CU_COST,EXP_DECL_COUNT,EXP_TOTAL_COST,EXP_CU_COST " +
+								"from WXJY_CUSTOM_M_STAT where month = ? ", lastDecember);
+				for (Object[] s : lastDecData) {
+					String customCode = (String) s[0];
+					Integer impDeclCount = Integer.valueOf(((BigDecimal) s[1]).toString());
+					BigDecimal impTotalCostT = (BigDecimal) s[2];
+					BigDecimal impCuCostT = (BigDecimal) s[3];
+					Integer expDeclCount = Integer.valueOf(((BigDecimal) s[4]).toString());
+					BigDecimal expTotalCostT = (BigDecimal) s[5];
+					BigDecimal expCuCostT = (BigDecimal) s[6];
+					impLastYearDecemberTotalCostMap.put(customCode, impTotalCostT);
+					impLastYearDecemberHgCostMap.put(customCode, impCuCostT);
+					expLastYearDecemberTotalCostMap.put(customCode, expTotalCostT);
+					expLastYearDecemberHgCostMap.put(customCode, expCuCostT);
+
+					impLastYearDecemberDeclCountMap.put(customCode, impDeclCount);
+					expLastYearDecemberDeclCountMap.put(customCode, expDeclCount);
+				}
+
+				boolean existData = false;
+				if (!existData) {
+					cal.setTime(curMonth);
+					cal.add(Calendar.YEAR, -2);
+					String yearBeforeLast = yearSdf.format(cal.getTime());
+					String firstMonthOfYearBeforeLast = yearBeforeLast + "01";
+					String lastMonthOfYearBeforeLast = yearBeforeLast + "12";
+					List<Object[]> list = (List<Object[]>) dao.getQueryBySql(
+							"select CUSTOM_CODE,IMP_DECL_COUNT,IMP_TOTAL_COST,IMP_CU_COST,EXP_DECL_COUNT,EXP_TOTAL_COST,EXP_CU_COST " +
+									"from WXJY_CUSTOM_M_STAT where month >= ? and month <= ? order by CUSTOM_CODE", firstMonthOfYearBeforeLast,
+							lastMonthOfYearBeforeLast);
+					if (list.size() > 0) {
+						int sumImpDeclCount = 0;
+						int sumExpDeclCount = 0;
+						BigDecimal sumImpYearBeforeLastTotalCost = new BigDecimal(0);
+						BigDecimal sumImpYearBeforeLastHgCost = new BigDecimal(0);
+						BigDecimal sumExpYearBeforeLastTotalCost = new BigDecimal(0);
+						BigDecimal sumExpYearBeforeLastHgCost = new BigDecimal(0);
+						String indexCustCode = null;
+						for (int j = 0; j < list.size(); j++) {
+							Object[] s = list.get(j);
+							String custCode = (String) s[0];
+							Integer impCount = Integer.valueOf(((BigDecimal) s[1]).toString());
+							BigDecimal impTotalCostT = (BigDecimal) s[2];
+							BigDecimal impCuCostT = (BigDecimal) s[3];
+							Integer expCount = Integer.valueOf(((BigDecimal) s[4]).toString());
+							BigDecimal expTotalCostT = (BigDecimal) s[5];
+							BigDecimal expCuCostT = (BigDecimal) s[6];
+
+							BigDecimal impMultily = new BigDecimal(impCount);
+							BigDecimal expMultily = new BigDecimal(expCount);
+							if (indexCustCode == null || indexCustCode.equals(custCode)) {// 同一关区,累计数据
+								indexCustCode = custCode;
+								sumImpDeclCount += impCount;
+								sumExpDeclCount += expCount;
+
+								sumImpYearBeforeLastTotalCost = sumImpYearBeforeLastTotalCost.add(impTotalCostT.multiply(impMultily));
+								sumImpYearBeforeLastHgCost = sumImpYearBeforeLastHgCost.add(impCuCostT.multiply(impMultily));
+								sumExpYearBeforeLastTotalCost = sumExpYearBeforeLastTotalCost.add(expTotalCostT.multiply(expMultily));
+								sumExpYearBeforeLastHgCost = sumExpYearBeforeLastHgCost.add(expCuCostT.multiply(expMultily));
+							} else {// 切换关区
+								BigDecimal impDivide = new BigDecimal(sumImpDeclCount);
+								BigDecimal expDivide = new BigDecimal(sumExpDeclCount);
+								if (sumImpDeclCount != 0) {
+									impYearBeforeLastTotalCostMap.put(indexCustCode,
+											sumImpYearBeforeLastTotalCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+									impYearBeforeLastHgCostMap.put(indexCustCode,
+											sumImpYearBeforeLastHgCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+								} else {
+									impYearBeforeLastTotalCostMap.put(indexCustCode, zero);
+									impYearBeforeLastHgCostMap.put(indexCustCode, zero);
+								}
+								if (sumExpDeclCount != 0) {
+									expYearBeforeLastTotalCostMap.put(indexCustCode,
+											sumExpYearBeforeLastTotalCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+									expYearBeforeLastHgCostMap.put(indexCustCode,
+											sumExpYearBeforeLastHgCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+								} else {
+									expYearBeforeLastTotalCostMap.put(indexCustCode, zero);
+									expYearBeforeLastHgCostMap.put(indexCustCode, zero);
+								}
+								impYearBeforeLastDeclCountMap.put(indexCustCode, sumImpDeclCount);
+								expYearBeforeLastDeclCountMap.put(indexCustCode, sumExpDeclCount);
+
+								sumImpDeclCount = impCount;
+								sumExpDeclCount = expCount;
+								sumImpYearBeforeLastTotalCost = new BigDecimal(0);
+								sumImpYearBeforeLastHgCost = new BigDecimal(0);
+								sumExpYearBeforeLastTotalCost = new BigDecimal(0);
+								sumExpYearBeforeLastHgCost = new BigDecimal(0);
+								indexCustCode = custCode;
+								sumImpYearBeforeLastTotalCost = sumImpYearBeforeLastTotalCost.add(impTotalCostT.multiply(impMultily));
+								sumImpYearBeforeLastHgCost = sumImpYearBeforeLastHgCost.add(impCuCostT.multiply(impMultily));
+								sumExpYearBeforeLastTotalCost = sumExpYearBeforeLastTotalCost.add(expTotalCostT.multiply(expMultily));
+								sumExpYearBeforeLastHgCost = sumExpYearBeforeLastHgCost.add(expCuCostT.multiply(expMultily));
+							}
+							if (j == list.size() - 1) {// 最后一条记录
+								BigDecimal impDivide = new BigDecimal(sumImpDeclCount);
+								BigDecimal expDivide = new BigDecimal(sumExpDeclCount);
+								if (sumImpDeclCount != 0) {
+									impYearBeforeLastTotalCostMap.put(indexCustCode,
+											sumImpYearBeforeLastTotalCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+									impYearBeforeLastHgCostMap.put(indexCustCode,
+											sumImpYearBeforeLastHgCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+								} else {
+									impYearBeforeLastTotalCostMap.put(indexCustCode, zero);
+									impYearBeforeLastHgCostMap.put(indexCustCode, zero);
+								}
+								if (sumExpDeclCount != 0) {
+									expYearBeforeLastTotalCostMap.put(indexCustCode,
+											sumExpYearBeforeLastTotalCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+									expYearBeforeLastHgCostMap.put(indexCustCode,
+											sumExpYearBeforeLastHgCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+								} else {
+									expYearBeforeLastTotalCostMap.put(indexCustCode, zero);
+									expYearBeforeLastHgCostMap.put(indexCustCode, zero);
+								}
+								impYearBeforeLastDeclCountMap.put(indexCustCode, sumImpDeclCount);
+								expYearBeforeLastDeclCountMap.put(indexCustCode, sumExpDeclCount);
+							}
+						}
+					}
+				}
+			}
+
+			for (String customCode : customCodeSet) {
+				CustomMonthlyStat stat = new CustomMonthlyStat();
+				stat.setCustomCode(customCode);
+				stat.setMonth(dataPeriod);
+
+				Integer impCount = impDeclCountMap.get(customCode);
+				if (impCount != null) {
+					stat.setImpDeclCount(impCount);
+					BigDecimal impDeclDiv = new BigDecimal(impCount * 3600);// 每单耗时x小时
+
+					BigDecimal sumImpTotalCost = new BigDecimal(impTotalCostMap.get(customCode));
+					impTotalCost = sumImpTotalCost.divide(impDeclDiv, 4, BigDecimal.ROUND_HALF_UP);
+					stat.setImpTotalCost(impTotalCost);
+
+					BigDecimal sumImpHgCost = new BigDecimal(impHgCostMap.get(customCode));
+					impHgCost = sumImpHgCost.divide(impDeclDiv, 4, BigDecimal.ROUND_HALF_UP);
+					stat.setImpCuCost(impHgCost);
+				} else {
+					stat.setImpDeclCount(0);
+					stat.setImpTotalCost(zero);
+					stat.setImpCuCost(zero);
+				}
+				Integer impManCount = impManDeclCountMap.get(customCode);
+				if (impManCount != null) {
+					stat.setImpManDeclCount(impManCount);
+				} else {
+					stat.setImpManDeclCount(0);
+				}
+				Integer impAuditCount = impAuditDeclCountMap.get(customCode);
+				if (impAuditCount != null) {
+					stat.setImpManualAuditDeclCount(impAuditCount);
+				} else {
+					stat.setImpManualAuditDeclCount(0);
+				}
+				Integer expCount = expDeclCountMap.get(customCode);
+				if (expCount != null) {
+					stat.setExpDeclCount(expCount);
+					BigDecimal expDeclDiv = new BigDecimal(expCount * 3600);// 每单耗时x小时
+
+					BigDecimal sumExpTotalCost = new BigDecimal(expTotalCostMap.get(customCode));
+					expTotalCost = sumExpTotalCost.divide(expDeclDiv, 4, BigDecimal.ROUND_HALF_UP);
+					stat.setExpTotalCost(expTotalCost);
+
+					BigDecimal sumExpHgCost = new BigDecimal(expHgCostMap.get(customCode));
+					expHgCost = sumExpHgCost.divide(expDeclDiv, 4, BigDecimal.ROUND_HALF_UP);
+					stat.setExpCuCost(expHgCost);
+				} else {
+					stat.setExpDeclCount(0);
+					stat.setExpTotalCost(zero);
+					stat.setExpCuCost(zero);
+				}
+				Integer expManCount = expManDeclCountMap.get(customCode);
+				if (expManCount != null) {
+					stat.setExpManDeclCount(expManCount);
+				} else {
+					stat.setExpManDeclCount(0);
+				}
+				Integer expAuditCount = expAuditDeclCountMap.get(customCode);
+				if (expAuditCount != null) {
+					stat.setExpManualAuditDeclCount(expAuditCount);
+				} else {
+					stat.setExpManualAuditDeclCount(0);
+				}
+				if (dataPeriod.compareTo(noRelStatMonth) > 0) {
+					if (dataPeriod.endsWith("01")) {
+						stat.setImpTotalCostCurentYear(impTotalCost);
+						stat.setImpCuCostCurentYear(impHgCost);
+						stat.setExpTotalCostCurentYear(expTotalCost);
+						stat.setExpCuCostCurentYear(expHgCost);
+
+						stat.setImpDeclCountCurentYear(stat.getImpDeclCount());
+						stat.setExpDeclCountCurentYear(stat.getExpDeclCount());
+					} else {// 另外查询当年前面月份数据来计算
+						if (impCount == null) { // 当月进口报单量为0
+							stat.setImpTotalCostCurentYear(
+									impCurYearTotalCostMap.get(customCode) != null ? impCurYearTotalCostMap.get(customCode) : zero);
+							stat.setImpCuCostCurentYear(
+									impCurYearHgCostMap.get(customCode) != null ? impCurYearHgCostMap.get(customCode) : zero);
+							stat.setImpDeclCountCurentYear(
+									impCurYearDeclCountMap.get(customCode) != null ? impCurYearDeclCountMap.get(customCode) : 0);
+						} else { // 累计前面月份和当月
+							Integer impCurYearDeclCount = impCurYearDeclCountMap.get(customCode);
+							if (impCurYearDeclCount == null) { // 对应关区当年前面月份入境报单量为0
+								stat.setImpTotalCostCurentYear(impTotalCost);
+								stat.setImpCuCostCurentYear(impHgCost);
+								stat.setImpDeclCountCurentYear(stat.getImpDeclCount());
+							} else {
+								BigDecimal impCurYearTotalCost = impCurYearTotalCostMap.get(customCode);
+								if (impCurYearTotalCost != null) {
+									impCurYearTotalCost = impCurYearTotalCost.multiply(new BigDecimal(impCurYearDeclCount))
+											.add(impTotalCost)
+											.divide(new BigDecimal(impCurYearDeclCount + impCount), 4, BigDecimal.ROUND_HALF_UP);
+									stat.setImpTotalCostCurentYear(impCurYearTotalCost);
+								} else {
+									stat.setImpTotalCostCurentYear(impTotalCost);
+								}
+								BigDecimal impCurYearCuCost = impCurYearHgCostMap.get(customCode);
+								if (impCurYearCuCost != null) {
+									impCurYearCuCost = impCurYearCuCost.multiply(new BigDecimal(impCurYearDeclCount)).add(impHgCost)
+											.divide(new BigDecimal(impCurYearDeclCount + impCount), 4, BigDecimal.ROUND_HALF_UP);
+									stat.setImpCuCostCurentYear(impCurYearCuCost);
+								} else {
+									stat.setImpCuCostCurentYear(impHgCost);
+								}
+								stat.setImpDeclCountCurentYear(impCurYearDeclCount + impCount);
+							}
+						}
+
+						if (expCount == null) {
+							stat.setExpTotalCostCurentYear(
+									expCurYearTotalCostMap.get(customCode) != null ? expCurYearTotalCostMap.get(customCode) : zero);
+							stat.setExpCuCostCurentYear(
+									expCurYearHgCostMap.get(customCode) != null ? expCurYearHgCostMap.get(customCode) : zero);
+							stat.setExpDeclCountCurentYear(
+									expCurYearDeclCountMap.get(customCode) != null ? expCurYearDeclCountMap.get(customCode) : 0);
+						} else {
+							Integer expCurYearDeclCount = expCurYearDeclCountMap.get(customCode);
+							if (expCurYearDeclCount == null) {
+								stat.setExpTotalCostCurentYear(expTotalCost);
+								stat.setExpCuCostCurentYear(expHgCost);
+								stat.setExpDeclCountCurentYear(stat.getExpDeclCount());
+							} else {
+								BigDecimal expCurYearTotalCost = expCurYearTotalCostMap.get(customCode);
+								if (expCurYearTotalCost != null) {
+									expCurYearTotalCost = expCurYearTotalCost.multiply(new BigDecimal(expCurYearDeclCount))
+											.add(expTotalCost)
+											.divide(new BigDecimal(expCurYearDeclCount + expCount), 4, BigDecimal.ROUND_HALF_UP);
+									stat.setExpTotalCostCurentYear(expCurYearTotalCost);
+								} else {
+									stat.setExpTotalCostCurentYear(expTotalCost);
+								}
+								BigDecimal expCurYearCuCost = expCurYearHgCostMap.get(customCode);
+								if (expCurYearCuCost != null) {
+									expCurYearCuCost = expCurYearCuCost.multiply(new BigDecimal(expCurYearDeclCount)).add(expHgCost)
+											.divide(new BigDecimal(expCurYearDeclCount + expCount), 4, BigDecimal.ROUND_HALF_UP);
+									stat.setExpCuCostCurentYear(expCurYearCuCost);
+								} else {
+									stat.setExpCuCostCurentYear(expHgCost);
+								}
+								stat.setExpDeclCountCurentYear(expCurYearDeclCount + expCount);
+							}
+						}
+					}
+
+					stat.setImpTotalCostLastMonth(
+							impLastMonthTotalCostMap.get(customCode) != null ? impLastMonthTotalCostMap.get(customCode) : zero);
+					stat.setImpTotalCostLastYearDecember(
+							impLastYearDecemberTotalCostMap.get(customCode) != null ? impLastYearDecemberTotalCostMap.get(customCode)
+									: zero);
+					stat.setImpTotalCostYearBeforeLast(
+							impYearBeforeLastTotalCostMap.get(customCode) != null ? impYearBeforeLastTotalCostMap.get(customCode) : zero);
+					stat.setImpCuCostLastMonth(
+							impLastMonthHgCostMap.get(customCode) != null ? impLastMonthHgCostMap.get(customCode) : zero);
+					stat.setImpCuCostLastYearDecember(
+							impLastYearDecemberHgCostMap.get(customCode) != null ? impLastYearDecemberHgCostMap.get(customCode) : zero);
+					stat.setImpCuCostYearBeforeLast(
+							impYearBeforeLastHgCostMap.get(customCode) != null ? impYearBeforeLastHgCostMap.get(customCode) : zero);
+
+					stat.setExpTotalCostLastMonth(
+							expLastMonthTotalCostMap.get(customCode) != null ? expLastMonthTotalCostMap.get(customCode) : zero);
+					stat.setExpTotalCostLastYearDecember(
+							expLastYearDecemberTotalCostMap.get(customCode) != null ? expLastYearDecemberTotalCostMap.get(customCode)
+									: zero);
+					stat.setExpTotalCostYearBeforeLast(
+							expYearBeforeLastTotalCostMap.get(customCode) != null ? expYearBeforeLastTotalCostMap.get(customCode) : zero);
+					stat.setExpCuCostLastMonth(
+							expLastMonthHgCostMap.get(customCode) != null ? expLastMonthHgCostMap.get(customCode) : zero);
+					stat.setExpCuCostLastYearDecember(
+							expLastYearDecemberHgCostMap.get(customCode) != null ? expLastYearDecemberHgCostMap.get(customCode) : zero);
+					stat.setExpCuCostYearBeforeLast(
+							expYearBeforeLastHgCostMap.get(customCode) != null ? expYearBeforeLastHgCostMap.get(customCode) : zero);
+
+					stat.setImpDeclCountLastMonth(
+							impLastMonthDeclCountMap.get(customCode) != null ? impLastMonthDeclCountMap.get(customCode) : 0);
+					stat.setImpDeclCountLastYearDecember(
+							impLastYearDecemberDeclCountMap.get(customCode) != null ? impLastYearDecemberDeclCountMap.get(customCode) : 0);
+					stat.setImpDeclCountYearBeforeLast(
+							impYearBeforeLastDeclCountMap.get(customCode) != null ? impYearBeforeLastDeclCountMap.get(customCode) : 0);
+
+					stat.setExpDeclCountLastMonth(
+							expLastMonthDeclCountMap.get(customCode) != null ? expLastMonthDeclCountMap.get(customCode) : 0);
+					stat.setExpDeclCountLastYearDecember(
+							expLastYearDecemberDeclCountMap.get(customCode) != null ? expLastYearDecemberDeclCountMap.get(customCode) : 0);
+					stat.setExpDeclCountYearBeforeLast(
+							expYearBeforeLastDeclCountMap.get(customCode) != null ? expYearBeforeLastDeclCountMap.get(customCode) : 0);
+				}
+				stat.setId(dao.getGuidStringBySql());
+				customMonthlyStatRepository.save(stat);
+			}
+
+			// 20191014 再次维护合并了关区的统计中间数据
+			mainCustomMonthlyStatFinal(dataPeriod);
+
+			MiddleDataMainStatus mStatus = new MiddleDataMainStatus();
+			mStatus.setCreateTime(new Date());
+			mStatus.setDataType(CustomMonthlyStat.class.getSimpleName());
+			mStatus.setStatPeriod(dataPeriod);
+			dao.executeUpdate("insert into WXJY_MID_D_M_STATUS (ID,DATA_TYPE, STAT_PERIOD, CREATE_TIME) " +
+					"values(sys_guid(),?,?,?) ", mStatus.getDataType(), mStatus.getStatPeriod(), mStatus.getCreateTime());
+		}
+	}
+
+
+	private void mainCustomMonthlyStatFinal(String dataPeriod) {
+		List<Object[]> copyList = new ArrayList<Object[]>();
+		List<Object[]> curMonthStat = (List<Object[]>) dao.getQueryBySql("select ID,MONTH,CUSTOM_CODE,IMP_DECL_COUNT,IMP_MAN_DECL_COUNT,IMP_MANUAL_AUDIT_DECL_COUNT,IMP_DECL_COUNT_LM,IMP_DECL_COUNT_LY_DEC," +
+						"IMP_DECL_COUNT_CURYEAR,IMP_DECL_COUNT_YBL,IMP_TOTAL_COST,IMP_TOTAL_COST_LM,IMP_TOTAL_COST_LY_DEC,IMP_TOTAL_COST_CY,IMP_TOTAL_COST_YBL," +
+						"IMP_CU_COST,IMP_CU_COST_LM,IMP_CU_COST_LY_DEC,IMP_CU_COST_CY,IMP_CU_COST_YBL,EXP_DECL_COUNT,EXP_MAN_DECL_COUNT,EXP_MANUAL_AUDIT_DECL_COUNT," +
+						"EXP_DECL_COUNT_LM,EXP_DECL_COUNT_LY_DEC,EXP_DECL_COUNT_CURYEAR,EXP_DECL_COUNT_YBL,EXP_TOTAL_COST,EXP_TOTAL_COST_LM,EXP_TOTAL_COST_LY_DEC," +
+						"EXP_TOTAL_COST_CY,EXP_TOTAL_COST_YBL,EXP_CU_COST,EXP_CU_COST_LM,EXP_CU_COST_LY_DEC,EXP_CU_COST_CY,EXP_CU_COST_YBL from WXJY_CUSTOM_M_STAT where month = ?",
+				dataPeriod);
+		for (Object[] s : curMonthStat) {
+			String customCode = (String) s[2];
+			s[2] = rootCustomsMap.get(customCode);
+			copyList.add(s);
+		}
+
+		Integer sumImpDeclCount = 0;// 进口单数
+		Integer sumImpManDeclCount = 0;// 进口查验单数
+		Integer sumImpAuditDeclCount = 0;// 进口人工审单单数
+		Integer sumImpDeclCountLastMonth = 0;// 上个月进口单数
+		Integer sumImpDeclCountLastYearDecember = 0;// 去年12月进口单数
+		Integer sumImpDeclCountCurentYear = 0;// 今年截止当月总进口单数
+		Integer sumImpDeclCountYearBeforeLast = 0;// 前年总进口单数
+		Integer sumExpDeclCount = 0;// 出口单数
+		Integer sumExpManDeclCount = 0;// 出口查验单数
+		Integer sumExpAuditDeclCount = 0;// 出口人工审单单数
+		Integer sumExpDeclCountLastMonth = 0;// 上个月出口单数
+		Integer sumExpDeclCountLastYearDecember = 0;// 去年12月进口单数
+		Integer sumExpDeclCountCurentYear = 0;// 今年截止当月总出口单数
+		Integer sumExpDeclCountYearBeforeLast = 0;// 前年总出口单数
+
+		// 20个消耗时间字段
+		BigDecimal sumImpTotalCost = zero;// 进口平均整体通关时间(小时)
+		BigDecimal sumImpTotalCostLastMonth = zero;// 进口平均整体通关时间-上月
+		BigDecimal sumImpTotalCostLastYearDecember = zero;// 进口平均整体通关时间-去年12月
+		BigDecimal sumImpTotalCostCurentYear = zero;// 进口平均整体通关时间-1至当月
+		BigDecimal sumImpTotalCostYearBeforeLast = zero;// 进口平均整体通关时间-前年
+		BigDecimal sumImpCuCost = zero;// 进口平均海关通关时间(小时)
+		BigDecimal sumImpCuCostLastMonth = zero;// 进口平均海关通关时间(小时)-上月
+		BigDecimal sumImpCuCostLastYearDecember = zero;// 进口平均海关通关时间-去年12月
+		BigDecimal sumImpCuCostCurentYear = zero;// 进口平均海关通关时间-1至当月
+		BigDecimal sumImpCuCostYearBeforeLast = zero;// 进口平均海关通关时间-前年
+		BigDecimal sumExpTotalCost = zero;// 出口平均整体通关时间(小时)
+		BigDecimal sumExpTotalCostLastMonth = zero;// 出口平均整体通关时间(小时)-上月
+		BigDecimal sumExpTotalCostLastYearDecember = zero; // 出口平均整体通关时间-去年12月
+		BigDecimal sumExpTotalCostCurentYear = zero;// 出口平均整体通关时间-1至当月
+		BigDecimal sumExpTotalCostYearBeforeLast = zero;// 出口平均整体通关时间-前年
+		BigDecimal sumExpCuCost = zero;// 出口平均海关通关时间(小时)
+		BigDecimal sumExpCuCostLastMonth = zero;// 出口平均海关通关时间(小时)-上月
+		BigDecimal sumExpCuCostLastYearDecember = zero;// 出口平均海关通关时间-去年12月
+		BigDecimal sumExpCuCostCurentYear = zero;// 出口平均海关通关时间-1至当月
+		BigDecimal sumExpCuCostYearBeforeLast = zero;// 出口平均海关通关时间-前年
+
+		for (String customCode : firstClassCustoms) {
+			if (!hasMultipleCustomList.contains(customCode)) {// 无下级关区的关区
+				boolean existData = false;
+				for (Object[] s : copyList) {
+					String customCodeT = (String) s[2];
+					if (customCode.equals(customCodeT)) {// 找到了既是唯一一条
+						CustomMonthlyStatFinal stat = new CustomMonthlyStatFinal();
+						stat.setMonth((String) s[1]);
+						stat.setImpDeclCount(Integer.valueOf(((BigDecimal) s[2]).toString()));
+						stat.setImpManDeclCount(Integer.valueOf(((BigDecimal) s[3]).toString()));
+						stat.setImpManualAuditDeclCount(Integer.valueOf(((BigDecimal) s[4]).toString()));
+						stat.setImpDeclCountLastMonth(Integer.valueOf(((BigDecimal) s[5]).toString()));
+						stat.setImpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[6]).toString()));
+						stat.setImpDeclCountCurentYear(Integer.valueOf(((BigDecimal) s[7]).toString()));
+						stat.setImpDeclCountYearBeforeLast(Integer.valueOf(((BigDecimal) s[8]).toString()));
+						stat.setImpTotalCost((BigDecimal) s[9]);
+						stat.setImpTotalCostLastMonth((BigDecimal) s[10]);
+						stat.setImpTotalCostLastYearDecember((BigDecimal) s[11]);
+						stat.setImpTotalCostCurentYear((BigDecimal) s[12]);
+						stat.setImpTotalCostYearBeforeLast((BigDecimal) s[13]);
+						stat.setImpCuCost((BigDecimal) s[14]);
+						stat.setImpCuCostLastMonth((BigDecimal) s[15]);
+						stat.setImpCuCostLastYearDecember((BigDecimal) s[16]);
+						stat.setImpCuCostCurentYear((BigDecimal) s[17]);
+						stat.setImpCuCostYearBeforeLast((BigDecimal) s[18]);
+						stat.setExpDeclCount(Integer.valueOf(((BigDecimal) s[19]).toString()));
+						stat.setExpManDeclCount(Integer.valueOf(((BigDecimal) s[20]).toString()));
+						stat.setExpManualAuditDeclCount(Integer.valueOf(((BigDecimal) s[21]).toString()));
+						stat.setExpDeclCountLastMonth(Integer.valueOf(((BigDecimal) s[22]).toString()));
+						stat.setExpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[23]).toString()));
+						stat.setExpDeclCountCurentYear(Integer.valueOf(((BigDecimal) s[24]).toString()));
+						stat.setExpDeclCountYearBeforeLast(Integer.valueOf(((BigDecimal) s[25]).toString()));
+						stat.setExpTotalCost((BigDecimal) s[26]);
+						stat.setExpTotalCostLastMonth((BigDecimal) s[27]);
+						stat.setExpTotalCostLastYearDecember((BigDecimal) s[28]);
+						stat.setExpTotalCostCurentYear((BigDecimal) s[29]);
+						stat.setExpTotalCostYearBeforeLast((BigDecimal) s[30]);
+						stat.setExpCuCost((BigDecimal) s[31]);
+						stat.setExpCuCostLastMonth((BigDecimal) s[32]);
+						stat.setExpCuCostLastYearDecember((BigDecimal) s[33]);
+						stat.setExpCuCostCurentYear((BigDecimal) s[34]);
+						stat.setExpCuCostYearBeforeLast((BigDecimal) s[35]);
+						stat.setId(dao.getGuidStringBySql());
+						customMonthlyStatFinalRepository.save(stat);
+						existData = true;
+						break;
+					}
+				}
+				if (!existData) {// 若不存在关区合并前的统计数据,需要补上合并后的统计记录
+
+					CustomMonthlyStatFinal stat = new CustomMonthlyStatFinal();
+					stat.setMonth(dataPeriod);
+					stat.setCustomCode(customCode);
+					stat.setImpDeclCount(0);
+					stat.setImpManDeclCount(0);
+					stat.setImpManualAuditDeclCount(0);
+					stat.setImpCuCost(zero);
+					stat.setImpTotalCost(zero);
+					stat.setExpDeclCount(0);
+					stat.setExpManDeclCount(0);
+					stat.setExpManualAuditDeclCount(0);
+					stat.setExpCuCost(zero);
+					stat.setExpTotalCost(zero);
+
+					Calendar cal = Calendar.getInstance();
+					Date curMonth = new Date();
+					try {
+						curMonth = monthSdf.parse(dataPeriod);
+					} catch (ParseException e) {
+						e.printStackTrace();
+					}
+					cal.setTime(curMonth);
+					cal.add(Calendar.MONTH, -1);
+					Date lastMonthDate = cal.getTime();
+					List<Object[]> lastMonthData = (List<Object[]>) dao.getQueryBySql("select ID,MONTH,CUSTOM_CODE,IMP_DECL_COUNT,IMP_MAN_DECL_COUNT,IMP_MANUAL_AUDIT_DECL_COUNT,IMP_DECL_COUNT_LM,IMP_DECL_COUNT_LY_DEC," +
+									"IMP_DECL_COUNT_CURYEAR,IMP_DECL_COUNT_YBL,IMP_TOTAL_COST,IMP_TOTAL_COST_LM,IMP_TOTAL_COST_LY_DEC,IMP_TOTAL_COST_CY,IMP_TOTAL_COST_YBL," +
+									"IMP_CU_COST,IMP_CU_COST_LM,IMP_CU_COST_LY_DEC,IMP_CU_COST_CY,IMP_CU_COST_YBL,EXP_DECL_COUNT,EXP_MAN_DECL_COUNT,EXP_MANUAL_AUDIT_DECL_COUNT," +
+									"EXP_DECL_COUNT_LM,EXP_DECL_COUNT_LY_DEC,EXP_DECL_COUNT_CURYEAR,EXP_DECL_COUNT_YBL,EXP_TOTAL_COST,EXP_TOTAL_COST_LM,EXP_TOTAL_COST_LY_DEC," +
+									"EXP_TOTAL_COST_CY,EXP_TOTAL_COST_YBL,EXP_CU_COST,EXP_CU_COST_LM,EXP_CU_COST_LY_DEC,EXP_CU_COST_CY,EXP_CU_COST_YBL from WXJY_CUSTOM_M_STAT_F where month = ? and CUSTOM_CODE = ?",
+							monthSdf.format(lastMonthDate), customCode);
+					if (lastMonthData != null && lastMonthData.size() > 0) {
+						for (Object[] s : lastMonthData) {
+							stat.setImpDeclCountLastMonth(Integer.valueOf(((BigDecimal)  s[6]).toString()));
+							stat.setImpCuCostLastMonth((BigDecimal) s[15]);
+							stat.setImpTotalCostLastMonth((BigDecimal) s[10]);
+							stat.setExpDeclCountLastMonth(Integer.valueOf(((BigDecimal)  s[22]).toString()));
+							stat.setExpCuCostLastMonth((BigDecimal) s[31]);
+							stat.setExpTotalCostLastMonth((BigDecimal) s[26]);
+
+							if (dataPeriod.endsWith("01")) {
+								stat.setImpDeclCountCurentYear(0);
+								stat.setImpCuCostCurentYear(zero);
+								stat.setImpTotalCostCurentYear(zero);
+								stat.setExpDeclCountCurentYear(0);
+								stat.setExpCuCostCurentYear(zero);
+								stat.setExpTotalCostCurentYear(zero);
+								// 去年12月也就是上个月
+								stat.setImpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[3]).toString()));
+								stat.setImpCuCostLastYearDecember((BigDecimal) s[14]);
+								stat.setImpTotalCostLastYearDecember((BigDecimal) s[9]);
+								stat.setExpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[21]).toString()));
+								stat.setExpCuCostLastYearDecember((BigDecimal) s[30]);
+								stat.setExpTotalCostLastYearDecember((BigDecimal) s[25]);
+								// 前年平均值需要重新查询&计算
+								if (dataPeriod.compareTo(noRelStatMonth) > 0) {
+									cal.setTime(curMonth);
+									cal.add(Calendar.YEAR, -1);
+									String lastYearJanuary = monthSdf.format(cal.getTime());
+									cal.add(Calendar.YEAR, -1);
+									String yearBeforeLastJanuary = monthSdf.format(cal.getTime());
+									List<Object[]> yearBeforeLastData = (List<Object[]>) dao.getQueryBySql("select ID,MONTH,CUSTOM_CODE,IMP_DECL_COUNT,IMP_MAN_DECL_COUNT,IMP_MANUAL_AUDIT_DECL_COUNT,IMP_DECL_COUNT_LM,IMP_DECL_COUNT_LY_DEC," +
+													"IMP_DECL_COUNT_CURYEAR,IMP_DECL_COUNT_YBL,IMP_TOTAL_COST,IMP_TOTAL_COST_LM,IMP_TOTAL_COST_LY_DEC,IMP_TOTAL_COST_CY,IMP_TOTAL_COST_YBL," +
+													"IMP_CU_COST,IMP_CU_COST_LM,IMP_CU_COST_LY_DEC,IMP_CU_COST_CY,IMP_CU_COST_YBL,EXP_DECL_COUNT,EXP_MAN_DECL_COUNT,EXP_MANUAL_AUDIT_DECL_COUNT," +
+													"EXP_DECL_COUNT_LM,EXP_DECL_COUNT_LY_DEC,EXP_DECL_COUNT_CURYEAR,EXP_DECL_COUNT_YBL,EXP_TOTAL_COST,EXP_TOTAL_COST_LM,EXP_TOTAL_COST_LY_DEC," +
+													"EXP_TOTAL_COST_CY,EXP_TOTAL_COST_YBL,EXP_CU_COST,EXP_CU_COST_LM,EXP_CU_COST_LY_DEC,EXP_CU_COST_CY,EXP_CU_COST_YBL from WXJY_CUSTOM_M_STAT_F where" +
+													" month >= ? and month < ? and CUSTOM_CODE = ?",
+											yearBeforeLastJanuary, lastYearJanuary, customCode);
+									if (yearBeforeLastData != null && yearBeforeLastData.size() > 0) {
+										int sumImpDeclCountYBL = 0;
+										BigDecimal sumImpCuCostYBL = new BigDecimal(0);
+										BigDecimal sumImpTotalCostYBL = new BigDecimal(0);
+
+										int sumExpDeclCountYBL = 0;
+										BigDecimal sumExCuCostYBL = new BigDecimal(0);
+										BigDecimal sumExpTotalCostYBL = new BigDecimal(0);
+
+										for (Object[] t : yearBeforeLastData) {
+											Integer impCount = Integer.valueOf(((BigDecimal) t[3]).toString());
+											if (impCount != null && impCount != 0) {
+												sumImpDeclCountYBL += impCount;
+												BigDecimal mul = new BigDecimal(impCount);
+
+												BigDecimal impCuCost = (BigDecimal) t[14];
+												if (impCuCost != null) {
+													sumImpCuCostYBL = sumImpCuCostYBL.add(impCuCost.multiply(mul));
+												}
+												BigDecimal impTotalCost = (BigDecimal) t[9];
+												if (impTotalCost != null) {
+													sumImpTotalCostYBL = sumImpTotalCostYBL.add(impTotalCost.multiply(mul));
+												}
+											}
+
+											Integer expCount = Integer.valueOf(((BigDecimal) t[21]).toString());
+											if (expCount != null && expCount != 0) {
+												sumExpDeclCountYBL += expCount;
+												BigDecimal mul = new BigDecimal(expCount);
+
+												BigDecimal expCuCost = (BigDecimal) t[30];
+												if (expCuCost != null) {
+													sumExCuCostYBL = sumExCuCostYBL.add(expCuCost.multiply(mul));
+												}
+												BigDecimal expTotalCost = (BigDecimal) t[25];
+												if (expTotalCost != null) {
+													sumExpTotalCostYBL = sumExpTotalCostYBL.add(expTotalCost.multiply(mul));
+												}
+											}
+
+										}
+
+										if (sumImpDeclCountYBL != 0) {
+											BigDecimal div = new BigDecimal(sumImpDeclCountYBL);
+											stat.setImpDeclCountYearBeforeLast(sumImpDeclCountYBL);
+											stat.setImpCuCostYearBeforeLast(sumImpCuCostYBL.divide(div, 4, BigDecimal.ROUND_HALF_UP));
+											stat.setImpTotalCostYearBeforeLast(sumImpTotalCostYBL.divide(div, 4, BigDecimal.ROUND_HALF_UP));
+										} else {
+											stat.setImpDeclCountYearBeforeLast(0);
+											stat.setImpCuCostYearBeforeLast(zero);
+											stat.setImpTotalCostYearBeforeLast(zero);
+										}
+
+										if (sumExpDeclCountYBL != 0) {
+											BigDecimal div = new BigDecimal(sumExpDeclCountYBL);
+											stat.setExpDeclCountYearBeforeLast(sumExpDeclCountYBL);
+											stat.setExpCuCostYearBeforeLast(sumExCuCostYBL.divide(div, 4, BigDecimal.ROUND_HALF_UP));
+											stat.setExpTotalCostYearBeforeLast(sumExpTotalCostYBL.divide(div, 4, BigDecimal.ROUND_HALF_UP));
+										} else {
+											stat.setExpDeclCountYearBeforeLast(0);
+											stat.setExpCuCostYearBeforeLast(zero);
+											stat.setExpTotalCostYearBeforeLast(zero);
+										}
+
+									} else {
+										stat.setImpDeclCountYearBeforeLast(0);
+										stat.setImpCuCostYearBeforeLast(zero);
+										stat.setImpTotalCostYearBeforeLast(zero);
+										stat.setExpDeclCountYearBeforeLast(0);
+										stat.setExpCuCostYearBeforeLast(zero);
+										stat.setExpTotalCostYearBeforeLast(zero);
+									}
+								} else {
+									stat.setImpDeclCountYearBeforeLast(0);
+									stat.setImpCuCostYearBeforeLast(zero);
+									stat.setImpTotalCostYearBeforeLast(zero);
+									stat.setExpDeclCountYearBeforeLast(0);
+									stat.setExpCuCostYearBeforeLast(zero);
+									stat.setExpTotalCostYearBeforeLast(zero);
+								}
+							} else {
+								stat.setImpDeclCountCurentYear(Integer.valueOf(((BigDecimal) s[8]).toString()));
+								stat.setImpCuCostCurentYear((BigDecimal) s[17]);
+								stat.setImpTotalCostCurentYear((BigDecimal) s[12]);
+								stat.setExpDeclCountCurentYear(Integer.valueOf(((BigDecimal) s[24]).toString()));
+								stat.setExpCuCostCurentYear((BigDecimal) s[33]);
+								stat.setExpTotalCostCurentYear((BigDecimal) s[28]);
+								// 去年12月数据是上个月对应字段的值
+								stat.setImpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[7]).toString()));
+								stat.setImpCuCostLastYearDecember((BigDecimal) s[16]);
+								stat.setImpTotalCostLastYearDecember((BigDecimal) s[11]);
+								stat.setExpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[23]).toString()));
+								stat.setExpCuCostLastYearDecember((BigDecimal) s[32]);
+								stat.setExpTotalCostLastYearDecember((BigDecimal) s[27]);
+
+								stat.setImpDeclCountYearBeforeLast(Integer.valueOf(((BigDecimal) s[9]).toString()));
+								stat.setImpCuCostYearBeforeLast((BigDecimal) s[18]);
+								stat.setImpTotalCostYearBeforeLast((BigDecimal) s[13]);
+								stat.setExpDeclCountYearBeforeLast(Integer.valueOf(((BigDecimal) s[25]).toString()));
+								stat.setExpCuCostYearBeforeLast((BigDecimal) s[34]);
+								stat.setExpTotalCostYearBeforeLast((BigDecimal) s[29]);
+							}
+							break;
+						}
+					} else {//要求从最早月度开始维护,则若前面数据不存在,当前月度直接设置为0
+						stat.setImpDeclCountCurentYear(0);
+						stat.setImpCuCostCurentYear(zero);
+						stat.setImpTotalCostCurentYear(zero);
+						stat.setExpDeclCountCurentYear(0);
+						stat.setExpCuCostCurentYear(zero);
+						stat.setExpTotalCostCurentYear(zero);
+
+						stat.setImpDeclCountLastMonth(0);
+						stat.setImpCuCostLastMonth(zero);
+						stat.setImpTotalCostLastMonth(zero);
+						stat.setExpDeclCountLastMonth(0);
+						stat.setExpCuCostLastMonth(zero);
+						stat.setExpTotalCostLastMonth(zero);
+
+						stat.setImpDeclCountLastYearDecember(0);
+						stat.setImpCuCostLastYearDecember(zero);
+						stat.setImpTotalCostLastYearDecember(zero);
+						stat.setExpDeclCountLastYearDecember(0);
+						stat.setExpCuCostLastYearDecember(zero);
+						stat.setExpTotalCostLastYearDecember(zero);
+
+						stat.setImpDeclCountYearBeforeLast(0);
+						stat.setImpCuCostYearBeforeLast(zero);
+						stat.setImpTotalCostYearBeforeLast(zero);
+						stat.setExpDeclCountYearBeforeLast(0);
+						stat.setExpCuCostYearBeforeLast(zero);
+						stat.setExpTotalCostYearBeforeLast(zero);
+					}
+					stat.setId(dao.getGuidStringBySql());
+					customMonthlyStatFinalRepository.save(stat);
+				}
+			} else {// 需要将一级关区及其下级关区的数据合并
+				sumImpDeclCount = 0;// 进口单数
+				sumImpManDeclCount = 0;//进口查验单数
+				sumImpAuditDeclCount = 0;//进口人工审单单数
+				sumImpDeclCountLastMonth = 0;// 上个月进口单数
+				sumImpDeclCountLastYearDecember = 0;// 去年12月进口单数
+				sumImpDeclCountCurentYear = 0;// 今年截止当月总进口单数
+				sumImpDeclCountYearBeforeLast = 0;// 前年总进口单数
+				sumExpDeclCount = 0;// 出口单数
+				sumExpManDeclCount = 0;//进口查验单数
+				sumExpAuditDeclCount = 0;//进口人工审单单数
+				sumExpDeclCountLastMonth = 0;// 上个月出口单数
+				sumExpDeclCountLastYearDecember = 0;// 去年12月进口单数
+				sumExpDeclCountCurentYear = 0;// 今年截止当月总出口单数
+				sumExpDeclCountYearBeforeLast = 0;// 前年总出口单数
+
+				// 20个消耗时间字段
+				sumImpTotalCost = zero;// 进口平均整体通关时间(小时)
+				sumImpTotalCostLastMonth = zero;// 进口平均整体通关时间-上月
+				sumImpTotalCostLastYearDecember = zero;// 进口平均整体通关时间-去年12月
+				sumImpTotalCostCurentYear = zero;// 进口平均整体通关时间-1至当月
+				sumImpTotalCostYearBeforeLast = zero;// 进口平均整体通关时间-前年
+				sumImpCuCost = zero;// 进口平均海关通关时间(小时)
+				sumImpCuCostLastMonth = zero;// 进口平均海关通关时间(小时)-上月
+				sumImpCuCostLastYearDecember = zero;// 进口平均海关通关时间-去年12月
+				sumImpCuCostCurentYear = zero;// 进口平均海关通关时间-1至当月
+				sumImpCuCostYearBeforeLast = zero;// 进口平均海关通关时间-前年
+				sumExpTotalCost = zero;// 出口平均整体通关时间(小时)
+				sumExpTotalCostLastMonth = zero;// 出口平均整体通关时间(小时)-上月
+				sumExpTotalCostLastYearDecember = zero; // 出口平均整体通关时间-去年12月
+				sumExpTotalCostCurentYear = zero;// 出口平均整体通关时间-1至当月
+				sumExpTotalCostYearBeforeLast = zero;// 出口平均整体通关时间-前年
+				sumExpCuCost = zero;// 出口平均海关通关时间(小时)
+				sumExpCuCostLastMonth = zero;// 出口平均海关通关时间(小时)-上月
+				sumExpCuCostLastYearDecember = zero;// 出口平均海关通关时间-去年12月
+				sumExpCuCostCurentYear = zero;// 出口平均海关通关时间-1至当月
+				sumExpCuCostYearBeforeLast = zero;// 出口平均海关通关时间-前年
+
+				for (Object[] s : copyList) {
+					if (customCode.equals((String) s[2])) {
+						sumImpDeclCount += Integer.valueOf(((BigDecimal) s[3]).toString());
+						sumImpManDeclCount += Integer.valueOf(((BigDecimal) s[4]).toString());
+						sumImpAuditDeclCount += Integer.valueOf(((BigDecimal) s[5]).toString());
+						sumImpDeclCountLastMonth += s[6] != null ? Integer.valueOf(((BigDecimal) s[6]).toString()) : 0;
+						sumImpDeclCountLastYearDecember += s[7] != null ? Integer.valueOf(((BigDecimal) s[7]).toString())
+								: 0;
+						sumImpDeclCountCurentYear += s[8] != null ? Integer.valueOf(((BigDecimal) s[8]).toString()) : 0;
+						sumImpDeclCountYearBeforeLast += s[9] != null ? Integer.valueOf(((BigDecimal) s[9]).toString()) : 0;
+
+						sumExpDeclCount += Integer.valueOf(((BigDecimal) s[20]).toString());
+						sumExpManDeclCount += Integer.valueOf(((BigDecimal) s[21]).toString());
+						sumExpAuditDeclCount += Integer.valueOf(((BigDecimal) s[22]).toString());
+						sumExpDeclCountLastMonth += s[23] != null ? Integer.valueOf(((BigDecimal) s[23]).toString()) : 0;
+						sumExpDeclCountLastYearDecember += s[24] != null ? Integer.valueOf(((BigDecimal) s[24]).toString())
+								: 0;
+						sumExpDeclCountCurentYear += s[25] != null ? Integer.valueOf(((BigDecimal) s[25]).toString()) : 0;
+						sumExpDeclCountYearBeforeLast += s[26] != null ? Integer.valueOf(((BigDecimal) s[26]).toString()) : 0;
+
+						BigDecimal impCurMonthMultiply = (BigDecimal) s[3];
+						BigDecimal impLastMonthMultiply = s[6] != null ? (BigDecimal) s[6] : new BigDecimal(0);
+						BigDecimal impLastYearDecemberMultiply = s[7] != null ? (BigDecimal) s[7] : new BigDecimal(0);
+						BigDecimal impCurYearMultiply = s[8] != null ? (BigDecimal) s[8] : new BigDecimal(0);
+						BigDecimal impYearBeforeLastMultiply = s[9] != null ? (BigDecimal) s[9] : new BigDecimal(0);
+
+						BigDecimal expCurMonthMultiply = (BigDecimal) s[20];
+						BigDecimal expLastMonthMultiply = s[23] != null ? (BigDecimal) s[23] : new BigDecimal(0);
+						BigDecimal expLastYearDecemberMultiply = s[24] != null ? (BigDecimal) s[24] : new BigDecimal(0);
+						BigDecimal expCurYearMultiply = s[25] != null ? (BigDecimal) s[25] : new BigDecimal(0);
+						BigDecimal expYearBeforeLastMultiply = s[26] != null ? (BigDecimal) s[26] : new BigDecimal(0);
+
+						sumImpTotalCost = s[10] != null
+								? sumImpTotalCost.add(((BigDecimal) s[10]).multiply(impCurMonthMultiply))
+								: sumImpTotalCost;
+						sumImpTotalCostLastMonth = s[11] != null
+								? sumImpTotalCostLastMonth.add(((BigDecimal) s[11]).multiply(impLastMonthMultiply))
+								: sumImpTotalCostLastMonth;
+						sumImpTotalCostLastYearDecember = s[12] != null
+								? sumImpTotalCostLastYearDecember
+								.add(((BigDecimal) s[12]).multiply(impLastYearDecemberMultiply))
+								: sumImpTotalCostLastYearDecember;
+						sumImpTotalCostCurentYear = s[13] != null
+								? sumImpTotalCostCurentYear.add(((BigDecimal) s[13]).multiply(impCurYearMultiply))
+								: sumImpTotalCostCurentYear;
+						sumImpTotalCostYearBeforeLast = s[14] != null
+								? sumImpTotalCostYearBeforeLast.add(((BigDecimal) s[14]).multiply(impYearBeforeLastMultiply))
+								: sumImpTotalCostYearBeforeLast;
+
+						sumImpCuCost = s[15] != null ? sumImpCuCost.add(((BigDecimal) s[15]).multiply(impCurMonthMultiply))
+								: sumImpCuCost;
+						sumImpCuCostLastMonth = s[16] != null
+								? sumImpCuCostLastMonth.add(((BigDecimal) s[16]).multiply(impLastMonthMultiply))
+								: sumImpCuCostLastMonth;
+						sumImpCuCostLastYearDecember = s[17] != null
+								? sumImpCuCostLastYearDecember.add(((BigDecimal) s[17]).multiply(impLastYearDecemberMultiply))
+								: sumImpCuCostLastYearDecember;
+						sumImpCuCostCurentYear = s[18] != null
+								? sumImpCuCostCurentYear.add(((BigDecimal) s[18]).multiply(impCurYearMultiply))
+								: sumImpCuCostCurentYear;
+						sumImpCuCostYearBeforeLast = s[19] != null
+								? sumImpCuCostYearBeforeLast.add(((BigDecimal) s[19]).multiply(impYearBeforeLastMultiply))
+								: sumImpCuCostYearBeforeLast;
+
+						sumExpTotalCost = s[27] != null
+								? sumExpTotalCost.add(((BigDecimal) s[27]).multiply(expCurMonthMultiply))
+								: sumExpTotalCost;
+						sumExpTotalCostLastMonth = s[28] != null
+								? sumExpTotalCostLastMonth.add(((BigDecimal) s[28]).multiply(expLastMonthMultiply))
+								: sumExpTotalCostLastMonth;
+						sumExpTotalCostLastYearDecember = s[29] != null
+								? sumExpTotalCostLastYearDecember
+								.add(((BigDecimal) s[29]).multiply(expLastYearDecemberMultiply))
+								: sumExpTotalCostLastYearDecember;
+						sumExpTotalCostCurentYear = s[30] != null
+								? sumExpTotalCostCurentYear.add(((BigDecimal) s[30]).multiply(expCurYearMultiply))
+								: sumExpTotalCostCurentYear;
+						sumExpTotalCostYearBeforeLast = s[31] != null
+								? sumExpTotalCostYearBeforeLast.add(((BigDecimal) s[31]).multiply(expYearBeforeLastMultiply))
+								: sumExpTotalCostYearBeforeLast;
+
+						sumExpCuCost = s[32] != null ? sumExpCuCost.add(((BigDecimal) s[32]).multiply(expCurMonthMultiply))
+								: sumExpCuCost;
+						sumExpCuCostLastMonth = s[33] != null
+								? sumExpCuCostLastMonth.add(((BigDecimal) s[33]).multiply(expLastMonthMultiply))
+								: sumExpCuCostLastMonth;
+						sumExpCuCostLastYearDecember = s[34] != null
+								? sumExpCuCostLastYearDecember.add(((BigDecimal) s[34]).multiply(expLastYearDecemberMultiply))
+								: sumExpCuCostLastYearDecember;
+						sumExpCuCostCurentYear = s[35] != null
+								? sumExpCuCostCurentYear.add(((BigDecimal) s[35]).multiply(expCurYearMultiply))
+								: sumExpCuCostCurentYear;
+						sumExpCuCostYearBeforeLast = s[36] != null
+								? sumExpCuCostYearBeforeLast.add(((BigDecimal) s[36]).multiply(expYearBeforeLastMultiply))
+								: sumExpCuCostYearBeforeLast;
+					}
+				}
+
+				CustomMonthlyStatFinal stat = new CustomMonthlyStatFinal();
+				stat.setMonth(dataPeriod);
+				stat.setCustomCode(customCode);
+
+				stat.setImpCuCost(
+						sumImpDeclCount == 0 ? zero : sumImpCuCost.divide(new BigDecimal(sumImpDeclCount), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpCuCostCurentYear(sumImpDeclCountCurentYear == 0 ? zero
+						: sumImpCuCostCurentYear.divide(new BigDecimal(sumImpDeclCountCurentYear), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpCuCostLastMonth(sumImpDeclCountLastMonth == 0 ? zero
+						: sumImpCuCostLastMonth.divide(new BigDecimal(sumImpDeclCountLastMonth), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpCuCostLastYearDecember(sumImpDeclCountLastYearDecember == 0 ? zero
+						: sumImpCuCostLastYearDecember.divide(new BigDecimal(sumImpDeclCountLastYearDecember), 4,
+						BigDecimal.ROUND_HALF_UP));
+				stat.setImpCuCostYearBeforeLast(sumImpDeclCountYearBeforeLast == 0 ? zero
+						: sumImpCuCostYearBeforeLast.divide(new BigDecimal(sumImpDeclCountYearBeforeLast), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpDeclCount(sumImpDeclCount);
+				stat.setImpManDeclCount(sumImpManDeclCount);
+				stat.setImpManualAuditDeclCount(sumImpAuditDeclCount);
+				stat.setImpDeclCountCurentYear(sumImpDeclCountCurentYear);
+				stat.setImpDeclCountLastMonth(sumImpDeclCountLastMonth);
+				stat.setImpDeclCountLastYearDecember(sumImpDeclCountLastYearDecember);
+				stat.setImpDeclCountYearBeforeLast(sumImpDeclCountYearBeforeLast);
+				stat.setImpTotalCost(
+						sumImpDeclCount == 0 ? zero : sumImpTotalCost.divide(new BigDecimal(sumImpDeclCount), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpTotalCostCurentYear(sumImpDeclCountCurentYear == 0 ? zero
+						: sumImpTotalCostCurentYear.divide(new BigDecimal(sumImpDeclCountCurentYear), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpTotalCostLastMonth(sumImpDeclCountLastMonth == 0 ? zero
+						: sumImpTotalCostLastMonth.divide(new BigDecimal(sumImpDeclCountLastMonth), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpTotalCostLastYearDecember(sumImpDeclCountLastYearDecember == 0 ? zero
+						: sumImpTotalCostLastYearDecember.divide(new BigDecimal(sumImpDeclCountLastYearDecember), 4,
+						BigDecimal.ROUND_HALF_UP));
+				stat.setImpTotalCostYearBeforeLast(sumImpDeclCountYearBeforeLast == 0 ? zero
+						: sumImpTotalCostYearBeforeLast.divide(new BigDecimal(sumImpDeclCountYearBeforeLast), 4, BigDecimal.ROUND_HALF_UP));
+
+				stat.setExpCuCost(
+						sumExpDeclCount == 0 ? zero : sumExpCuCost.divide(new BigDecimal(sumExpDeclCount), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpCuCostCurentYear(sumExpDeclCountCurentYear == 0 ? zero
+						: sumExpCuCostCurentYear.divide(new BigDecimal(sumExpDeclCountCurentYear), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpCuCostLastMonth(sumExpDeclCountLastMonth == 0 ? zero
+						: sumExpCuCostLastMonth.divide(new BigDecimal(sumExpDeclCountLastMonth), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpCuCostLastYearDecember(sumExpDeclCountLastYearDecember == 0 ? zero
+						: sumExpCuCostLastYearDecember.divide(new BigDecimal(sumExpDeclCountLastYearDecember), 4,
+						BigDecimal.ROUND_HALF_UP));
+				stat.setExpCuCostYearBeforeLast(sumExpDeclCountYearBeforeLast == 0 ? zero
+						: sumExpCuCostYearBeforeLast.divide(new BigDecimal(sumExpDeclCountYearBeforeLast), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpDeclCount(sumExpDeclCount);
+				stat.setExpManDeclCount(sumExpManDeclCount);
+				stat.setExpManualAuditDeclCount(sumExpAuditDeclCount);
+				stat.setExpDeclCountCurentYear(sumExpDeclCountCurentYear);
+				stat.setExpDeclCountLastMonth(sumExpDeclCountLastMonth);
+				stat.setExpDeclCountLastYearDecember(sumExpDeclCountLastYearDecember);
+				stat.setExpDeclCountYearBeforeLast(sumExpDeclCountYearBeforeLast);
+				stat.setExpTotalCost(
+						sumExpDeclCount == 0 ? zero : sumExpTotalCost.divide(new BigDecimal(sumExpDeclCount), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpTotalCostCurentYear(sumExpDeclCountCurentYear == 0 ? zero
+						: sumExpTotalCostCurentYear.divide(new BigDecimal(sumExpDeclCountCurentYear), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpTotalCostLastMonth(sumExpDeclCountLastMonth == 0 ? zero
+						: sumExpTotalCostLastMonth.divide(new BigDecimal(sumExpDeclCountLastMonth), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpTotalCostLastYearDecember(sumExpDeclCountLastYearDecember == 0 ? zero
+						: sumExpTotalCostLastYearDecember.divide(new BigDecimal(sumExpDeclCountLastYearDecember), 4,
+						BigDecimal.ROUND_HALF_UP));
+				stat.setExpTotalCostYearBeforeLast(sumExpDeclCountYearBeforeLast == 0 ? zero
+						: sumExpTotalCostYearBeforeLast.divide(new BigDecimal(sumExpDeclCountYearBeforeLast), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setId(dao.getGuidStringBySql());
+				customMonthlyStatFinalRepository.save(stat);
+			}
+		}
+	}
+
+	/**
+	 * 删单涉案数据
+	 * 删单涉案每天跑近一个月数据量大导致日志打不开,现在改为只查和危险品有关的报关单数据
+	 */
+	private void delSpecialAndDelHeadLogData(Date end) {
+		//原来写的删单只删当前时间前一天数据,这会导致重刷时间范围数据时剔除不了以前删单的单子,而涉案的总是剔除近一年的,如果刷的是一年以前的也剔除不了
+		//所以这里按照传递进来的时间做近一年范围剔除
+		//新剔除范围
+		Date today = null;
+		Calendar c = Calendar.getInstance();
+		try {
+			today = daySdf.parse(daySdf.format(end));
+			c.setTime(today);
+		} catch (ParseException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		String sa_sql = "";//涉案
+		List<String> specialEntryIds = new ArrayList<String>();
+		List<String> specialH2018EntryIds = new ArrayList<String>();
+		List<String> delEntryIds = new ArrayList<String>();
+		//flag 生产环境正式代码设置为true;删除5年内的涉案数据设置为false以提升效率
+		//刷数据后会存在很多涉案数据没有剔除干净,因此需要flag改为false跑一次,很多当天查出的报关单在前两年涉案
+		boolean flag = true;
+		if (flag) {//生产环境
+			// 每日维护取最近一年涉案的报关单号来过滤需要汇总的报关单
+			c.add(Calendar.YEAR, -1);
+			sa_sql = "select distinct(ENTRY_ID) from rh2k_SPECIAL_ENTRY where OP_TIME >= ? and OP_TIME < ?";
+			specialEntryIds = (List<String>) rh2kRepository.getQueryBySql(sa_sql, c.getTime(), today);
+			specialH2018EntryIds = (List<String>) h2018Dao.getQueryBySql(
+					"select distinct(ENTRY_ID) from ENTRY_HEAD where D_DATE >= ? and D_DATE < ? " +
+							"and NOTE_S like '%处罚决定书%'", c.getTime(), today);
+			//20231013发现退单和删单都会进ENTRY_DEL_HEAD_LOG,只有ENTRY_OP_LOG OP_TYPE第一位为0可以区分删单
+			delEntryIds = (List<String>) zmqdRepository.getQueryBySql(
+					"select distinct(ENTRY_ID) from h18c_ENTRY_OP_LOG where substr(OP_TYPE,1,1) = '0' "
+							+ "and OP_TIME >= ? and OP_TIME < ?", c.getTime(), today);
+		} else {//测试环境
+			// 全新生成所有中间数据时,取最近5年的涉案单号,每一年涉案的单号大约几千单,2018以前的很少
+			c.add(Calendar.YEAR, -5);
+			sa_sql = "select distinct(ENTRY_ID) from rh2k_SPECIAL_ENTRY where OP_TIME >= ?";
+			specialEntryIds = (List<String>) rh2kRepository.getQueryBySql(sa_sql, c.getTime());
+			specialH2018EntryIds = (List<String>) h2018Dao.getQueryBySql(
+					"select distinct(ENTRY_ID) from ENTRY_HEAD where D_DATE >= ? " +
+							"and NOTE_S like '%处罚决定书%'", c.getTime());
+			try {
+				// 把维护记录日期当天及之后所有的的删单记录添加进过滤集合(切记:删单记录大多数在结关之后才执行,全新生成是不考虑)
+				delEntryIds = (List<String>) zmqdRepository.getQueryBySql("select distinct(ENTRY_ID) from h18c_ENTRY_OP_LOG "
+						+ "where substr(OP_TYPE,1,1) = '0' and OP_TIME >= ?", daySdf.parse("20160101"));
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+		}
+		//删单和涉案的单号
+		if (specialEntryIds != null && specialEntryIds.size() > 0) {
+			delEntryIds.addAll(specialEntryIds);
+		}
+		if (specialH2018EntryIds != null && specialH2018EntryIds.size() > 0) {
+			delEntryIds.addAll(specialH2018EntryIds);
+		}
+		if (null != delEntryIds && delEntryIds.size() > 0) {
+			int currentPage = 1;
+			int pageSize = 100;
+			int count = 0;
+			int page = (delEntryIds.size() % pageSize == 0 ? delEntryIds.size() / pageSize : delEntryIds.size() / pageSize + 1);
+			for (int j = 0; j < page; j++) {
+				StringBuilder entryIds = new StringBuilder();
+				int total = currentPage * pageSize;
+				for (int i = count; i < (delEntryIds.size() - count > 100 ? total : delEntryIds.size()); i++) {
+					entryIds.append("'").append(delEntryIds.get(i)).append("',");
+				}
+				entryIds.deleteCharAt(entryIds.length() - 1);
+				String ids = entryIds.toString();
+
+				//同步删除通过报关单号关联的商品编码信息
+				String sql2 = "delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + ids + ")";
+				dao.executeUpdate(sql2);
+
+				String sql = "delete from WXJY_ENTRY_HEAD where ENTRY_ID in (" + ids + ")";
+				dao.executeUpdate(sql);
+
+				currentPage++;
+				count += pageSize;
+			}
+		}
+		//如果有涉案数据则需要把月度数据重刷
+		if (null != delEntryIds && delEntryIds.size() > 0) {
+			//由于删掉涉案是在当月重新刷月度数据前执行,所以需要将一级海关存放,否则合并表不生成数据
+			rootCustomsMap.clear();
+			hasMultipleCustomList.clear();
+			firstClassCustoms.clear();
+			List<PubCustomsMapping> custMapping = pubCustomsMappingRepository.findAll();
+			for (PubCustomsMapping m : custMapping) {
+				String pCustomCode = m.getMappingCode();
+				if (rootCustomsMap.containsValue(pCustomCode)) {
+					hasMultipleCustomList.add(pCustomCode);
+				}
+				rootCustomsMap.put(m.getCustomsCode(), pCustomCode);
+				firstClassCustoms.add(pCustomCode);
+			}
+			Calendar cl = Calendar.getInstance();
+			Date clNow = new Date();
+			Date deadline = clNow;
+			cl.setTime(today);
+			if (flag) {//生产环境
+				// 每日维护取最近一年涉案的报关单号来过滤需要汇总的报关单
+				cl.add(Calendar.YEAR, -1);
+			} else {//测试环境
+				// 全新生成所有中间数据时,取最近5年的涉案单号,每一年涉案的单号大约几千单,2018以前的很少
+				cl.add(Calendar.YEAR, -5);
+			}
+			while (!cl.getTime().after(deadline)) {
+				String dataPeriod = monthSdf.format(cl.getTime());
+				Date statBegin = null;
+				try {
+					statBegin = monthSdf.parse(dataPeriod);
+				} catch (ParseException e) {
+				}
+				cl.setTime(statBegin);
+				cl.add(Calendar.MONTH, 1);
+				Date statEnd = cl.getTime();
+				//每日数据不重刷
+				dao.executeUpdate("delete from WXJY_MID_D_M_STATUS where DATA_TYPE != ? and STAT_PERIOD = ?", EntryHead.class.getSimpleName(), dataPeriod);
+				monthlyDataMaintance(dataPeriod, statBegin, statEnd);
+			}
+			rootCustomsMap.clear();
+			hasMultipleCustomList.clear();
+			firstClassCustoms.clear();
+			logger.info("涉案删除后月份数据重刷成功");
+		} else {
+			logger.info("最近无涉案数据不需要重新生成月度数据");
+		}
+	}
+}

+ 3394 - 0
src/main/java/cn/gov/customs/data/timer/H2018ZhOldDangerGoodsUtil.java

@@ -0,0 +1,3394 @@
+package cn.gov.customs.data.timer;
+
+
+import cn.gov.customs.data.entity.wxjy.bus.*;
+import cn.gov.customs.data.entity.wxjy.common.PubCustomsMapping;
+import cn.gov.customs.data.repository.h2018.H2018Repository;
+import cn.gov.customs.data.repository.iedg.IedgRepository;
+import cn.gov.customs.data.repository.inspect.InspectRepository;
+import cn.gov.customs.data.repository.rh2k.Rh2kRepository;
+import cn.gov.customs.data.repository.wxjy.WxjyRepository;
+import cn.gov.customs.data.repository.wxjy.bus.CustomMonthlyStatFinalRepository;
+import cn.gov.customs.data.repository.wxjy.bus.CustomMonthlyStatRepository;
+import cn.gov.customs.data.repository.wxjy.bus.EntryHeadRepository;
+import cn.gov.customs.data.repository.wxjy.bus.EntryListRepository;
+import cn.gov.customs.data.repository.wxjy.common.PubCustomsMappingRepository;
+import cn.gov.customs.data.repository.zmqd.ZmqdRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: H2018危险品
+ * @Author wq
+ * @Date 2025-09-30 14:31:11
+ * @Version 1.0
+ */
+@Component
+@Configuration
+@PropertySource("classpath:data-acquisition.properties")
+public class H2018ZhOldDangerGoodsUtil {
+
+	Logger logger = LoggerFactory.getLogger(H2018ZhOldDangerGoodsUtil.class);
+	private static SimpleDateFormat yearSdf = new SimpleDateFormat("yyyy");
+
+	private static SimpleDateFormat monthSdf = new SimpleDateFormat("yyyyMM");
+	private static SimpleDateFormat daySdf = new SimpleDateFormat("yyyyMMdd");
+	private static SimpleDateFormat fullSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+	private static final String IE_DATE_ADAPT = "12:00:00";//下发的报关单I_E_DATE丢失时分精度
+	private static boolean reGenerateAllData = false;
+	private static final String noRelStatMonth = "201812"; // 该月及之前月份月度统计中间数据不用维护所有字段内容,比如相对差值字段,去年/前年xx平均值
+
+	private static final BigDecimal zero = new BigDecimal(0);
+	private static HashMap<String, String> rootCustomsMap = new HashMap<String, String>();// 根据关区代码获得所隶属的一级关区代码
+
+	private static List<String> hasMultipleCustomList = new ArrayList<String>(); // 拥有下级关区的关区代码
+
+	private static Set<String> firstClassCustoms = new HashSet<String>(); // 一级关区代码集合
+
+	@Autowired
+	private H2018Repository h2018Dao;
+
+	@Autowired
+	private WxjyRepository dao;
+
+	@Autowired
+	private IedgRepository iedgRepository;
+
+	@Autowired
+	private InspectRepository inspDao;
+
+	@Autowired
+	private ZmqdRepository zmqdRepository;
+
+	@Autowired
+	private Rh2kRepository rh2kRepository;
+
+	@Autowired
+	private PubCustomsMappingRepository mappingRepository;
+
+	@Autowired
+	private EntryHeadRepository entryHeadRepository;
+
+	@Autowired
+	private EntryListRepository entryListRepository;
+
+	@Autowired
+	private CustomMonthlyStatFinalRepository customMonthlyStatFinalRepository;
+
+	@Autowired
+	private CustomMonthlyStatRepository customMonthlyStatRepository;
+
+	@Autowired
+	private PubCustomsMappingRepository pubCustomsMappingRepository;
+
+	/**
+	 * @description: H2018危险品报关单信息
+	 * @param: hsCodes
+	 * endTime
+	 * @return: void
+	 * @author zoumin
+	 * @date: 2021-11-09 16:06:48
+	 * @version 1.0
+	 */
+	public void h2018Business(List<String> ciqCodeList, Calendar c, String type) {
+		/**H2018已结关报关单危险品信息*/
+		logger.info("=================同步H2018已结关(80)报关单危险品信息======start==========");
+		SimpleDateFormat daySdf = new SimpleDateFormat("yyyy-MM-dd");
+		Date today = c.getTime();
+		c.add(Calendar.DATE, -1);
+		Date yesterday = c.getTime();
+		String yesterdayStr = "";
+		Date statBegin = null;
+		Date statEnd = null;
+		try {
+			yesterdayStr = daySdf.format(yesterday);
+			statBegin = daySdf.parse(yesterdayStr);
+			statEnd = daySdf.parse(daySdf.format(today));
+		} catch (ParseException e) {
+			e.printStackTrace();
+			return;
+		}
+		//商品是直接查询基础表中所有数据插入,无论捞历史数据还是每日数据都可按日期删除,报关单表头不行(只捞了历史ciq编码的报关单)
+		dao.executeUpdate("delete from WXJY_MID_D_M_STATUS where DATA_TYPE = 'EntryHead' and BUSINESS_TYPE = ? and STAT_PERIOD = ?", type,yesterdayStr);
+		//获取危险品的ciq编码
+		List<String> allCiqCodeList = (List<String>) iedgRepository.getQueryBySql("select distinct c.ciq_code from iedg_sync_chemicals_ciq c");
+		try {
+			// 一体化通关
+			ythDeclMain(statBegin, statEnd, ciqCodeList, allCiqCodeList);
+
+			// 口岸清关(直接进出口)
+			kaqgDeclMain(statBegin, statEnd, ciqCodeList, allCiqCodeList);
+
+			// 转关(因为需求不要求出境的,只考虑维护入境转关类型报关的转关数据发送时间、转关数据核销时间)
+			zgDeclMain(statBegin, statEnd, ciqCodeList, allCiqCodeList);
+//
+			// 运维时可以查询MiddleDataMainStatus对应记录来分析哪些时间的定时任务没有正确执行,届时进行维护
+			MiddleDataMainStatus mStatus = new MiddleDataMainStatus();
+			mStatus.setCreateTime(new Date());
+			mStatus.setDataType(EntryHead.class.getSimpleName());
+			mStatus.setBusinessType(type);
+			mStatus.setStatPeriod(yesterdayStr);
+			dao.executeUpdate("insert into WXJY_MID_D_M_STATUS (ID,DATA_TYPE, STAT_PERIOD,BUSINESS_TYPE, CREATE_TIME) " +
+					"values(sys_guid(),?,?,?,?) ", mStatus.getDataType(), mStatus.getStatPeriod(), mStatus.getBusinessType(), new Date());
+		} catch (Exception e) {
+			logger.error("危险品报关单通关时长统计每日中间表数据维护异常", e);
+		}
+		try {
+			//删除中间表中涉案和删单的
+			delSpecialAndDelHeadLogData(statEnd);
+			logger.info("每日中间表涉案和删单的数据删除成功!");
+		} catch (Exception e1) {
+			logger.error("删除危险品报关单通关时长统计每日中间表涉案和删单数据异常", e1);
+		}
+		// 2019-11-19 增加每天维护当月的月度统计数据
+		// reGenerateAllData 生产环境正式代码设置为false;清空所有中间数据重新生成时设置为true以提升效率,这时会全新生成所有月度统计;
+		if (!reGenerateAllData) {
+			// 月度统计维护关区合并的FINAL表用到,需要先初始化,否则首次执行时无法维护几个FINAL后缀的表数据
+			if (firstClassCustoms.size() == 0) {// 还没有初始化过
+				rootCustomsMap.clear();
+				hasMultipleCustomList.clear();
+				List<PubCustomsMapping> custMapping = pubCustomsMappingRepository.findAll();
+				for (PubCustomsMapping m : custMapping) {
+					String pCustomCode = m.getMappingCode();
+					if (rootCustomsMap.containsValue(pCustomCode)) {
+						hasMultipleCustomList.add(pCustomCode);
+					}
+					rootCustomsMap.put(m.getCustomsCode(), pCustomCode);
+					firstClassCustoms.add(pCustomCode);
+				}
+			}
+
+			String dataPeriod = monthSdf.format(yesterday);// 当天凌晨维护的是昨天的数据,故月度统计是昨天所在月度
+			// 维护月度之前尝试删除可能未删除的月度维护日志,便于月度维护开展
+			// 月度统计定时维护触发时间晚于每日中间数据维护,需要维护好月度统计日志
+			dao.executeUpdate("delete from WXJY_MID_D_M_STATUS where STAT_PERIOD = ?", dataPeriod);
+
+			Date monthStatBegin = statBegin;// 随意初始化为昨日0点
+			try {
+				monthStatBegin = monthSdf.parse(dataPeriod);// 昨日所在月份1日0点
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+			monthlyDataMaintance(dataPeriod, monthStatBegin, statEnd);
+			// 维护完当月月度统计临时数值后删除维护日志,便于月度统计定时维护持续工作,每月初月度定时任务重新执行一次不碍事
+			dao.executeUpdate("delete from WXJY_MID_D_M_STATUS where STAT_PERIOD = ?", dataPeriod);
+
+		}
+	}
+
+	public void ythDeclMain(Date statBegin, Date statEnd, List<String> code, List<String> allCode) {
+		Map<String, Object[]> tmpMap1 = new HashMap<String, Object[]>();
+		Map<String, Date[]> tmpMap2 = new HashMap<String, Date[]>();
+		Map<String, Date> tmpMap9 = new HashMap<String, Date>();
+		Map<String, Object[]> tmpMap10 = new HashMap<String, Object[]>();
+		Map<String, Object[]> tmpMap11 = new HashMap<String, Object[]>();
+		Map<String, Date> tmpMap12 = new HashMap<String, Date>();
+		if (code != null && code.size() > 0) {
+			List<String> entryH2018IdList = new ArrayList<>();//存放所有
+			StringBuilder codeSb = new StringBuilder();
+			int j = 1;
+			for (Iterator itera = code.iterator(); itera.hasNext(); ) {
+				String ciqCode = (String) itera.next();
+
+				codeSb.append("'").append(ciqCode).append("',");
+				if ((j % 600 == 0 || !itera.hasNext()) && codeSb.length() > 0) {
+					codeSb.deleteCharAt(codeSb.length() - 1);
+					String codes = codeSb.toString();
+					//存在后续查出的报关单前面已经有,所以需要处理去重
+					//出口按编码、ungid不为空和货物属性包含31或32
+					//进口按ungid不为空或货物属性包含31或32
+					String sql = "select distinct(d.ENTRY_ID) from ENTRY_HEAD d, ENTRY_WORKFLOW w,ENTRY_LIST l where " +
+							"d.ENTRY_ID like '47%' and (substr(d.EDI_REMARK,7,1)!='C' or substr(d.EDI_REMARK,15,1)!='1') " +
+							"and (substr(d.EDI_REMARK,17,1) in ('a','c','d','e','f') " +
+							"or substr(d.EDI_REMARK,17,1) = 'C' and substr(d.EDI_REMARK,8,1) = 'G' ) " +
+							"and d.ENTRY_ID = w.ENTRY_ID and d.ENTRY_ID = l.ENTRY_ID and w.STEP_ID = '80000000' and w.CREATE_DATE >= ? and w.CREATE_DATE < ? " +
+							"and ((d.I_E_FLAG = 'E' and (l.IQ_CODE in (" + codes + ") or l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%')) or (d.I_E_FLAG = 'I' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%'))) order by d.ENTRY_ID;";
+					List<String> entryIdList = (List<String>) h2018Dao.getQueryBySql(sql, statBegin, statEnd);
+					entryH2018IdList.addAll(entryIdList);
+					codeSb.delete(0, codeSb.length());
+				}
+				j++;
+			}
+			//用JDK1.8 Stream中对List进行去重:list.stream().distinct();
+			entryH2018IdList = (List) entryH2018IdList.stream().distinct().collect(Collectors.toList());
+			if (entryH2018IdList != null && entryH2018IdList.size() > 0) {
+				StringBuilder sb = new StringBuilder();
+				int i = 1;
+				for (Iterator iterator = entryH2018IdList.iterator(); iterator.hasNext(); ) {
+					String id = (String) iterator.next();
+
+					sb.append("'").append(id).append("',");
+
+					if ((i % 300 == 0 || !iterator.hasNext()) && sb.length() > 0) {
+						List<String> impIdList2 = new ArrayList<String>();//20191210 进口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_LIST_NEW查到精确I_E_DATE
+						List<String> impIdList3 = new ArrayList<String>();//20211210 出口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_MONITOR_NEW查到精确ARRIVAL_DATE
+						Map<String, Object> map = new HashMap<String, Object>();
+						sb.deleteCharAt(sb.length() - 1);
+						String ids = sb.toString();
+						String entryIds = sb.toString();
+						String sql = "select h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY,"
+								+ " TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),nvl(count(c.ENTRY_ID),0),substr(EDI_REMARK,53,1) "
+								+ "from ENTRY_HEAD h left join ENTRY_CONTAINER c on h.ENTRY_ID = c.ENTRY_ID where h.ENTRY_ID in ("
+								+ ids + ") group by h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY," +
+								"TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),substr(EDI_REMARK,53,1);";
+						List<Object[]> list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							String idH = (String) d[0];
+							String iEFlag = (String) d[3];
+							String traMode = (String) d[4];
+							if ("I".equals(iEFlag)) {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList2.add(idH);
+								}
+							} else {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList3.add(idH);
+								}
+							}
+							tmpMap1.put((String) d[0],
+									new Object[]{(Date) d[1], (String) d[2], (String) d[3], (String) d[4], (Date) d[5], (String) d[6], (String) d[7], (String) d[8], (String) d[9], (String) d[10], (String) d[11],
+											(BigDecimal) d[12], (BigDecimal) d[13], (String) d[14], (String) d[15], (BigInteger) d[16], (String) d[17]});
+						}
+
+						sql = "select h.ENTRY_ID,(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='10000000' AND h.ENTRY_ID = a.ENTRY_ID) as authDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='80000000' AND h.ENTRY_ID = a.ENTRY_ID) as releaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='81000000' AND h.ENTRY_ID = b.ENTRY_ID) as preReleaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='70000000' AND h.ENTRY_ID = c.ENTRY_ID) as certRlsDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='82000000' AND h.ENTRY_ID = c.ENTRY_ID) as passDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='30000000' AND h.ENTRY_ID = c.ENTRY_ID) as orderDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='30000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as orderReceiveDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='00200000' AND h.ENTRY_ID = c.ENTRY_ID) as compEleDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='33000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as profVerifyDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='00000000' AND h.ENTRY_ID = b.ENTRY_ID) as eleDeclDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%M%') as assessStartDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%') as assessEndDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID in ('10000000','10200000','20000000') AND h.ENTRY_ID = b.ENTRY_ID and substr(b.status_code,4,1) = 5 and b.proc_result like '%E%') as refundDate "
+								+ "from ENTRY_HEAD h where h.ENTRY_ID in (" + ids
+								+ ") group by ENTRY_ID;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap2.put((String) d[0], new Date[]{(Date) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (Date) d[5], (Date) d[6], (Date) d[7], (Date) d[8], (Date) d[9],
+									(Date) d[10], (Date) d[11], (Date) d[12], (Date) d[13]});
+						}
+
+						sql = "select h.ENTRY_ID,substr(h.CHECK_REQUEST_TOTAL,-1,1),h.CREATE_TIME,h.MAN_CHK_TIME_START,h.MAN_CHK_TIME_END,MAN_PROC_RESULT,MAN_PROC_IDEA,CHECK_CUSTOMS_CODE "
+								+ "from CI_CHECK_MAN_WORK_HEAD h where h.CHECK_STATE = 'M' and h.MODIFY_TIME = "
+								+ "(select max(d.MODIFY_TIME) from CI_CHECK_MAN_WORK_HEAD d where d.ID = h.ID) and h.ENTRY_ID in(" + ids + ") ;";
+						list = (List<Object[]>) inspDao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap11.put((String) d[0], new Object[]{(String) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (String) d[5], (String) d[6], (String) d[7]});
+						}
+
+						//货运量毛重、净重、货运值人民币、美元、集装箱数量GROUP_CONCAT方法放在此处当传一个报关单id并且没有随附单证时会报错,所以加上nvl()
+						sql = "select h.ENTRY_ID,sum(nvl(l.RMB_PRICE,0)),sum(nvl(l.USD_PRICE,0)),h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,"
+								+ "h.OWNER_CODE,h.OWNER_NAME,h.FRN_CONSIGN_CODE,h.FRN_CONSIGN_NAME from ENTRY_HEAD h left join ENTRY_LIST l on h.ENTRY_ID=l.ENTRY_ID "
+								+ "where h.ENTRY_ID in("
+								+ ids + ") group by h.ENTRY_ID,h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,h.OWNER_CODE,h.OWNER_NAME,h.FRN_CONSIGN_CODE,h.FRN_CONSIGN_NAME;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap10.put((String) d[0], new Object[]{(BigDecimal) d[1], (BigDecimal) d[2], (String) d[3], (String) d[4], (String) d[5], (String) d[6], (String) d[7]
+									, (String) d[8], (String) d[9]});
+						}
+						if (impIdList2.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList2) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 进口新舱单水运、空运的I_E_DATE精准值由MANIFEST_LIST_NEW的REAL_ARRIVE_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号
+							sql = "select a.ENTRY_ID, b.REAL_ARRIVE_DATE from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_LIST_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE and to_char(a.I_E_DATE,'yyyyMMdd') = to_char(b.REAL_ARRIVE_DATE,'yyyyMMdd')";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap9.put(entryId, (Date) d[1]);
+							}
+							impIdList2.clear();
+						}
+						//出口舱单
+						if (impIdList3.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList3) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 出口新舱单水运、空运可能提前但航班晚到,无法用时间去精准定位哪一条会卸载很多次,精准值由MANIFEST_MONITOR_NEW的ARRIVAL_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号,ARRIVAL_DATE为00:00:00的赋值12:00:00
+							//20210508舱单只获取和武汉海关有关的数据进行时间赋值,所以a.I_E_PORT = b.CUSTOMS_CODE
+							sql = "select a.ENTRY_ID, min(b.ARRIVAL_DATE) from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_MONITOR_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE group by a.ENTRY_ID";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap12.put(entryId, (Date) d[1]);
+							}
+							impIdList3.clear();
+						}
+						for (Map.Entry<String, Object[]> d : tmpMap1.entrySet()) {
+							String entryId = d.getKey();
+							Object[] v = d.getValue();
+							Date ieDate = (Date) v[0];// 货物运抵时间
+							String iePort = (String) v[1];
+							String ieFlag = (String) v[2];
+							String trafMode = (String) v[3];
+							Date declDate = (Date) v[4];// 申报时间
+							String declPort = (String) v[5];// 申报口岸
+							String consignScc = (String) v[6];
+							String consignCode = (String) v[7];
+							String consignName = (String) v[8];
+							String tradeCountry = (String) v[9];
+							String tradeMode = (String) v[10];
+							BigDecimal grossWt = (BigDecimal) v[11];//毛重
+							BigDecimal netWt = (BigDecimal) v[12];//净重
+							String advanceDecl = (String) v[13];//判断是否是提前申报
+							//两步申报都下发到了h2018所以使用00200000节点判断只属于两步申报其中一种类型,
+							//应当使用edi_remark41位判断是否有值(edi_remark41值为1,2,3均为两步申报)
+							String twoStep = (String) v[14];//判断是否是两步申报
+							//2018存在twoStepValue截取出来值为' '情况,需要单独处理
+							String twoStepDecl = (" ").equals(twoStep) ? "" : twoStep;
+							BigInteger container = (BigInteger) v[15];// 集装箱数量
+							String newTwoStep = (String) v[16];//判断是否是新两步申报
+
+							Date[] all = tmpMap2.get(entryId);
+							Date authDate = null;
+							Date releaseDate = null;
+							Date preReleaseDate = null;
+							Date certRlsDate = null;
+							Date passDate = null;
+							Date orderDate = null;
+							Date orderReceiveDate = null;
+							Date compEleDate = null;
+							Date profVerifyDate = null;
+							Date eleDeclDate = null;
+							Date assessStartDate = null;
+							Date assessEndDate = null;
+							Date refundDate = null;
+							if (all != null) {
+								authDate = all[0];// 10审单受理时间
+								releaseDate = all[1];// 80结关时间
+								preReleaseDate = all[2];// 81担保放行时间
+								certRlsDate = all[3];// 70单证放行时间
+								passDate = all[4];// 82000000通道验放
+								orderDate = all[5];// 30000000现场接单
+								orderReceiveDate = all[6];// 30现场接单时间
+								compEleDate = all[7];// 00200000完整申报电子申报时间
+								profVerifyDate = all[8];// 33专业审证单核时间
+								eleDeclDate = all[9];// 00电子申报时间
+								assessStartDate = all[10];// 26排查处置/现场验估时间
+								assessEndDate = all[11];// 26验估处置完毕时间
+								refundDate = all[12];// 退单时间
+							}
+
+							Date realArriveDate = tmpMap9.get(entryId);
+							Object[] obj = tmpMap10.get(entryId);
+							BigDecimal rmbPrice = zero;
+							BigDecimal usdPrice = zero;
+							String agentCode = null;
+							String agentName = null;
+							String noteS = null;
+							String ownerCode = null;
+							String ownerName = null;
+							String frnConsignCode = null;
+							String frnConsignName = null;
+							if (obj != null) {
+								rmbPrice = (BigDecimal) obj[0];//人民币
+								usdPrice = (BigDecimal) obj[1];//美元
+								agentCode = (String) obj[2];//申报单位代码
+								agentName = (String) obj[3];//申报单位名称
+								noteS = (String) obj[4];//备注
+								ownerCode = (String) obj[5];//生产销售单位代码
+								ownerName = (String) obj[6];//生产销售单位名称
+								frnConsignCode = (String) obj[7];//生产销售单位代码
+								frnConsignName = (String) obj[8];//生产销售单位名称
+							}
+
+							Object[] man = tmpMap11.get(entryId);
+							String checkFlag = null;
+							Date manCreateTime = null;
+							Date manChkTimeStart = null;
+							Date manChkTimeEnd = null;
+							String manProcResult = null;
+							String manProcIdea = null;
+							String checkCustomsCode = null;
+							if (man != null) {
+								checkFlag = (String) man[0];//是否查验送检
+								manCreateTime = (Date) man[1];//指令下达时间
+								manChkTimeStart = (Date) man[2];//查验开始时间
+								manChkTimeEnd = (Date) man[3];//查验结束时间
+								manProcResult = (String) man[4];//处理结果
+								manProcIdea = (String) man[5];//处理意见
+								checkCustomsCode = (String) man[6];//查验关区
+							}
+
+							if ("I".equals(ieFlag)) {
+								if (realArriveDate != null) {
+									ieDate = realArriveDate;
+								} else {
+									if (ieDate != null) {
+										// 由于报关单表中I_E_DATE精度不够,需要做(非精准)修正(用户给的建议应该是错的,模糊处理下好了,时分为0的设置为12点)
+										if ("I".equals(ieFlag)) {// 入境
+											String ieDateStr = fullSdf.format(ieDate);
+											if (ieDateStr.endsWith("00:00:00")) {
+												ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+												try {
+													ieDate = fullSdf.parse(ieDateStr);
+												} catch (ParseException e1) {
+													// TODO Auto-generated catch block
+													e1.printStackTrace();
+												}
+											}
+										}
+									}
+								}
+							} else {
+								realArriveDate = tmpMap12.get(entryId);
+								//ARRIVAL_DATE为00:00:00时赋值12:00:00
+								if (realArriveDate != null) {
+									String ieDateStr = fullSdf.format(realArriveDate);
+									if (ieDateStr.endsWith("00:00:00")) {
+										ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+										try {
+											realArriveDate = fullSdf.parse(ieDateStr);
+										} catch (ParseException e1) {
+											// TODO Auto-generated catch block
+											e1.printStackTrace();
+										}
+									}
+								}
+							}
+
+							EntryHead e = new EntryHead();
+							e.setEntryId(entryId);
+							e.setAcceptDate(authDate != null ? authDate : orderDate);
+							e.setCertRlsDate(certRlsDate);// 70单证放行时间
+							e.setReleaseDate(releaseDate);//80
+							e.setPreReleaseDate(preReleaseDate);// 81时间
+							e.setPassMode("1");// 一体化通关
+							e.setDeclPort(declPort);
+							e.setIePort(iePort);
+							e.setIeDate(ieDate);
+							e.setDeclDate(declDate);
+							e.setIeFlag(ieFlag);
+							e.setTrafMode(trafMode);
+							e.setConsignScc(consignScc);
+							e.setConsignCode(consignCode);
+							e.setConsignName(consignName);
+							e.setTradeCountry(tradeCountry);
+							e.setTradeMode(tradeMode);
+							e.setOrderReceiveDate(orderReceiveDate);//30接单时间
+							e.setCompEleDate(compEleDate);// 00200000完整申报电子申报时间
+							e.setProfVerifyFlag(profVerifyDate != null ? "1" : "0");
+							e.setNewTwoStepFlag((null != newTwoStep && !"".equals(newTwoStep) && newTwoStep.equals("1")) ? "1" : "0");
+							e.setEleDeclDate(eleDeclDate);
+							e.setAssessStartDate(assessStartDate);
+							e.setAssessEndDate(assessEndDate);
+							e.setRefundDate(refundDate);
+							e.setRefundFlag(refundDate != null ? "1" : "0");
+							e.setCheckFlag(manCreateTime != null ? "1" : "0");
+							long orderReceiveCost = 0L;//接单耗时:30000000-10000000
+							//20210423新增处理10节点无时间时的赋值,避免程序报错
+							if (orderReceiveDate != null && (authDate != null || orderDate != null)) {
+								Long time = authDate != null ? authDate.getTime() : orderDate.getTime();
+								orderReceiveCost = (orderReceiveDate.getTime() - time) / 1000;
+								e.setOrderReceiveCost(orderReceiveCost);
+							} else {
+								e.setOrderReceiveCost(null);
+							}
+
+							long hgCost = 0L;
+							long totalCost = 0L;
+							//edi_remark11位为T表示提前申报
+							if ("T".equals(advanceDecl)) {
+								e.setDeclAdvanceFlag("1");
+							} else {
+								e.setDeclAdvanceFlag("0");
+							}
+							if ("I".equals(ieFlag)) {// 入境
+								/**根据综合处杨科提出的修改意见,这里将原来'电脑审单时间早于货物运抵时间'改成'申报时间早于货物运抵时间'的为提前申报*/
+							/*if (authDate.before(ieDate)) {
+								authDate = ieDate;
+								e.setDeclAdvanceFlag("1");
+							}*/
+								if (ieDate != null) {
+									if (declDate.before(ieDate)) {
+										authDate = ieDate;
+										//								e.setDeclAdvanceFlag("1");
+									} else {
+										//20210423新增处理10节点无时间时的赋值,避免程序报错
+										if (authDate == null) {
+											authDate = orderDate;
+										}
+									}
+								}
+								if (e.getPreReleaseDate() == null && e.getReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								} else if (e.getPreReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getPreReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								}
+								if (hgCost < 0) {
+									hgCost = 0L;
+								}
+								if (totalCost < 0) {
+									totalCost = hgCost;
+								}
+								//新组合查询用00-货物运抵,组合查询用10-货物运抵
+								e.setBeforeDeclCost((eleDeclDate.getTime() - e.getIeDate().getTime()) / 1000);// 申报前准备时间
+								if (e.getBeforeDeclCost() < 0) {
+									e.setBeforeDeclCost(0L);
+								}
+							} else {// 出境 海关通关时间=70/81之间较早的时间-受理时间
+								// 20191211 出口口岸清关、一体化:公路取BINDING_ROAD_TRANSPORT表GEN_DATE;铁路、邮路运输的整体通关时长=海关通关时长
+								//20210423新增处理10节点无时间时的赋值,避免程序报错
+								if (authDate == null) {
+									authDate = orderDate;
+								}
+								if (realArriveDate != null) {
+									//20211209出口舱单有时间赋值给出口货物运抵时间否则使用10审单时间,同时进行计算
+									e.setExInPortDate(realArriveDate);
+								} else {
+									// 取不到数据的统一将货物入境时间设置为受理时间
+									if ("3".equals(trafMode) || "6".equals(trafMode) || "9".equals(trafMode)) {// 其它运输方式也假设归为一类
+										e.setExInPortDate(authDate);
+									} else if ("4".equals(trafMode)) {//TODO 公路:暂时取不到数据
+										e.setExInPortDate(authDate);
+									} else {
+										e.setExInPortDate(authDate);// TODO 出口水运、空运通关时长第一个时间点数据来源还未下发,先临时赋值
+									}
+								}
+
+								if (e.getCertRlsDate() == null) {
+									if (e.getPreReleaseDate() != null) {
+										if (authDate != null) {
+											hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+
+								} else {
+									if (e.getPreReleaseDate() != null) {
+										if (e.getCertRlsDate().before(e.getPreReleaseDate())) {
+											if (authDate != null) {
+												hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										} else {
+											if (authDate != null) {
+												hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										}
+
+									} else {
+										if (authDate != null) {
+											hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+								}
+								e.setBeforeDeclCost(e.getExInPortDate() != null
+										? ((eleDeclDate.getTime() - e.getExInPortDate().getTime()) / 1000)
+										: 0L);// 申报前准备时间
+								if (e.getBeforeDeclCost() < 0) {
+									e.setBeforeDeclCost(0L);
+								}
+							}
+
+							e.setMainStatus("1");
+							e.setCuCost(hgCost);// 海关通关时间(秒)
+							e.setTotalCost(totalCost);// 总体通关时间
+							e.setGrossWt(grossWt);//净重
+							e.setNetWt(netWt);//毛重
+							e.setRmbPrice(rmbPrice);//人民币
+							e.setUsdPrice(usdPrice);//美元
+							e.setContainer(container);//集装箱数量
+							e.setAgentCode(agentCode);//申报单位代码
+							e.setAgentName(agentName);//申报单位名称
+							e.setNoteS(noteS);//备注
+							e.setOwnerCode(ownerCode);//生产销售单位代码
+							e.setOwnerName(ownerName);//生产销售单位名称
+							e.setFrnConsignCode(frnConsignCode);
+							e.setFrnConsignName(frnConsignName);
+							//报关模式
+							String mode = null;
+							//部分订单既是提前申报又是两步申报,不是两步和提前申报的单子均为一般申报,twoStepDecl:0或者空格:代表一分模式
+							if ("1".equals(e.getDeclAdvanceFlag()) && (null == twoStepDecl || "".equals(twoStepDecl) || "0".equals(twoStepDecl))) {
+								mode = "3";
+							} else if ("1".equals(e.getDeclAdvanceFlag()) && (null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2,3";
+							} else if ((null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2";
+							} else {
+								mode = "1";
+							}
+							e.setDeclMode(mode);//报关模式
+							//70000000、80000000、81000000、82000000均为空则表示未放行
+							if (preReleaseDate == null && certRlsDate == null && releaseDate == null && passDate == null) {
+								e.setDeclStatus("1");
+							} else if (releaseDate != null) {
+								//80表示已结关
+								e.setDeclStatus("3");
+							} else {
+								e.setDeclStatus("2");
+							}
+
+							e.setManCreateTime(manCreateTime);//指令下达时间
+							e.setManChkTimeStart(manChkTimeStart);//查验开始时间
+							e.setManChkTimeEnd(manChkTimeEnd);//查验结束时间
+							e.setManProcResult(manProcResult);
+							e.setManProcIdea(manProcIdea);
+							e.setCheckCustomsCode(checkCustomsCode);
+							dao.executeUpdate("delete from WXJY_ENTRY_HEAD where ENTRY_ID = ?", entryId);
+
+							entryHeadRepository.save(e);
+						}
+						//ciqCode存在超过600个情况,每个报关单每次查都拼接重复工作太多,所以提出来
+						//先删除这些报关单下的所有商品信息
+						dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						try {
+							StringBuilder codeListSb = new StringBuilder();
+							int x = 1;
+							for (Iterator it = allCode.iterator(); it.hasNext(); ) {
+								String iqCode = (String) it.next();
+
+								codeListSb.append("'").append(iqCode).append("',");
+								if ((x % 600 == 0 || !it.hasNext()) && codeListSb.length() > 0) {
+									codeListSb.deleteCharAt(codeListSb.length() - 1);
+									String iqCodes = codeListSb.toString();
+									//报关单表体,报关单第九位0=出口1=进口
+									sql = "select ENTRY_ID,G_NO,CODE_TS,G_NAME,QTY_1,RMB_PRICE,USD_PRICE,G_MODEL,G_CERT_FLAG," +
+											"(select max(a.CREATE_DATE) from ENTRY_WORKFLOW a where a.STEP_ID='80000000' AND l.ENTRY_ID = a.ENTRY_ID) as RELEASE_DATE," +
+											"UNGID,UNG_FLAG,UNG_MODEL,UNG_CLASSIFY,UNG_G_NAME,PRODUCT_CHAR_CODE,IQ_CODE " +
+											"from ENTRY_LIST l where l.ENTRY_ID in (" + entryIds + ") " +
+											"and ((substr(l.ENTRY_ID,9,1) ='0' and (l.IQ_CODE in (" + iqCodes + ") or l.UNGID is not null " +
+											"or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')) or " +
+											"(substr(l.ENTRY_ID,9,1) = '1' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')));";
+									List<Object[]> codeTsList = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									if (null != codeTsList && codeTsList.size() > 0) {
+										//由于新组合查询不设定某个固定节点更新数据,会存在相同报关单在后面更新流程节点时间,所以先从中间表查出数据进行更新
+										//会存在商品金额为空的情况,如果只有一条商品并商品为空则报关单头要删除
+										EntryList entity = null;
+										for (Object[] codeTs : codeTsList) {//将根据报关单编号查询到的商品编号及报关单号添加到KPI_ENTRY_HEAD_NEW_COPY表里
+											entity = new EntryList();
+											entity.setEntryId(codeTs[0] != null ? codeTs[0].toString() : "");
+											entity.setGNo(codeTs[1] != null ? (BigDecimal) codeTs[1] : new BigDecimal(0));
+											entity.setCodeTs(codeTs[2] != null ? codeTs[2].toString() : "");
+											entity.setGName(codeTs[3] != null ? codeTs[3].toString() : "");
+											entity.setQty1(codeTs[4] != null ? (BigDecimal) codeTs[4] : new BigDecimal(0));
+											entity.setRmbPrice(codeTs[5] != null ? (BigDecimal) codeTs[5] : new BigDecimal(0));
+											entity.setUsdPrice(codeTs[6] != null ? (BigDecimal) codeTs[6] : new BigDecimal(0));
+											entity.setGModel(codeTs[7] != null ? codeTs[7].toString() : "");
+											entity.setGCertFlag(codeTs[8] != null ? codeTs[8].toString() : "");
+											entity.setReleaseDate(codeTs[9] != null ? (Date) codeTs[9] : null);
+											entity.setCodeTsShort(codeTs[2] != null ? codeTs[2].toString().substring(0, 6) : "");
+											entity.setUngid(codeTs[10] != null ? codeTs[10].toString() : "");
+											entity.setUngFlag(codeTs[11] != null ? codeTs[11].toString() : "");
+											entity.setUngModel(codeTs[12] != null ? codeTs[12].toString() : "");
+											entity.setUngClassify(codeTs[13] != null ? codeTs[13].toString() : "");
+											entity.setUngGName(codeTs[14] != null ? codeTs[14].toString() : "");
+											entity.setIqCode(codeTs[16] != null ? codeTs[16].toString() : "");
+											//货物属性,判断货物属性是否是31/散装危险化学品,32/件装危险化学品
+											String goods_attr = "";
+											if (codeTs[15] != null) {
+												goods_attr = (String) codeTs[15];
+												if (goods_attr.contains("31")) {
+													goods_attr = "31";
+												} else if (goods_attr.contains("32")) {
+													goods_attr = "32";
+												} else {
+													goods_attr = "";
+												}
+											}
+											entity.setProductCharCode(goods_attr);
+											//查出的数据可能存在ciqCode或者UNGID为空的情况,报关单第九位0=出口1=进口
+											//出口按ciq编码、ungid不为空和货物属性包含31或32
+											//进口按ungid不为空或货物属性
+											String ieFlag = codeTs[0] != null ? codeTs[0].toString().substring(8, 9) : "";
+											//货物属性为不空时可以初步判定该商品是危化品,接下来只需判断该商品是否还包含危险货物的属性
+											if (entity.getProductCharCode() != null && !"".equals(entity.getProductCharCode())) {
+												if (codeTs[10] != null) {
+													entity.setGoodsType("1,2,3");
+												} else {
+													entity.setGoodsType("1");
+												}
+											} else {
+												//货物属性为空时
+												//出口
+												if (ieFlag.equals("0")) {
+													if (codeTs[16] != null) {
+														//syncChemicalsCiq只可能是包含了危化品,因为这个表的数据就是查询的系统中危险品模块里用户已经维护的包含了危化品的数据
+														Object[] obj = (Object[]) dao.getObjectBySql("select * from iedg_sync_chemicals_ciq where CIQ_CODE = ?", (String) codeTs[16]);
+														if (obj != null) {
+															if (codeTs[16] != null) {
+																entity.setGoodsType("1,2,3");
+															} else {
+																entity.setGoodsType("1");
+															}
+														} else {
+															entity.setGoodsType("2");
+														}
+													} else {
+														entity.setGoodsType("2");
+													}
+												} else {
+													//进口
+													entity.setGoodsType("2");
+												}
+											}
+											entity.setId(dao.getGuidStringBySql());
+											entryListRepository.save(entity);
+										}
+									}
+									codeListSb.delete(0, codeListSb.length());
+								}
+								x++;
+							}
+						} catch (Exception ex) {
+							// 主键可能因为多次结关跨天,导致新纪录主键重复
+							logger.error("保存危险品新维度一体化通关中间记录失败,重新保存");
+							dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						}
+						tmpMap1.clear();
+						tmpMap2.clear();
+						tmpMap9.clear();
+						tmpMap10.clear();
+						tmpMap12.clear();
+						tmpMap11.clear();
+						sb.delete(0, sb.length());
+					}
+					i++;
+				}
+			}
+		}
+	}
+
+	public void zgDeclMain(Date statBegin, Date statEnd, List<String> code, List<String> allCode) {
+		Map<String, Object[]> tmpMap1 = new HashMap<String, Object[]>();
+		Map<String, Date[]> tmpMap2 = new HashMap<String, Date[]>();
+		Map<String, Date[]> tmpMap5 = new HashMap<String, Date[]>();//转关
+		Map<String, Date> tmpMap9 = new HashMap<String, Date>();
+		Map<String, Object[]> tmpMap10 = new HashMap<String, Object[]>();
+		Map<String, Object[]> tmpMap11 = new HashMap<String, Object[]>();
+		Map<String, Date> tmpMap12 = new HashMap<String, Date>();
+		if (code != null && code.size() > 0) {
+			List<String> entryH2018IdList = new ArrayList<>();//存放所有
+			StringBuilder codeSb = new StringBuilder();
+			int j = 1;
+			for (Iterator itera = code.iterator(); itera.hasNext(); ) {
+				String ciqCode = (String) itera.next();
+
+				codeSb.append("'").append(ciqCode).append("',");
+				if ((j % 600 == 0 || !itera.hasNext()) && codeSb.length() > 0) {
+					codeSb.deleteCharAt(codeSb.length() - 1);
+					String codes = codeSb.toString();
+					//存在后续查出的报关单前面已经有,所以需要处理去重
+					//出口按编码、ungid不为空和货物属性包含31或32
+					//进口按ungid不为空或货物属性包含31或32
+					String sql = "select distinct(d.ENTRY_ID) from ENTRY_HEAD d, ENTRY_WORKFLOW w, ENTRY_LIST l where " +
+							"d.ENTRY_ID like '47%' and (substr(d.EDI_REMARK,7,1)!='C' or substr(d.EDI_REMARK,15,1)!='1') " +
+							"and (substr(d.EDI_REMARK,17,1) not in ('a','c','C','d','e','f') " +
+							"or (substr(d.EDI_REMARK,17,1) = 'C' and substr(d.EDI_REMARK,8,1) != 'G')) and substr(d.I_E_PORT,0,2)!=substr(d.DECL_PORT,0,2) " +
+							"and d.ENTRY_ID = w.ENTRY_ID and d.ENTRY_ID = l.ENTRY_ID and w.STEP_ID = '80000000' and w.CREATE_DATE >= ? and w.CREATE_DATE < ? " +
+							"and ((d.I_E_FLAG = 'E' and (l.IQ_CODE in (" + codes + ") or l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%')) or (d.I_E_FLAG = 'I' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%'))) order by d.ENTRY_ID;";
+					List<String> entryIdList = (List<String>) h2018Dao.getQueryBySql(sql, statBegin, statEnd);
+					entryH2018IdList.addAll(entryIdList);
+					codeSb.delete(0, codeSb.length());
+				}
+				j++;
+			}
+			//用JDK1.8 Stream中对List进行去重:list.stream().distinct();
+			entryH2018IdList = (List) entryH2018IdList.stream().distinct().collect(Collectors.toList());
+			if (entryH2018IdList != null && entryH2018IdList.size() > 0) {
+				StringBuilder sb = new StringBuilder();
+				int i = 1;
+				for (Iterator iterator = entryH2018IdList.iterator(); iterator.hasNext(); ) {
+					String id = (String) iterator.next();
+
+					sb.append("'").append(id).append("',");
+
+					if ((i % 300 == 0 || !iterator.hasNext()) && sb.length() > 0) {
+						List<String> impIdList = new ArrayList<String>();
+						List<String> impIdList2 = new ArrayList<String>();//20191210 进口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_LIST_NEW查到精确I_E_DATE
+						List<String> impIdList3 = new ArrayList<String>();//20211210 出口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_MONITOR_NEW查到精确ARRIVAL_DATE
+						Map<String, Object> map = new HashMap<String, Object>();
+						sb.deleteCharAt(sb.length() - 1);
+						String ids = sb.toString();
+						String entryIds = sb.toString();
+						String sql = "select h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT,CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY,"
+								+ " TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),nvl(count(c.ENTRY_ID),0),substr(EDI_REMARK,53,1) "
+								+ "from ENTRY_HEAD h left join ENTRY_CONTAINER c on h.ENTRY_ID = c.ENTRY_ID where h.ENTRY_ID in ("
+								+ ids + ")  group by h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY," +
+								"TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),substr(EDI_REMARK,53,1);";
+						List<Object[]> list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							String idH = (String) d[0];
+							String iEFlag = (String) d[3];
+							String traMode = (String) d[4];
+							if ("I".equals(iEFlag)) {
+								impIdList.add(idH);
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList2.add(idH);
+								}
+							} else {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList3.add(idH);
+								}
+							}
+							tmpMap1.put((String) d[0],
+									new Object[]{(Date) d[1], (String) d[2], (String) d[3], (String) d[4], (Date) d[5], (String) d[6], (String) d[7], (String) d[8], (String) d[9], (String) d[10], (String) d[11],
+											(BigDecimal) d[12], (BigDecimal) d[13], (String) d[14], (String) d[15], (BigInteger) d[16], (String) d[17]});
+						}
+
+						sql = "select h.ENTRY_ID,(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='10000000' AND h.ENTRY_ID = a.ENTRY_ID) as authDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='80000000' AND h.ENTRY_ID = a.ENTRY_ID) as releaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='81000000' AND h.ENTRY_ID = b.ENTRY_ID) as preReleaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='70000000' AND h.ENTRY_ID = c.ENTRY_ID) as certRlsDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='82000000' AND h.ENTRY_ID = c.ENTRY_ID) as passDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='30000000' AND h.ENTRY_ID = c.ENTRY_ID) as orderDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='30000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as orderReceiveDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='00200000' AND h.ENTRY_ID = c.ENTRY_ID) as compEleDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='33000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as profVerifyDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='00000000' AND h.ENTRY_ID = b.ENTRY_ID) as eleDeclDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%M%') as assessStartDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%') as assessEndDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID in ('10000000','10200000','20000000') AND h.ENTRY_ID = b.ENTRY_ID and substr(b.status_code,4,1) = 5 and b.proc_result like '%E%') as refundDate "
+								+ "from ENTRY_HEAD h where h.ENTRY_ID in (" + ids
+								+ ") group by ENTRY_ID;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap2.put((String) d[0], new Date[]{(Date) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (Date) d[5], (Date) d[6], (Date) d[7], (Date) d[8], (Date) d[9],
+									(Date) d[10], (Date) d[11], (Date) d[12], (Date) d[13]});
+						}
+
+						sql = "select h.ENTRY_ID,substr(h.CHECK_REQUEST_TOTAL,-1,1),h.CREATE_TIME,h.MAN_CHK_TIME_START,h.MAN_CHK_TIME_END,MAN_PROC_RESULT,MAN_PROC_IDEA,CHECK_CUSTOMS_CODE "
+								+ "from CI_CHECK_MAN_WORK_HEAD h where h.CHECK_STATE = 'M' and h.MODIFY_TIME = "
+								+ "(select max(d.MODIFY_TIME) from CI_CHECK_MAN_WORK_HEAD d where d.ID = h.ID) and h.ENTRY_ID in(" + ids + ") ;";
+						list = (List<Object[]>) inspDao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap11.put((String) d[0], new Object[]{(String) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (String) d[5], (String) d[6], (String) d[7]});
+						}
+
+						//货运量毛重、净重、货运值人民币、美元、集装箱数量GROUP_CONCAT方法放在此处当传一个报关单id并且没有随附单证时会报错,所以加上nvl()
+						sql = "select h.ENTRY_ID,sum(nvl(l.RMB_PRICE,0)),sum(nvl(l.USD_PRICE,0)),h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,"
+								+ "h.OWNER_CODE,h.OWNER_NAME,FRN_CONSIGN_CODE,FRN_CONSIGN_NAME from ENTRY_HEAD h left join ENTRY_LIST l on h.ENTRY_ID=l.ENTRY_ID "
+								+ "where h.ENTRY_ID in("
+								+ ids + ") group by h.ENTRY_ID,h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,h.OWNER_CODE,h.OWNER_NAME,FRN_CONSIGN_CODE,FRN_CONSIGN_NAME;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap10.put((String) d[0], new Object[]{(BigDecimal) d[1], (BigDecimal) d[2], (String) d[3], (String) d[4], (String) d[5], (String) d[6], (String) d[7]
+									, (String) d[8], (String) d[9]});
+						}
+						if (impIdList.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 部分转关类型的报关单需要通过新舱单系统拿到转关数据发送时间和转关数据核销时间
+							sql = "select a.ENTRY_ID, b.EXAM_TIME, b.CHECK_TIME from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.IM_DECL_CUR_HEAD b, " +
+									"`g_whdb_h2000_ims_recv`.MANIFEST_CHK_NEW c where a.ENTRY_ID in ("
+									+ ids + ") and (a.ENTRY_ID = c.FORM_ID and c.MANIFEST_ID = b.PRE_NO)";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap5.put(entryId, new Date[]{(Date) d[1], (Date) d[2]});
+								impIdList.remove(entryId);
+							}
+							// 从新舱单关联之后,剩下的再从提运单/转关单关联表查询两个时间值
+							sb.delete(0, sb.length());
+							for (String entryId : impIdList) {
+								sb.append("'").append(entryId).append("',");
+							}
+							if (sb.length() > 0) {
+								List<String> tmpIdList = new ArrayList<String>(impIdList);
+								sb.deleteCharAt(sb.length() - 1);
+								ids = sb.toString();
+								// 2019-11-07 入境报关单整体通关时间第一个时间点计算规则变更,水运和空运取报关单和提运单表中I_E_DATE时分秒不为0的,若都为0,则设置为12点;新舱单中I_E_DATE时分秒基本都为0,故不考虑。
+								// 公路的取 “进出境承运已确报”(物流监控工作流信息表)
+								// 经过数据分析,放弃上面方案,改为若I_E_DATE时分为0的改为12点
+
+								// 只考虑入境报关单的转关数据:可能查到多余报关单量的数据
+								sql = "select a.ENTRY_ID, b.EXAM_TIME, b.CHECK_TIME from ENTRY_HEAD a,`g_whdb_h2000_ims_recv`.IM_DECL_CUR_HEAD b," +
+										"`g_whdb_h2000_ims_recv`.IM_TRANS_LIST_REL c where a.ENTRY_ID in ("
+										+ ids + ") and (a.ENTRY_ID = c.ENTRY_NO and c.PRE_NO = b.PRE_NO)";
+
+								list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+								for (Object[] d : list) {
+									String entryId = (String) d[0];
+									tmpMap5.put(entryId, new Date[]{(Date) d[1], (Date) d[2]});
+									tmpIdList.remove(entryId);
+								}
+								sb.delete(0, sb.length());
+								for (String entryId : tmpIdList) {
+									sb.append("'").append(entryId).append("',");
+								}
+								if (sb.length() > 0) {
+									sb.deleteCharAt(sb.length() - 1);
+									ids = sb.toString();
+									sql = "select a.ENTRY_ID, b.EXAM_TIME, b.CHECK_TIME from ENTRY_HEAD a,`g_whdb_h2000_ims_recv`.IM_DECL_CUR_HEAD b," +
+											"`g_whdb_h2000_ims_recv`.IM_TRANS_LIST_REL c where a.ENTRY_ID in ("
+											+ ids + ") and (a.BILL_NO = c.BILL_NO and c.PRE_NO = b.PRE_NO)";
+
+									list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									for (Object[] d : list) {
+										String entryId = (String) d[0];
+										tmpMap5.put(entryId, new Date[]{(Date) d[1], (Date) d[2]});
+										tmpIdList.remove(entryId);
+									}
+								}
+								sb.delete(0, sb.length());
+								for (String entryId : tmpIdList) {
+									sb.append("'").append(entryId).append("',");
+								}
+								if (sb.length() > 0) {
+									sb.deleteCharAt(sb.length() - 1);
+									ids = sb.toString();
+									sql = "select a.ENTRY_ID, b.EXAM_TIME, b.CHECK_TIME from ENTRY_HEAD a,`g_whdb_h2000_ims_recv`.IM_DECL_CUR_HEAD b " +
+											"where a.ENTRY_ID in (" + ids + ") and instr(a.TRAF_NAME,b.PRE_NO) > 0";
+
+									list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									for (Object[] d : list) {
+										String entryId = (String) d[0];
+										tmpMap5.put(entryId, new Date[]{(Date) d[1], (Date) d[2]});
+										tmpIdList.remove(entryId);
+									}
+								}
+							}
+						}
+						if (impIdList2.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList2) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 进口新舱单水运、空运的I_E_DATE精准值由MANIFEST_LIST_NEW的REAL_ARRIVE_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号
+							sql = "select a.ENTRY_ID, b.REAL_ARRIVE_DATE from ENTRY_HEAD a,`g_whdb_h2000_ims_recv`.MANIFEST_LIST_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE and to_char(a.I_E_DATE,'yyyyMMdd') = to_char(b.REAL_ARRIVE_DATE,'yyyyMMdd')";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap9.put(entryId, (Date) d[1]);
+							}
+							impIdList2.clear();
+						}
+						//出口舱单
+						if (impIdList3.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList3) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 出口新舱单水运、空运可能提前但航班晚到,无法用时间去精准定位哪一条会卸载很多次,精准值由MANIFEST_MONITOR_NEW的ARRIVAL_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号,ARRIVAL_DATE为00:00:00的赋值12:00:00
+							//20210508舱单只获取和武汉海关有关的数据进行时间赋值,所以a.I_E_PORT = b.CUSTOMS_CODE
+							sql = "select a.ENTRY_ID, min(b.ARRIVAL_DATE) from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_MONITOR_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE group by a.ENTRY_ID";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap12.put(entryId, (Date) d[1]);
+							}
+							impIdList3.clear();
+						}
+						for (Map.Entry<String, Object[]> d : tmpMap1.entrySet()) {
+							String entryId = d.getKey();
+							Object[] v = d.getValue();
+							Date ieDate = (Date) v[0];// 货物运抵时间
+							String iePort = (String) v[1];
+							String ieFlag = (String) v[2];
+							String trafMode = (String) v[3];
+							Date declDate = (Date) v[4];// 申报时间
+							String declPort = (String) v[5];// 申报口岸
+							String consignScc = (String) v[6];
+							String consignCode = (String) v[7];
+							String consignName = (String) v[8];
+							String tradeCountry = (String) v[9];
+							String tradeMode = (String) v[10];
+							BigDecimal grossWt = (BigDecimal) v[11];//毛重
+							BigDecimal netWt = (BigDecimal) v[12];//净重
+							String advanceDecl = (String) v[13];//判断是否是提前申报
+							//两步申报都下发到了h2018所以使用00200000节点判断只属于两步申报其中一种类型,
+							//应当使用edi_remark41位判断是否有值(edi_remark41值为1,2,3均为两步申报)
+							String twoStep = (String) v[14];//判断是否是两步申报
+							//2018存在twoStepValue截取出来值为' '情况,需要单独处理
+							String twoStepDecl = (" ").equals(twoStep) ? "" : twoStep;
+							BigInteger container = (BigInteger) v[15];// 集装箱数量
+							String newTwoStep = (String) v[16];//判断是否是新两步申报
+
+							Date[] all = tmpMap2.get(entryId);
+							Date authDate = null;
+							Date releaseDate = null;
+							Date preReleaseDate = null;
+							Date certRlsDate = null;
+							Date passDate = null;
+							Date orderDate = null;
+							Date orderReceiveDate = null;
+							Date compEleDate = null;
+							Date profVerifyDate = null;
+							Date eleDeclDate = null;
+							Date assessStartDate = null;
+							Date assessEndDate = null;
+							Date refundDate = null;
+							if (all != null) {
+								authDate = all[0];// 10审单受理时间
+								releaseDate = all[1];// 80结关时间
+								preReleaseDate = all[2];// 81担保放行时间
+								certRlsDate = all[3];// 70单证放行时间
+								passDate = all[4];// 82000000通道验放
+								orderDate = all[5];// 30000000现场接单
+								orderReceiveDate = all[6];// 30现场接单时间
+								compEleDate = all[7];// 00200000完整申报电子申报时间
+								profVerifyDate = all[8];// 33专业审证单核时间
+								eleDeclDate = all[9];// 00电子申报时间
+								assessStartDate = all[10];// 26排查处置/现场验估时间
+								assessEndDate = all[11];// 26验估处置完毕时间
+								refundDate = all[12];// 退单时间
+							}
+
+							Date examDate = null;// 转关数据发送时间
+							Date checkDate = null;// 转关数据核销时间(极少数转关单该字段为空)
+							Date[] dt = tmpMap5.get(entryId);
+							if (dt != null) {
+								examDate = dt[0];// 转关数据发送时间
+								checkDate = dt[1];// 转关数据核销时间
+							}
+
+							Date realArriveDate = tmpMap9.get(entryId);
+							Object[] obj = tmpMap10.get(entryId);
+							BigDecimal rmbPrice = zero;
+							BigDecimal usdPrice = zero;
+							String agentCode = null;
+							String agentName = null;
+							String noteS = null;
+							String ownerCode = null;
+							String ownerName = null;
+							String frnConsignCode = null;
+							String frnConsignName = null;
+							if (obj != null) {
+								rmbPrice = (BigDecimal) obj[0];//人民币
+								usdPrice = (BigDecimal) obj[1];//美元
+								agentCode = (String) obj[2];//申报单位代码
+								agentName = (String) obj[3];//申报单位名称
+								noteS = (String) obj[4];//备注
+								ownerCode = (String) obj[5];//生产销售单位代码
+								ownerName = (String) obj[6];//生产销售单位名称
+								frnConsignCode = (String) obj[7];//生产销售单位代码
+								frnConsignName = (String) obj[8];//生产销售单位名称
+							}
+
+							Object[] man = tmpMap11.get(entryId);
+							String checkFlag = null;
+							Date manCreateTime = null;
+							Date manChkTimeStart = null;
+							Date manChkTimeEnd = null;
+							String manProcResult = null;
+							String manProcIdea = null;
+							String checkCustomsCode = null;
+							if (man != null) {
+								checkFlag = (String) man[0];//是否查验送检
+								manCreateTime = (Date) man[1];//指令下达时间
+								manChkTimeStart = (Date) man[2];//查验开始时间
+								manChkTimeEnd = (Date) man[3];//查验结束时间
+								manProcResult = (String) man[4];//处理结果
+								manProcIdea = (String) man[5];//处理意见
+								checkCustomsCode = (String) man[6];//查验关区
+							}
+
+							if ("I".equals(ieFlag)) {
+								if (realArriveDate != null) {
+									ieDate = realArriveDate;
+								} else {
+									if (ieDate != null) {
+										// 由于报关单表中I_E_DATE精度不够,需要做(非精准)修正(用户给的建议应该是错的,模糊处理下好了,时分为0的设置为12点)
+										if ("I".equals(ieFlag)) {// 入境
+											String ieDateStr = fullSdf.format(ieDate);
+											if (ieDateStr.endsWith("00:00:00")) {
+												ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+												try {
+													ieDate = fullSdf.parse(ieDateStr);
+												} catch (ParseException e1) {
+													// TODO Auto-generated catch block
+													e1.printStackTrace();
+												}
+											}
+										}
+									}
+								}
+							} else {
+								realArriveDate = tmpMap12.get(entryId);
+								//ARRIVAL_DATE为00:00:00时赋值12:00:00
+								if (realArriveDate != null) {
+									String ieDateStr = fullSdf.format(realArriveDate);
+									if (ieDateStr.endsWith("00:00:00")) {
+										ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+										try {
+											realArriveDate = fullSdf.parse(ieDateStr);
+										} catch (ParseException e1) {
+											// TODO Auto-generated catch block
+											e1.printStackTrace();
+										}
+									}
+								}
+							}
+
+							EntryHead e = new EntryHead();
+							e.setEntryId(entryId);
+							e.setAcceptDate(authDate != null ? authDate : orderDate);
+							e.setCertRlsDate(certRlsDate);// 70单证放行时间
+							e.setReleaseDate(releaseDate);//80
+							e.setPreReleaseDate(preReleaseDate);// 81时间
+							e.setPassMode("3");// 转关
+							if ("I".equals(ieFlag)) {
+								if (examDate != null) {
+									e.setPassMode("3");// 转关
+								} else {
+									e.setPassMode("1");// 一体化
+								}
+							} else {
+								e.setPassMode("3");// 转关
+							}
+							e.setDeclPort(declPort);
+							e.setIePort(iePort);
+							e.setIeDate(ieDate);
+							e.setDeclDate(declDate);
+							e.setIeFlag(ieFlag);
+							e.setTrafMode(trafMode);
+							e.setConsignScc(consignScc);
+							e.setConsignCode(consignCode);
+							e.setConsignName(consignName);
+							e.setTradeCountry(tradeCountry);
+							e.setTradeMode(tradeMode);
+							e.setOrderReceiveDate(orderReceiveDate);//30接单时间
+							e.setCompEleDate(compEleDate);// 00200000完整申报电子申报时间
+							e.setExamDate(examDate);// 转关数据发送时间
+							e.setCheckDate(checkDate);// 转关数据核销时间
+							e.setProfVerifyFlag(profVerifyDate != null ? "1" : "0");
+							e.setNewTwoStepFlag((null != newTwoStep && !"".equals(newTwoStep) && newTwoStep.equals("1")) ? "1" : "0");
+							e.setEleDeclDate(eleDeclDate);
+							e.setAssessStartDate(assessStartDate);
+							e.setAssessEndDate(assessEndDate);
+							e.setRefundDate(refundDate);
+							e.setRefundFlag(refundDate != null ? "1" : "0");
+							e.setCheckFlag(manCreateTime != null ? "1" : "0");
+							long orderReceiveCost = 0L;//接单耗时:30000000-10000000
+							//20210423新增处理10节点无时间时的赋值,避免程序报错
+							if (orderReceiveDate != null && (authDate != null || orderDate != null)) {
+								Long time = authDate != null ? authDate.getTime() : orderDate.getTime();
+								orderReceiveCost = (orderReceiveDate.getTime() - time) / 1000;
+								e.setOrderReceiveCost(orderReceiveCost);
+							} else {
+								e.setOrderReceiveCost(null);
+							}
+
+							long hgCost = 0L;
+							long totalCost = 0L;
+							//edi_remark11位为T表示提前申报
+							if ("T".equals(advanceDecl)) {
+								e.setDeclAdvanceFlag("1");
+							} else {
+								e.setDeclAdvanceFlag("0");
+							}
+							if ("I".equals(ieFlag)) {// 入境
+								/**根据综合处杨科提出的修改意见,这里将原来'电脑审单时间早于货物运抵时间'改成'申报时间早于货物运抵时间'的为提前申报*/
+							/*if (authDate.before(ieDate)) {
+								authDate = ieDate;
+								e.setDeclAdvanceFlag("1");
+							}*/
+								if (ieDate != null) {
+									if (declDate.before(ieDate)) {
+										authDate = ieDate;
+										//								e.setDeclAdvanceFlag("1");
+									} else {
+										//20210423新增处理10节点无时间时的赋值,避免程序报错
+										if (authDate == null) {
+											authDate = orderDate;
+										}
+									}
+								}
+								if (e.getPreReleaseDate() == null && e.getReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								} else if (e.getPreReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getPreReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								}
+								if (hgCost < 0) {
+									hgCost = 0L;
+								}
+								if (totalCost < 0) {
+									totalCost = hgCost;
+								}
+							} else {// 出境 海关通关时间=70/81之间较早的时间-受理时间
+								// 20191211 出口口岸清关、一体化:公路取BINDING_ROAD_TRANSPORT表GEN_DATE;铁路、邮路运输的整体通关时长=海关通关时长
+								//20210423新增处理10节点无时间时的赋值,避免程序报错
+								if (authDate == null) {
+									authDate = orderDate;
+								}
+								if (realArriveDate != null) {
+									//20211209出口舱单有时间赋值给出口货物运抵时间否则使用10审单时间,同时进行计算
+									e.setExInPortDate(realArriveDate);
+								} else {
+									// 取不到数据的统一将货物入境时间设置为受理时间
+									if ("3".equals(trafMode) || "6".equals(trafMode) || "9".equals(trafMode)) {// 其它运输方式也假设归为一类
+										e.setExInPortDate(authDate);
+									} else if ("4".equals(trafMode)) {//TODO 公路:暂时取不到数据
+										e.setExInPortDate(authDate);
+									} else {
+										e.setExInPortDate(authDate);// TODO 出口水运、空运通关时长第一个时间点数据来源还未下发,先临时赋值
+									}
+								}
+
+								if (e.getCertRlsDate() == null) {
+									if (e.getPreReleaseDate() != null) {
+										if (authDate != null) {
+											hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+
+								} else {
+									if (e.getPreReleaseDate() != null) {
+										if (e.getCertRlsDate().before(e.getPreReleaseDate())) {
+											if (authDate != null) {
+												hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										} else {
+											if (authDate != null) {
+												hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										}
+
+									} else {
+										if (authDate != null) {
+											hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+								}
+							}
+
+							e.setMainStatus("1");
+							e.setCuCost(hgCost);// 海关通关时间(秒)
+							e.setTotalCost(totalCost);// 总体通关时间
+							e.setGrossWt(grossWt);//净重
+							e.setNetWt(netWt);//毛重
+							e.setRmbPrice(rmbPrice);//人民币
+							e.setUsdPrice(usdPrice);//美元
+							e.setContainer(container);//集装箱数量
+							e.setAgentCode(agentCode);//申报单位代码
+							e.setAgentName(agentName);//申报单位名称
+							e.setNoteS(noteS);//备注
+							e.setOwnerCode(ownerCode);//生产销售单位代码
+							e.setOwnerName(ownerName);//生产销售单位名称
+							e.setFrnConsignCode(frnConsignCode);
+							e.setFrnConsignName(frnConsignName);
+							if ("I".equals(ieFlag)) {// 仅入境转关单有以下值
+								long beforeDeclCost = 0L;
+								if (checkDate != null && examDate != null) {
+									beforeDeclCost = (eleDeclDate.getTime() - checkDate.getTime()) / 1000;
+									if (beforeDeclCost < 0) {
+										beforeDeclCost = 0L;
+									}
+								}
+								e.setBeforeDeclCost(beforeDeclCost);// 申报前准备时间
+							} else {// TODO 20191025 出境转关单有 货物进港时间 值
+								long beforeDeclCost = e.getExInPortDate() != null
+										? (authDate.getTime() - e.getExInPortDate().getTime())
+										: 0L;
+								if (beforeDeclCost < 0) {
+									beforeDeclCost = 0L;
+								}
+								e.setBeforeDeclCost(beforeDeclCost);
+							}
+							//报关模式
+							String mode = null;
+							//部分订单既是提前申报又是两步申报,不是两步和提前申报的单子均为一般申报,twoStepDecl:0或者空格:代表一分模式
+							if ("1".equals(e.getDeclAdvanceFlag()) && (null == twoStepDecl || "".equals(twoStepDecl) || "0".equals(twoStepDecl))) {
+								mode = "3";
+							} else if ("1".equals(e.getDeclAdvanceFlag()) && (null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2,3";
+							} else if ((null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2";
+							} else {
+								mode = "1";
+							}
+							e.setDeclMode(mode);//报关模式
+							//70000000、80000000、81000000、82000000均为空则表示未放行
+							if (preReleaseDate == null && certRlsDate == null && releaseDate == null && passDate == null) {
+								e.setDeclStatus("1");
+							} else if (releaseDate != null) {
+								//80表示已结关
+								e.setDeclStatus("3");
+							} else {
+								e.setDeclStatus("2");
+							}
+
+							e.setManCreateTime(manCreateTime);//指令下达时间
+							e.setManChkTimeStart(manChkTimeStart);//查验开始时间
+							e.setManChkTimeEnd(manChkTimeEnd);//查验结束时间
+							e.setManProcResult(manProcResult);
+							e.setManProcIdea(manProcIdea);
+							e.setCheckCustomsCode(checkCustomsCode);
+							dao.executeUpdate("delete from WXJY_ENTRY_HEAD where ENTRY_ID = ?", entryId);
+							entryHeadRepository.save(e);
+						}
+						//ciqCode存在超过600个情况,每个报关单每次查都拼接重复工作太多,所以提出来
+						//先删除这些报关单下的所有商品信息
+						dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						try {
+							StringBuilder codeListSb = new StringBuilder();
+							int x = 1;
+							for (Iterator it = allCode.iterator(); it.hasNext(); ) {
+								String iqCode = (String) it.next();
+
+								codeListSb.append("'").append(iqCode).append("',");
+								if ((x % 600 == 0 || !it.hasNext()) && codeListSb.length() > 0) {
+									codeListSb.deleteCharAt(codeListSb.length() - 1);
+									String iqCodes = codeListSb.toString();
+									//报关单表体,报关单第九位0=出口1=进口
+									sql = "select ENTRY_ID,G_NO,CODE_TS,G_NAME,QTY_1,RMB_PRICE,USD_PRICE,G_MODEL,G_CERT_FLAG," +
+											"(select max(a.CREATE_DATE) from ENTRY_WORKFLOW a where a.STEP_ID='80000000' AND l.ENTRY_ID = a.ENTRY_ID) as RELEASE_DATE," +
+											"UNGID,UNG_FLAG,UNG_MODEL,UNG_CLASSIFY,UNG_G_NAME,PRODUCT_CHAR_CODE,IQ_CODE " +
+											"from ENTRY_LIST l where l.ENTRY_ID in (" + entryIds + ") " +
+											"and ((substr(l.ENTRY_ID,9,1) ='0' and (l.IQ_CODE in (" + iqCodes + ") or l.UNGID is not null " +
+											"or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')) or " +
+											"(substr(l.ENTRY_ID,9,1) = '1' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')));";
+									List<Object[]> codeTsList = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									if (null != codeTsList && codeTsList.size() > 0) {
+										//由于新组合查询不设定某个固定节点更新数据,会存在相同报关单在后面更新流程节点时间,所以先从中间表查出数据进行更新
+										//会存在商品金额为空的情况,如果只有一条商品并商品为空则报关单头要删除
+										EntryList entity = null;
+										for (Object[] codeTs : codeTsList) {//将根据报关单编号查询到的商品编号及报关单号添加到KPI_ENTRY_HEAD_NEW_COPY表里
+											entity = new EntryList();
+											entity.setEntryId(codeTs[0] != null ? codeTs[0].toString() : "");
+											entity.setGNo(codeTs[1] != null ? (BigDecimal) codeTs[1] : new BigDecimal(0));
+											entity.setCodeTs(codeTs[2] != null ? codeTs[2].toString() : "");
+											entity.setGName(codeTs[3] != null ? codeTs[3].toString() : "");
+											entity.setQty1(codeTs[4] != null ? (BigDecimal) codeTs[4] : new BigDecimal(0));
+											entity.setRmbPrice(codeTs[5] != null ? (BigDecimal) codeTs[5] : new BigDecimal(0));
+											entity.setUsdPrice(codeTs[6] != null ? (BigDecimal) codeTs[6] : new BigDecimal(0));
+											entity.setGModel(codeTs[7] != null ? codeTs[7].toString() : "");
+											entity.setGCertFlag(codeTs[8] != null ? codeTs[8].toString() : "");
+											entity.setReleaseDate(codeTs[9] != null ? (Date) codeTs[9] : null);
+											entity.setCodeTsShort(codeTs[2] != null ? codeTs[2].toString().substring(0, 6) : "");
+											entity.setUngid(codeTs[10] != null ? codeTs[10].toString() : "");
+											entity.setUngFlag(codeTs[11] != null ? codeTs[11].toString() : "");
+											entity.setUngModel(codeTs[12] != null ? codeTs[12].toString() : "");
+											entity.setUngClassify(codeTs[13] != null ? codeTs[13].toString() : "");
+											entity.setUngGName(codeTs[14] != null ? codeTs[14].toString() : "");
+											entity.setIqCode(codeTs[16] != null ? codeTs[16].toString() : "");
+											//货物属性,判断货物属性是否是31/散装危险化学品,32/件装危险化学品
+											String goods_attr = "";
+											if (codeTs[15] != null) {
+												goods_attr = (String) codeTs[15];
+												if (goods_attr.contains("31")) {
+													goods_attr = "31";
+												} else if (goods_attr.contains("32")) {
+													goods_attr = "32";
+												} else {
+													goods_attr = "";
+												}
+											}
+											entity.setProductCharCode(goods_attr);
+											//查出的数据可能存在ciqCode或者UNGID为空的情况,报关单第九位0=出口1=进口
+											//出口按ciq编码、ungid不为空和货物属性包含31或32
+											//进口按ungid不为空或货物属性
+											String ieFlag = codeTs[0] != null ? codeTs[0].toString().substring(8, 9) : "";
+											//货物属性为不空时可以初步判定该商品是危化品,接下来只需判断该商品是否还包含危险货物的属性
+											if (entity.getProductCharCode() != null && !"".equals(entity.getProductCharCode())) {
+												if (codeTs[10] != null) {
+													entity.setGoodsType("1,2,3");
+												} else {
+													entity.setGoodsType("1");
+												}
+											} else {
+												//货物属性为空时
+												//出口
+												if (ieFlag.equals("0")) {
+													if (codeTs[16] != null) {
+														//syncChemicalsCiq只可能是包含了危化品,因为这个表的数据就是查询的系统中危险品模块里用户已经维护的包含了危化品的数据
+														Object[] obj = (Object[]) dao.getObjectBySql("select * from iedg_sync_chemicals_ciq where CIQ_CODE = ?", (String) codeTs[16]);
+														if (obj != null) {
+															if (codeTs[16] != null) {
+																entity.setGoodsType("1,2,3");
+															} else {
+																entity.setGoodsType("1");
+															}
+														} else {
+															entity.setGoodsType("2");
+														}
+													} else {
+														entity.setGoodsType("2");
+													}
+												} else {
+													//进口
+													entity.setGoodsType("2");
+												}
+											}
+											entity.setId(dao.getGuidStringBySql());
+											entryListRepository.save(entity);
+										}
+									}
+									codeListSb.delete(0, codeListSb.length());
+								}
+								x++;
+							}
+						} catch (Exception ex) {
+							// 主键可能因为多次结关跨天,导致新纪录主键重复
+							logger.error("保存危险品新维度一体化通关中间记录失败,重新保存");
+							dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						}
+						tmpMap1.clear();
+						tmpMap2.clear();
+						tmpMap5.clear();
+						tmpMap9.clear();
+						tmpMap10.clear();
+						tmpMap12.clear();
+						tmpMap11.clear();
+						sb.delete(0, sb.length());
+					}
+					i++;
+				}
+			}
+		}
+	}
+
+	public void kaqgDeclMain(Date statBegin, Date statEnd, List<String> code, List<String> allCode) {
+		Map<String, Object[]> tmpMap1 = new HashMap<String, Object[]>();
+		Map<String, Date[]> tmpMap2 = new HashMap<String, Date[]>();
+		Map<String, Date> tmpMap9 = new HashMap<String, Date>();
+		Map<String, Object[]> tmpMap10 = new HashMap<String, Object[]>();
+		Map<String, Object[]> tmpMap11 = new HashMap<String, Object[]>();
+		Map<String, Date> tmpMap12 = new HashMap<String, Date>();
+		if (code != null && code.size() > 0) {
+			List<String> entryH2018IdList = new ArrayList<>();//存放所有
+			StringBuilder codeSb = new StringBuilder();
+			int j = 1;
+			for (Iterator itera = code.iterator(); itera.hasNext(); ) {
+				String ciqCode = (String) itera.next();
+
+				codeSb.append("'").append(ciqCode).append("',");
+				if ((j % 600 == 0 || !itera.hasNext()) && codeSb.length() > 0) {
+					codeSb.deleteCharAt(codeSb.length() - 1);
+					String codes = codeSb.toString();
+					//存在后续查出的报关单前面已经有,所以需要处理去重
+					//出口按编码、ungid不为空和货物属性包含31或32
+					//进口按ungid不为空或货物属性包含31或32
+					String sql = "select distinct(d.ENTRY_ID) from ENTRY_HEAD d, ENTRY_WORKFLOW w, ENTRY_LIST l where " +
+							"d.ENTRY_ID like '47%' and (substr(d.EDI_REMARK,7,1)!='C' or substr(d.EDI_REMARK,15,1)!='1') " +
+							"and (substr(d.EDI_REMARK,17,1) not in ('a','c','C','d','e','f') or " +
+							"(substr(d.EDI_REMARK,17,1) = 'C' and substr(d.EDI_REMARK,8,1) != 'G')) and substr(d.I_E_PORT,0,2)=substr(d.DECL_PORT,0,2) " +
+							"and d.ENTRY_ID = w.ENTRY_ID and d.ENTRY_ID = l.ENTRY_ID and w.STEP_ID = '80000000' and w.CREATE_DATE >= ? and w.CREATE_DATE < ? " +
+							"and ((d.I_E_FLAG = 'E' and (l.IQ_CODE in (" + codes + ") or l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%')) or (d.I_E_FLAG = 'I' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' " +
+							"or l.PRODUCT_CHAR_CODE like '%32%'))) order by d.ENTRY_ID;";
+					List<String> entryIdList = (List<String>) h2018Dao.getQueryBySql(sql, statBegin, statEnd);
+					entryH2018IdList.addAll(entryIdList);
+					codeSb.delete(0, codeSb.length());
+				}
+				j++;
+			}
+			//用JDK1.8 Stream中对List进行去重:list.stream().distinct();
+			entryH2018IdList = (List) entryH2018IdList.stream().distinct().collect(Collectors.toList());
+			if (entryH2018IdList != null && entryH2018IdList.size() > 0) {
+				StringBuilder sb = new StringBuilder();
+				int i = 1;
+				for (Iterator iterator = entryH2018IdList.iterator(); iterator.hasNext(); ) {
+					String id = (String) iterator.next();
+
+					sb.append("'").append(id).append("',");
+
+					if ((i % 300 == 0 || !iterator.hasNext()) && sb.length() > 0) {
+						List<String> impIdList2 = new ArrayList<String>();//20191210 进口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_LIST_NEW查到精确I_E_DATE
+						List<String> impIdList3 = new ArrayList<String>();//20211210 出口水运(新舱单部分)、空运可以从新舱单系统MANIFEST_MONITOR_NEW查到精确ARRIVAL_DATE
+						sb.deleteCharAt(sb.length() - 1);
+						String ids = sb.toString();
+						String entryIds = sb.toString();
+						String sql = "select h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT,CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY,"
+								+ " TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),nvl(count(c.ENTRY_ID),0),substr(EDI_REMARK,53,1) "
+								+ "from ENTRY_HEAD h left join ENTRY_CONTAINER c on h.ENTRY_ID = c.ENTRY_ID where h.ENTRY_ID in ("
+								+ ids + ")  group by h.ENTRY_ID, I_E_DATE, I_E_PORT, I_E_FLAG, TRAF_MODE, D_DATE, DECL_PORT, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_I_E_COUNTRY," +
+								"TRADE_MODE, nvl(GROSS_WT,0), nvl(NET_WT,0), substr(EDI_REMARK,11,1), substr(EDI_REMARK,41,1),substr(EDI_REMARK,53,1);";
+						List<Object[]> list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							String idH = (String) d[0];
+							String iEFlag = (String) d[3];
+							String traMode = (String) d[4];
+							if ("I".equals(iEFlag)) {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList2.add(idH);
+								}
+							} else {
+								if ("2".equals(traMode) || "5".equals(traMode)) {
+									impIdList3.add(idH);
+								}
+							}
+							tmpMap1.put((String) d[0],
+									new Object[]{(Date) d[1], (String) d[2], (String) d[3], (String) d[4], (Date) d[5], (String) d[6], (String) d[7], (String) d[8], (String) d[9], (String) d[10],
+											(String) d[11], (BigDecimal) d[12], (BigDecimal) d[13], (String) d[14], (String) d[15], (BigInteger) d[16], (String) d[17]});
+						}
+
+						sql = "select h.ENTRY_ID,(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='10000000' AND h.ENTRY_ID = a.ENTRY_ID) as authDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW a where STEP_ID='80000000' AND h.ENTRY_ID = a.ENTRY_ID) as releaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='81000000' AND h.ENTRY_ID = b.ENTRY_ID) as preReleaseDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='70000000' AND h.ENTRY_ID = c.ENTRY_ID) as certRlsDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='82000000' AND h.ENTRY_ID = c.ENTRY_ID) as passDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='30000000' AND h.ENTRY_ID = c.ENTRY_ID) as orderDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='30000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as orderReceiveDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW c where STEP_ID='00200000' AND h.ENTRY_ID = c.ENTRY_ID) as compEleDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='33000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%' and PROC_ER like '47%') as profVerifyDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='00000000' AND h.ENTRY_ID = b.ENTRY_ID) as eleDeclDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%M%') as assessStartDate, "
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID='26000000' AND h.ENTRY_ID = b.ENTRY_ID AND PROC_RESULT like '%G%') as assessEndDate,"
+								+ "(select max(CREATE_DATE) from ENTRY_WORKFLOW b where STEP_ID in ('10000000','10200000','20000000') AND h.ENTRY_ID = b.ENTRY_ID and substr(b.status_code,4,1) = 5 and b.proc_result like '%E%') as refundDate "
+								+ "from ENTRY_HEAD h where h.ENTRY_ID in (" + ids
+								+ ") group by ENTRY_ID;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap2.put((String) d[0], new Date[]{(Date) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (Date) d[5], (Date) d[6], (Date) d[7], (Date) d[8], (Date) d[9],
+									(Date) d[10], (Date) d[11], (Date) d[12], (Date) d[13]});
+						}
+
+						sql = "select h.ENTRY_ID,substr(h.CHECK_REQUEST_TOTAL,-1,1),h.CREATE_TIME,h.MAN_CHK_TIME_START,h.MAN_CHK_TIME_END,MAN_PROC_RESULT,MAN_PROC_IDEA,CHECK_CUSTOMS_CODE "
+								+ "from CI_CHECK_MAN_WORK_HEAD h where h.CHECK_STATE = 'M' and h.MODIFY_TIME = "
+								+ "(select max(d.MODIFY_TIME) from CI_CHECK_MAN_WORK_HEAD d where d.ID = h.ID) and h.ENTRY_ID in(" + ids + ") ;";
+						list = (List<Object[]>) inspDao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap11.put((String) d[0], new Object[]{(String) d[1], (Date) d[2], (Date) d[3], (Date) d[4], (String) d[5], (String) d[6], (String) d[7]});
+						}
+
+						//货运量毛重、净重、货运值人民币、美元、集装箱数量GROUP_CONCAT方法放在此处当传一个报关单id并且没有随附单证时会报错,所以加上nvl()
+						sql = "select h.ENTRY_ID,sum(nvl(l.RMB_PRICE,0)),sum(nvl(l.USD_PRICE,0)),h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,"
+								+ "h.OWNER_CODE,h.OWNER_NAME,FRN_CONSIGN_CODE,FRN_CONSIGN_NAME from ENTRY_HEAD h left join ENTRY_LIST l on h.ENTRY_ID=l.ENTRY_ID "
+								+ "where h.ENTRY_ID in("
+								+ ids + ") group by h.ENTRY_ID,h.AGENT_CODE,h.AGENT_NAME,h.NOTE_S,h.OWNER_CODE,h.OWNER_NAME,FRN_CONSIGN_CODE,FRN_CONSIGN_NAME;";
+						list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+						for (Object[] d : list) {
+							tmpMap10.put((String) d[0], new Object[]{(BigDecimal) d[1], (BigDecimal) d[2], (String) d[3], (String) d[4], (String) d[5], (String) d[6], (String) d[7],
+									(String) d[8], (String) d[9]});
+						}
+						if (impIdList2.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList2) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 进口新舱单水运、空运的I_E_DATE精准值由MANIFEST_LIST_NEW的REAL_ARRIVE_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号
+							sql = "select a.ENTRY_ID, b.REAL_ARRIVE_DATE from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_LIST_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE and to_char(a.I_E_DATE,'yyyyMMdd') = to_char(b.REAL_ARRIVE_DATE,'yyyyMMdd')";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap9.put(entryId, (Date) d[1]);
+							}
+							impIdList2.clear();
+						}
+						//出口舱单
+						if (impIdList3.size() > 0) {
+							sb.delete(0, sb.length());
+							for (String impId : impIdList3) {
+								sb.append("'").append(impId).append("',");
+							}
+							sb.deleteCharAt(sb.length() - 1);
+							ids = sb.toString();
+							// 出口新舱单水运、空运可能提前但航班晚到,无法用时间去精准定位哪一条会卸载很多次,精准值由MANIFEST_MONITOR_NEW的ARRIVAL_DATE给定
+							// 注意:提运单号会被重用,当天的也可能有不同报关单使用了相同的提运单号,ARRIVAL_DATE为00:00:00的赋值12:00:00
+							//20210508舱单只获取和武汉海关有关的数据进行时间赋值,所以a.I_E_PORT = b.CUSTOMS_CODE
+							sql = "select a.ENTRY_ID, min(b.ARRIVAL_DATE) from ENTRY_HEAD a, `g_whdb_h2000_ims_recv`.MANIFEST_MONITOR_NEW b where a.ENTRY_ID in ("
+									+ ids + ") and a.BILL_NO = b.BILL_NO and a.I_E_PORT = b.CUSTOMS_CODE group by a.ENTRY_ID";
+
+							list = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+							for (Object[] d : list) {
+								String entryId = (String) d[0];
+								tmpMap12.put(entryId, (Date) d[1]);
+							}
+							impIdList3.clear();
+						}
+						for (Map.Entry<String, Object[]> d : tmpMap1.entrySet()) {
+							String entryId = d.getKey();
+							Object[] v = d.getValue();
+							Date ieDate = (Date) v[0];// 货物运抵时间
+							String iePort = (String) v[1];
+							String ieFlag = (String) v[2];
+							String trafMode = (String) v[3];
+							Date declDate = (Date) v[4];// 申报时间
+							String declPort = (String) v[5];// 申报口岸
+							String consignScc = (String) v[6];
+							String consignCode = (String) v[7];
+							String consignName = (String) v[8];
+							String tradeCountry = (String) v[9];
+							String tradeMode = (String) v[10];
+							BigDecimal grossWt = (BigDecimal) v[11];//毛重
+							BigDecimal netWt = (BigDecimal) v[12];//净重
+							String advanceDecl = (String) v[13];//判断是否是提前申报
+							//两步申报都下发到了h2018所以使用00200000节点判断只属于两步申报其中一种类型,
+							//应当使用edi_remark41位判断是否有值(edi_remark41值为1,2,3均为两步申报)
+							String twoStep = (String) v[14];//判断是否是两步申报
+							//2018存在twoStepValue截取出来值为' '情况,需要单独处理
+							String twoStepDecl = (" ").equals(twoStep) ? "" : twoStep;
+							BigInteger container = (BigInteger) v[15];// 集装箱数量
+							String newTwoStep = (String) v[16];//判断是否是新两步申报
+
+							Date[] all = tmpMap2.get(entryId);
+							Date authDate = null;
+							Date releaseDate = null;
+							Date preReleaseDate = null;
+							Date certRlsDate = null;
+							Date passDate = null;
+							Date orderDate = null;
+							Date orderReceiveDate = null;
+							Date compEleDate = null;
+							Date profVerifyDate = null;
+							Date eleDeclDate = null;
+							Date assessStartDate = null;
+							Date assessEndDate = null;
+							Date refundDate = null;
+							if (all != null) {
+								authDate = all[0];// 10审单受理时间
+								releaseDate = all[1];// 80结关时间
+								preReleaseDate = all[2];// 81担保放行时间
+								certRlsDate = all[3];// 70单证放行时间
+								passDate = all[4];// 82000000通道验放
+								orderDate = all[5];// 30000000现场接单
+								orderReceiveDate = all[6];// 30现场接单时间
+								compEleDate = all[7];// 00200000完整申报电子申报时间
+								profVerifyDate = all[8];// 33专业审证单核时间
+								eleDeclDate = all[9];// 00电子申报时间
+								assessStartDate = all[10];// 26排查处置/现场验估时间
+								assessEndDate = all[11];// 26验估处置完毕时间
+								refundDate = all[12];// 退单时间
+							}
+
+							Date realArriveDate = tmpMap9.get(entryId);
+							Object[] obj = tmpMap10.get(entryId);
+							BigDecimal rmbPrice = zero;
+							BigDecimal usdPrice = zero;
+							String agentCode = null;
+							String agentName = null;
+							String noteS = null;
+							String ownerCode = null;
+							String ownerName = null;
+							String frnConsignCode = null;
+							String frnConsignName = null;
+							if (obj != null) {
+								rmbPrice = (BigDecimal) obj[0];//人民币
+								usdPrice = (BigDecimal) obj[1];//美元
+								agentCode = (String) obj[2];//申报单位代码
+								agentName = (String) obj[3];//申报单位名称
+								noteS = (String) obj[4];//备注
+								ownerCode = (String) obj[7];//生产销售单位代码
+								ownerName = (String) obj[8];//生产销售单位名称
+								frnConsignCode = (String) obj[7];//生产销售单位代码
+								frnConsignName = (String) obj[8];//生产销售单位名称
+							}
+
+							Object[] man = tmpMap11.get(entryId);
+							String checkFlag = null;
+							Date manCreateTime = null;
+							Date manChkTimeStart = null;
+							Date manChkTimeEnd = null;
+							String manProcResult = null;
+							String manProcIdea = null;
+							String checkCustomsCode = null;
+							if (man != null) {
+								checkFlag = (String) man[0];//是否查验送检
+								manCreateTime = (Date) man[1];//指令下达时间
+								manChkTimeStart = (Date) man[2];//查验开始时间
+								manChkTimeEnd = (Date) man[3];//查验结束时间
+								manProcResult = (String) man[4];//处理结果
+								manProcIdea = (String) man[5];//处理意见
+								checkCustomsCode = (String) man[6];//查验关区
+							}
+
+							if ("I".equals(ieFlag)) {
+								if (realArriveDate != null) {
+									ieDate = realArriveDate;
+								} else {
+									if (ieDate != null) {
+										// 由于报关单表中I_E_DATE精度不够,需要做(非精准)修正(用户给的建议应该是错的,模糊处理下好了,时分为0的设置为12点)
+										if ("I".equals(ieFlag)) {// 入境
+											String ieDateStr = fullSdf.format(ieDate);
+											if (ieDateStr.endsWith("00:00:00")) {
+												ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+												try {
+													ieDate = fullSdf.parse(ieDateStr);
+												} catch (ParseException e1) {
+													// TODO Auto-generated catch block
+													e1.printStackTrace();
+												}
+											}
+										}
+									}
+								}
+							} else {
+								realArriveDate = tmpMap12.get(entryId);
+								//ARRIVAL_DATE为00:00:00时赋值12:00:00
+								if (realArriveDate != null) {
+									String ieDateStr = fullSdf.format(realArriveDate);
+									if (ieDateStr.endsWith("00:00:00")) {
+										ieDateStr = ieDateStr.substring(0, 11) + IE_DATE_ADAPT;
+										try {
+											realArriveDate = fullSdf.parse(ieDateStr);
+										} catch (ParseException e1) {
+											// TODO Auto-generated catch block
+											e1.printStackTrace();
+										}
+									}
+								}
+							}
+
+							EntryHead e = new EntryHead();
+							e.setEntryId(entryId);
+							e.setAcceptDate(authDate != null ? authDate : orderDate);
+							e.setCertRlsDate(certRlsDate);// 70单证放行时间
+							e.setReleaseDate(releaseDate);//80
+							e.setPreReleaseDate(preReleaseDate);// 81时间
+							e.setPassMode("2");// 一体化通关
+							e.setDeclPort(declPort);
+							e.setIePort(iePort);
+							e.setIeDate(ieDate);
+							e.setDeclDate(declDate);
+							e.setIeFlag(ieFlag);
+							e.setTrafMode(trafMode);
+
+							e.setConsignScc(consignScc);
+							e.setConsignCode(consignCode);
+							e.setConsignName(consignName);
+							e.setTradeCountry(tradeCountry);
+							e.setTradeMode(tradeMode);
+							e.setOrderReceiveDate(orderReceiveDate);//30接单时间
+							e.setCompEleDate(compEleDate);// 00200000完整申报电子申报时间
+							e.setProfVerifyFlag(profVerifyDate != null ? "1" : "0");
+							e.setNewTwoStepFlag((null != newTwoStep && !"".equals(newTwoStep) && newTwoStep.equals("1")) ? "1" : "0");
+							e.setEleDeclDate(eleDeclDate);
+							e.setAssessStartDate(assessStartDate);
+							e.setAssessEndDate(assessEndDate);
+							e.setRefundDate(refundDate);
+							e.setRefundFlag(refundDate != null ? "1" : "0");
+							e.setCheckFlag(manCreateTime != null ? "1" : "0");
+							long orderReceiveCost = 0L;//接单耗时:30000000-10000000
+							//20210423新增处理10节点无时间时的赋值,避免程序报错
+							if (orderReceiveDate != null && (authDate != null || orderDate != null)) {
+								Long time = authDate != null ? authDate.getTime() : orderDate.getTime();
+								orderReceiveCost = (orderReceiveDate.getTime() - time) / 1000;
+								e.setOrderReceiveCost(orderReceiveCost);
+							} else {
+								e.setOrderReceiveCost(null);
+							}
+
+							long hgCost = 0L;
+							long totalCost = 0L;
+							//edi_remark11位为T表示提前申报
+							if ("T".equals(advanceDecl)) {
+								e.setDeclAdvanceFlag("1");
+							} else {
+								e.setDeclAdvanceFlag("0");
+							}
+							if ("I".equals(ieFlag)) {// 入境
+								/**根据综合处杨科提出的修改意见,这里将原来'电脑审单时间早于货物运抵时间'改成'申报时间早于货物运抵时间'的为提前申报*/
+								if (ieDate != null) {
+									if (declDate.before(ieDate)) {
+										authDate = ieDate;
+										//								e.setDeclAdvanceFlag("1");
+									} else {
+										//20210423新增处理10节点无时间时的赋值,避免程序报错
+										if (authDate == null) {
+											authDate = orderDate;
+										}
+									}
+								}
+								if (e.getPreReleaseDate() == null && e.getReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								} else if (e.getPreReleaseDate() != null) {
+									if (authDate != null) {
+										hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+									}
+									if (ieDate != null) {
+										totalCost = (e.getPreReleaseDate().getTime() - ieDate.getTime()) / 1000;
+									}
+								}
+								if (hgCost < 0) {
+									hgCost = 0L;
+								}
+								if (totalCost < 0) {
+									totalCost = hgCost;
+								}
+								//新组合查询用00-货物运抵,组合查询用10-货物运抵
+								e.setBeforeDeclCost((eleDeclDate.getTime() - e.getIeDate().getTime()) / 1000);// 申报前准备时间
+								if (e.getBeforeDeclCost() < 0) {
+									e.setBeforeDeclCost(0L);
+								}
+							} else {// 出境 海关通关时间=70/81之间较早的时间-受理时间
+								// 20191211 出口口岸清关、一体化:公路取BINDING_ROAD_TRANSPORT表GEN_DATE;铁路、邮路运输的整体通关时长=海关通关时长
+								//20210423新增处理10节点无时间时的赋值,避免程序报错
+								if (authDate == null) {
+									authDate = orderDate;
+								}
+								if (realArriveDate != null) {
+									//20211209出口舱单有时间赋值给出口货物运抵时间否则使用10审单时间,同时进行计算
+									e.setExInPortDate(realArriveDate);
+								} else {
+									// 取不到数据的统一将货物入境时间设置为受理时间
+									if ("3".equals(trafMode) || "6".equals(trafMode) || "9".equals(trafMode)) {// 其它运输方式也假设归为一类
+										e.setExInPortDate(authDate);
+									} else if ("4".equals(trafMode)) {//TODO 公路:暂时取不到数据
+										e.setExInPortDate(authDate);
+									} else {
+										e.setExInPortDate(authDate);// TODO 出口水运、空运通关时长第一个时间点数据来源还未下发,先临时赋值
+									}
+								}
+
+								if (e.getCertRlsDate() == null) {
+									if (e.getPreReleaseDate() != null) {
+										if (authDate != null) {
+											hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+
+								} else {
+									if (e.getPreReleaseDate() != null) {
+										if (e.getCertRlsDate().before(e.getPreReleaseDate())) {
+											if (authDate != null) {
+												hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										} else {
+											if (authDate != null) {
+												hgCost = (e.getPreReleaseDate().getTime() - authDate.getTime()) / 1000;
+											}
+											totalCost = e.getExInPortDate() != null
+													? ((e.getPreReleaseDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+													: hgCost;
+										}
+
+									} else {
+										if (authDate != null) {
+											hgCost = (e.getCertRlsDate().getTime() - authDate.getTime()) / 1000;
+										}
+										totalCost = e.getExInPortDate() != null
+												? ((e.getCertRlsDate().getTime() - e.getExInPortDate().getTime()) / 1000)
+												: hgCost;
+									}
+								}
+								e.setBeforeDeclCost(e.getExInPortDate() != null
+										? ((eleDeclDate.getTime() - e.getExInPortDate().getTime()) / 1000)
+										: 0L);// 申报前准备时间
+								if (e.getBeforeDeclCost() < 0) {
+									e.setBeforeDeclCost(0L);
+								}
+							}
+
+							e.setMainStatus("1");
+							e.setCuCost(hgCost);// 海关通关时间(秒)
+							e.setTotalCost(totalCost);// 总体通关时间
+							e.setGrossWt(grossWt);//净重
+							e.setNetWt(netWt);//毛重
+							e.setRmbPrice(rmbPrice);//人民币
+							e.setUsdPrice(usdPrice);//美元
+							e.setContainer(container);//集装箱数量
+							e.setAgentCode(agentCode);//申报单位代码
+							e.setAgentName(agentName);//申报单位名称
+							e.setNoteS(noteS);//备注
+							e.setOwnerCode(ownerCode);//生产销售单位代码
+							e.setOwnerName(ownerName);//生产销售单位名称
+							e.setFrnConsignCode(frnConsignCode);
+							e.setFrnConsignName(frnConsignName);
+							//报关模式
+							String mode = null;
+							//部分订单既是提前申报又是两步申报,不是两步和提前申报的单子均为一般申报,twoStepDecl:0或者空格:代表一分模式
+							if ("1".equals(e.getDeclAdvanceFlag()) && (null == twoStepDecl || "".equals(twoStepDecl) || "0".equals(twoStepDecl))) {
+								mode = "3";
+							} else if ("1".equals(e.getDeclAdvanceFlag()) && (null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2,3";
+							} else if ((null != twoStepDecl && "".equals(twoStepDecl)) && !"0".equals(twoStepDecl)) {
+								mode = "2";
+							} else {
+								mode = "1";
+							}
+							e.setDeclMode(mode);//报关模式
+							//70000000、80000000、81000000、82000000均为空则表示未放行
+							if (preReleaseDate == null && certRlsDate == null && releaseDate == null && passDate == null) {
+								e.setDeclStatus("1");
+							} else if (releaseDate != null) {
+								//80表示已结关
+								e.setDeclStatus("3");
+							} else {
+								e.setDeclStatus("2");
+							}
+
+							e.setManCreateTime(manCreateTime);//指令下达时间
+							e.setManChkTimeStart(manChkTimeStart);//查验开始时间
+							e.setManChkTimeEnd(manChkTimeEnd);//查验结束时间
+							e.setManProcResult(manProcResult);
+							e.setManProcIdea(manProcIdea);
+							e.setCheckCustomsCode(checkCustomsCode);
+							dao.executeUpdate("delete from WXJY_ENTRY_HEAD where ENTRY_ID = ?", entryId);
+							entryHeadRepository.save(e);
+
+						}
+						//ciqCode存在超过600个情况,每个报关单每次查都拼接重复工作太多,所以提出来
+						//先删除这些报关单下的所有商品信息
+						dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						try {
+							StringBuilder codeListSb = new StringBuilder();
+							int x = 1;
+							for (Iterator it = allCode.iterator(); it.hasNext(); ) {
+								String iqCode = (String) it.next();
+
+								codeListSb.append("'").append(iqCode).append("',");
+								if ((x % 600 == 0 || !it.hasNext()) && codeListSb.length() > 0) {
+									codeListSb.deleteCharAt(codeListSb.length() - 1);
+									String iqCodes = codeListSb.toString();
+									//报关单表体,报关单第九位0=出口1=进口
+									sql = "select ENTRY_ID,G_NO,CODE_TS,G_NAME,QTY_1,RMB_PRICE,USD_PRICE,G_MODEL,G_CERT_FLAG," +
+											"(select max(a.CREATE_DATE) from ENTRY_WORKFLOW a where a.STEP_ID='80000000' AND l.ENTRY_ID = a.ENTRY_ID) as RELEASE_DATE," +
+											"UNGID,UNG_FLAG,UNG_MODEL,UNG_CLASSIFY,UNG_G_NAME,PRODUCT_CHAR_CODE,IQ_CODE " +
+											"from ENTRY_LIST l where l.ENTRY_ID in (" + entryIds + ") " +
+											"and ((substr(l.ENTRY_ID,9,1) ='0' and (l.IQ_CODE in (" + iqCodes + ") or l.UNGID is not null " +
+											"or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')) or " +
+											"(substr(l.ENTRY_ID,9,1) = '1' and (l.UNGID is not null or l.PRODUCT_CHAR_CODE like '%31%' or l.PRODUCT_CHAR_CODE like '%32%')));";
+									List<Object[]> codeTsList = (List<Object[]>) h2018Dao.getQueryBySql(sql);
+									if (null != codeTsList && codeTsList.size() > 0) {
+										//由于新组合查询不设定某个固定节点更新数据,会存在相同报关单在后面更新流程节点时间,所以先从中间表查出数据进行更新
+										//会存在商品金额为空的情况,如果只有一条商品并商品为空则报关单头要删除
+										EntryList entity = null;
+										for (Object[] codeTs : codeTsList) {//将根据报关单编号查询到的商品编号及报关单号添加到KPI_ENTRY_HEAD_NEW_COPY表里
+											entity = new EntryList();
+											entity.setEntryId(codeTs[0] != null ? codeTs[0].toString() : "");
+											entity.setGNo(codeTs[1] != null ? (BigDecimal) codeTs[1] : new BigDecimal(0));
+											entity.setCodeTs(codeTs[2] != null ? codeTs[2].toString() : "");
+											entity.setGName(codeTs[3] != null ? codeTs[3].toString() : "");
+											entity.setQty1(codeTs[4] != null ? (BigDecimal) codeTs[4] : new BigDecimal(0));
+											entity.setRmbPrice(codeTs[5] != null ? (BigDecimal) codeTs[5] : new BigDecimal(0));
+											entity.setUsdPrice(codeTs[6] != null ? (BigDecimal) codeTs[6] : new BigDecimal(0));
+											entity.setGModel(codeTs[7] != null ? codeTs[7].toString() : "");
+											entity.setGCertFlag(codeTs[8] != null ? codeTs[8].toString() : "");
+											entity.setReleaseDate(codeTs[9] != null ? (Date) codeTs[9] : null);
+											entity.setCodeTsShort(codeTs[2] != null ? codeTs[2].toString().substring(0, 6) : "");
+											entity.setUngid(codeTs[10] != null ? codeTs[10].toString() : "");
+											entity.setUngFlag(codeTs[11] != null ? codeTs[11].toString() : "");
+											entity.setUngModel(codeTs[12] != null ? codeTs[12].toString() : "");
+											entity.setUngClassify(codeTs[13] != null ? codeTs[13].toString() : "");
+											entity.setUngGName(codeTs[14] != null ? codeTs[14].toString() : "");
+											entity.setIqCode(codeTs[16] != null ? codeTs[16].toString() : "");
+											//货物属性,判断货物属性是否是31/散装危险化学品,32/件装危险化学品
+											String goods_attr = "";
+											if (codeTs[15] != null) {
+												goods_attr = (String) codeTs[15];
+												if (goods_attr.contains("31")) {
+													goods_attr = "31";
+												} else if (goods_attr.contains("32")) {
+													goods_attr = "32";
+												} else {
+													goods_attr = "";
+												}
+											}
+											entity.setProductCharCode(goods_attr);
+											//查出的数据可能存在ciqCode或者UNGID为空的情况,报关单第九位0=出口1=进口
+											//出口按ciq编码、ungid不为空和货物属性包含31或32
+											//进口按ungid不为空或货物属性
+											String ieFlag = codeTs[0] != null ? codeTs[0].toString().substring(8, 9) : "";
+											//货物属性为不空时可以初步判定该商品是危化品,接下来只需判断该商品是否还包含危险货物的属性
+											if (entity.getProductCharCode() != null && !"".equals(entity.getProductCharCode())) {
+												if (codeTs[10] != null) {
+													entity.setGoodsType("1,2,3");
+												} else {
+													entity.setGoodsType("1");
+												}
+											} else {
+												//货物属性为空时
+												//出口
+												if (ieFlag.equals("0")) {
+													if (codeTs[16] != null) {
+														//syncChemicalsCiq只可能是包含了危化品,因为这个表的数据就是查询的系统中危险品模块里用户已经维护的包含了危化品的数据
+														Object[] obj = (Object[]) dao.getObjectBySql("select * from iedg_sync_chemicals_ciq where CIQ_CODE = ?", (String) codeTs[16]);
+														if (obj != null) {
+															if (codeTs[16] != null) {
+																entity.setGoodsType("1,2,3");
+															} else {
+																entity.setGoodsType("1");
+															}
+														} else {
+															entity.setGoodsType("2");
+														}
+													} else {
+														entity.setGoodsType("2");
+													}
+												} else {
+													//进口
+													entity.setGoodsType("2");
+												}
+											}
+											entity.setId(dao.getGuidStringBySql());
+											entryListRepository.save(entity);
+										}
+									}
+									codeListSb.delete(0, codeListSb.length());
+								}
+								x++;
+							}
+						} catch (Exception ex) {
+							// 主键可能因为多次结关跨天,导致新纪录主键重复
+							logger.error("保存危险品新维度一体化通关中间记录失败,重新保存");
+							dao.executeUpdate("delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + entryIds + ")");
+						}
+						tmpMap1.clear();
+						tmpMap2.clear();
+						tmpMap9.clear();
+						tmpMap10.clear();
+						tmpMap12.clear();
+						tmpMap11.clear();
+						sb.delete(0, sb.length());
+					}
+					i++;
+				}
+			}
+		}
+	}
+
+	public void monthlyDataMaintance(String dataPeriod, Date statBegin, Date statEnd) {
+		try {
+			// 查询当月转关单两个时间不为空的入境转关单信息
+			List<Object[]> entryList = (List<Object[]>) dao.getQueryBySql("select DECL_PORT,i_e_flag,CHECK_FLAG,ORDER_RECEIVE_DATE,TOTAL_COST,CU_COST from WXJY_ENTRY_HEAD where RELEASE_DATE >= ? and RELEASE_DATE < ?",
+					statBegin, statEnd);
+			// 维护CustomMonthlyStat 表1
+			mainCustomMonthlyStat(dataPeriod, statBegin, statEnd, entryList);
+		} catch (Exception e) {
+			logger.error(dataPeriod + " 月通关时长月度统计中间数据维护错误:", e);
+		}
+	}
+
+	private void mainCustomMonthlyStat(String dataPeriod, Date statBegin, Date statEnd,
+									   List<Object[]> entryList) {
+		Object[] mainRcd = (Object[]) dao.getObjectBySql(
+				"select * from WXJY_MID_D_M_STATUS where DATA_TYPE = ? and STAT_PERIOD = ?", CustomMonthlyStat.class.getSimpleName(), dataPeriod);
+		if (mainRcd == null) {
+			dao.executeUpdate("delete from WXJY_CUSTOM_M_STAT where month = ?", dataPeriod);// 以往维护过程中可能出错生成了部分数据
+			dao.executeUpdate("delete from WXJY_CUSTOM_M_STAT_F where month = ?", dataPeriod);
+
+			Set<String> customCodeSet = new HashSet<String>();
+
+			Map<String, Integer> impDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impManDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impAuditDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Long> impTotalCostMap = new HashMap<String, Long>();
+			Map<String, Long> impHgCostMap = new HashMap<String, Long>();
+			Map<String, Integer> expDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expManDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expAuditDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Long> expTotalCostMap = new HashMap<String, Long>();
+			Map<String, Long> expHgCostMap = new HashMap<String, Long>();
+
+			for (Object[] e : entryList) {
+				String customCode = (String) e[0];
+				customCodeSet.add(customCode);
+				String ieFlag = (String) e[1];
+				String checkFlag = (String) e[2];
+				Date orderReceiveDate = (Date) e[3];
+				Long totalCost = ((BigDecimal) e[4]).longValue();
+				Long hgCost = ((BigDecimal) e[5]).longValue();
+
+				if ("I".equals(ieFlag)) {// 入境
+					Integer impCount = impDeclCountMap.get(customCode);
+					if (impCount == null) {
+						impCount = 1;
+					} else {
+						impCount++;
+					}
+					impDeclCountMap.put(customCode, impCount);
+
+					Integer impManCount = impManDeclCountMap.get(customCode);
+					if (impManCount == null && checkFlag.equals("0")) {
+						impManCount = 1;
+					} else {
+						if (checkFlag.equals("0")) {
+							impManCount++;
+						}
+					}
+					impManDeclCountMap.put(customCode, impManCount);
+
+					Integer impAuditCount = impAuditDeclCountMap.get(customCode);
+					if (impAuditCount == null && orderReceiveDate != null) {
+						impAuditCount = 1;
+					} else {
+						if (orderReceiveDate != null) {
+							impAuditCount++;
+						}
+					}
+					impAuditDeclCountMap.put(customCode, impAuditCount);
+
+					Long sumTotalCost = impTotalCostMap.get(customCode);
+					if (sumTotalCost == null) {
+						sumTotalCost = totalCost;
+					} else {
+						sumTotalCost += totalCost;
+					}
+					impTotalCostMap.put(customCode, sumTotalCost);
+
+					Long sumHgCost = impHgCostMap.get(customCode);
+					if (sumHgCost == null) {
+						sumHgCost = hgCost;
+					} else {
+						sumHgCost += hgCost;
+					}
+					impHgCostMap.put(customCode, sumHgCost);
+
+				} else {// 出境
+					Integer expCount = expDeclCountMap.get(customCode);
+					if (expCount == null) {
+						expCount = 1;
+					} else {
+						expCount++;
+					}
+					expDeclCountMap.put(customCode, expCount);
+
+					Integer expManCount = expManDeclCountMap.get(customCode);
+					if (expManCount == null && checkFlag.equals("0")) {
+						expManCount = 1;
+					} else {
+						if (checkFlag.equals("0")) {
+							expManCount++;
+						}
+					}
+					expManDeclCountMap.put(customCode, expManCount);
+
+					Integer expAuditCount = expAuditDeclCountMap.get(customCode);
+					if (expAuditCount == null && orderReceiveDate != null) {
+						expAuditCount = 1;
+					} else {
+						if (orderReceiveDate != null) {
+							expAuditCount++;
+						}
+					}
+					expAuditDeclCountMap.put(customCode, expAuditCount);
+
+					Long sumTotalCost = expTotalCostMap.get(customCode);
+					if (sumTotalCost == null) {
+						sumTotalCost = totalCost;
+					} else {
+						sumTotalCost += totalCost;
+					}
+					expTotalCostMap.put(customCode, sumTotalCost);
+
+					Long sumHgCost = expHgCostMap.get(customCode);
+					if (sumHgCost == null) {
+						sumHgCost = hgCost;
+					} else {
+						sumHgCost += hgCost;
+					}
+					expHgCostMap.put(customCode, sumHgCost);
+				}
+
+			}
+
+			BigDecimal impTotalCost = new BigDecimal(0);
+			BigDecimal impHgCost = new BigDecimal(0);
+			BigDecimal expTotalCost = new BigDecimal(0);
+			BigDecimal expHgCost = new BigDecimal(0);
+
+			// 当年各平均值为每个月单量x每个月对应时间累加后,除以总单量
+			Map<String, BigDecimal> impCurYearTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impCurYearHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impLastMonthTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impLastMonthHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impLastYearDecemberTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impLastYearDecemberHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impYearBeforeLastTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> impYearBeforeLastHgCostMap = new HashMap<String, BigDecimal>();
+
+			Map<String, BigDecimal> expCurYearTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expCurYearHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expLastMonthTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expLastMonthHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expLastYearDecemberTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expLastYearDecemberHgCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expYearBeforeLastTotalCostMap = new HashMap<String, BigDecimal>();
+			Map<String, BigDecimal> expYearBeforeLastHgCostMap = new HashMap<String, BigDecimal>();
+
+			Map<String, Integer> impCurYearDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impLastMonthDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impLastYearDecemberDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> impYearBeforeLastDeclCountMap = new HashMap<String, Integer>();
+
+			Map<String, Integer> expCurYearDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expLastMonthDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expLastYearDecemberDeclCountMap = new HashMap<String, Integer>();
+			Map<String, Integer> expYearBeforeLastDeclCountMap = new HashMap<String, Integer>();
+
+			if (dataPeriod.compareTo(noRelStatMonth) > 0) {
+				if (!dataPeriod.endsWith("01")) {
+					int sumImpDeclCount = 0;
+					int sumExpDeclCount = 0;
+					BigDecimal sumImpCurYearTotalCost = new BigDecimal(0);
+					BigDecimal sumImpCurYearHgCost = new BigDecimal(0);
+					BigDecimal sumExpCurYearTotalCost = new BigDecimal(0);
+					BigDecimal sumExpCurYearHgCost = new BigDecimal(0);
+
+					String indexCustCode = null;
+					String year = dataPeriod.substring(0, 4);
+					List<Object[]> curYearlist = (List<Object[]>) dao.getQueryBySql(
+							"select MONTH,CUSTOM_CODE,IMP_DECL_COUNT,IMP_MAN_DECL_COUNT,IMP_MANUAL_AUDIT_DECL_COUNT,IMP_DECL_COUNT_LM,IMP_DECL_COUNT_LY_DEC," +
+									"IMP_DECL_COUNT_CURYEAR,IMP_DECL_COUNT_YBL,IMP_TOTAL_COST,IMP_TOTAL_COST_LM,IMP_TOTAL_COST_LY_DEC,IMP_TOTAL_COST_CY,IMP_TOTAL_COST_YBL," +
+									"IMP_CU_COST,IMP_CU_COST_LM,IMP_CU_COST_LY_DEC,IMP_CU_COST_CY,IMP_CU_COST_YBL,EXP_DECL_COUNT,EXP_MAN_DECL_COUNT,EXP_MANUAL_AUDIT_DECL_COUNT," +
+									"EXP_DECL_COUNT_LM,EXP_DECL_COUNT_LY_DEC,EXP_DECL_COUNT_CURYEAR,EXP_DECL_COUNT_YBL,EXP_TOTAL_COST,EXP_TOTAL_COST_LM,EXP_TOTAL_COST_LY_DEC," +
+									"EXP_TOTAL_COST_CY,EXP_TOTAL_COST_YBL,EXP_CU_COST,EXP_CU_COST_LM,EXP_CU_COST_LY_DEC,EXP_CU_COST_CY,EXP_CU_COST_YBL " +
+									"from WXJY_CUSTOM_M_STAT where month >= ? and month < ? order by CUSTOM_CODE", year + "01", dataPeriod);
+					for (int i = 0; i < curYearlist.size(); i++) {
+						Object[] s = curYearlist.get(i);
+						String custCode = (String) s[0];
+						int impCount = s[2] != null ? ((BigDecimal) s[2]).intValue() : 0;
+						int expCount = s[19] != null ? ((BigDecimal) s[19]).intValue() : 0;
+
+						BigDecimal impMultily = new BigDecimal(impCount);
+						BigDecimal expMultily = new BigDecimal(expCount);
+						BigDecimal impTotalCostT = (BigDecimal) s[10];
+						BigDecimal impCuCostT = (BigDecimal) s[15];
+						BigDecimal expTotalCostT = (BigDecimal) s[27];
+						BigDecimal expCuCostT = (BigDecimal) s[32];
+						if (indexCustCode == null || indexCustCode.equals(custCode)) {// 同一关区,累计数据
+							indexCustCode = custCode;
+							sumImpDeclCount += impCount;
+							sumExpDeclCount += expCount;
+							sumImpCurYearTotalCost = sumImpCurYearTotalCost.add(impTotalCostT.multiply(impMultily));
+							sumImpCurYearHgCost = sumImpCurYearHgCost.add(impCuCostT.multiply(impMultily));
+							sumExpCurYearTotalCost = sumExpCurYearTotalCost.add(expTotalCostT.multiply(expMultily));
+							sumExpCurYearHgCost = sumExpCurYearHgCost.add(expCuCostT.multiply(expMultily));
+						} else {// 切换关区
+							if (sumImpDeclCount != 0) {
+								BigDecimal impDivide = new BigDecimal(sumImpDeclCount);
+								impCurYearTotalCostMap.put(indexCustCode,
+										sumImpCurYearTotalCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+								impCurYearHgCostMap.put(indexCustCode, sumImpCurYearHgCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+							} else {
+								impCurYearTotalCostMap.put(indexCustCode, zero);
+								impCurYearHgCostMap.put(indexCustCode, zero);
+							}
+							if (sumExpDeclCount != 0) {
+								BigDecimal expDivide = new BigDecimal(sumExpDeclCount);
+								expCurYearTotalCostMap.put(indexCustCode,
+										sumExpCurYearTotalCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+								expCurYearHgCostMap.put(indexCustCode, sumExpCurYearHgCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+							} else {
+								expCurYearTotalCostMap.put(indexCustCode, zero);
+								expCurYearHgCostMap.put(indexCustCode, zero);
+							}
+							impCurYearDeclCountMap.put(indexCustCode, sumImpDeclCount);
+							expCurYearDeclCountMap.put(indexCustCode, sumExpDeclCount);
+
+							sumImpDeclCount = impCount;
+							sumExpDeclCount = expCount;
+							sumImpCurYearTotalCost = new BigDecimal(0);
+							sumImpCurYearHgCost = new BigDecimal(0);
+							sumExpCurYearTotalCost = new BigDecimal(0);
+							sumExpCurYearHgCost = new BigDecimal(0);
+							indexCustCode = custCode;
+							sumImpCurYearTotalCost = sumImpCurYearTotalCost.add(impTotalCostT.multiply(impMultily));
+							sumImpCurYearHgCost = sumImpCurYearHgCost.add(impCuCostT.multiply(impMultily));
+							sumExpCurYearTotalCost = sumExpCurYearTotalCost.add(expTotalCostT.multiply(expMultily));
+							sumExpCurYearHgCost = sumExpCurYearHgCost.add(expCuCostT.multiply(expMultily));
+						}
+						if (i == curYearlist.size() - 1) {// 最后一条记录
+							BigDecimal impDivide = new BigDecimal(sumImpDeclCount);
+							BigDecimal expDivide = new BigDecimal(sumExpDeclCount);
+							if (sumImpDeclCount != 0) {
+								impCurYearTotalCostMap.put(indexCustCode,
+										sumImpCurYearTotalCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+								impCurYearHgCostMap.put(indexCustCode, sumImpCurYearHgCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+							} else {
+								impCurYearTotalCostMap.put(indexCustCode, zero);
+								impCurYearHgCostMap.put(indexCustCode, zero);
+							}
+							if (sumExpDeclCount != 0) {
+								expCurYearTotalCostMap.put(indexCustCode,
+										sumExpCurYearTotalCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+								expCurYearHgCostMap.put(indexCustCode, sumExpCurYearHgCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+							} else {
+								expCurYearTotalCostMap.put(indexCustCode, zero);
+								expCurYearHgCostMap.put(indexCustCode, zero);
+							}
+						}
+					}
+				}
+
+				// 先查询到上个月的数据备用
+				Date curMonth = null;
+				try {
+					curMonth = monthSdf.parse(dataPeriod);
+				} catch (ParseException e1) {
+				}
+				Calendar cal = Calendar.getInstance();
+				cal.setTime(curMonth);
+				cal.add(Calendar.MONTH, -1);
+				Date lastMonthDate = cal.getTime();
+				String lastMonthStr = monthSdf.format(lastMonthDate);
+				List<Object[]> lastMonthData = (List<Object[]>) dao.getQueryBySql(
+						"select CUSTOM_CODE,IMP_DECL_COUNT,IMP_TOTAL_COST,IMP_CU_COST,EXP_DECL_COUNT,EXP_TOTAL_COST,EXP_CU_COST " +
+								"from WXJY_CUSTOM_M_STAT where month = ? ", lastMonthStr);
+				for (Object[] s : lastMonthData) {
+					String customCode = (String) s[0];
+					Integer impDeclCount = Integer.valueOf(((BigDecimal) s[1]).toString());
+					BigDecimal impTotalCostT = (BigDecimal) s[2];
+					BigDecimal impCuCostT = (BigDecimal) s[3];
+					Integer expDeclCount = Integer.valueOf(((BigDecimal) s[4]).toString());
+					BigDecimal expTotalCostT = (BigDecimal) s[5];
+					BigDecimal expCuCostT = (BigDecimal) s[6];
+					impLastMonthTotalCostMap.put(customCode, impTotalCostT);
+					impLastMonthHgCostMap.put(customCode, impCuCostT);
+					expLastMonthTotalCostMap.put(customCode, expTotalCostT);
+					expLastMonthHgCostMap.put(customCode, expCuCostT);
+
+					impLastMonthDeclCountMap.put(customCode, impDeclCount);
+					expLastMonthDeclCountMap.put(customCode, expDeclCount);
+				}
+
+				// 去年12月数据
+				cal.setTime(curMonth);
+				cal.add(Calendar.YEAR, -1);
+				String lastDecember = yearSdf.format(cal.getTime()) + "12";
+				List<Object[]> lastDecData = (List<Object[]>) dao.getQueryBySql(
+						"select CUSTOM_CODE,IMP_DECL_COUNT,IMP_TOTAL_COST,IMP_CU_COST,EXP_DECL_COUNT,EXP_TOTAL_COST,EXP_CU_COST " +
+								"from WXJY_CUSTOM_M_STAT where month = ? ", lastDecember);
+				for (Object[] s : lastDecData) {
+					String customCode = (String) s[0];
+					Integer impDeclCount = Integer.valueOf(((BigDecimal) s[1]).toString());
+					BigDecimal impTotalCostT = (BigDecimal) s[2];
+					BigDecimal impCuCostT = (BigDecimal) s[3];
+					Integer expDeclCount = Integer.valueOf(((BigDecimal) s[4]).toString());
+					BigDecimal expTotalCostT = (BigDecimal) s[5];
+					BigDecimal expCuCostT = (BigDecimal) s[6];
+					impLastYearDecemberTotalCostMap.put(customCode, impTotalCostT);
+					impLastYearDecemberHgCostMap.put(customCode, impCuCostT);
+					expLastYearDecemberTotalCostMap.put(customCode, expTotalCostT);
+					expLastYearDecemberHgCostMap.put(customCode, expCuCostT);
+
+					impLastYearDecemberDeclCountMap.put(customCode, impDeclCount);
+					expLastYearDecemberDeclCountMap.put(customCode, expDeclCount);
+				}
+
+				boolean existData = false;
+				if (!existData) {
+					cal.setTime(curMonth);
+					cal.add(Calendar.YEAR, -2);
+					String yearBeforeLast = yearSdf.format(cal.getTime());
+					String firstMonthOfYearBeforeLast = yearBeforeLast + "01";
+					String lastMonthOfYearBeforeLast = yearBeforeLast + "12";
+					List<Object[]> list = (List<Object[]>) dao.getQueryBySql(
+							"select CUSTOM_CODE,IMP_DECL_COUNT,IMP_TOTAL_COST,IMP_CU_COST,EXP_DECL_COUNT,EXP_TOTAL_COST,EXP_CU_COST " +
+									"from WXJY_CUSTOM_M_STAT where month >= ? and month <= ? order by CUSTOM_CODE", firstMonthOfYearBeforeLast,
+							lastMonthOfYearBeforeLast);
+					if (list.size() > 0) {
+						int sumImpDeclCount = 0;
+						int sumExpDeclCount = 0;
+						BigDecimal sumImpYearBeforeLastTotalCost = new BigDecimal(0);
+						BigDecimal sumImpYearBeforeLastHgCost = new BigDecimal(0);
+						BigDecimal sumExpYearBeforeLastTotalCost = new BigDecimal(0);
+						BigDecimal sumExpYearBeforeLastHgCost = new BigDecimal(0);
+						String indexCustCode = null;
+						for (int j = 0; j < list.size(); j++) {
+							Object[] s = list.get(j);
+							String custCode = (String) s[0];
+							Integer impCount = Integer.valueOf(((BigDecimal) s[1]).toString());
+							BigDecimal impTotalCostT = (BigDecimal) s[2];
+							BigDecimal impCuCostT = (BigDecimal) s[3];
+							Integer expCount = Integer.valueOf(((BigDecimal) s[4]).toString());
+							BigDecimal expTotalCostT = (BigDecimal) s[5];
+							BigDecimal expCuCostT = (BigDecimal) s[6];
+
+							BigDecimal impMultily = new BigDecimal(impCount);
+							BigDecimal expMultily = new BigDecimal(expCount);
+							if (indexCustCode == null || indexCustCode.equals(custCode)) {// 同一关区,累计数据
+								indexCustCode = custCode;
+								sumImpDeclCount += impCount;
+								sumExpDeclCount += expCount;
+
+								sumImpYearBeforeLastTotalCost = sumImpYearBeforeLastTotalCost.add(impTotalCostT.multiply(impMultily));
+								sumImpYearBeforeLastHgCost = sumImpYearBeforeLastHgCost.add(impCuCostT.multiply(impMultily));
+								sumExpYearBeforeLastTotalCost = sumExpYearBeforeLastTotalCost.add(expTotalCostT.multiply(expMultily));
+								sumExpYearBeforeLastHgCost = sumExpYearBeforeLastHgCost.add(expCuCostT.multiply(expMultily));
+							} else {// 切换关区
+								BigDecimal impDivide = new BigDecimal(sumImpDeclCount);
+								BigDecimal expDivide = new BigDecimal(sumExpDeclCount);
+								if (sumImpDeclCount != 0) {
+									impYearBeforeLastTotalCostMap.put(indexCustCode,
+											sumImpYearBeforeLastTotalCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+									impYearBeforeLastHgCostMap.put(indexCustCode,
+											sumImpYearBeforeLastHgCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+								} else {
+									impYearBeforeLastTotalCostMap.put(indexCustCode, zero);
+									impYearBeforeLastHgCostMap.put(indexCustCode, zero);
+								}
+								if (sumExpDeclCount != 0) {
+									expYearBeforeLastTotalCostMap.put(indexCustCode,
+											sumExpYearBeforeLastTotalCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+									expYearBeforeLastHgCostMap.put(indexCustCode,
+											sumExpYearBeforeLastHgCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+								} else {
+									expYearBeforeLastTotalCostMap.put(indexCustCode, zero);
+									expYearBeforeLastHgCostMap.put(indexCustCode, zero);
+								}
+								impYearBeforeLastDeclCountMap.put(indexCustCode, sumImpDeclCount);
+								expYearBeforeLastDeclCountMap.put(indexCustCode, sumExpDeclCount);
+
+								sumImpDeclCount = impCount;
+								sumExpDeclCount = expCount;
+								sumImpYearBeforeLastTotalCost = new BigDecimal(0);
+								sumImpYearBeforeLastHgCost = new BigDecimal(0);
+								sumExpYearBeforeLastTotalCost = new BigDecimal(0);
+								sumExpYearBeforeLastHgCost = new BigDecimal(0);
+								indexCustCode = custCode;
+								sumImpYearBeforeLastTotalCost = sumImpYearBeforeLastTotalCost.add(impTotalCostT.multiply(impMultily));
+								sumImpYearBeforeLastHgCost = sumImpYearBeforeLastHgCost.add(impCuCostT.multiply(impMultily));
+								sumExpYearBeforeLastTotalCost = sumExpYearBeforeLastTotalCost.add(expTotalCostT.multiply(expMultily));
+								sumExpYearBeforeLastHgCost = sumExpYearBeforeLastHgCost.add(expCuCostT.multiply(expMultily));
+							}
+							if (j == list.size() - 1) {// 最后一条记录
+								BigDecimal impDivide = new BigDecimal(sumImpDeclCount);
+								BigDecimal expDivide = new BigDecimal(sumExpDeclCount);
+								if (sumImpDeclCount != 0) {
+									impYearBeforeLastTotalCostMap.put(indexCustCode,
+											sumImpYearBeforeLastTotalCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+									impYearBeforeLastHgCostMap.put(indexCustCode,
+											sumImpYearBeforeLastHgCost.divide(impDivide, 4, BigDecimal.ROUND_HALF_UP));
+								} else {
+									impYearBeforeLastTotalCostMap.put(indexCustCode, zero);
+									impYearBeforeLastHgCostMap.put(indexCustCode, zero);
+								}
+								if (sumExpDeclCount != 0) {
+									expYearBeforeLastTotalCostMap.put(indexCustCode,
+											sumExpYearBeforeLastTotalCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+									expYearBeforeLastHgCostMap.put(indexCustCode,
+											sumExpYearBeforeLastHgCost.divide(expDivide, 4, BigDecimal.ROUND_HALF_UP));
+								} else {
+									expYearBeforeLastTotalCostMap.put(indexCustCode, zero);
+									expYearBeforeLastHgCostMap.put(indexCustCode, zero);
+								}
+								impYearBeforeLastDeclCountMap.put(indexCustCode, sumImpDeclCount);
+								expYearBeforeLastDeclCountMap.put(indexCustCode, sumExpDeclCount);
+							}
+						}
+					}
+				}
+			}
+
+			for (String customCode : customCodeSet) {
+				CustomMonthlyStat stat = new CustomMonthlyStat();
+				stat.setCustomCode(customCode);
+				stat.setMonth(dataPeriod);
+
+				Integer impCount = impDeclCountMap.get(customCode);
+				if (impCount != null) {
+					stat.setImpDeclCount(impCount);
+					BigDecimal impDeclDiv = new BigDecimal(impCount * 3600);// 每单耗时x小时
+
+					BigDecimal sumImpTotalCost = new BigDecimal(impTotalCostMap.get(customCode));
+					impTotalCost = sumImpTotalCost.divide(impDeclDiv, 4, BigDecimal.ROUND_HALF_UP);
+					stat.setImpTotalCost(impTotalCost);
+
+					BigDecimal sumImpHgCost = new BigDecimal(impHgCostMap.get(customCode));
+					impHgCost = sumImpHgCost.divide(impDeclDiv, 4, BigDecimal.ROUND_HALF_UP);
+					stat.setImpCuCost(impHgCost);
+				} else {
+					stat.setImpDeclCount(0);
+					stat.setImpTotalCost(zero);
+					stat.setImpCuCost(zero);
+				}
+				Integer impManCount = impManDeclCountMap.get(customCode);
+				if (impManCount != null) {
+					stat.setImpManDeclCount(impManCount);
+				} else {
+					stat.setImpManDeclCount(0);
+				}
+				Integer impAuditCount = impAuditDeclCountMap.get(customCode);
+				if (impAuditCount != null) {
+					stat.setImpManualAuditDeclCount(impAuditCount);
+				} else {
+					stat.setImpManualAuditDeclCount(0);
+				}
+				Integer expCount = expDeclCountMap.get(customCode);
+				if (expCount != null) {
+					stat.setExpDeclCount(expCount);
+					BigDecimal expDeclDiv = new BigDecimal(expCount * 3600);// 每单耗时x小时
+
+					BigDecimal sumExpTotalCost = new BigDecimal(expTotalCostMap.get(customCode));
+					expTotalCost = sumExpTotalCost.divide(expDeclDiv, 4, BigDecimal.ROUND_HALF_UP);
+					stat.setExpTotalCost(expTotalCost);
+
+					BigDecimal sumExpHgCost = new BigDecimal(expHgCostMap.get(customCode));
+					expHgCost = sumExpHgCost.divide(expDeclDiv, 4, BigDecimal.ROUND_HALF_UP);
+					stat.setExpCuCost(expHgCost);
+				} else {
+					stat.setExpDeclCount(0);
+					stat.setExpTotalCost(zero);
+					stat.setExpCuCost(zero);
+				}
+				Integer expManCount = expManDeclCountMap.get(customCode);
+				if (expManCount != null) {
+					stat.setExpManDeclCount(expManCount);
+				} else {
+					stat.setExpManDeclCount(0);
+				}
+				Integer expAuditCount = expAuditDeclCountMap.get(customCode);
+				if (expAuditCount != null) {
+					stat.setExpManualAuditDeclCount(expAuditCount);
+				} else {
+					stat.setExpManualAuditDeclCount(0);
+				}
+				if (dataPeriod.compareTo(noRelStatMonth) > 0) {
+					if (dataPeriod.endsWith("01")) {
+						stat.setImpTotalCostCurentYear(impTotalCost);
+						stat.setImpCuCostCurentYear(impHgCost);
+						stat.setExpTotalCostCurentYear(expTotalCost);
+						stat.setExpCuCostCurentYear(expHgCost);
+
+						stat.setImpDeclCountCurentYear(stat.getImpDeclCount());
+						stat.setExpDeclCountCurentYear(stat.getExpDeclCount());
+					} else {// 另外查询当年前面月份数据来计算
+						if (impCount == null) { // 当月进口报单量为0
+							stat.setImpTotalCostCurentYear(
+									impCurYearTotalCostMap.get(customCode) != null ? impCurYearTotalCostMap.get(customCode) : zero);
+							stat.setImpCuCostCurentYear(
+									impCurYearHgCostMap.get(customCode) != null ? impCurYearHgCostMap.get(customCode) : zero);
+							stat.setImpDeclCountCurentYear(
+									impCurYearDeclCountMap.get(customCode) != null ? impCurYearDeclCountMap.get(customCode) : 0);
+						} else { // 累计前面月份和当月
+							Integer impCurYearDeclCount = impCurYearDeclCountMap.get(customCode);
+							if (impCurYearDeclCount == null) { // 对应关区当年前面月份入境报单量为0
+								stat.setImpTotalCostCurentYear(impTotalCost);
+								stat.setImpCuCostCurentYear(impHgCost);
+								stat.setImpDeclCountCurentYear(stat.getImpDeclCount());
+							} else {
+								BigDecimal impCurYearTotalCost = impCurYearTotalCostMap.get(customCode);
+								if (impCurYearTotalCost != null) {
+									impCurYearTotalCost = impCurYearTotalCost.multiply(new BigDecimal(impCurYearDeclCount))
+											.add(impTotalCost)
+											.divide(new BigDecimal(impCurYearDeclCount + impCount), 4, BigDecimal.ROUND_HALF_UP);
+									stat.setImpTotalCostCurentYear(impCurYearTotalCost);
+								} else {
+									stat.setImpTotalCostCurentYear(impTotalCost);
+								}
+								BigDecimal impCurYearCuCost = impCurYearHgCostMap.get(customCode);
+								if (impCurYearCuCost != null) {
+									impCurYearCuCost = impCurYearCuCost.multiply(new BigDecimal(impCurYearDeclCount)).add(impHgCost)
+											.divide(new BigDecimal(impCurYearDeclCount + impCount), 4, BigDecimal.ROUND_HALF_UP);
+									stat.setImpCuCostCurentYear(impCurYearCuCost);
+								} else {
+									stat.setImpCuCostCurentYear(impHgCost);
+								}
+								stat.setImpDeclCountCurentYear(impCurYearDeclCount + impCount);
+							}
+						}
+
+						if (expCount == null) {
+							stat.setExpTotalCostCurentYear(
+									expCurYearTotalCostMap.get(customCode) != null ? expCurYearTotalCostMap.get(customCode) : zero);
+							stat.setExpCuCostCurentYear(
+									expCurYearHgCostMap.get(customCode) != null ? expCurYearHgCostMap.get(customCode) : zero);
+							stat.setExpDeclCountCurentYear(
+									expCurYearDeclCountMap.get(customCode) != null ? expCurYearDeclCountMap.get(customCode) : 0);
+						} else {
+							Integer expCurYearDeclCount = expCurYearDeclCountMap.get(customCode);
+							if (expCurYearDeclCount == null) {
+								stat.setExpTotalCostCurentYear(expTotalCost);
+								stat.setExpCuCostCurentYear(expHgCost);
+								stat.setExpDeclCountCurentYear(stat.getExpDeclCount());
+							} else {
+								BigDecimal expCurYearTotalCost = expCurYearTotalCostMap.get(customCode);
+								if (expCurYearTotalCost != null) {
+									expCurYearTotalCost = expCurYearTotalCost.multiply(new BigDecimal(expCurYearDeclCount))
+											.add(expTotalCost)
+											.divide(new BigDecimal(expCurYearDeclCount + expCount), 4, BigDecimal.ROUND_HALF_UP);
+									stat.setExpTotalCostCurentYear(expCurYearTotalCost);
+								} else {
+									stat.setExpTotalCostCurentYear(expTotalCost);
+								}
+								BigDecimal expCurYearCuCost = expCurYearHgCostMap.get(customCode);
+								if (expCurYearCuCost != null) {
+									expCurYearCuCost = expCurYearCuCost.multiply(new BigDecimal(expCurYearDeclCount)).add(expHgCost)
+											.divide(new BigDecimal(expCurYearDeclCount + expCount), 4, BigDecimal.ROUND_HALF_UP);
+									stat.setExpCuCostCurentYear(expCurYearCuCost);
+								} else {
+									stat.setExpCuCostCurentYear(expHgCost);
+								}
+								stat.setExpDeclCountCurentYear(expCurYearDeclCount + expCount);
+							}
+						}
+					}
+
+					stat.setImpTotalCostLastMonth(
+							impLastMonthTotalCostMap.get(customCode) != null ? impLastMonthTotalCostMap.get(customCode) : zero);
+					stat.setImpTotalCostLastYearDecember(
+							impLastYearDecemberTotalCostMap.get(customCode) != null ? impLastYearDecemberTotalCostMap.get(customCode)
+									: zero);
+					stat.setImpTotalCostYearBeforeLast(
+							impYearBeforeLastTotalCostMap.get(customCode) != null ? impYearBeforeLastTotalCostMap.get(customCode) : zero);
+					stat.setImpCuCostLastMonth(
+							impLastMonthHgCostMap.get(customCode) != null ? impLastMonthHgCostMap.get(customCode) : zero);
+					stat.setImpCuCostLastYearDecember(
+							impLastYearDecemberHgCostMap.get(customCode) != null ? impLastYearDecemberHgCostMap.get(customCode) : zero);
+					stat.setImpCuCostYearBeforeLast(
+							impYearBeforeLastHgCostMap.get(customCode) != null ? impYearBeforeLastHgCostMap.get(customCode) : zero);
+
+					stat.setExpTotalCostLastMonth(
+							expLastMonthTotalCostMap.get(customCode) != null ? expLastMonthTotalCostMap.get(customCode) : zero);
+					stat.setExpTotalCostLastYearDecember(
+							expLastYearDecemberTotalCostMap.get(customCode) != null ? expLastYearDecemberTotalCostMap.get(customCode)
+									: zero);
+					stat.setExpTotalCostYearBeforeLast(
+							expYearBeforeLastTotalCostMap.get(customCode) != null ? expYearBeforeLastTotalCostMap.get(customCode) : zero);
+					stat.setExpCuCostLastMonth(
+							expLastMonthHgCostMap.get(customCode) != null ? expLastMonthHgCostMap.get(customCode) : zero);
+					stat.setExpCuCostLastYearDecember(
+							expLastYearDecemberHgCostMap.get(customCode) != null ? expLastYearDecemberHgCostMap.get(customCode) : zero);
+					stat.setExpCuCostYearBeforeLast(
+							expYearBeforeLastHgCostMap.get(customCode) != null ? expYearBeforeLastHgCostMap.get(customCode) : zero);
+
+					stat.setImpDeclCountLastMonth(
+							impLastMonthDeclCountMap.get(customCode) != null ? impLastMonthDeclCountMap.get(customCode) : 0);
+					stat.setImpDeclCountLastYearDecember(
+							impLastYearDecemberDeclCountMap.get(customCode) != null ? impLastYearDecemberDeclCountMap.get(customCode) : 0);
+					stat.setImpDeclCountYearBeforeLast(
+							impYearBeforeLastDeclCountMap.get(customCode) != null ? impYearBeforeLastDeclCountMap.get(customCode) : 0);
+
+					stat.setExpDeclCountLastMonth(
+							expLastMonthDeclCountMap.get(customCode) != null ? expLastMonthDeclCountMap.get(customCode) : 0);
+					stat.setExpDeclCountLastYearDecember(
+							expLastYearDecemberDeclCountMap.get(customCode) != null ? expLastYearDecemberDeclCountMap.get(customCode) : 0);
+					stat.setExpDeclCountYearBeforeLast(
+							expYearBeforeLastDeclCountMap.get(customCode) != null ? expYearBeforeLastDeclCountMap.get(customCode) : 0);
+				}
+				stat.setId(dao.getGuidStringBySql());
+				customMonthlyStatRepository.save(stat);
+			}
+
+			// 20191014 再次维护合并了关区的统计中间数据
+			mainCustomMonthlyStatFinal(dataPeriod);
+
+			MiddleDataMainStatus mStatus = new MiddleDataMainStatus();
+			mStatus.setCreateTime(new Date());
+			mStatus.setDataType(CustomMonthlyStat.class.getSimpleName());
+			mStatus.setStatPeriod(dataPeriod);
+			dao.executeUpdate("insert into WXJY_MID_D_M_STATUS (ID,DATA_TYPE, STAT_PERIOD, CREATE_TIME) " +
+					"values(sys_guid(),?,?,?) ", mStatus.getDataType(), mStatus.getStatPeriod(), mStatus.getCreateTime());
+		}
+	}
+
+
+	private void mainCustomMonthlyStatFinal(String dataPeriod) {
+		List<Object[]> copyList = new ArrayList<Object[]>();
+		List<Object[]> curMonthStat = (List<Object[]>) dao.getQueryBySql("select ID,MONTH,CUSTOM_CODE,IMP_DECL_COUNT,IMP_MAN_DECL_COUNT,IMP_MANUAL_AUDIT_DECL_COUNT,IMP_DECL_COUNT_LM,IMP_DECL_COUNT_LY_DEC," +
+						"IMP_DECL_COUNT_CURYEAR,IMP_DECL_COUNT_YBL,IMP_TOTAL_COST,IMP_TOTAL_COST_LM,IMP_TOTAL_COST_LY_DEC,IMP_TOTAL_COST_CY,IMP_TOTAL_COST_YBL," +
+						"IMP_CU_COST,IMP_CU_COST_LM,IMP_CU_COST_LY_DEC,IMP_CU_COST_CY,IMP_CU_COST_YBL,EXP_DECL_COUNT,EXP_MAN_DECL_COUNT,EXP_MANUAL_AUDIT_DECL_COUNT," +
+						"EXP_DECL_COUNT_LM,EXP_DECL_COUNT_LY_DEC,EXP_DECL_COUNT_CURYEAR,EXP_DECL_COUNT_YBL,EXP_TOTAL_COST,EXP_TOTAL_COST_LM,EXP_TOTAL_COST_LY_DEC," +
+						"EXP_TOTAL_COST_CY,EXP_TOTAL_COST_YBL,EXP_CU_COST,EXP_CU_COST_LM,EXP_CU_COST_LY_DEC,EXP_CU_COST_CY,EXP_CU_COST_YBL " +
+						"from WXJY_CUSTOM_M_STAT where month = ?",
+				dataPeriod);
+		for (Object[] s : curMonthStat) {
+			String customCode = (String) s[2];
+			s[2] = rootCustomsMap.get(customCode);
+			copyList.add(s);
+		}
+
+		Integer sumImpDeclCount = 0;// 进口单数
+		Integer sumImpManDeclCount = 0;// 进口查验单数
+		Integer sumImpAuditDeclCount = 0;// 进口人工审单单数
+		Integer sumImpDeclCountLastMonth = 0;// 上个月进口单数
+		Integer sumImpDeclCountLastYearDecember = 0;// 去年12月进口单数
+		Integer sumImpDeclCountCurentYear = 0;// 今年截止当月总进口单数
+		Integer sumImpDeclCountYearBeforeLast = 0;// 前年总进口单数
+		Integer sumExpDeclCount = 0;// 出口单数
+		Integer sumExpManDeclCount = 0;// 出口查验单数
+		Integer sumExpAuditDeclCount = 0;// 出口人工审单单数
+		Integer sumExpDeclCountLastMonth = 0;// 上个月出口单数
+		Integer sumExpDeclCountLastYearDecember = 0;// 去年12月进口单数
+		Integer sumExpDeclCountCurentYear = 0;// 今年截止当月总出口单数
+		Integer sumExpDeclCountYearBeforeLast = 0;// 前年总出口单数
+
+		// 20个消耗时间字段
+		BigDecimal sumImpTotalCost = zero;// 进口平均整体通关时间(小时)
+		BigDecimal sumImpTotalCostLastMonth = zero;// 进口平均整体通关时间-上月
+		BigDecimal sumImpTotalCostLastYearDecember = zero;// 进口平均整体通关时间-去年12月
+		BigDecimal sumImpTotalCostCurentYear = zero;// 进口平均整体通关时间-1至当月
+		BigDecimal sumImpTotalCostYearBeforeLast = zero;// 进口平均整体通关时间-前年
+		BigDecimal sumImpCuCost = zero;// 进口平均海关通关时间(小时)
+		BigDecimal sumImpCuCostLastMonth = zero;// 进口平均海关通关时间(小时)-上月
+		BigDecimal sumImpCuCostLastYearDecember = zero;// 进口平均海关通关时间-去年12月
+		BigDecimal sumImpCuCostCurentYear = zero;// 进口平均海关通关时间-1至当月
+		BigDecimal sumImpCuCostYearBeforeLast = zero;// 进口平均海关通关时间-前年
+		BigDecimal sumExpTotalCost = zero;// 出口平均整体通关时间(小时)
+		BigDecimal sumExpTotalCostLastMonth = zero;// 出口平均整体通关时间(小时)-上月
+		BigDecimal sumExpTotalCostLastYearDecember = zero; // 出口平均整体通关时间-去年12月
+		BigDecimal sumExpTotalCostCurentYear = zero;// 出口平均整体通关时间-1至当月
+		BigDecimal sumExpTotalCostYearBeforeLast = zero;// 出口平均整体通关时间-前年
+		BigDecimal sumExpCuCost = zero;// 出口平均海关通关时间(小时)
+		BigDecimal sumExpCuCostLastMonth = zero;// 出口平均海关通关时间(小时)-上月
+		BigDecimal sumExpCuCostLastYearDecember = zero;// 出口平均海关通关时间-去年12月
+		BigDecimal sumExpCuCostCurentYear = zero;// 出口平均海关通关时间-1至当月
+		BigDecimal sumExpCuCostYearBeforeLast = zero;// 出口平均海关通关时间-前年
+
+		for (String customCode : firstClassCustoms) {
+			if (!hasMultipleCustomList.contains(customCode)) {// 无下级关区的关区
+				boolean existData = false;
+				for (Object[] s : copyList) {
+					String customCodeT = (String) s[2];
+					if (customCode.equals(customCodeT)) {// 找到了既是唯一一条
+						CustomMonthlyStatFinal stat = new CustomMonthlyStatFinal();
+						stat.setMonth((String) s[1]);
+						stat.setImpDeclCount(Integer.valueOf(((BigDecimal) s[2]).toString()));
+						stat.setImpManDeclCount(Integer.valueOf(((BigDecimal) s[3]).toString()));
+						stat.setImpManualAuditDeclCount(Integer.valueOf(((BigDecimal) s[4]).toString()));
+						stat.setImpDeclCountLastMonth(Integer.valueOf(((BigDecimal) s[5]).toString()));
+						stat.setImpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[6]).toString()));
+						stat.setImpDeclCountCurentYear(Integer.valueOf(((BigDecimal) s[7]).toString()));
+						stat.setImpDeclCountYearBeforeLast(Integer.valueOf(((BigDecimal) s[8]).toString()));
+						stat.setImpTotalCost((BigDecimal) s[9]);
+						stat.setImpTotalCostLastMonth((BigDecimal) s[10]);
+						stat.setImpTotalCostLastYearDecember((BigDecimal) s[11]);
+						stat.setImpTotalCostCurentYear((BigDecimal) s[12]);
+						stat.setImpTotalCostYearBeforeLast((BigDecimal) s[13]);
+						stat.setImpCuCost((BigDecimal) s[14]);
+						stat.setImpCuCostLastMonth((BigDecimal) s[15]);
+						stat.setImpCuCostLastYearDecember((BigDecimal) s[16]);
+						stat.setImpCuCostCurentYear((BigDecimal) s[17]);
+						stat.setImpCuCostYearBeforeLast((BigDecimal) s[18]);
+						stat.setExpDeclCount(Integer.valueOf(((BigDecimal) s[19]).toString()));
+						stat.setExpManDeclCount(Integer.valueOf(((BigDecimal) s[20]).toString()));
+						stat.setExpManualAuditDeclCount(Integer.valueOf(((BigDecimal) s[21]).toString()));
+						stat.setExpDeclCountLastMonth(Integer.valueOf(((BigDecimal) s[22]).toString()));
+						stat.setExpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[23]).toString()));
+						stat.setExpDeclCountCurentYear(Integer.valueOf(((BigDecimal) s[24]).toString()));
+						stat.setExpDeclCountYearBeforeLast(Integer.valueOf(((BigDecimal) s[25]).toString()));
+						stat.setExpTotalCost((BigDecimal) s[26]);
+						stat.setExpTotalCostLastMonth((BigDecimal) s[27]);
+						stat.setExpTotalCostLastYearDecember((BigDecimal) s[28]);
+						stat.setExpTotalCostCurentYear((BigDecimal) s[29]);
+						stat.setExpTotalCostYearBeforeLast((BigDecimal) s[30]);
+						stat.setExpCuCost((BigDecimal) s[31]);
+						stat.setExpCuCostLastMonth((BigDecimal) s[32]);
+						stat.setExpCuCostLastYearDecember((BigDecimal) s[33]);
+						stat.setExpCuCostCurentYear((BigDecimal) s[34]);
+						stat.setExpCuCostYearBeforeLast((BigDecimal) s[35]);
+						stat.setId(dao.getGuidStringBySql());
+						customMonthlyStatFinalRepository.save(stat);
+						existData = true;
+						break;
+					}
+				}
+				if (!existData) {// 若不存在关区合并前的统计数据,需要补上合并后的统计记录
+
+					CustomMonthlyStatFinal stat = new CustomMonthlyStatFinal();
+					stat.setMonth(dataPeriod);
+					stat.setCustomCode(customCode);
+					stat.setImpDeclCount(0);
+					stat.setImpManDeclCount(0);
+					stat.setImpManualAuditDeclCount(0);
+					stat.setImpCuCost(zero);
+					stat.setImpTotalCost(zero);
+					stat.setExpDeclCount(0);
+					stat.setExpManDeclCount(0);
+					stat.setExpManualAuditDeclCount(0);
+					stat.setExpCuCost(zero);
+					stat.setExpTotalCost(zero);
+
+					Calendar cal = Calendar.getInstance();
+					Date curMonth = new Date();
+					try {
+						curMonth = monthSdf.parse(dataPeriod);
+					} catch (ParseException e) {
+						e.printStackTrace();
+					}
+					cal.setTime(curMonth);
+					cal.add(Calendar.MONTH, -1);
+					Date lastMonthDate = cal.getTime();
+					List<Object[]> lastMonthData = (List<Object[]>) dao.getQueryBySql("select ID,MONTH,CUSTOM_CODE,IMP_DECL_COUNT,IMP_MAN_DECL_COUNT,IMP_MANUAL_AUDIT_DECL_COUNT,IMP_DECL_COUNT_LM,IMP_DECL_COUNT_LY_DEC," +
+									"IMP_DECL_COUNT_CURYEAR,IMP_DECL_COUNT_YBL,IMP_TOTAL_COST,IMP_TOTAL_COST_LM,IMP_TOTAL_COST_LY_DEC,IMP_TOTAL_COST_CY,IMP_TOTAL_COST_YBL," +
+									"IMP_CU_COST,IMP_CU_COST_LM,IMP_CU_COST_LY_DEC,IMP_CU_COST_CY,IMP_CU_COST_YBL,EXP_DECL_COUNT,EXP_MAN_DECL_COUNT,EXP_MANUAL_AUDIT_DECL_COUNT," +
+									"EXP_DECL_COUNT_LM,EXP_DECL_COUNT_LY_DEC,EXP_DECL_COUNT_CURYEAR,EXP_DECL_COUNT_YBL,EXP_TOTAL_COST,EXP_TOTAL_COST_LM,EXP_TOTAL_COST_LY_DEC," +
+									"EXP_TOTAL_COST_CY,EXP_TOTAL_COST_YBL,EXP_CU_COST,EXP_CU_COST_LM,EXP_CU_COST_LY_DEC,EXP_CU_COST_CY,EXP_CU_COST_YBL " +
+									"from WXJY_CUSTOM_M_STAT_F where month = ? and CUSTOM_CODE = ?",
+							monthSdf.format(lastMonthDate), customCode);
+					if (lastMonthData != null && lastMonthData.size() > 0) {
+						for (Object[] s : lastMonthData) {
+							stat.setImpDeclCountLastMonth(Integer.valueOf(((BigDecimal)  s[6]).toString()));
+							stat.setImpCuCostLastMonth((BigDecimal) s[15]);
+							stat.setImpTotalCostLastMonth((BigDecimal) s[10]);
+							stat.setExpDeclCountLastMonth(Integer.valueOf(((BigDecimal)  s[22]).toString()));
+							stat.setExpCuCostLastMonth((BigDecimal) s[31]);
+							stat.setExpTotalCostLastMonth((BigDecimal) s[26]);
+
+							if (dataPeriod.endsWith("01")) {
+								stat.setImpDeclCountCurentYear(0);
+								stat.setImpCuCostCurentYear(zero);
+								stat.setImpTotalCostCurentYear(zero);
+								stat.setExpDeclCountCurentYear(0);
+								stat.setExpCuCostCurentYear(zero);
+								stat.setExpTotalCostCurentYear(zero);
+								// 去年12月也就是上个月
+								stat.setImpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[3]).toString()));
+								stat.setImpCuCostLastYearDecember((BigDecimal) s[14]);
+								stat.setImpTotalCostLastYearDecember((BigDecimal) s[9]);
+								stat.setExpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[21]).toString()));
+								stat.setExpCuCostLastYearDecember((BigDecimal) s[30]);
+								stat.setExpTotalCostLastYearDecember((BigDecimal) s[25]);
+								// 前年平均值需要重新查询&计算
+								if (dataPeriod.compareTo(noRelStatMonth) > 0) {
+									cal.setTime(curMonth);
+									cal.add(Calendar.YEAR, -1);
+									String lastYearJanuary = monthSdf.format(cal.getTime());
+									cal.add(Calendar.YEAR, -1);
+									String yearBeforeLastJanuary = monthSdf.format(cal.getTime());
+									List<Object[]> yearBeforeLastData = (List<Object[]>) dao.getQueryBySql("select ID,MONTH,CUSTOM_CODE,IMP_DECL_COUNT,IMP_MAN_DECL_COUNT,IMP_MANUAL_AUDIT_DECL_COUNT,IMP_DECL_COUNT_LM,IMP_DECL_COUNT_LY_DEC," +
+													"IMP_DECL_COUNT_CURYEAR,IMP_DECL_COUNT_YBL,IMP_TOTAL_COST,IMP_TOTAL_COST_LM,IMP_TOTAL_COST_LY_DEC,IMP_TOTAL_COST_CY,IMP_TOTAL_COST_YBL," +
+													"IMP_CU_COST,IMP_CU_COST_LM,IMP_CU_COST_LY_DEC,IMP_CU_COST_CY,IMP_CU_COST_YBL,EXP_DECL_COUNT,EXP_MAN_DECL_COUNT,EXP_MANUAL_AUDIT_DECL_COUNT," +
+													"EXP_DECL_COUNT_LM,EXP_DECL_COUNT_LY_DEC,EXP_DECL_COUNT_CURYEAR,EXP_DECL_COUNT_YBL,EXP_TOTAL_COST,EXP_TOTAL_COST_LM,EXP_TOTAL_COST_LY_DEC," +
+													"EXP_TOTAL_COST_CY,EXP_TOTAL_COST_YBL,EXP_CU_COST,EXP_CU_COST_LM,EXP_CU_COST_LY_DEC,EXP_CU_COST_CY,EXP_CU_COST_YBL " +
+													"from WXJY_CUSTOM_M_STAT_F where month >= ? and month < ? and CUSTOM_CODE = ?",
+											yearBeforeLastJanuary, lastYearJanuary, customCode);
+									if (yearBeforeLastData != null && yearBeforeLastData.size() > 0) {
+										int sumImpDeclCountYBL = 0;
+										BigDecimal sumImpCuCostYBL = new BigDecimal(0);
+										BigDecimal sumImpTotalCostYBL = new BigDecimal(0);
+
+										int sumExpDeclCountYBL = 0;
+										BigDecimal sumExCuCostYBL = new BigDecimal(0);
+										BigDecimal sumExpTotalCostYBL = new BigDecimal(0);
+
+										for (Object[] t : yearBeforeLastData) {
+											Integer impCount = Integer.valueOf(((BigDecimal) t[3]).toString());
+											if (impCount != null && impCount != 0) {
+												sumImpDeclCountYBL += impCount;
+												BigDecimal mul = new BigDecimal(impCount);
+
+												BigDecimal impCuCost = (BigDecimal) t[14];
+												if (impCuCost != null) {
+													sumImpCuCostYBL = sumImpCuCostYBL.add(impCuCost.multiply(mul));
+												}
+												BigDecimal impTotalCost = (BigDecimal) t[9];
+												if (impTotalCost != null) {
+													sumImpTotalCostYBL = sumImpTotalCostYBL.add(impTotalCost.multiply(mul));
+												}
+											}
+
+											Integer expCount = Integer.valueOf(((BigDecimal) t[21]).toString());
+											if (expCount != null && expCount != 0) {
+												sumExpDeclCountYBL += expCount;
+												BigDecimal mul = new BigDecimal(expCount);
+
+												BigDecimal expCuCost = (BigDecimal) t[30];
+												if (expCuCost != null) {
+													sumExCuCostYBL = sumExCuCostYBL.add(expCuCost.multiply(mul));
+												}
+												BigDecimal expTotalCost = (BigDecimal) t[25];
+												if (expTotalCost != null) {
+													sumExpTotalCostYBL = sumExpTotalCostYBL.add(expTotalCost.multiply(mul));
+												}
+											}
+
+										}
+
+										if (sumImpDeclCountYBL != 0) {
+											BigDecimal div = new BigDecimal(sumImpDeclCountYBL);
+											stat.setImpDeclCountYearBeforeLast(sumImpDeclCountYBL);
+											stat.setImpCuCostYearBeforeLast(sumImpCuCostYBL.divide(div, 4, BigDecimal.ROUND_HALF_UP));
+											stat.setImpTotalCostYearBeforeLast(sumImpTotalCostYBL.divide(div, 4, BigDecimal.ROUND_HALF_UP));
+										} else {
+											stat.setImpDeclCountYearBeforeLast(0);
+											stat.setImpCuCostYearBeforeLast(zero);
+											stat.setImpTotalCostYearBeforeLast(zero);
+										}
+
+										if (sumExpDeclCountYBL != 0) {
+											BigDecimal div = new BigDecimal(sumExpDeclCountYBL);
+											stat.setExpDeclCountYearBeforeLast(sumExpDeclCountYBL);
+											stat.setExpCuCostYearBeforeLast(sumExCuCostYBL.divide(div, 4, BigDecimal.ROUND_HALF_UP));
+											stat.setExpTotalCostYearBeforeLast(sumExpTotalCostYBL.divide(div, 4, BigDecimal.ROUND_HALF_UP));
+										} else {
+											stat.setExpDeclCountYearBeforeLast(0);
+											stat.setExpCuCostYearBeforeLast(zero);
+											stat.setExpTotalCostYearBeforeLast(zero);
+										}
+
+									} else {
+										stat.setImpDeclCountYearBeforeLast(0);
+										stat.setImpCuCostYearBeforeLast(zero);
+										stat.setImpTotalCostYearBeforeLast(zero);
+										stat.setExpDeclCountYearBeforeLast(0);
+										stat.setExpCuCostYearBeforeLast(zero);
+										stat.setExpTotalCostYearBeforeLast(zero);
+									}
+								} else {
+									stat.setImpDeclCountYearBeforeLast(0);
+									stat.setImpCuCostYearBeforeLast(zero);
+									stat.setImpTotalCostYearBeforeLast(zero);
+									stat.setExpDeclCountYearBeforeLast(0);
+									stat.setExpCuCostYearBeforeLast(zero);
+									stat.setExpTotalCostYearBeforeLast(zero);
+								}
+							} else {
+								stat.setImpDeclCountCurentYear(Integer.valueOf(((BigDecimal) s[8]).toString()));
+								stat.setImpCuCostCurentYear((BigDecimal) s[17]);
+								stat.setImpTotalCostCurentYear((BigDecimal) s[12]);
+								stat.setExpDeclCountCurentYear(Integer.valueOf(((BigDecimal) s[24]).toString()));
+								stat.setExpCuCostCurentYear((BigDecimal) s[33]);
+								stat.setExpTotalCostCurentYear((BigDecimal) s[28]);
+								// 去年12月数据是上个月对应字段的值
+								stat.setImpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[7]).toString()));
+								stat.setImpCuCostLastYearDecember((BigDecimal) s[16]);
+								stat.setImpTotalCostLastYearDecember((BigDecimal) s[11]);
+								stat.setExpDeclCountLastYearDecember(Integer.valueOf(((BigDecimal) s[23]).toString()));
+								stat.setExpCuCostLastYearDecember((BigDecimal) s[32]);
+								stat.setExpTotalCostLastYearDecember((BigDecimal) s[27]);
+
+								stat.setImpDeclCountYearBeforeLast(Integer.valueOf(((BigDecimal) s[9]).toString()));
+								stat.setImpCuCostYearBeforeLast((BigDecimal) s[18]);
+								stat.setImpTotalCostYearBeforeLast((BigDecimal) s[13]);
+								stat.setExpDeclCountYearBeforeLast(Integer.valueOf(((BigDecimal) s[25]).toString()));
+								stat.setExpCuCostYearBeforeLast((BigDecimal) s[34]);
+								stat.setExpTotalCostYearBeforeLast((BigDecimal) s[29]);
+							}
+							break;
+						}
+					} else {//要求从最早月度开始维护,则若前面数据不存在,当前月度直接设置为0
+						stat.setImpDeclCountCurentYear(0);
+						stat.setImpCuCostCurentYear(zero);
+						stat.setImpTotalCostCurentYear(zero);
+						stat.setExpDeclCountCurentYear(0);
+						stat.setExpCuCostCurentYear(zero);
+						stat.setExpTotalCostCurentYear(zero);
+
+						stat.setImpDeclCountLastMonth(0);
+						stat.setImpCuCostLastMonth(zero);
+						stat.setImpTotalCostLastMonth(zero);
+						stat.setExpDeclCountLastMonth(0);
+						stat.setExpCuCostLastMonth(zero);
+						stat.setExpTotalCostLastMonth(zero);
+
+						stat.setImpDeclCountLastYearDecember(0);
+						stat.setImpCuCostLastYearDecember(zero);
+						stat.setImpTotalCostLastYearDecember(zero);
+						stat.setExpDeclCountLastYearDecember(0);
+						stat.setExpCuCostLastYearDecember(zero);
+						stat.setExpTotalCostLastYearDecember(zero);
+
+						stat.setImpDeclCountYearBeforeLast(0);
+						stat.setImpCuCostYearBeforeLast(zero);
+						stat.setImpTotalCostYearBeforeLast(zero);
+						stat.setExpDeclCountYearBeforeLast(0);
+						stat.setExpCuCostYearBeforeLast(zero);
+						stat.setExpTotalCostYearBeforeLast(zero);
+					}
+					stat.setId(dao.getGuidStringBySql());
+					customMonthlyStatFinalRepository.save(stat);
+				}
+			} else {// 需要将一级关区及其下级关区的数据合并
+				sumImpDeclCount = 0;// 进口单数
+				sumImpManDeclCount = 0;//进口查验单数
+				sumImpAuditDeclCount = 0;//进口人工审单单数
+				sumImpDeclCountLastMonth = 0;// 上个月进口单数
+				sumImpDeclCountLastYearDecember = 0;// 去年12月进口单数
+				sumImpDeclCountCurentYear = 0;// 今年截止当月总进口单数
+				sumImpDeclCountYearBeforeLast = 0;// 前年总进口单数
+				sumExpDeclCount = 0;// 出口单数
+				sumExpManDeclCount = 0;//进口查验单数
+				sumExpAuditDeclCount = 0;//进口人工审单单数
+				sumExpDeclCountLastMonth = 0;// 上个月出口单数
+				sumExpDeclCountLastYearDecember = 0;// 去年12月进口单数
+				sumExpDeclCountCurentYear = 0;// 今年截止当月总出口单数
+				sumExpDeclCountYearBeforeLast = 0;// 前年总出口单数
+
+				// 20个消耗时间字段
+				sumImpTotalCost = zero;// 进口平均整体通关时间(小时)
+				sumImpTotalCostLastMonth = zero;// 进口平均整体通关时间-上月
+				sumImpTotalCostLastYearDecember = zero;// 进口平均整体通关时间-去年12月
+				sumImpTotalCostCurentYear = zero;// 进口平均整体通关时间-1至当月
+				sumImpTotalCostYearBeforeLast = zero;// 进口平均整体通关时间-前年
+				sumImpCuCost = zero;// 进口平均海关通关时间(小时)
+				sumImpCuCostLastMonth = zero;// 进口平均海关通关时间(小时)-上月
+				sumImpCuCostLastYearDecember = zero;// 进口平均海关通关时间-去年12月
+				sumImpCuCostCurentYear = zero;// 进口平均海关通关时间-1至当月
+				sumImpCuCostYearBeforeLast = zero;// 进口平均海关通关时间-前年
+				sumExpTotalCost = zero;// 出口平均整体通关时间(小时)
+				sumExpTotalCostLastMonth = zero;// 出口平均整体通关时间(小时)-上月
+				sumExpTotalCostLastYearDecember = zero; // 出口平均整体通关时间-去年12月
+				sumExpTotalCostCurentYear = zero;// 出口平均整体通关时间-1至当月
+				sumExpTotalCostYearBeforeLast = zero;// 出口平均整体通关时间-前年
+				sumExpCuCost = zero;// 出口平均海关通关时间(小时)
+				sumExpCuCostLastMonth = zero;// 出口平均海关通关时间(小时)-上月
+				sumExpCuCostLastYearDecember = zero;// 出口平均海关通关时间-去年12月
+				sumExpCuCostCurentYear = zero;// 出口平均海关通关时间-1至当月
+				sumExpCuCostYearBeforeLast = zero;// 出口平均海关通关时间-前年
+
+				for (Object[] s : copyList) {
+					if (customCode.equals((String) s[2])) {
+						sumImpDeclCount += Integer.valueOf(((BigDecimal) s[3]).toString());
+						sumImpManDeclCount += Integer.valueOf(((BigDecimal) s[4]).toString());
+						sumImpAuditDeclCount += Integer.valueOf(((BigDecimal) s[5]).toString());
+						sumImpDeclCountLastMonth += s[6] != null ? Integer.valueOf(((BigDecimal) s[6]).toString()) : 0;
+						sumImpDeclCountLastYearDecember += s[7] != null ? Integer.valueOf(((BigDecimal) s[7]).toString())
+								: 0;
+						sumImpDeclCountCurentYear += s[8] != null ? Integer.valueOf(((BigDecimal) s[8]).toString()) : 0;
+						sumImpDeclCountYearBeforeLast += s[9] != null ? Integer.valueOf(((BigDecimal) s[9]).toString()) : 0;
+
+						sumExpDeclCount += Integer.valueOf(((BigDecimal) s[20]).toString());
+						sumExpManDeclCount += Integer.valueOf(((BigDecimal) s[21]).toString());
+						sumExpAuditDeclCount += Integer.valueOf(((BigDecimal) s[22]).toString());
+						sumExpDeclCountLastMonth += s[23] != null ? Integer.valueOf(((BigDecimal) s[23]).toString()) : 0;
+						sumExpDeclCountLastYearDecember += s[24] != null ? Integer.valueOf(((BigDecimal) s[24]).toString())
+								: 0;
+						sumExpDeclCountCurentYear += s[25] != null ? Integer.valueOf(((BigDecimal) s[25]).toString()) : 0;
+						sumExpDeclCountYearBeforeLast += s[26] != null ? Integer.valueOf(((BigDecimal) s[26]).toString()) : 0;
+
+						BigDecimal impCurMonthMultiply = (BigDecimal) s[3];
+						BigDecimal impLastMonthMultiply = s[6] != null ? (BigDecimal) s[6] : new BigDecimal(0);
+						BigDecimal impLastYearDecemberMultiply = s[7] != null ? (BigDecimal) s[7] : new BigDecimal(0);
+						BigDecimal impCurYearMultiply = s[8] != null ? (BigDecimal) s[8] : new BigDecimal(0);
+						BigDecimal impYearBeforeLastMultiply = s[9] != null ? (BigDecimal) s[9] : new BigDecimal(0);
+
+						BigDecimal expCurMonthMultiply = (BigDecimal) s[20];
+						BigDecimal expLastMonthMultiply = s[23] != null ? (BigDecimal) s[23] : new BigDecimal(0);
+						BigDecimal expLastYearDecemberMultiply = s[24] != null ? (BigDecimal) s[24] : new BigDecimal(0);
+						BigDecimal expCurYearMultiply = s[25] != null ? (BigDecimal) s[25] : new BigDecimal(0);
+						BigDecimal expYearBeforeLastMultiply = s[26] != null ? (BigDecimal) s[26] : new BigDecimal(0);
+
+						sumImpTotalCost = s[10] != null
+								? sumImpTotalCost.add(((BigDecimal) s[10]).multiply(impCurMonthMultiply))
+								: sumImpTotalCost;
+						sumImpTotalCostLastMonth = s[11] != null
+								? sumImpTotalCostLastMonth.add(((BigDecimal) s[11]).multiply(impLastMonthMultiply))
+								: sumImpTotalCostLastMonth;
+						sumImpTotalCostLastYearDecember = s[12] != null
+								? sumImpTotalCostLastYearDecember
+								.add(((BigDecimal) s[12]).multiply(impLastYearDecemberMultiply))
+								: sumImpTotalCostLastYearDecember;
+						sumImpTotalCostCurentYear = s[13] != null
+								? sumImpTotalCostCurentYear.add(((BigDecimal) s[13]).multiply(impCurYearMultiply))
+								: sumImpTotalCostCurentYear;
+						sumImpTotalCostYearBeforeLast = s[14] != null
+								? sumImpTotalCostYearBeforeLast.add(((BigDecimal) s[14]).multiply(impYearBeforeLastMultiply))
+								: sumImpTotalCostYearBeforeLast;
+
+						sumImpCuCost = s[15] != null ? sumImpCuCost.add(((BigDecimal) s[15]).multiply(impCurMonthMultiply))
+								: sumImpCuCost;
+						sumImpCuCostLastMonth = s[16] != null
+								? sumImpCuCostLastMonth.add(((BigDecimal) s[16]).multiply(impLastMonthMultiply))
+								: sumImpCuCostLastMonth;
+						sumImpCuCostLastYearDecember = s[17] != null
+								? sumImpCuCostLastYearDecember.add(((BigDecimal) s[17]).multiply(impLastYearDecemberMultiply))
+								: sumImpCuCostLastYearDecember;
+						sumImpCuCostCurentYear = s[18] != null
+								? sumImpCuCostCurentYear.add(((BigDecimal) s[18]).multiply(impCurYearMultiply))
+								: sumImpCuCostCurentYear;
+						sumImpCuCostYearBeforeLast = s[19] != null
+								? sumImpCuCostYearBeforeLast.add(((BigDecimal) s[19]).multiply(impYearBeforeLastMultiply))
+								: sumImpCuCostYearBeforeLast;
+
+						sumExpTotalCost = s[27] != null
+								? sumExpTotalCost.add(((BigDecimal) s[27]).multiply(expCurMonthMultiply))
+								: sumExpTotalCost;
+						sumExpTotalCostLastMonth = s[28] != null
+								? sumExpTotalCostLastMonth.add(((BigDecimal) s[28]).multiply(expLastMonthMultiply))
+								: sumExpTotalCostLastMonth;
+						sumExpTotalCostLastYearDecember = s[29] != null
+								? sumExpTotalCostLastYearDecember
+								.add(((BigDecimal) s[29]).multiply(expLastYearDecemberMultiply))
+								: sumExpTotalCostLastYearDecember;
+						sumExpTotalCostCurentYear = s[30] != null
+								? sumExpTotalCostCurentYear.add(((BigDecimal) s[30]).multiply(expCurYearMultiply))
+								: sumExpTotalCostCurentYear;
+						sumExpTotalCostYearBeforeLast = s[31] != null
+								? sumExpTotalCostYearBeforeLast.add(((BigDecimal) s[31]).multiply(expYearBeforeLastMultiply))
+								: sumExpTotalCostYearBeforeLast;
+
+						sumExpCuCost = s[32] != null ? sumExpCuCost.add(((BigDecimal) s[32]).multiply(expCurMonthMultiply))
+								: sumExpCuCost;
+						sumExpCuCostLastMonth = s[33] != null
+								? sumExpCuCostLastMonth.add(((BigDecimal) s[33]).multiply(expLastMonthMultiply))
+								: sumExpCuCostLastMonth;
+						sumExpCuCostLastYearDecember = s[34] != null
+								? sumExpCuCostLastYearDecember.add(((BigDecimal) s[34]).multiply(expLastYearDecemberMultiply))
+								: sumExpCuCostLastYearDecember;
+						sumExpCuCostCurentYear = s[35] != null
+								? sumExpCuCostCurentYear.add(((BigDecimal) s[35]).multiply(expCurYearMultiply))
+								: sumExpCuCostCurentYear;
+						sumExpCuCostYearBeforeLast = s[36] != null
+								? sumExpCuCostYearBeforeLast.add(((BigDecimal) s[36]).multiply(expYearBeforeLastMultiply))
+								: sumExpCuCostYearBeforeLast;
+					}
+				}
+
+				CustomMonthlyStatFinal stat = new CustomMonthlyStatFinal();
+				stat.setMonth(dataPeriod);
+				stat.setCustomCode(customCode);
+
+				stat.setImpCuCost(
+						sumImpDeclCount == 0 ? zero : sumImpCuCost.divide(new BigDecimal(sumImpDeclCount), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpCuCostCurentYear(sumImpDeclCountCurentYear == 0 ? zero
+						: sumImpCuCostCurentYear.divide(new BigDecimal(sumImpDeclCountCurentYear), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpCuCostLastMonth(sumImpDeclCountLastMonth == 0 ? zero
+						: sumImpCuCostLastMonth.divide(new BigDecimal(sumImpDeclCountLastMonth), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpCuCostLastYearDecember(sumImpDeclCountLastYearDecember == 0 ? zero
+						: sumImpCuCostLastYearDecember.divide(new BigDecimal(sumImpDeclCountLastYearDecember), 4,
+						BigDecimal.ROUND_HALF_UP));
+				stat.setImpCuCostYearBeforeLast(sumImpDeclCountYearBeforeLast == 0 ? zero
+						: sumImpCuCostYearBeforeLast.divide(new BigDecimal(sumImpDeclCountYearBeforeLast), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpDeclCount(sumImpDeclCount);
+				stat.setImpManDeclCount(sumImpManDeclCount);
+				stat.setImpManualAuditDeclCount(sumImpAuditDeclCount);
+				stat.setImpDeclCountCurentYear(sumImpDeclCountCurentYear);
+				stat.setImpDeclCountLastMonth(sumImpDeclCountLastMonth);
+				stat.setImpDeclCountLastYearDecember(sumImpDeclCountLastYearDecember);
+				stat.setImpDeclCountYearBeforeLast(sumImpDeclCountYearBeforeLast);
+				stat.setImpTotalCost(
+						sumImpDeclCount == 0 ? zero : sumImpTotalCost.divide(new BigDecimal(sumImpDeclCount), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpTotalCostCurentYear(sumImpDeclCountCurentYear == 0 ? zero
+						: sumImpTotalCostCurentYear.divide(new BigDecimal(sumImpDeclCountCurentYear), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpTotalCostLastMonth(sumImpDeclCountLastMonth == 0 ? zero
+						: sumImpTotalCostLastMonth.divide(new BigDecimal(sumImpDeclCountLastMonth), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setImpTotalCostLastYearDecember(sumImpDeclCountLastYearDecember == 0 ? zero
+						: sumImpTotalCostLastYearDecember.divide(new BigDecimal(sumImpDeclCountLastYearDecember), 4,
+						BigDecimal.ROUND_HALF_UP));
+				stat.setImpTotalCostYearBeforeLast(sumImpDeclCountYearBeforeLast == 0 ? zero
+						: sumImpTotalCostYearBeforeLast.divide(new BigDecimal(sumImpDeclCountYearBeforeLast), 4, BigDecimal.ROUND_HALF_UP));
+
+				stat.setExpCuCost(
+						sumExpDeclCount == 0 ? zero : sumExpCuCost.divide(new BigDecimal(sumExpDeclCount), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpCuCostCurentYear(sumExpDeclCountCurentYear == 0 ? zero
+						: sumExpCuCostCurentYear.divide(new BigDecimal(sumExpDeclCountCurentYear), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpCuCostLastMonth(sumExpDeclCountLastMonth == 0 ? zero
+						: sumExpCuCostLastMonth.divide(new BigDecimal(sumExpDeclCountLastMonth), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpCuCostLastYearDecember(sumExpDeclCountLastYearDecember == 0 ? zero
+						: sumExpCuCostLastYearDecember.divide(new BigDecimal(sumExpDeclCountLastYearDecember), 4,
+						BigDecimal.ROUND_HALF_UP));
+				stat.setExpCuCostYearBeforeLast(sumExpDeclCountYearBeforeLast == 0 ? zero
+						: sumExpCuCostYearBeforeLast.divide(new BigDecimal(sumExpDeclCountYearBeforeLast), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpDeclCount(sumExpDeclCount);
+				stat.setExpManDeclCount(sumExpManDeclCount);
+				stat.setExpManualAuditDeclCount(sumExpAuditDeclCount);
+				stat.setExpDeclCountCurentYear(sumExpDeclCountCurentYear);
+				stat.setExpDeclCountLastMonth(sumExpDeclCountLastMonth);
+				stat.setExpDeclCountLastYearDecember(sumExpDeclCountLastYearDecember);
+				stat.setExpDeclCountYearBeforeLast(sumExpDeclCountYearBeforeLast);
+				stat.setExpTotalCost(
+						sumExpDeclCount == 0 ? zero : sumExpTotalCost.divide(new BigDecimal(sumExpDeclCount), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpTotalCostCurentYear(sumExpDeclCountCurentYear == 0 ? zero
+						: sumExpTotalCostCurentYear.divide(new BigDecimal(sumExpDeclCountCurentYear), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpTotalCostLastMonth(sumExpDeclCountLastMonth == 0 ? zero
+						: sumExpTotalCostLastMonth.divide(new BigDecimal(sumExpDeclCountLastMonth), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setExpTotalCostLastYearDecember(sumExpDeclCountLastYearDecember == 0 ? zero
+						: sumExpTotalCostLastYearDecember.divide(new BigDecimal(sumExpDeclCountLastYearDecember), 4,
+						BigDecimal.ROUND_HALF_UP));
+				stat.setExpTotalCostYearBeforeLast(sumExpDeclCountYearBeforeLast == 0 ? zero
+						: sumExpTotalCostYearBeforeLast.divide(new BigDecimal(sumExpDeclCountYearBeforeLast), 4, BigDecimal.ROUND_HALF_UP));
+				stat.setId(dao.getGuidStringBySql());
+				customMonthlyStatFinalRepository.save(stat);
+			}
+		}
+	}
+
+	/**
+	 * 删单涉案数据
+	 * 删单涉案每天跑近一个月数据量大导致日志打不开,现在改为只查和危险品有关的报关单数据
+	 */
+	private void delSpecialAndDelHeadLogData(Date end) {
+		//原来写的删单只删当前时间前一天数据,这会导致重刷时间范围数据时剔除不了以前删单的单子,而涉案的总是剔除近一年的,如果刷的是一年以前的也剔除不了
+		//所以这里按照传递进来的时间做近一年范围剔除
+		//新剔除范围
+		Date today = null;
+		Calendar c = Calendar.getInstance();
+		try {
+			today = daySdf.parse(daySdf.format(end));
+			c.setTime(today);
+		} catch (ParseException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		String sa_sql = "";//涉案
+		List<String> specialEntryIds = new ArrayList<String>();
+		List<String> specialH2018EntryIds = new ArrayList<String>();
+		List<String> delEntryIds = new ArrayList<String>();
+		//flag 生产环境正式代码设置为true;删除5年内的涉案数据设置为false以提升效率
+		//刷数据后会存在很多涉案数据没有剔除干净,因此需要flag改为false跑一次,很多当天查出的报关单在前两年涉案
+		boolean flag = true;
+		if (flag) {//生产环境
+			// 每日维护取最近一年涉案的报关单号来过滤需要汇总的报关单
+			c.add(Calendar.YEAR, -1);
+			sa_sql = "select distinct(ENTRY_ID) from rh2k_SPECIAL_ENTRY where OP_TIME >= ? and OP_TIME < ?";
+			specialEntryIds = (List<String>) rh2kRepository.getQueryBySql(sa_sql, c.getTime(), today);
+			specialH2018EntryIds = (List<String>) h2018Dao.getQueryBySql(
+					"select distinct(ENTRY_ID) from ENTRY_HEAD where D_DATE >= ? and D_DATE < ? " +
+							"and NOTE_S like '%处罚决定书%'", c.getTime(), today);
+			//20231013发现退单和删单都会进ENTRY_DEL_HEAD_LOG,只有ENTRY_OP_LOG OP_TYPE第一位为0可以区分删单
+			delEntryIds = (List<String>) zmqdRepository.getQueryBySql(
+					"select distinct(ENTRY_ID) from h18c_ENTRY_OP_LOG where substr(OP_TYPE,1,1) = '0' "
+							+ "and OP_TIME >= ? and OP_TIME < ?", c.getTime(), today);
+		} else {//测试环境
+			// 全新生成所有中间数据时,取最近5年的涉案单号,每一年涉案的单号大约几千单,2018以前的很少
+			c.add(Calendar.YEAR, -5);
+			sa_sql = "select distinct(ENTRY_ID) from rh2k_SPECIAL_ENTRY where OP_TIME >= ?";
+			specialEntryIds = (List<String>) rh2kRepository.getQueryBySql(sa_sql, c.getTime());
+			specialH2018EntryIds = (List<String>) h2018Dao.getQueryBySql(
+					"select distinct(ENTRY_ID) from ENTRY_HEAD where D_DATE >= ? " +
+							"and NOTE_S like '%处罚决定书%'", c.getTime());
+			try {
+				// 把维护记录日期当天及之后所有的的删单记录添加进过滤集合(切记:删单记录大多数在结关之后才执行,全新生成是不考虑)
+				delEntryIds = (List<String>) zmqdRepository.getQueryBySql("select distinct(ENTRY_ID) from h18c_ENTRY_OP_LOG "
+						+ "where substr(OP_TYPE,1,1) = '0' and OP_TIME >= ?", daySdf.parse("20160101"));
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+		}
+		//删单和涉案的单号
+		if (specialEntryIds != null && specialEntryIds.size() > 0) {
+			delEntryIds.addAll(specialEntryIds);
+		}
+		if (specialH2018EntryIds != null && specialH2018EntryIds.size() > 0) {
+			delEntryIds.addAll(specialH2018EntryIds);
+		}
+		if (null != delEntryIds && delEntryIds.size() > 0) {
+			int currentPage = 1;
+			int pageSize = 100;
+			int count = 0;
+			int page = (delEntryIds.size() % pageSize == 0 ? delEntryIds.size() / pageSize : delEntryIds.size() / pageSize + 1);
+			for (int j = 0; j < page; j++) {
+				StringBuilder entryIds = new StringBuilder();
+				int total = currentPage * pageSize;
+				for (int i = count; i < (delEntryIds.size() - count > 100 ? total : delEntryIds.size()); i++) {
+					entryIds.append("'").append(delEntryIds.get(i)).append("',");
+				}
+				entryIds.deleteCharAt(entryIds.length() - 1);
+				String ids = entryIds.toString();
+
+				//同步删除通过报关单号关联的商品编码信息
+				String sql2 = "delete from WXJY_ENTRY_LIST where ENTRY_ID in (" + ids + ")";
+				dao.executeUpdate(sql2);
+
+				String sql = "delete from WXJY_ENTRY_HEAD where ENTRY_ID in (" + ids + ")";
+				dao.executeUpdate(sql);
+
+				currentPage++;
+				count += pageSize;
+			}
+		}
+		//如果有涉案数据则需要把月度数据重刷
+		if (null != delEntryIds && delEntryIds.size() > 0) {
+			//由于删掉涉案是在当月重新刷月度数据前执行,所以需要将一级海关存放,否则合并表不生成数据
+			rootCustomsMap.clear();
+			hasMultipleCustomList.clear();
+			firstClassCustoms.clear();
+			List<PubCustomsMapping> custMapping = pubCustomsMappingRepository.findAll();
+			for (PubCustomsMapping m : custMapping) {
+				String pCustomCode = m.getMappingCode();
+				if (rootCustomsMap.containsValue(pCustomCode)) {
+					hasMultipleCustomList.add(pCustomCode);
+				}
+				rootCustomsMap.put(m.getCustomsCode(), pCustomCode);
+				firstClassCustoms.add(pCustomCode);
+			}
+			Calendar cl = Calendar.getInstance();
+			Date clNow = new Date();
+			Date deadline = clNow;
+			cl.setTime(today);
+			if (flag) {//生产环境
+				// 每日维护取最近一年涉案的报关单号来过滤需要汇总的报关单
+				cl.add(Calendar.YEAR, -1);
+			} else {//测试环境
+				// 全新生成所有中间数据时,取最近5年的涉案单号,每一年涉案的单号大约几千单,2018以前的很少
+				cl.add(Calendar.YEAR, -5);
+			}
+			while (!cl.getTime().after(deadline)) {
+				String dataPeriod = monthSdf.format(cl.getTime());
+				Date statBegin = null;
+				try {
+					statBegin = monthSdf.parse(dataPeriod);
+				} catch (ParseException e) {
+				}
+				cl.setTime(statBegin);
+				cl.add(Calendar.MONTH, 1);
+				Date statEnd = cl.getTime();
+				//每日数据不重刷
+				dao.executeUpdate("delete from WXJY_MID_D_M_STATUS where DATA_TYPE != ? and STAT_PERIOD = ?", EntryHead.class.getSimpleName(), dataPeriod);
+				monthlyDataMaintance(dataPeriod, statBegin, statEnd);
+			}
+			rootCustomsMap.clear();
+			hasMultipleCustomList.clear();
+			firstClassCustoms.clear();
+			logger.info("涉案删除后月份数据重刷成功");
+		} else {
+			logger.info("最近无涉案数据不需要重新生成月度数据");
+		}
+	}
+}

+ 298 - 0
src/main/java/cn/gov/customs/data/timer/ZhDataRunTask.java

@@ -0,0 +1,298 @@
+package cn.gov.customs.data.timer;
+
+import cn.gov.customs.data.entity.wxjy.common.PubCustomsMapping;
+import cn.gov.customs.data.repository.iedg.IedgRepository;
+import cn.gov.customs.data.repository.wxjy.WxjyRepository;
+import cn.gov.customs.data.repository.wxjy.common.PubCustomsMappingRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * 综合处危险品数据
+ *
+ * @author wq
+ */
+@Component
+@PropertySource("classpath:data-acquisition.properties")
+public class ZhDataRunTask {
+    Logger logger = LoggerFactory.getLogger(ZhDataRunTask.class);
+
+    private static SimpleDateFormat monthSdf = new SimpleDateFormat("yyyyMM");
+    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+    private static SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
+    private static SimpleDateFormat daySdf = new SimpleDateFormat("yyyyMMdd");
+    // 临时用于指定日期范围进行历史数据维护时修改为true,生产环境平时配置为false
+    private static boolean reGenerateAllData = false;
+    private static final String firstStatMonth = "202301";// 当前若是12月,则维护到前年1.1,否则维护到上前年1.1
+
+    private static HashMap<String, String> rootCustomsMap = new HashMap<String, String>();// 根据关区代码获得所隶属的一级关区代码
+
+    private static List<String> hasMultipleCustomList = new ArrayList<String>(); // 拥有下级关区的关区代码
+
+    private static Set<String> firstClassCustoms = new HashSet<String>(); // 一级关区代码集合
+
+    @Autowired
+    private WxjyRepository dao;
+
+    @Autowired
+    private PubCustomsMappingRepository mappingRepository;
+
+    @Autowired
+    private IedgRepository iedgRepository;
+
+    @Autowired
+    private H2018ZhDangerGoodsUtil h2018;
+
+    @Autowired
+    private H2018ZhOldDangerGoodsUtil oldH2018;
+
+    @Autowired
+    private H2018NewDeclaredGoodsUtil newH2018;
+
+    @Scheduled(cron = "${schedule.cron.h2018.zhDangerGoods}")
+    public void h2018DangerData() throws ParseException {
+        Calendar c = Calendar.getInstance();
+        Date now = c.getTime();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        //获取危险品的ciq编码
+        List<String> ciqCodeList = getCiqCodeList("h2018", "day");
+        if (reGenerateAllData) {
+            c.setTime(now);
+            try {
+                // 当前若是12月,则维护到前年1.1,否则维护到上前年1.1 // 要开始维护的后一天开始
+                c.setTime(daySdf.parse("20230102"));
+            } catch (ParseException e) {
+            }
+            Date deadline = now;
+            try {
+                // 截止日期后一天
+                deadline = daySdf.parse("20251202");
+                logger.info("==========综合危险品通关时长任务执行开始===H2018=====" + sdf.format(new Date()) + "=======");
+            } catch (ParseException e) {
+            }
+            while (!c.getTime().after(deadline)) {
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(c.getTime());
+                h2018.h2018Business(ciqCodeList, calendar, "day");
+                c.add(Calendar.DATE, 1);
+            }
+            boolean reGenerateMonthStat = true;// 全新生成所有月度统计
+            if (reGenerateMonthStat) {
+                logger.info("==========开始维护综合危险品通关时长月度统计中间数据==========");
+                rootCustomsMap.clear();
+                hasMultipleCustomList.clear();
+                firstClassCustoms.clear();
+                List<PubCustomsMapping> custMapping = mappingRepository.findAll();
+                for (PubCustomsMapping m : custMapping) {
+                    String pCustomCode = m.getMappingCode();
+                    if (rootCustomsMap.containsValue(pCustomCode)) {
+                        hasMultipleCustomList.add(pCustomCode);
+                    }
+                    rootCustomsMap.put(m.getCustomsCode(), pCustomCode);
+                    firstClassCustoms.add(pCustomCode);
+                }
+
+                String fromMonthStr = firstStatMonth; // 起始月份
+                List<Object[]> list = (List<Object[]>) dao
+                        .getQueryBySql("select * from WXJY_MID_D_M_STATUS where STAT_PERIOD = ?", fromMonthStr);
+                if (list == null || list.size() == 0) {
+                    // 因为UI界面展示设计为可查看最近一年的统计,有些统计需要对比前年的数据,故需要维护最近3-4年的数据
+                    now = new Date();
+                    Date fromMonth = null;
+                    try {
+                        fromMonth = monthSdf.parse("202301");
+                    } catch (ParseException e) {
+                        // TODO Auto-generated catch block
+                        e.printStackTrace();
+                    }
+                    c = Calendar.getInstance();
+                    c.setTime(fromMonth);
+                    deadline = now;
+                    try {
+                        deadline = monthSdf.parse("202510");// 截止月份
+                    } catch (ParseException e) {
+                    }
+                    while (!c.getTime().after(deadline)) {
+                        String dataPeriod = monthSdf.format(c.getTime());
+                        Date statBegin = null;
+                        try {
+                            statBegin = monthSdf.parse(dataPeriod);
+                        } catch (ParseException e) {
+                        }
+                        c.setTime(statBegin);
+                        c.add(Calendar.MONTH, 1);
+                        Date statEnd = c.getTime();
+
+                        h2018.monthlyDataMaintance(dataPeriod,statBegin, statEnd);
+                    }
+                }
+
+                logger.info("完成维护综合危险品通关时长月度统计中间数据");
+            }
+
+            return;
+        } else {
+            //根据上次执行完生成的数据时间接着生成数据
+            Date maxEndTime = getEndTime();
+            Date deadline = now;
+            //如果maxDay为空则代表未生成过数据,则从20200325开始生成,否则就按上次结束时间开始生成
+            if (maxEndTime == null) {
+                try {
+                    // 当前若是12月,则维护到前年1.1,否则维护到上前年1.1// 要开始维护的后一天开始
+                    c.setTime(daySdf.parse("20230102"));
+                    // 截止日期后一天
+                    deadline = daySdf.parse(daySdf.format(now));
+                } catch (ParseException e) {
+                }
+            } else {
+                try {
+                    // 截止日期后一天
+                    deadline = daySdf.parse(daySdf.format(c.getTime()));
+                    //从其它系统获取理货时间存在查验数据已经更新但理货时间还未下发情况,所以每天把前一个星期数据重刷避免理货时间下发本系统没赋值
+                    //查询出的时间+1天,避免最后那天生成的数据不完整重刷
+                    Date day = addDays(maxEndTime, -1);
+                    // 要开始维护的后一天开始
+                    c.setTime(daySdf.parse(daySdf.format(day)));
+                    logger.info("==========任务执行开始===H2018=====" + sdf.format(new Date()) + "=======");
+                } catch (ParseException e) {
+                }
+            }
+            while (!c.getTime().after(deadline)) {
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(c.getTime());
+                h2018.h2018Business(ciqCodeList, calendar, "day");
+                c.add(Calendar.DATE, 1);
+            }
+        }
+        logger.info("==========任务执行结束===H2018=====" + sdf.format(new Date()) + "=======");
+    }
+
+    @Scheduled(cron = "${schedule.cron.h2018.zhOldDangerGoods}")
+    public void h2018OldDangerData() {
+        //捞取新增的检验检疫编码数据
+        Calendar c = Calendar.getInstance();
+        Date now = c.getTime();
+        Date deadline = now;
+        try {
+            // 当前若是12月,则维护到前年1.1,否则维护到上前年1.1
+            c.setTime(daySdf.parse("20230102"));// 要开始维护的后一天开始
+            deadline = daySdf.parse(daySdf.format(now));// 截止日期后一天
+        } catch (ParseException e) {
+        }
+        //获取危险品的ciq编码
+        List<String> ciqCodeList = getCiqCodeList("h2018", "old");
+        while (!c.getTime().after(deadline)) {
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(c.getTime());
+            oldH2018.h2018Business(ciqCodeList, calendar, "old");
+            c.add(Calendar.DATE, 1);
+        }
+        logger.info("==========捞取历史任务执行结束===H2018=====" + sdf.format(new Date()) + "=======");
+
+    }
+
+    public static Date addDays(Date date, int day) {
+        Calendar currCal = Calendar.getInstance();
+        currCal.setTime(date);
+        currCal.add(Calendar.DAY_OF_YEAR, day);
+        currCal.set(Calendar.HOUR_OF_DAY, 0);
+        currCal.set(Calendar.MINUTE, 0);
+        currCal.set(Calendar.SECOND, 0);
+        return currCal.getTime();
+    }
+
+    /**
+     * @description: 获取危化品的ciqCode 根据ciqCode获取相关的业务数据
+     * @param: dataSource 参数值为eciq或h2018 该参数作为动态字段拼接条件语句
+     * @param: businessType old表示当前ciqCode的业务数据还没捞取过需要补捞取历史数据,day表示每天定时捞取至昨日的业务数据
+     * @return: java.util.List<java.lang.String>
+     * @author zoumin
+     * @date: 2021-12-20 11:39:04
+     * @version 1.0
+     */
+    public List<String> getCiqCodeList(String dataSource, String businessType) {
+        //用户手动维护的危化品CIQ编码
+        String sql = "select distinct c.ciq_code from iedg_sync_chemicals_ciq c ";
+        String busColumn = "c.bus_" + dataSource;
+        if (businessType.equals("old")) {
+            //为空表示查询的是需要补捞历史数据的ciq编码
+            sql += "where " + busColumn + " is null ";
+        } else if (businessType.equals("day")) {
+            //为1表示查询的是每天执行捞取至昨天的ciq编码
+            sql += "where " + busColumn + " = '1' ";
+        }
+        List<String> list = (List<String>) iedgRepository.getQueryBySql(sql);
+        return list;
+    }
+
+    /**
+     * @description: 获取最后一次捞取数据的日期,作为下次捞取数据的开始日期
+     * @param: 业务类型,H2018_DANGER_GOODS,ECIQ_DANGER_GOODS,H2018库或ECIQ下发库
+     * @return: java.util.Date
+     * @author zoumin
+     * @date: 2022-03-02 12:35:03
+     * @version 1.0
+     */
+    public Date getEndTime() throws ParseException {
+        String endTime = null;
+        //执行捞取每天数据的任务,拿到获取数据的结束日期
+        String sqlDay = "select max(STAT_PERIOD) from WXJY_MID_D_M_STATUS where DATA_TYPE = 'EntryHead' and business_type = 'day' ";
+        String dayDate = (String)dao.getObjectBySql(sqlDay);
+
+        //执行捞取历史数据的任务,拿到获取数据的结束日期
+        String sqlOld = "select max(STAT_PERIOD) from WXJY_MID_D_M_STATUS where DATA_TYPE = 'EntryHead' and business_type = 'old' ";
+        String oldDate = (String)dao.getObjectBySql(sqlOld);
+        //考虑到任务执行过程中会出现异常,所以这里要判断下捞取每天数据的任务和捞取隶属数据的任务最后一次获取数据的日期执行到哪里,
+        //从最早的数据结束日期开始捞取数据,尽量避免中间数据漏掉
+        if(dayDate != null && oldDate != null){
+            //进行比较后,数据结束日期取较早的那个日期作为下次捞取数据的开始日期
+            if(daySdf.parse(dayDate).before(daySdf.parse(oldDate))){
+                endTime = sdfDate.format(daySdf.parse(dayDate));
+            }else{
+                endTime = sdfDate.format(daySdf.parse(oldDate));
+            }
+        }else{
+            if(dayDate != null){
+                endTime = sdfDate.format(daySdf.parse(dayDate));
+            }
+            if(oldDate != null){
+                endTime = sdfDate.format(daySdf.parse(oldDate));;
+            }
+        }
+        if(endTime != null){
+            try {
+                return sdfDate.parse(endTime);
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+        }else{
+            return null;
+        }
+        return null;
+    }
+
+    //近一年申报命中查验的新申报商品报关单
+    @Scheduled(cron = "${schedule.cron.h2018.newDeclaredGoods}")
+    public void h2018NewDeclaredGoodsData() {
+        Calendar c = Calendar.getInstance();
+        // 时分秒设置为0
+        c.set(Calendar.HOUR_OF_DAY, 0); // 时
+        c.set(Calendar.MINUTE, 0); // 分
+        c.set(Calendar.SECOND, 0); // 秒
+        c.set(Calendar.MILLISECOND, 0); // 毫秒
+        c.add(Calendar.YEAR, -1);
+        String sql = "select distinct cas from IEDG_BASE_CHEMICALS_CATALOG WHERE is_deleted = 0 and cas is not null";
+        List<String> list = (List<String>) iedgRepository.getQueryBySql(sql);
+        newH2018.toDoDataMain(c.getTime(),list);
+        logger.info("==========捞取近一年新申报商品报关单任务执行结束===H2018=====" + sdf.format(new Date()) + "=======");
+
+    }
+}

+ 114 - 0
src/main/java/cn/gov/customs/data/util/BeanRefUtil.java

@@ -0,0 +1,114 @@
+package cn.gov.customs.data.util;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.persistence.Column;
+
+
+/**
+ * 反射 处理
+ * @author HSY
+ *
+ */
+public class BeanRefUtil {
+    /**
+	 * 取Bean的属性和值对应关系的MAP
+	 * @param bean
+	 * @return Map
+	 */
+	public static Map<String, Object> getFieldValueMap(Object bean) {
+		Class<?> cls = bean.getClass();
+
+		Map<String, Object> valueMap = new HashMap<String, Object>();
+		// 取出bean里的所有方法
+		Method[] methods = cls.getDeclaredMethods();
+		Field[] fields = cls.getDeclaredFields();
+
+		for (Field field : fields) {
+			try {
+				String columnName = "";
+				if (field.isAnnotationPresent(Column.class)) {
+					Column presentColumn = field.getDeclaredAnnotation(Column.class);
+					columnName = presentColumn.name();
+				}
+				String fieldType = field.getType().getSimpleName();
+				String fieldGetName = parGetName(field.getName());
+				if (!checkGetMet(methods, fieldGetName)) {
+					continue;
+				}
+				Method fieldGetMet = cls.getMethod(fieldGetName, new Class[] {});
+				Object fieldVal = fieldGetMet.invoke(bean, new Object[] {});
+				String result = "";
+				if ("Date".equals(fieldType)) {
+					result = fmtDate((Date) fieldVal);
+				} else {
+					if (null != fieldVal) {
+						result = String.valueOf(fieldVal);
+					}
+				}
+				valueMap.put(columnName, result);
+			} catch (Exception e) {
+				e.printStackTrace();
+				continue;
+			}
+		}
+		return valueMap;
+
+	}
+
+	/**
+	 * 日期转化为String
+	 * 
+	 * @param date
+	 * @return date string
+	 */
+	public static String fmtDate(Date date) {
+		if (null == date) {
+			return null;
+		}
+		try {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
+			return sdf.format(date);
+		} catch (Exception e) {
+			return null;
+		}
+	}
+
+	/**
+	 * 判断是否存在某属性的 get方法
+	 * 
+	 * @param methods
+	 * @param fieldGetMet
+	 * @return boolean
+	 */
+	public static boolean checkGetMet(Method[] methods, String fieldGetMet) {
+		for (Method met : methods) {
+			if (fieldGetMet.equals(met.getName())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * 拼接某属性的 get方法
+	 * 
+	 * @param fieldName
+	 * @return String
+	 */
+	public static String parGetName(String fieldName) {
+		if (null == fieldName || "".equals(fieldName)) {
+			return null;
+		}
+		return "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
+	}
+
+	
+
+}

+ 132 - 0
src/main/java/cn/gov/customs/data/util/DataUtils.java

@@ -0,0 +1,132 @@
+package cn.gov.customs.data.util;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 时间工具类
+ * @author HSY
+ *
+ */
+public class DataUtils {
+	
+	
+	/**
+	 *  两个时间差
+	 * @Description: 
+	 * @author HSY 
+	 * @param:
+	 */
+//	public static long calculationDate(Date start, Date end) {
+//		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+//		try {
+////			Date s = sdf.parse(start);
+////			Date e = sdf.parse(end);
+//			long diff = start.getTime() - end.getTime();// 这样得到的差值是毫秒级别
+//			long days = diff / (1000 * 60 * 60 * 24);
+////			long hours = (diff - days * (1000 * 60 * 60 * 24)) / (1000 * 60 * 60);
+////			long minutes = (diff - days * (1000 * 60 * 60 * 24) - hours * (1000 * 60 * 60)) / (1000 * 60);
+////			System.out.println("" + days + "天" + hours + "小时" + minutes + "分");
+//
+//			return diff;
+//		} catch (Exception e) {
+//			e.printStackTrace();
+//		}
+//		return 0;
+//	}
+	/**
+	 *  两个时间差
+	 * @Description: 
+	 * @author HSY 
+	 * @param:
+	 */
+	public static long calculationDate(Date start, Date end) {
+		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
+		try {
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(sdf.parse(sdf.format(start)));
+		long time1 = cal.getTimeInMillis();
+		cal.setTime(sdf.parse(sdf.format(end)));
+		long time2 = cal.getTimeInMillis();
+		long between_days=(time2-time1)/(1000*3600*24);
+		return between_days;
+	} catch (Exception e) {
+		e.printStackTrace();
+	}
+		return 0;
+	}
+	
+	public static  String getDateByNum(Date date, String type, Integer num) {
+		// 格式化日期
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(date);
+
+		if ("day".equals(type)) { // 天
+			cal.add(Calendar.DAY_OF_MONTH, num);
+		} else if ("week".equals(type)) {
+			cal.add(Calendar.WEEK_OF_YEAR, num);
+		} else if ("month".equals(type)) {
+			cal.add(Calendar.MONTH, num);
+		} else if ("year".equals(type)) {
+			cal.add(Calendar.YEAR, num);
+		}
+		 
+		return sdf.format(cal.getTime());
+	}
+
+	/**
+	 * 获取两个日期之间的日期
+	 * @param beginDate
+	 * @param endDate
+	 * @return yyyy-MM-dd  包含beginDate和endDate
+	 * @throws ParseException
+	 */
+	public static List<String> getDaysBetween(String beginDate, String endDate) throws ParseException {
+		List<String> result = new ArrayList<String>();
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+		Date start = sdf.parse(beginDate);
+		Date end = sdf.parse(endDate);
+		Calendar tempStart = Calendar.getInstance();
+		tempStart.setTime(start);
+		Calendar tempEnd = Calendar.getInstance();
+		tempEnd.setTime(end);
+		tempEnd.add(Calendar.DATE, +1);// 日期加1(包含结束)
+		while (tempStart.before(tempEnd)) {
+			result.add(sdf.format(tempStart.getTime()));
+			tempStart.add(Calendar.DAY_OF_YEAR, 1);
+		}
+		return result;
+	}
+	
+	public static void main(String[] args) {
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		try {
+			Date start = sdf.parse("2019-10-01 00:00:01");
+			Date end = sdf.parse("2020-10-09 10:30:00");
+			while (calculationDate(start, end) > 8){
+				Date date = start;
+				String tempEndTime = getDateByNum(date, "day", 10) + " 00:00:01";
+				try {
+					start = sdf.parse(tempEndTime);
+				} catch (ParseException e) {
+					e.printStackTrace();
+					break;
+				}
+				System.out.println("========"+ sdf.format(date)+"======" + tempEndTime + "===");
+			}
+					
+			System.out.println("============");
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		
+		
+	}
+	
+
+}

+ 20 - 0
src/main/java/cn/gov/customs/data/util/JasyptUtils.java

@@ -0,0 +1,20 @@
+package cn.gov.customs.data.util;
+
+import org.jasypt.util.text.BasicTextEncryptor;
+
+/**
+ * @Description: 通过jasypt 生成铭文加密
+ * @author: scott
+ * @date: 2023年07月20日 11:18
+ */
+public class JasyptUtils {
+	public static void main(String[] args) {
+		//该类的选择根据algorithm:PBEWithMD5AndDE选择的算法选择
+		BasicTextEncryptor encryptor = new BasicTextEncryptor();
+		encryptor.setPassword("wxjy-data-service");
+		System.out.println(encryptor.encrypt("iedg"));
+		System.out.println(encryptor.encrypt("app_db_rj_wxp"));
+		System.out.println(encryptor.encrypt("WXJYUSER"));
+		System.out.println(encryptor.encrypt("WXJY_pass"));
+	}
+}

+ 25 - 0
src/main/java/cn/gov/customs/data/util/ScheduleConfig.java

@@ -0,0 +1,25 @@
+package cn.gov.customs.data.util;
+
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.SchedulingConfigurer;
+import org.springframework.scheduling.config.ScheduledTaskRegistrar;
+ 
+import java.util.concurrent.Executors;
+ 
+/**
+ * 多线程执行定时任务
+ * @author 王久印
+ * 2018年3月1日
+ */
+@Configuration
+@EnableScheduling
+//所有的定时任务都放在一个线程池中,定时任务启动时使用不同都线程。
+public class ScheduleConfig implements SchedulingConfigurer {
+    @Override
+    public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
+        //设定一个长度10的定时任务线程池
+        taskRegistrar.setScheduler(Executors.newScheduledThreadPool(10));
+    }
+}

+ 49 - 0
src/main/java/cn/gov/customs/data/util/ThreadConfig.java

@@ -0,0 +1,49 @@
+package cn.gov.customs.data.util;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableAsync;
+
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+@Configuration
+@EnableAsync
+public class ThreadConfig {
+    private int nThreads = 8;
+    private int MAX_QUEUQ_SIZE = 2000;
+
+    @Bean
+    public ExecutorService getThreadPool(){
+//        return Executors.newFixedThreadPool(20);
+        return new ThreadPoolExecutor(nThreads,
+                nThreads, 0L, TimeUnit.MILLISECONDS,
+                new ArrayBlockingQueue<Runnable>(MAX_QUEUQ_SIZE),
+                new ThreadPoolExecutor.CallerRunsPolicy());
+    }
+
+    // ThredPoolTaskExcutor的处理流程
+    // 当池子大小小于corePoolSize,就新建线程,并处理请求
+    // 当池子大小等于corePoolSize,把请求放入workQueue中,池子里的空闲线程就去workQueue中取任务并处理
+    // 当workQueue放不下任务时,就新建线程入池,并处理请求,如果池子大小撑到了maximumPoolSize,就用RejectedExecutionHandler来做拒绝处理
+    // 当池子的线程数大于corePoolSize时,多余的线程会等待keepAliveTime长时间,如果无请求可处理就自行销毁
+//    @Bean(name="hscodePool")
+//    public Executor getAsyncExecutor() {
+//        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+//        //核心线程数5:线程池创建时候初始化的线程数
+//        executor.setCorePoolSize(5);
+//        //最大线程数5:线程池最大的线程数,只有在缓冲队列满了之后才会申请超过核心线程数的线程
+//        executor.setMaxPoolSize(100);
+//        //缓冲队列500:用来缓冲执行任务的队列
+//        executor.setQueueCapacity(50);
+//        //允许线程的空闲时间60秒:当超过了核心线程出之外的线程在空闲时间到达之后会被销毁
+//        executor.setKeepAliveSeconds(60);
+//        //线程池名的前缀:设置好了之后可以方便我们定位处理任务所在的线程池
+//        executor.setThreadNamePrefix("DailyAsync-");
+//        executor.initialize();
+//
+//        return executor;
+//    }
+}

+ 107 - 0
src/main/resources/application.yml

@@ -0,0 +1,107 @@
+server:
+  port: 8004
+  servlet:
+    context-path: /wxjy-data-service
+spring:
+  primary:
+    datasource:
+      driverClassName: dm.jdbc.driver.DmDriver
+      jdbc-url: jdbc:dm://10.79.221.3:5237?SCHEMA=WXJYUSER
+      username: ENC(yQdG3mnvM3SOZQ2Z7MHU4ZaK8Smii+tB)
+      password: ENC(pBcZrw2N3AyrHbqY76N3DQLokxPTi6jJ)
+#      jdbc-url: jdbc:dm://43.137.18.189:5326?SCHEMA=WXJY
+#      username: WXJY
+#      password: Dameng123
+
+  iedg:
+    datasource:
+      driverClassName: oracle.jdbc.OracleDriver
+      jdbc-url: jdbc:oracle:thin:@10.79.91.172:1521:orcl
+      #      username: iedg
+      #      password: iedg
+      username: ENC(YMlfZujcstyOZ/QmfjvjEA==)
+      password: ENC(YMlfZujcstyOZ/QmfjvjEA==)
+  app:
+    datasource:
+      driverClassName: com.gbase.jdbc.Driver
+      jdbc-url: jdbc:gbase://10.79.90.60:5258/g_whdb_h2000_app?profileSql=true
+      ##      password: app_db_rj_wxp
+      ##      username: app_db_rj_wxp
+      password: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+      username: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+  h2018app:
+    datasource:
+      driverClassName: com.gbase.jdbc.Driver
+      jdbc-url: jdbc:gbase://10.79.90.60:5258/g_whdb_h2018app?profileSql=true
+      ##      password: app_db_rj_wxp
+      ##      username: app_db_rj_wxp
+      password: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+      username: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+  h2018:
+    datasource:
+      driverClassName: com.gbase.jdbc.Driver
+      jdbc-url: jdbc:gbase://10.79.90.60:5258/g_whdb_h2018_3_0_recv?profileSql=true
+      ##      password: app_db_rj_wxp
+      ##      username: app_db_rj_wxp
+      password: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+      username: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+  rh2k:
+    datasource:
+      driverClassName: com.gbase.jdbc.Driver
+      jdbc-url: jdbc:gbase://10.79.90.60:5258/g_whdb_rh2k?profileSql=true
+      ##      password: app_db_rj_wxp
+      ##      username: app_db_rj_wxp
+      password: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+      username: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+  inspect:
+    datasource:
+      driverClassName: com.gbase.jdbc.Driver
+      jdbc-url: jdbc:gbase://10.79.90.60:5258/g_whdb_customs_inspection?profileSql=true
+      ##      password: app_db_rj_wxp
+      ##      username: app_db_rj_wxp
+      password: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+      username: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+  zmqd:
+    datasource:
+      driverClassName: com.gbase.jdbc.Driver
+      jdbc-url: jdbc:gbase://10.79.90.60:5258/g_whdb_zmqd?profileSql=true
+      ##      password: app_db_rj_wxp
+      ##      username: app_db_rj_wxp
+      password: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+      username: ENC(d9iPMG8VHio9V94TVMu73MzAWXPFUqxk)
+  jackson:
+    serialization:
+      indent_output: true
+  jpa:
+    hibernate:
+      ## 特别重要与spring.jpa.hibernate.ddl-auto=update适配,dm无法适配
+      naming:
+        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
+      ddl-auto: none
+    properties:
+      hibernate:
+        dialect: org.hibernate.dialect.DmDialect
+        show-sql: true
+        ## 这里是告诉JPA要控制的是哪个模式,这个是默认创建的模式
+        default_schema: WXJYUSER
+        temp:
+          # 禁用JDBC元数据检查
+          use_jdbc_metadata_defaults: false
+    database-platform: org.hibernate.dialect.DmDialect
+    open-in-view: false
+
+logging:
+  file:
+    name: timer.log
+    path: 'wxjy-data-service/'
+  pattern:
+    file: '%d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n'
+  level:
+    root: ERROR
+
+#加密秘钥
+jasypt:
+  encryptor:
+    password: wxjy-data-service
+    algorithm: PBEWithMD5AndDES
+    iv-generator-classname: org.jasypt.iv.NoIvGenerator

+ 10 - 0
src/main/resources/data-acquisition.properties

@@ -0,0 +1,10 @@
+#正式环境配置
+schedule.cron.h2018.zhDangerGoods=0 35 0 * * ?
+schedule.cron.h2018.zhOldDangerGoods=0 20 1 * * ?
+schedule.cron.h2018.newDeclaredGoods=0 5 7 * * ?
+
+#month
+schedule.cron.month.baseData=0 25 5 1 * ?
+
+
+

BIN
src/main/resources/lib/DmDialect-for-hibernate5.3-8.1.2.141.jar


BIN
src/main/resources/lib/DmJdbcDriver18-8.1.2.94.jar


BIN
src/main/resources/lib/GBaseHibernate4.3.1-Dialect-8.3.81.51.jar


BIN
src/main/resources/lib/gbase-connector-java-8.3.81.53-build54.4.7-bin-cutlog.jar


BIN
src/main/resources/lib/ojdbc6.jar


+ 13 - 0
src/test/java/cn/gov/customs/data/MqApplicationTests.java

@@ -0,0 +1,13 @@
+package cn.gov.customs.data;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class MqApplicationTests {
+
+    @Test
+    void contextLoads() {
+    }
+
+}

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff