From 39b08247cb3cc98789686b42f73f71f1515183e2 Mon Sep 17 00:00:00 2001
From: judy <278197488@qq.com>
Date: Sun, 29 Sep 2024 16:41:12 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
shkj-admin/pom.xml | 2 +-
.../main/java/com/shkj/ShkjApplication.java | 3 --
.../system/pda/PdaSysLoginController.java | 4 +--
.../src/main/resources/application-pro.yml | 33 +++----------------
.../src/main/resources/application-test.yml | 8 ++---
shkj-admin/src/main/resources/application.yml | 2 +-
shkj-admin/src/main/resources/logback.xml | 2 +-
shkj-admin/src/test/java/com/shkj/test.java | 22 -------------
.../java/com/shkj/wcs/plc/PlcEventTask.java | 6 ++--
.../main/java/com/shkj/wcs/plc/PlcInit.java | 2 +-
.../java/com/shkj/wcs/third/rcs/RCSUtil.java | 8 ++---
11 files changed, 20 insertions(+), 72 deletions(-)
diff --git a/shkj-admin/pom.xml b/shkj-admin/pom.xml
index 6d8c2fc..7f8dfdd 100644
--- a/shkj-admin/pom.xml
+++ b/shkj-admin/pom.xml
@@ -121,7 +121,7 @@
- mjk-admin
+ mjk2-admin
diff --git a/shkj-admin/src/main/java/com/shkj/ShkjApplication.java b/shkj-admin/src/main/java/com/shkj/ShkjApplication.java
index a94610b..b7c9bca 100644
--- a/shkj-admin/src/main/java/com/shkj/ShkjApplication.java
+++ b/shkj-admin/src/main/java/com/shkj/ShkjApplication.java
@@ -4,8 +4,6 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableAsync;
/**
@@ -16,7 +14,6 @@ import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, MongoAutoConfiguration.class},scanBasePackages = {"org.jeecg.modules.jmreport", "com.shkj"})
//@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, MongoAutoConfiguration.class}, scanBasePackages = {"com.shkj"})
@EnableAsync
-@EnableRetry
public class ShkjApplication {
public static void main(String[] args) {
// System.setProperty("spring.devtools.restart.enabled", "false");
diff --git a/shkj-admin/src/main/java/com/shkj/web/controller/system/pda/PdaSysLoginController.java b/shkj-admin/src/main/java/com/shkj/web/controller/system/pda/PdaSysLoginController.java
index 7faf74d..666bc97 100644
--- a/shkj-admin/src/main/java/com/shkj/web/controller/system/pda/PdaSysLoginController.java
+++ b/shkj-admin/src/main/java/com/shkj/web/controller/system/pda/PdaSysLoginController.java
@@ -30,8 +30,8 @@ public class PdaSysLoginController {
@PostMapping("/login")
public AjaxResult login(@RequestBody LoginBody loginBody) {
if (loginBody.getBranchId() == null || loginBody.getBranchId().equals(0L)) {
-// return AjaxResult.error("请选择仓库");
- loginBody.setBranchId(SecurityUtils.erpBranchId);
+ // return AjaxResult.error("请选择仓库");
+ loginBody.setBranchId(SecurityUtils.getCurrentBranchId());
}
AjaxResult ajax = AjaxResult.success();
// 生成令牌
diff --git a/shkj-admin/src/main/resources/application-pro.yml b/shkj-admin/src/main/resources/application-pro.yml
index 33a25dd..04452c6 100644
--- a/shkj-admin/src/main/resources/application-pro.yml
+++ b/shkj-admin/src/main/resources/application-pro.yml
@@ -12,9 +12,9 @@ spring:
druid:
# 主库数据源
master:
- url: jdbc:mysql://192.168.150.162:3306/mjk_wcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B7
+ url: jdbc:mysql://127.0.0.1:3306/kmv2_wcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B7
username: root
- password: Y4yhl9tbf110
+ password: Mjk@2024_Kmv2
# 从库数据源
slave:
# 从数据源开关/默认关闭
@@ -64,11 +64,11 @@ spring:
# redis 配置
redis:
# 地址
- host: 192.168.150.162
+ host: 127.0.0.1
# 端口,默认为6379
port: 6379
# 数据库索引
- database: 1
+ database: 0
# 密码
password:
# 连接超时时间
@@ -83,28 +83,3 @@ spring:
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
-
-third:
- # agv接口
- agvCreateTaskUrl: http://127.0.0.1:60354/rest/common/createTask
- agvStatesUrl: http://127.0.0.1:60354/rest/robots/states
- agvCancelTaskUrl: http://127.0.0.1:60354/rest/common/cancelTask
- queryAckByTaskUrl: http://127.0.0.1:8081/rest/common/queryAckByTaskId
- # ess接口
- essTaskDistributionUrl: http://210.21.218.14:60354/task/create
- essTaskCancelUrl: http://210.21.218.14:60354/task/cancel
- # 输送线接口
- moveContainerUrl: http://210.21.218.14:60354/conveyor/moveContainer
- containerArrivedUrl: http://210.21.218.14:60354/conveyor/containerArrived
- # 播种墙 电子标签
- tagSendTaskUrl: http://210.21.218.14:60354/PTL/SendDASData
- tagPickingDetailsUrl: http://210.21.218.14:60354/PTL/DASPickingDetails
- # erp接口
- erpU8PuStoreInUrl: http://192.168.1.99:13001/api/U8PuStoreIn/Add
- erpU8MaterialOutUrl: http://192.168.1.99:13001/api/U8MaterialOut/Add
-
-plc:
- firstBarcode: DB320.DBD82
- secondBarcode: DB320.DBD104
- thirdBarcode: DB320.DBD12
- containerCode: DB320.DBD6
diff --git a/shkj-admin/src/main/resources/application-test.yml b/shkj-admin/src/main/resources/application-test.yml
index 37a3a0f..b59c000 100644
--- a/shkj-admin/src/main/resources/application-test.yml
+++ b/shkj-admin/src/main/resources/application-test.yml
@@ -12,11 +12,9 @@ spring:
druid:
# 主库数据源
master:
- # url: jdbc:mysql://120.77.94.227:3306/ydt_wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
- url: jdbc:mysql://120.77.94.227:3306/mjk_wms_wcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://127.0.0.1:3306/mjk_wcs_2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
- password: CTlTwKgIrRVTsEHqxxx
- #password: 123456
+ password: 123456
# 从库数据源
slave:
# 从数据源开关/默认关闭
@@ -73,7 +71,7 @@ spring:
# 数据库索引
database: 3
# 密码
- password: rvGUoUFAIg4nESp9
+ password:
# 连接超时时间
timeout: 10s
lettuce:
diff --git a/shkj-admin/src/main/resources/application.yml b/shkj-admin/src/main/resources/application.yml
index 949a21f..d7e7999 100644
--- a/shkj-admin/src/main/resources/application.yml
+++ b/shkj-admin/src/main/resources/application.yml
@@ -45,7 +45,7 @@ spring:
# 国际化资源文件路径
basename: i18n/messages
profiles:
- active: dev
+ active: pro
# 文件上传
servlet:
multipart:
diff --git a/shkj-admin/src/main/resources/logback.xml b/shkj-admin/src/main/resources/logback.xml
index 974ea2d..0d655da 100644
--- a/shkj-admin/src/main/resources/logback.xml
+++ b/shkj-admin/src/main/resources/logback.xml
@@ -8,7 +8,7 @@
logback
-
+
diff --git a/shkj-admin/src/test/java/com/shkj/test.java b/shkj-admin/src/test/java/com/shkj/test.java
index 2019a37..823b828 100644
--- a/shkj-admin/src/test/java/com/shkj/test.java
+++ b/shkj-admin/src/test/java/com/shkj/test.java
@@ -86,26 +86,4 @@ public class test {
}
}, 1000, 3000, TimeUnit.MILLISECONDS);
}
-
- @Test
- public void test11(){
- String testJson ="[{\"id\":495,\"orderNo\":\"1331500053\",\"moldId\":123,\"containerId\":150,\"containerCode\":\"10000150\",\"type\":\"call\",\"planStatus\":\"2\",\"locationId\":150,\"qty\":1.0000,\"branchId\":3,\"createTime\":\"2023-11-11 09:00:38\",\"createBy\":\"judy\",\"updateTime\":\"2023-11-11 09:03:00\",\"updateBy\":\"judy\",\"detailId\":150}]";
- List sysStockDetails = JSONObject.parseArray(testJson,SysStockDetail.class);
-
-
- List collect = sysStockDetails.stream().filter(x -> x.getMoldId() != null).collect(Collectors.toList());
- log.info("new ==="+collect);
-
- }
-
- @Test
- public void test8(){
- String str = "Hello ((World))";
- String result = str.replaceAll("\\([^\\(\\)]*\\)", "");
- System.out.println(result); // 输出:Hello
-
-
-
-
- }
}
diff --git a/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java b/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java
index 37c9ea3..c90489a 100644
--- a/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java
+++ b/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java
@@ -97,7 +97,7 @@ public class PlcEventTask {
@Autowired
PlcInit plcInit;
- @Scheduled(fixedDelay = 8000)
+ // @Scheduled(fixedDelay = 8000)
public void init() {
//查询需要连接的PLC,初始化连接对象
List plcList = iWcsPlcConnectService.selectWcsPlcConnectList(new WcsPlcConnect().setIsActive("1"));
@@ -119,7 +119,7 @@ public class PlcEventTask {
//输送线心跳
- @Scheduled(fixedDelay = 4000)
+ // @Scheduled(fixedDelay = 4000)
public void writePlcheartbeatDps(){
//根据连接的plcId获取属性
PlcOperate plcOperate = plcInit.getPlcOperate_dps();
@@ -147,7 +147,7 @@ public class PlcEventTask {
}
}
//堆垛机心跳
- @Scheduled(fixedDelay = 4000)
+ // @Scheduled(fixedDelay = 4000)
public void writePlcheartbeatStk(){
//根据连接的plcId获取属性
PlcOperate plcOperate = plcInit.getPlcOperate_stk();
diff --git a/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcInit.java b/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcInit.java
index d2e5ae2..6f31c26 100644
--- a/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcInit.java
+++ b/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcInit.java
@@ -32,7 +32,7 @@ public class PlcInit {
RedisTemplate redisTemplate;
private ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);
- @PostConstruct
+ // @PostConstruct
public void init(){
log.info("初始化连接对象");
executorService.scheduleWithFixedDelay(
diff --git a/shkj-wms/src/main/java/com/shkj/wcs/third/rcs/RCSUtil.java b/shkj-wms/src/main/java/com/shkj/wcs/third/rcs/RCSUtil.java
index 0cf76ca..805baa3 100644
--- a/shkj-wms/src/main/java/com/shkj/wcs/third/rcs/RCSUtil.java
+++ b/shkj-wms/src/main/java/com/shkj/wcs/third/rcs/RCSUtil.java
@@ -55,16 +55,16 @@ import java.util.stream.Collectors;
@Component
public class RCSUtil {
- @Value("${third.agvCreateTaskUrl}")
+ @Value("${third.agvCreateTaskUrl:}")
private String agvCreateTaskUrl;
- @Value("${third.agvCancelTaskUrl}")
+ @Value("${third.agvCancelTaskUrl:}")
private String agvCancelTaskUrl;
- @Value("${third.agvStatesUrl}")
+ @Value("${third.agvStatesUrl:}")
private String agvStatesUrl;
- @Value("${third.queryAckByTaskUrl}")
+ @Value("${third.queryAckByTaskUrl:}")
private String queryAckByTaskUrl;
@Autowired