|
@@ -33,7 +33,7 @@ public class OpcDaTask extends TimerTask {
|
|
|
|
|
|
private final Map<String, DataModel> map;
|
|
|
|
|
|
- private final List<String> itemIdList;
|
|
|
+ private final List<com.example.opc_common.entity.Item> itemList;
|
|
|
|
|
|
private final String timeFormat;
|
|
|
|
|
@@ -45,7 +45,7 @@ public class OpcDaTask extends TimerTask {
|
|
|
ItemGroup itemGroup,
|
|
|
DataSource dataSource,
|
|
|
Map<String, DataModel> map,
|
|
|
- List<String> itemIdList,String timeFormat) {
|
|
|
+ List<com.example.opc_common.entity.Item> itemList, String timeFormat) {
|
|
|
this.redisUtil = redisUtil;
|
|
|
this.opcAsyncTask = opcAsyncTask;
|
|
|
this.itemGroupDao = itemGroupDao;
|
|
@@ -54,7 +54,7 @@ public class OpcDaTask extends TimerTask {
|
|
|
this.itemGroup = itemGroup;
|
|
|
this.dataSource = dataSource;
|
|
|
this.map = map;
|
|
|
- this.itemIdList = itemIdList;
|
|
|
+ this.itemList = itemList;
|
|
|
this.timeFormat = timeFormat;
|
|
|
}
|
|
|
|
|
@@ -68,9 +68,14 @@ public class OpcDaTask extends TimerTask {
|
|
|
server.connect();
|
|
|
SyncAccess access = new SyncAccess(server, itemGroup.getModeValue() * 1000);
|
|
|
// AccessBase access = new Async20Access(server, itemGroup.getModeValue() ,true);
|
|
|
- for (String itemId : itemIdList) {
|
|
|
+ for (com.example.opc_common.entity.Item item : itemList) {
|
|
|
+ String itemId = item.getItemReadName();
|
|
|
+ Integer eventMode = item.getEventMode();
|
|
|
+ Integer eventValue = item.getEventValue();
|
|
|
+ Integer tableReportId = item.getTableReportId();
|
|
|
access.addItem(itemId, new DataCallback() {
|
|
|
private long timeLong = 0;
|
|
|
+
|
|
|
@Override
|
|
|
public void changed(Item item, ItemState itemState) {
|
|
|
try {
|
|
@@ -169,9 +174,22 @@ public class OpcDaTask extends TimerTask {
|
|
|
try {
|
|
|
List<BigDecimal> dataValueList = new ArrayList<>();
|
|
|
BigDecimal bigDecimal = JSON.parseObject(value.toString(), BigDecimal.class);
|
|
|
- dataValueList.add(Blank.isNotEmpty(dm) ?
|
|
|
+ BigDecimal dmData = Blank.isNotEmpty(dm) ?
|
|
|
MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) :
|
|
|
- bigDecimal);
|
|
|
+ bigDecimal;
|
|
|
+ dataValueList.add(dmData);
|
|
|
+ if (Blank.isNotEmpty(eventMode) && Blank.isNotEmpty(eventValue) && Blank.isNotEmpty(tableReportId)) {
|
|
|
+ BigDecimal bigEventValue = new BigDecimal(eventValue);
|
|
|
+ if (eventMode.equals(ConstantStr.EVENT_MODEL_EXCEED)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == 1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ } else if (eventMode.equals(ConstantStr.EVENT_MODEL_LOWER)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == -1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
redisUtil.set(ConstantStr.DATA_VALUE + id + itemId, dataValueList, ConstantStr.TWO_HOUR);
|
|
|
} catch (Exception e) {
|
|
|
List<String> dataValueList = new ArrayList<>();
|
|
@@ -193,7 +211,22 @@ public class OpcDaTask extends TimerTask {
|
|
|
dataValueList = JavaTypeUtil.objChangeListBig(dataValueObject);
|
|
|
}
|
|
|
BigDecimal bigDecimal = JSON.parseObject(value.toString(), BigDecimal.class);
|
|
|
- dataValueList.add(Blank.isNotEmpty(dm) ? MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) : bigDecimal);
|
|
|
+ BigDecimal dmData = Blank.isNotEmpty(dm) ?
|
|
|
+ MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) :
|
|
|
+ bigDecimal;
|
|
|
+ dataValueList.add(dmData);
|
|
|
+ if (Blank.isNotEmpty(eventMode) && Blank.isNotEmpty(eventValue) && Blank.isNotEmpty(tableReportId)) {
|
|
|
+ BigDecimal bigEventValue = new BigDecimal(eventValue);
|
|
|
+ if (eventMode.equals(ConstantStr.EVENT_MODEL_EXCEED)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == 1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ } else if (eventMode.equals(ConstantStr.EVENT_MODEL_LOWER)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == -1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
redisUtil.set(ConstantStr.DATA_VALUE + id + itemId, dataValueList, ConstantStr.TWO_HOUR);
|
|
|
} catch (Exception e) {
|
|
|
List<String> dataValueList = new ArrayList<>();
|
|
@@ -239,9 +272,22 @@ public class OpcDaTask extends TimerTask {
|
|
|
|
|
|
dataValueList = new ArrayList<>();
|
|
|
BigDecimal bigDecimal = JSON.parseObject(value.toString(), BigDecimal.class);
|
|
|
- dataValueList.add(Blank.isNotEmpty(dm) ?
|
|
|
+ BigDecimal dmData = Blank.isNotEmpty(dm) ?
|
|
|
MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) :
|
|
|
- bigDecimal);
|
|
|
+ bigDecimal;
|
|
|
+ dataValueList.add(dmData);
|
|
|
+ if (Blank.isNotEmpty(eventMode) && Blank.isNotEmpty(eventValue) && Blank.isNotEmpty(tableReportId)) {
|
|
|
+ BigDecimal bigEventValue = new BigDecimal(eventValue);
|
|
|
+ if (eventMode.equals(ConstantStr.EVENT_MODEL_EXCEED)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == 1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ } else if (eventMode.equals(ConstantStr.EVENT_MODEL_LOWER)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == -1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
redisUtil.set(ConstantStr.DATA_VALUE + id + itemId, dataValueList, ConstantStr.TWO_HOUR);
|
|
|
} catch (Exception e) {
|
|
|
List<String> dataValueList = new ArrayList<>();
|
|
@@ -337,8 +383,8 @@ public class OpcDaTask extends TimerTask {
|
|
|
if (Blank.isNotEmpty(server)) {
|
|
|
server.dispose();
|
|
|
}
|
|
|
- for (String itemId : itemIdList) {
|
|
|
- redisUtil.del(ConstantStr.ITEM_GROUP + id + itemId);
|
|
|
+ for (com.example.opc_common.entity.Item item_ : itemList) {
|
|
|
+ redisUtil.del(ConstantStr.ITEM_GROUP + id + item_.getItemReadName());
|
|
|
}
|
|
|
redisUtil.del(ConstantStr.ITEM_GROUP + id);
|
|
|
itemGroupDao.runItemGroupById(id, ConstantStr.STOP_IT);
|
|
@@ -355,7 +401,8 @@ public class OpcDaTask extends TimerTask {
|
|
|
}
|
|
|
if (!flage) {
|
|
|
//存已经存入redis中的数据
|
|
|
- for (String itemId : itemIdList) {
|
|
|
+ for (com.example.opc_common.entity.Item item : itemList) {
|
|
|
+ String itemId = item.getItemReadName();
|
|
|
String valueBelongTime = String.valueOf(redisUtil.get(ConstantStr.VALUE_BELONG_TIME + id + itemId));
|
|
|
|
|
|
List<String> dataValueTimeList = new ArrayList<>();
|
|
@@ -434,10 +481,15 @@ public class OpcDaTask extends TimerTask {
|
|
|
} else if (itemGroup.getReadMode() == ConstantStr.ON_CHANGE) {
|
|
|
server.connect();
|
|
|
SyncAccess access = new SyncAccess(server, 1000);
|
|
|
- for (String itemId : itemIdList) {
|
|
|
+ for (com.example.opc_common.entity.Item item : itemList) {
|
|
|
+ String itemId = item.getItemReadName();
|
|
|
+ Integer eventMode = item.getEventMode();
|
|
|
+ Integer eventValue = item.getEventValue();
|
|
|
+ Integer tableReportId = item.getTableReportId();
|
|
|
access.addItem(itemId, new DataCallback() {
|
|
|
private Map<String, Object> valueMap;
|
|
|
private long timeLong = 0;
|
|
|
+
|
|
|
@Override
|
|
|
public void changed(Item item, ItemState itemState) {
|
|
|
try {
|
|
@@ -472,7 +524,22 @@ public class OpcDaTask extends TimerTask {
|
|
|
try {
|
|
|
List<BigDecimal> dataValueList = new ArrayList<>();
|
|
|
BigDecimal bigDecimal = JSON.parseObject(value.toString(), BigDecimal.class);
|
|
|
- dataValueList.add(Blank.isNotEmpty(dm) ? MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) : bigDecimal);
|
|
|
+ BigDecimal dmData = Blank.isNotEmpty(dm) ?
|
|
|
+ MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) :
|
|
|
+ bigDecimal;
|
|
|
+ dataValueList.add(dmData);
|
|
|
+ if (Blank.isNotEmpty(eventMode) && Blank.isNotEmpty(eventValue) && Blank.isNotEmpty(tableReportId)) {
|
|
|
+ BigDecimal bigEventValue = new BigDecimal(eventValue);
|
|
|
+ if (eventMode.equals(ConstantStr.EVENT_MODEL_EXCEED)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == 1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ } else if (eventMode.equals(ConstantStr.EVENT_MODEL_LOWER)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == -1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
redisUtil.set(ConstantStr.DATA_VALUE + id + itemId, dataValueList, ConstantStr.TWO_HOUR);
|
|
|
} catch (Exception e) {
|
|
|
List<String> dataValueList = new ArrayList<>();
|
|
@@ -500,7 +567,22 @@ public class OpcDaTask extends TimerTask {
|
|
|
dataValueList = JavaTypeUtil.objChangeListBig(dataValueObject);
|
|
|
}
|
|
|
BigDecimal bigDecimal = JSON.parseObject(value.toString(), BigDecimal.class);
|
|
|
- dataValueList.add(Blank.isNotEmpty(dm) ? MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) : bigDecimal);
|
|
|
+ BigDecimal dmData = Blank.isNotEmpty(dm) ?
|
|
|
+ MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) :
|
|
|
+ bigDecimal;
|
|
|
+ dataValueList.add(dmData);
|
|
|
+ if (Blank.isNotEmpty(eventMode) && Blank.isNotEmpty(eventValue) && Blank.isNotEmpty(tableReportId)) {
|
|
|
+ BigDecimal bigEventValue = new BigDecimal(eventValue);
|
|
|
+ if (eventMode.equals(ConstantStr.EVENT_MODEL_EXCEED)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == 1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ } else if (eventMode.equals(ConstantStr.EVENT_MODEL_LOWER)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == -1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
redisUtil.set(ConstantStr.DATA_VALUE + id + itemId, dataValueList, ConstantStr.TWO_HOUR);
|
|
|
} catch (Exception e) {
|
|
|
List<String> dataValueList = new ArrayList<>();
|
|
@@ -568,7 +650,22 @@ public class OpcDaTask extends TimerTask {
|
|
|
|
|
|
dataValueList = new ArrayList<>();
|
|
|
BigDecimal bigDecimal = JSON.parseObject(value.toString(), BigDecimal.class);
|
|
|
- dataValueList.add(Blank.isNotEmpty(dm) ? MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) : bigDecimal);
|
|
|
+ BigDecimal dmData = Blank.isNotEmpty(dm) ?
|
|
|
+ MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) :
|
|
|
+ bigDecimal;
|
|
|
+ dataValueList.add(dmData);
|
|
|
+ if (Blank.isNotEmpty(eventMode) && Blank.isNotEmpty(eventValue) && Blank.isNotEmpty(tableReportId)) {
|
|
|
+ BigDecimal bigEventValue = new BigDecimal(eventValue);
|
|
|
+ if (eventMode.equals(ConstantStr.EVENT_MODEL_EXCEED)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == 1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ } else if (eventMode.equals(ConstantStr.EVENT_MODEL_LOWER)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == -1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
redisUtil.set(ConstantStr.DATA_VALUE + id + itemId, dataValueList, ConstantStr.TWO_HOUR);
|
|
|
} catch (Exception e) {
|
|
|
List<String> dataValueList = new ArrayList<>();
|
|
@@ -665,8 +762,8 @@ public class OpcDaTask extends TimerTask {
|
|
|
if (Blank.isNotEmpty(server)) {
|
|
|
server.dispose();
|
|
|
}
|
|
|
- for (String itemId : itemIdList) {
|
|
|
- redisUtil.del(ConstantStr.ITEM_GROUP + id + itemId);
|
|
|
+ for (com.example.opc_common.entity.Item item_ : itemList) {
|
|
|
+ redisUtil.del(ConstantStr.ITEM_GROUP + id + item_.getItemReadName());
|
|
|
}
|
|
|
redisUtil.del(ConstantStr.ITEM_GROUP + id);
|
|
|
itemGroupDao.runItemGroupById(id, ConstantStr.STOP_IT);
|
|
@@ -683,7 +780,8 @@ public class OpcDaTask extends TimerTask {
|
|
|
}
|
|
|
if (!flage) {
|
|
|
//存已经存入redis中的数据
|
|
|
- for (String itemId : itemIdList) {
|
|
|
+ for (com.example.opc_common.entity.Item item : itemList) {
|
|
|
+ String itemId = item.getItemReadName();
|
|
|
String valueBelongTime = String.valueOf(redisUtil.get(ConstantStr.VALUE_BELONG_TIME + id + itemId));
|
|
|
|
|
|
List<String> dataValueTimeList = new ArrayList<>();
|
|
@@ -761,9 +859,14 @@ public class OpcDaTask extends TimerTask {
|
|
|
} else if (itemGroup.getReadMode() == ConstantStr.EXCEED_SET_VALUE) {
|
|
|
server.connect();
|
|
|
SyncAccess access = new SyncAccess(server, 1000);
|
|
|
- for (String itemId : itemIdList) {
|
|
|
+ for (com.example.opc_common.entity.Item item : itemList) {
|
|
|
+ String itemId = item.getItemReadName();
|
|
|
+ Integer eventMode = item.getEventMode();
|
|
|
+ Integer eventValue = item.getEventValue();
|
|
|
+ Integer tableReportId = item.getTableReportId();
|
|
|
access.addItem(itemId, new DataCallback() {
|
|
|
private long timeLong = 0;
|
|
|
+
|
|
|
@Override
|
|
|
public void changed(Item item, ItemState itemState) {
|
|
|
try {
|
|
@@ -791,6 +894,18 @@ public class OpcDaTask extends TimerTask {
|
|
|
try {
|
|
|
BigDecimal bigDecimal = JSON.parseObject(value.toString(), BigDecimal.class);
|
|
|
BigDecimal dmData = Blank.isNotEmpty(dm) ? MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) : bigDecimal;
|
|
|
+ if (Blank.isNotEmpty(eventMode) && Blank.isNotEmpty(eventValue) && Blank.isNotEmpty(tableReportId)) {
|
|
|
+ BigDecimal bigEventValue = new BigDecimal(eventValue);
|
|
|
+ if (eventMode.equals(ConstantStr.EVENT_MODEL_EXCEED)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == 1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ } else if (eventMode.equals(ConstantStr.EVENT_MODEL_LOWER)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == -1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (Blank.isEmpty(storageYmdh)) {
|
|
|
if (dmData.compareTo(bigModeValue) == 1) {
|
|
|
redisUtil.set(ConstantStr.VALUE_BELONG_TIME + id + itemId, currentYmdh, ConstantStr.TWO_HOUR);
|
|
@@ -901,8 +1016,8 @@ public class OpcDaTask extends TimerTask {
|
|
|
if (Blank.isNotEmpty(server)) {
|
|
|
server.dispose();
|
|
|
}
|
|
|
- for (String itemId : itemIdList) {
|
|
|
- redisUtil.del(ConstantStr.ITEM_GROUP + id + itemId);
|
|
|
+ for (com.example.opc_common.entity.Item item_ : itemList) {
|
|
|
+ redisUtil.del(ConstantStr.ITEM_GROUP + id + item_.getItemReadName());
|
|
|
}
|
|
|
redisUtil.del(ConstantStr.ITEM_GROUP + id);
|
|
|
itemGroupDao.runItemGroupById(id, ConstantStr.STOP_IT);
|
|
@@ -919,7 +1034,8 @@ public class OpcDaTask extends TimerTask {
|
|
|
}
|
|
|
if (!flage) {
|
|
|
//存已经存入redis中的数据
|
|
|
- for (String itemId : itemIdList) {
|
|
|
+ for (com.example.opc_common.entity.Item item : itemList) {
|
|
|
+ String itemId = item.getItemReadName();
|
|
|
String valueBelongTime = String.valueOf(redisUtil.get(ConstantStr.VALUE_BELONG_TIME + id + itemId));
|
|
|
|
|
|
List<String> dataValueTimeList = new ArrayList<>();
|
|
@@ -968,10 +1084,15 @@ public class OpcDaTask extends TimerTask {
|
|
|
}
|
|
|
} else if (itemGroup.getReadMode() == ConstantStr.LOWER_SET_VALUE) {
|
|
|
server.connect();
|
|
|
- SyncAccess access = new SyncAccess(server, 500);
|
|
|
- for (String itemId : itemIdList) {
|
|
|
+ SyncAccess access = new SyncAccess(server, 1000);
|
|
|
+ for (com.example.opc_common.entity.Item item : itemList) {
|
|
|
+ String itemId = item.getItemReadName();
|
|
|
+ Integer eventMode = item.getEventMode();
|
|
|
+ Integer eventValue = item.getEventValue();
|
|
|
+ Integer tableReportId = item.getTableReportId();
|
|
|
access.addItem(itemId, new DataCallback() {
|
|
|
private long timeLong = 0;
|
|
|
+
|
|
|
@Override
|
|
|
public void changed(Item item, ItemState itemState) {
|
|
|
try {
|
|
@@ -999,6 +1120,18 @@ public class OpcDaTask extends TimerTask {
|
|
|
try {
|
|
|
BigDecimal bigDecimal = JSON.parseObject(value.toString(), BigDecimal.class);
|
|
|
BigDecimal dmData = Blank.isNotEmpty(dm) ? MathUtil.quadricOperation(dm.getMathParameter(), dm.getOperationRule(), bigDecimal) : bigDecimal;
|
|
|
+ if (Blank.isNotEmpty(eventMode) && Blank.isNotEmpty(eventValue) && Blank.isNotEmpty(tableReportId)) {
|
|
|
+ BigDecimal bigEventValue = new BigDecimal(eventValue);
|
|
|
+ if (eventMode.equals(ConstantStr.EVENT_MODEL_EXCEED)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == 1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ } else if (eventMode.equals(ConstantStr.EVENT_MODEL_LOWER)) {
|
|
|
+ if (dmData.compareTo(bigEventValue) == -1) {
|
|
|
+ opcAsyncTask.eventTable(tableReportId, dmData, currentYmdhmss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (Blank.isEmpty(storageYmdh)) {
|
|
|
if (dmData.compareTo(bigModeValue) == -1) {
|
|
|
redisUtil.set(ConstantStr.VALUE_BELONG_TIME + id + itemId, currentYmdh, ConstantStr.TWO_HOUR);
|
|
@@ -1109,8 +1242,8 @@ public class OpcDaTask extends TimerTask {
|
|
|
if (Blank.isNotEmpty(server)) {
|
|
|
server.dispose();
|
|
|
}
|
|
|
- for (String itemId : itemIdList) {
|
|
|
- redisUtil.del(ConstantStr.ITEM_GROUP + id + itemId);
|
|
|
+ for (com.example.opc_common.entity.Item item_ : itemList) {
|
|
|
+ redisUtil.del(ConstantStr.ITEM_GROUP + id + item_.getItemReadName());
|
|
|
}
|
|
|
redisUtil.del(ConstantStr.ITEM_GROUP + id);
|
|
|
itemGroupDao.runItemGroupById(id, ConstantStr.STOP_IT);
|
|
@@ -1127,7 +1260,8 @@ public class OpcDaTask extends TimerTask {
|
|
|
}
|
|
|
if (!flage) {
|
|
|
//存已经存入redis中的数据
|
|
|
- for (String itemId : itemIdList) {
|
|
|
+ for (com.example.opc_common.entity.Item item : itemList) {
|
|
|
+ String itemId = item.getItemReadName();
|
|
|
String valueBelongTime = String.valueOf(redisUtil.get(ConstantStr.VALUE_BELONG_TIME + id + itemId));
|
|
|
|
|
|
List<String> dataValueTimeList = new ArrayList<>();
|