mqtt初始化链接调试
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user