Bladeren bron

数据库迁移到质量数据库的ip
iec集成service module

hfxc226 2 jaren geleden
bovenliggende
commit
d39d7fd836

+ 2 - 2
platform-dao/src/main/resources/application-daoProd.yml

@@ -3,9 +3,9 @@ spring:
     druid:
       master:
         driver-class-name: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://localhost:3306/hitch-sb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&allowMultiQueries=true
+        url: jdbc:mysql://192.168.16.240:3306/hitch-sb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&allowMultiQueries=true
         username: root
-        password: mydm888
+        password: qadata@668
         filters: wall,stat
         filter:
           stat:

+ 2 - 2
platform-dao/src/main/resources/application-daoTest.yml

@@ -3,10 +3,10 @@ spring:
     druid:
       master:
         driver-class-name: com.mysql.cj.jdbc.Driver
-        url: jdbc:mysql://localhost:3306/hitch-sb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&allowMultiQueries=true
+        url: jdbc:mysql://192.168.16.240:3306/hitch-sb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&allowMultiQueries=true
         username: root
         # password: mysql?123!@MYSQL
-        password: mydm888
+        password: qadata@668
         # password: sbgld@QYKH@$_e^mysqlv
         filters: wall,stat
         filter:

+ 13 - 1
platform-iec/pom.xml

@@ -21,6 +21,12 @@
 
     <dependencies>
         <dependency>
+            <groupId>com.platform</groupId>
+            <artifactId>platform-service</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+
+        <!--<dependency>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
             <version>8.0.15</version>
@@ -29,7 +35,7 @@
             <groupId>com.platform</groupId>
             <artifactId>platform-common</artifactId>
             <version>1.0-SNAPSHOT</version>
-        </dependency>
+        </dependency>-->
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-aop</artifactId>
@@ -83,6 +89,12 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-autoconfigure</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.platform</groupId>
+            <artifactId>platform-rest</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 
     <build>

+ 4 - 10
platform-iec/src/main/java/com/platform/iec/IecApplication.java

@@ -1,20 +1,15 @@
 package com.platform.iec;
 
+import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration;
 import com.platform.iec.master.MasterSysDataHandler;
 import com.ydl.iec.iec104.config.Iec104Config;
-import com.ydl.iec.iec104.core.Iec104ThreadLocal;
-import com.ydl.iec.iec104.core.ScheduledTaskPool;
 import com.ydl.iec.iec104.server.Iec104MasterFactory;
 import com.ydl.iec.util.Iec104Util;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.boot.CommandLineRunner;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.core.annotation.Order;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-
-import java.time.LocalDateTime;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import java.util.TimeZone;
 
 /**
@@ -23,9 +18,8 @@ import java.util.TimeZone;
  * @Date 2019/7/22
  * @Version Copyright (c) 2019,北京乾元坤和科技有限公司 All rights reserved.
  */
-@SpringBootApplication
-@EnableScheduling
-@Order(1)
+@SpringBootApplication(scanBasePackages = {"com.platform"}, exclude = {
+        DataSourceAutoConfiguration.class, PageHelperAutoConfiguration.class})
 @Slf4j
 public class IecApplication implements CommandLineRunner {
 

+ 1 - 1
platform-iec/src/main/resources/application.yml

@@ -1,5 +1,5 @@
 spring:
   profiles:
-    active: dev
+    active: daoDev,serviceDev,dev
   main:
     web-application-type: none

+ 1 - 2
platform-rest/src/main/resources/application-dev.yml

@@ -76,8 +76,7 @@ ignore:
     - /ignores/**
     - /wechat/**
     - /yongyou/**
-upload:
-  root-dir: D://data//xian
+
 
 platform:
   slf4j:

+ 0 - 2
platform-rest/src/main/resources/application-prod.yml

@@ -54,8 +54,6 @@ ignore:
     - /ignores/**
     - /wechat/**
     - /yongyou/**
-upload:
-  root-dir: /home/data/sb-base/FileData
 
 platform:
   slf4j:

+ 0 - 2
platform-rest/src/main/resources/application-test.yml

@@ -54,8 +54,6 @@ ignore:
     - /ignores/**
     - /wechat/**
     - /yongyou/**
-upload:
-  root-dir: /home/data/XiAnConstructionAsset/FileData
 
 platform:
   slf4j:

+ 1 - 0
platform-service/src/main/java/com/platform/service/purchase/impl/PurchaseContractServiceImpl.java

@@ -26,6 +26,7 @@ import com.platform.service.base.impl.BaseServiceImpl;
 import com.platform.service.purchase.PurchaseContractMainListService;
 import com.platform.service.purchase.PurchaseContractService;
 import com.platform.service.util.DataField;
+import com.platform.service.util.JavaToPdfHtmlFreeMarker;
 import freemarker.cache.StringTemplateLoader;
 import freemarker.template.Configuration;
 import freemarker.template.Template;

+ 3 - 2
platform-common/src/main/java/com/platform/common/util/JavaToPdfHtmlFreeMarker.java → platform-service/src/main/java/com/platform/service/util/JavaToPdfHtmlFreeMarker.java

@@ -1,8 +1,9 @@
-package com.platform.common.util;
+package com.platform.service.util;
 
 
 import com.itextpdf.text.DocumentException;
 import com.itextpdf.text.pdf.BaseFont;
+import com.platform.common.util.PathUtil;
 import freemarker.template.Configuration;
 import freemarker.template.Template;
 import lombok.extern.slf4j.Slf4j;
@@ -66,7 +67,7 @@ public class JavaToPdfHtmlFreeMarker {
         try {
             // 获取模板,并设置编码方式
 //            Template template = freemarkerCfg.getTemplate(htmlTmp);
-            Template template = this.getFreeMarkerConfiguration().getTemplate(htmlTmp);
+            Template template = getFreeMarkerConfiguration().getTemplate(htmlTmp);
 
             log.error("freeMarkerRender template" + template);
 

+ 2 - 0
platform-service/src/main/resources/application-serviceDev.yml

@@ -1,3 +1,5 @@
+upload:
+  root-dir: D://data//xian
 qykh:
   product: qykh_product
   product_help: qykh_product_help

+ 2 - 0
platform-service/src/main/resources/application-serviceProd.yml

@@ -1,3 +1,5 @@
+upload:
+  root-dir: /home/data/sb-base/FileData
 qykh:
   product: qykh_product
   product_help: qykh_product_help

+ 2 - 0
platform-service/src/main/resources/application-serviceTest.yml

@@ -1,3 +1,5 @@
+upload:
+  root-dir: /home/data/XiAnConstructionAsset/FileData
 qykh:
   product: qykh_product
   product_help: qykh_product_help