丽水后端

This commit is contained in:
2026-04-29 09:06:44 +08:00
parent f1f7319062
commit 7c9e61bb2b
2 changed files with 18 additions and 5 deletions

View File

@@ -14,12 +14,12 @@ industry:
captchaType: math
# 0为粗轧1为精轧
mode: 1
mode: 0
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8082
port: 8081
servlet:
# 应用的访问路径
context-path: /
@@ -73,7 +73,7 @@ spring:
# 地址
host: localhost
# 端口默认为6379
port: 6380
port: 6379
# 数据库索引
database: 0
# 密码
@@ -143,7 +143,7 @@ xss:
urlPatterns: /system/*,/monitor/*,/tool/*
ipAddress: 10.20.10.29
ipAddress: 10.20.10.30
httpIp: http://10.20.10.158

View File

@@ -810,6 +810,10 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
*/
@Override
public void getMaterialData() {
//打印leftId和rightId
System.out.println("监测到id-leftId或者rightId");
System.out.println("leftId:" + redisCache.getCacheObject("leftId"));
System.out.println("rightId:" + redisCache.getCacheObject("rightId"));
IndustryMaterial material = new IndustryMaterial();
material.setState(1L);
if (!industryMaterialMapper.selectIndustryMaterialList2(material).isEmpty()) {
@@ -844,8 +848,11 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
// 小于9则一直接受来料
String industryMaterialId = s7PLC.readString("DB4.30", 64);
System.out.println("industryMaterialId----------:" + industryMaterialId);
industryMaterialId = industryMaterialId.replace("\u0000", "");
System.out.println("industryMaterialId----------:" + industryMaterialId);
// 读取是否有此id
String leftId = redisCache.getCacheObject("leftId");
// 不为空表示读到了
@@ -878,6 +885,10 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
String specification = s7PLC.readString("DB4.162", 128);
specification = specification.replace("\u0000", "");
System.out.println(" diameter:" + diameterLeft);
System.out.println(" width:" + widthLeft);
System.out.println(" technology:" + technology);
System.out.println(" specification:" + specification);
industryMaterial.setDiameter(diameterLeft);
industryMaterial.setTechnology(technology);
@@ -902,12 +913,14 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
redisCache.setCacheObject("size", size);
}
System.out.println("sort:---" + sort);
// 小于9则一直接受来料
if (sort < 9L) {
// industryMaterialId = (String) PLCUtils.getPLCData(connector,ipAddress, 44, 30, "string", 64, 10,MbFlag);
industryMaterialId = s7PLC.readString("DB44.30", 64);
System.out.println("industryMaterialId----------:" + industryMaterialId);
industryMaterialId = industryMaterialId.replace("\u0000", "");
System.out.println("industryMaterialId----------:" + industryMaterialId);
// 读取是否有此id
String rightId = (String) redisCache.getCacheObject("rightId");
// 不为空表示读到了