feat(config): 合并
This commit is contained in:
@@ -10,7 +10,9 @@ import com.kangaroohy.milo.service.MiloService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@@ -22,8 +24,9 @@ import java.util.Map;
|
||||
import static com.fizz.business.service.manager.OpcMessageIdsManager.*;
|
||||
|
||||
@Slf4j
|
||||
//@Component
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
@ConditionalOnProperty(prefix = "kangaroohy.milo", name = "enabled", havingValue = "true")
|
||||
public class MessageReceiveSchedule extends BaseSchedule {
|
||||
|
||||
@Resource
|
||||
@@ -31,7 +34,7 @@ public class MessageReceiveSchedule extends BaseSchedule {
|
||||
|
||||
@Resource
|
||||
private OpcReceiverHandler opcReceiverHandler;
|
||||
// @Scheduled(fixedDelay = 1000)
|
||||
@Scheduled(fixedDelay = 1000)
|
||||
public void L1L2LineMeasure() {
|
||||
try {
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -26,8 +27,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static com.fizz.business.service.manager.OpcMessageIdsManager.*;
|
||||
|
||||
//@Component
|
||||
@Component
|
||||
@Slf4j
|
||||
@ConditionalOnProperty(prefix = "kangaroohy.milo", name = "enabled", havingValue = "true")
|
||||
public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
|
||||
@Resource
|
||||
@@ -87,7 +89,7 @@ public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
writeMessage( msg,entryMoveIds);
|
||||
log.info("接收入口移动信号:从 {} 移动到 {} ", msg.getMaterialPlaceSource(), msg.getMaterialPlaceDestination());
|
||||
logDataService.logInfo("TRACK","接收入口移动信号:从 {} 移动到 {} ", msg.getMaterialPlaceSource(), msg.getMaterialPlaceDestination());
|
||||
//opcReceiverHandler.onMessageReceived(OpcMessageType.ENTRY_MOVEMENT,msg);
|
||||
opcReceiverHandler.onMessageReceived(OpcMessageType.ENTRY_MOVEMENT,msg);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@@ -99,7 +101,7 @@ public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
writeMessage( msg,exitCutIds);
|
||||
log.info("接收到出口剪切信号:剪切类型 {},剪切长度{} ", msg.getCutType().toString(), msg.getCutLength());
|
||||
logDataService.logInfo("TRACK","接收到出口剪切信号:剪切类型 {},剪切长度{} ", msg.getCutType().toString(), msg.getCutLength());
|
||||
// opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_CUT,msg);
|
||||
opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_CUT,msg);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@@ -111,7 +113,7 @@ public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
writeMessage( msg,exitMoveIds);
|
||||
log.info("接收出口移动信号:从 {} 移动到 {} ", msg.getExSrc(), msg.getExDesc());
|
||||
logDataService.logInfo("TRACK","接收出口移动信号:从 {} 移动到 {} ", msg.getExSrc(), msg.getExDesc());
|
||||
// opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_MOVEMENT,msg);
|
||||
opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_MOVEMENT,msg);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@@ -123,7 +125,7 @@ public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
writeMessage(msg,exitMoveIds);
|
||||
log.info("接收出口称重信号:重量 {} ", msg.getWeight());
|
||||
logDataService.logInfo("TRACK","接收出口称重信号:重量 {} ", msg.getWeight());
|
||||
// opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_MEASURE,msg);
|
||||
opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_MEASURE,msg);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.kangaroohy.milo.service.MiloService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -18,8 +19,9 @@ import java.util.Map;
|
||||
|
||||
import static com.fizz.business.service.manager.OpcMessageIdsManager.pdiSetupIds;
|
||||
|
||||
//@Service
|
||||
@Service
|
||||
@Log4j2
|
||||
@ConditionalOnProperty(prefix = "kangaroohy.milo", name = "enabled", havingValue = "true")
|
||||
public class OpcMessageSend {
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ProStoppageServiceImpl extends ServiceImpl<ProStoppageMapper, ProSt
|
||||
|
||||
queryWrapper.ge("end_date", form.getStartDate() + " 00:00:00")
|
||||
.le("end_date", form.getEndDate() + " 23:59:59")
|
||||
// .ge("duration", 300)
|
||||
.ge("duration", 300)
|
||||
.orderByDesc("end_date");
|
||||
|
||||
List<ProStoppage> list = baseMapper.selectList(queryWrapper);
|
||||
|
||||
@@ -74,19 +74,19 @@ spring:
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码 abcd1234 fe2b3cef78b74d3692909bdcbdf46331 KeLunPu123!
|
||||
# password: KeLunPu123!
|
||||
# 密码 abcd1234 fe2b3cef78b74d3692909bdcbdf46331 KeLunPu123!
|
||||
password:
|
||||
#password:
|
||||
# 连接超时时间
|
||||
timeout: 20s
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 2
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 10
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 20
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
@@ -140,10 +140,10 @@ xss:
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
#rocketmq:
|
||||
#name-server: 127.0.0.1:9876
|
||||
#producer:
|
||||
#group: test
|
||||
#rocketmq:
|
||||
#name-server: 127.0.0.1:9876
|
||||
#producer:
|
||||
#group: test
|
||||
|
||||
springdoc:
|
||||
api-docs:
|
||||
@@ -173,7 +173,7 @@ kangaroohy:
|
||||
primary: default
|
||||
config:
|
||||
default:
|
||||
endpoint: opc.tcp://127.0.0.1:49320
|
||||
endpoint: opc.tcp://192.168.0.196:49320
|
||||
security-policy: none
|
||||
pool:
|
||||
max-idle: 5
|
||||
|
||||
Reference in New Issue
Block a user