mqtt初始化链接调试

This commit is contained in:
Timer
2026-02-26 01:08:27 +08:00
parent 0093cc70dd
commit 2ffec8d3a6
12 changed files with 163 additions and 76 deletions

View File

@ -47,21 +47,22 @@ public class DataSynJob {
}
@Async
// @Scheduled(cron = "0 0/3 * * * ?")//数据转发
@Scheduled(cron = "0 0 0/1 * * ?")//数据转发
public void job2() {
if (!scheduledEnabled) return; // 手动拦截
String addstr = "zhuanfa";
System.out.println("开始定时器-----------------" + CommUtil.nowDate() + "-----------------" + addstr);
List<MPoint> list2 = this.mPointService.selectListByWhere("where bizid = '0791CNWS' and SignalType='AI' and MeasureDT>DATE_SUB(NOW(), INTERVAL 5 MINUTE) and source_type='auto' ");
if (list2 != null && list2.size() > 0) {
for (int j = 0; j < list2.size(); ++j) {
// List<MPoint> list2 = this.mPointService.selectListByWhere("where bizid = '0533JS' and SignalType='AI' and MeasureDT>DATE_SUB(NOW(), INTERVAL 5 MINUTE) and source_type='auto' ");
List<MPoint> list2 = this.mPointService.selectListByWhere("where bizid = '0533JS' and SignalType='AI' and source_type='auto' ");
if (list2 != null && !list2.isEmpty()) {
for (MPoint mPoint : list2) {
MPointHistory mPointHistory = new MPointHistory();
mPointHistory.setParmvalue(list2.get(j).getParmvalue());
mPointHistory.setMeasuredt(list2.get(j).getMeasuredt());
mPointHistory.setTbName(list2.get(j).getMpointcode());
mPointHistory.setParmvalue(mPoint.getParmvalue());
mPointHistory.setMeasuredt(mPoint.getMeasuredt());
mPointHistory.setTbName(mPoint.getMpointcode());
mPointHistory.setUserid("data_job");
mPointHistory.setInsdt(CommUtil.nowDate());
mPointHistoryService.saveByCreate(list2.get(j).getBizid(), mPointHistory);
mPointHistoryService.saveByCreate(mPoint.getBizid(), mPointHistory);
}
System.out.println("完成一次(有数据)转发,执行了" + list2.size() + "次点");
} else {