瀏覽代碼

opc完善

hfxc226 2 年之前
父節點
當前提交
cb37c5861d

+ 2 - 2
platform-opc/src/main/java/com/platform/opc/servie/OpcTaskService.java

@@ -72,7 +72,7 @@ public class OpcTaskService {
     @Async
     @Scheduled(fixedDelay = 300000)  //间隔300秒,5分钟保存一次数据到数据库,确保每天不超过700万数据
     public void saveValue() {
-        log.info("开始读取redis");
+        log.info("开始读取redis1");
         String jsonStr = RedisUtils.getString("opcList");
         if (StringUtils.isNotBlank(jsonStr)) {
             List<OpcResult> resultList = JSON.parseArray(jsonStr, OpcResult.class);
@@ -115,6 +115,6 @@ public class OpcTaskService {
                 remoteOpcLogMapper.insertListforComplex(remoteOpcLogList);
             }
         }
-        log.info("结束读取redis");
+        log.info("结束读取redis1");
     }
 }

+ 2 - 1
platform-opc/src/main/resources/application-prod.yml

@@ -5,7 +5,8 @@ spring:
     password:
     port: 6379
     host: localhost
-    database: 2
+    database: 1
+    timeout: 0            # 连接空闲超过 N(毫秒)后关闭,0为禁用
     # 使用jedis连接池,需要排除lettuce-core,依赖jedis
     jedis:
       pool:

+ 3 - 2
platform-opc/src/main/resources/application-test.yml

@@ -5,7 +5,8 @@ spring:
     password:
     port: 6379
     host: localhost
-    database: 3
+    database: 1
+    timeout: 0            # 连接空闲超过 N(毫秒)后关闭,0为禁用
     # 使用jedis连接池,需要排除lettuce-core,依赖jedis
     jedis:
       pool:
@@ -16,4 +17,4 @@ spring:
         time-between-eviction-runs: 30000   # 逐出运行之间的时间(毫秒)
 platform:
   slf4j:
-    data: D://xajg
+    data: D://logs

+ 1 - 1
platform-service/src/main/java/com/platform/service/yongyou/impl/YongyouServiceImpl.java

@@ -277,7 +277,7 @@ public class YongyouServiceImpl implements YongyouService {
         otherOutMain.setDdate(DateUtils.dateToString(outStoreFormVO.getUserTime(), DateUtils.PATTERN_YMD) + " 00:00:00");
         otherOutMain.setVt_id("85");
         otherOutMain.setBisstqc(false);
-        // otherOutMain.setCcode("0000000006");
+        otherOutMain.setCcode("QTC230104001");// 需要传递一个固定值,不然用友不处理,且规则要和用友一样
         otherOutMain.setCrdcode(outStoreFormVO.getType()+""); // 出库类型
         otherOutMain.setCsource("库存");
         otherOutMain.setCdefine14(outStoreFormVO.getId());// 保存设备系统的单据id