|
|
@ -92,7 +92,7 @@ public class GatherDataTask { |
|
|
log.info("IP:{} 连接成功!!!",ip); |
|
|
log.info("IP:{} 连接成功!!!",ip); |
|
|
for (Device device : deviceList) { |
|
|
for (Device device : deviceList) { |
|
|
List<Collect> c1 = collectService.lambdaQuery().in(Collect::getCollectDesc, device.getDeviceType()).eq(Collect::getActive, "Y").list(); |
|
|
List<Collect> c1 = collectService.lambdaQuery().in(Collect::getCollectDesc, device.getDeviceType()).eq(Collect::getActive, "Y").list(); |
|
|
int i = CollectUtils.readXMZValue(siemensS7Net, device.getDeviceAddress()); |
|
|
|
|
|
|
|
|
int i = CollectUtils.readXMZValue(siemensS7Net, device.getDeviceIp()); |
|
|
log.info("设备:{} 读取值:{}",device.getDeviceDesc(),i); |
|
|
log.info("设备:{} 读取值:{}",device.getDeviceDesc(),i); |
|
|
CollectRecord collectRecord = getCollectRecord(device, c1, i); |
|
|
CollectRecord collectRecord = getCollectRecord(device, c1, i); |
|
|
collectRecordService.insertCollectRecord(collectRecord); |
|
|
collectRecordService.insertCollectRecord(collectRecord); |
|
|
@ -117,7 +117,7 @@ public class GatherDataTask { |
|
|
log.info("IP:{} 连接成功!!!",ip); |
|
|
log.info("IP:{} 连接成功!!!",ip); |
|
|
for (Device device : deviceList) { |
|
|
for (Device device : deviceList) { |
|
|
List<Collect> c1 = collectService.lambdaQuery().in(Collect::getCollectDesc, device.getDeviceType()).eq(Collect::getActive, "Y").list(); |
|
|
List<Collect> c1 = collectService.lambdaQuery().in(Collect::getCollectDesc, device.getDeviceType()).eq(Collect::getActive, "Y").list(); |
|
|
int i = CollectUtils.readSLValue(melsecMcNet, device.getDeviceAddress()); |
|
|
|
|
|
|
|
|
int i = CollectUtils.readSLValue(melsecMcNet, device.getDeviceIp()); |
|
|
log.info("设备:{} 读取值:{}",device.getDeviceDesc(),i); |
|
|
log.info("设备:{} 读取值:{}",device.getDeviceDesc(),i); |
|
|
CollectRecord collectRecord = getCollectRecord(device, c1, i); |
|
|
CollectRecord collectRecord = getCollectRecord(device, c1, i); |
|
|
collectRecordService.insertCollectRecord(collectRecord); |
|
|
collectRecordService.insertCollectRecord(collectRecord); |
|
|
@ -142,7 +142,7 @@ public class GatherDataTask { |
|
|
log.info("IP:{} 连接成功!!!",ip); |
|
|
log.info("IP:{} 连接成功!!!",ip); |
|
|
for (Device device : deviceList) { |
|
|
for (Device device : deviceList) { |
|
|
List<Collect> c1 = collectService.lambdaQuery().in(Collect::getCollectDesc, device.getDeviceType()).eq(Collect::getActive, "Y").list(); |
|
|
List<Collect> c1 = collectService.lambdaQuery().in(Collect::getCollectDesc, device.getDeviceType()).eq(Collect::getActive, "Y").list(); |
|
|
int i = CollectUtils.readSLValue(melsecMcNet, device.getDeviceAddress()); |
|
|
|
|
|
|
|
|
int i = CollectUtils.readSLValue(melsecMcNet, device.getDeviceIp()); |
|
|
log.info("设备:{} 读取值:{}",device.getDeviceDesc(),i); |
|
|
log.info("设备:{} 读取值:{}",device.getDeviceDesc(),i); |
|
|
CollectRecord collectRecord = getCollectRecord(device, c1, i); |
|
|
CollectRecord collectRecord = getCollectRecord(device, c1, i); |
|
|
collectRecordService.insertCollectRecord(collectRecord); |
|
|
collectRecordService.insertCollectRecord(collectRecord); |
|
|
|