fix: 日志补充
This commit is contained in:
@@ -39,6 +39,8 @@ import org.nl.acs.task.enums.TaskStatusEnum;
|
|||||||
import org.nl.acs.task.service.TaskService;
|
import org.nl.acs.task.service.TaskService;
|
||||||
import org.nl.acs.task.service.dto.TaskDto;
|
import org.nl.acs.task.service.dto.TaskDto;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
import org.nl.system.service.param.ISysParamService;
|
import org.nl.system.service.param.ISysParamService;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
import org.openscada.opc.lib.da.Server;
|
||||||
@@ -77,6 +79,9 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
@Autowired
|
@Autowired
|
||||||
StorageCellMapper storageCellMapper;
|
StorageCellMapper storageCellMapper;
|
||||||
|
|
||||||
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前指令
|
* 当前指令
|
||||||
*/
|
*/
|
||||||
@@ -561,7 +566,11 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
message = "重新下发电气信号";
|
message = "重新下发电气信号";
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
message = "下发电气任务号成功";
|
message = "下发电气任务号成功";
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
@@ -668,7 +677,11 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
message = "重新下发电气信号";
|
message = "重新下发电气信号";
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//如果不存在则直接找对应指令
|
//如果不存在则直接找对应指令
|
||||||
@@ -696,7 +709,11 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
this.writing(list);
|
this.writing(list);
|
||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ import org.nl.acs.task.service.TaskService;
|
|||||||
import org.nl.acs.task.service.dto.TaskDto;
|
import org.nl.acs.task.service.dto.TaskDto;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
import org.nl.system.service.param.ISysParamService;
|
import org.nl.system.service.param.ISysParamService;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
import org.openscada.opc.lib.da.Server;
|
||||||
@@ -84,6 +86,9 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
StorageCellMapper storageCellMapper;
|
StorageCellMapper storageCellMapper;
|
||||||
|
|
||||||
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前指令
|
* 当前指令
|
||||||
*/
|
*/
|
||||||
@@ -689,7 +694,11 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
this.writing(list);
|
this.writing(list);
|
||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果不存在则直接找对应指令
|
// 如果不存在则直接找对应指令
|
||||||
@@ -720,7 +729,11 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
this.writing(list);
|
this.writing(list);
|
||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -391,7 +391,6 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, inst.getInstruction_code())) {
|
, inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发信号");
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -503,7 +502,11 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, instdto.getInstruction_code())) {
|
, instdto.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -542,7 +545,11 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, inst.getInstruction_code())) {
|
, inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||||
|
|
||||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
//当前指令
|
//当前指令
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
|
||||||
@@ -408,7 +408,11 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, inst.getInstruction_code())) {
|
, inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -520,7 +524,11 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, instdto.getInstruction_code())) {
|
, instdto.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -559,7 +567,11 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, inst.getInstruction_code())) {
|
, inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
String device_code;
|
String device_code;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Device getDevice() {
|
public Device getDevice() {
|
||||||
return this.device;
|
return this.device;
|
||||||
@@ -273,36 +272,36 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
//
|
//
|
||||||
Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||||
if (StrUtil.isEmpty(inst.getVehicle_code())) {
|
if (StrUtil.isEmpty(inst.getVehicle_code())) {
|
||||||
message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11");
|
message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("device_code", device_code);
|
param.put("device_code", device_code);
|
||||||
param.put("vehicle_code", inst.getVehicle_code());
|
param.put("vehicle_code", inst.getVehicle_code());
|
||||||
param.put("type", AcsToLmsApplyTaskTypeEnum.LABEL_BIND.getType());
|
param.put("type", AcsToLmsApplyTaskTypeEnum.LABEL_BIND.getType());
|
||||||
String response = acsToWmsService.deviceApplyTwo(param);
|
String response = acsToWmsService.deviceApplyTwo(param);
|
||||||
JSONObject jo = JSON.parseObject(response);
|
JSONObject jo = JSON.parseObject(response);
|
||||||
if (StrUtil.isNotEmpty(jo.getString("body")) || jo.getInteger("status") == 200) {
|
if (StrUtil.isNotEmpty(jo.getString("body")) || jo.getInteger("status") == 200) {
|
||||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content("申请捆扎,参数,接口返回:" + jo)
|
.content("申请捆扎,参数,接口返回:" + jo)
|
||||||
.build();
|
.build();
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||||
// Map datas = applyLabelingAndBindingResponse.getData();
|
// Map datas = applyLabelingAndBindingResponse.getData();
|
||||||
packagePLCData(jo.getString("data"));
|
packagePLCData(jo.getString("data"));
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
} else {
|
} else {
|
||||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content("申请捆扎失败,接口返回:" + jo.getString("body"))
|
.content("申请捆扎失败,接口返回:" + jo.getString("body"))
|
||||||
.build();
|
.build();
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void packagePLCData(String datas) {
|
private void packagePLCData(String datas) {
|
||||||
|
|
||||||
JSONObject jo = JSON.parseObject(datas);
|
JSONObject jo = JSON.parseObject(datas);
|
||||||
@@ -554,7 +553,11 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, inst.getInstruction_code())) {
|
, inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -666,7 +669,11 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, instdto.getInstruction_code())) {
|
, instdto.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -705,7 +712,11 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, inst.getInstruction_code())) {
|
, inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|||||||
@@ -558,7 +558,11 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, instdto.getInstruction_code())) {
|
, instdto.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ import org.nl.acs.task.service.dto.TaskDto;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||||
import org.openscada.opc.lib.da.Server;
|
import org.openscada.opc.lib.da.Server;
|
||||||
|
|
||||||
@@ -76,6 +78,9 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||||
|
|
||||||
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||||
|
|
||||||
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
|
|
||||||
//当前指令
|
//当前指令
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
|
||||||
@@ -495,7 +500,6 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, inst.getInstruction_code())) {
|
, inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发信号");
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -607,7 +611,11 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, instdto.getInstruction_code())) {
|
, instdto.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -646,7 +654,11 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".task").toString()
|
||||||
, inst.getInstruction_code())) {
|
, inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + inst.getInstruction_code() + "再次下发电气信号")
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|||||||
@@ -428,7 +428,11 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
notCreateInstMessage = e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
@@ -449,9 +453,11 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
try {
|
try {
|
||||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8,map9,map10);
|
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8,map9,map10);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
|
.device_code(device_code)
|
||||||
+ ",指令终点:" + instdto.getNext_device_code() + ",交互参数:" + interactionJsonDTO.toString() + ",指令执行失败:" + e.getMessage());
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -374,8 +374,11 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
notCreateInstMessage = e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
return false;
|
.device_code(device_code)
|
||||||
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto); return false;
|
||||||
}
|
}
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||||
@@ -394,9 +397,11 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
try {
|
try {
|
||||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9);
|
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
|
.device_code(device_code)
|
||||||
+ ",指令终点:" + instdto.getNext_device_code() + ",交互参数:" + interactionJsonDTO.toString() + ",指令执行失败:" + e.getMessage());
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -399,8 +399,11 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
notCreateInstMessage = e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
return false;
|
.device_code(device_code)
|
||||||
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto); return false;
|
||||||
}
|
}
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||||
@@ -419,9 +422,11 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
try {
|
try {
|
||||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9);
|
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
|
.device_code(device_code)
|
||||||
+ ",指令终点:" + instdto.getNext_device_code() + ",交互参数:" + interactionJsonDTO.toString() + ",指令执行失败:" + e.getMessage());
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -392,8 +392,11 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
|||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
notCreateInstMessage = e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
return false;
|
.device_code(device_code)
|
||||||
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto); return false;
|
||||||
}
|
}
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||||
@@ -414,9 +417,11 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
|||||||
try {
|
try {
|
||||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9,map10, map11);
|
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9,map10, map11);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
|
.device_code(device_code)
|
||||||
+ ",指令终点:" + instdto.getNext_device_code() + ",交互参数:" + interactionJsonDTO.toString() + ",指令执行失败:" + e.getMessage());
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -298,16 +298,16 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
} else {
|
} else {
|
||||||
feedMessage = "universal_feedMessage5";
|
feedMessage = "universal_feedMessage5";
|
||||||
if (mode != 3) {
|
if (mode != 3) {
|
||||||
feedMessage = "universal_feedMessage1";
|
feedMessage = "universal_feedMessage1";
|
||||||
}
|
}
|
||||||
if (action != 8) {
|
if (action != 8) {
|
||||||
feedMessage = "universal_feedMessage2";
|
feedMessage = "universal_feedMessage2";
|
||||||
}
|
}
|
||||||
if (move != 0) {
|
if (move != 0) {
|
||||||
feedMessage = "universal_feedMessage3";
|
feedMessage = "universal_feedMessage3";
|
||||||
}
|
}
|
||||||
if (task == 0) {
|
if (task == 0) {
|
||||||
feedMessage = "universal_feedMessage4";
|
feedMessage = "universal_feedMessage4";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -361,16 +361,16 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
Map<String, Object> map7 = new HashMap<>();
|
Map<String, Object> map7 = new HashMap<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instruction.getInstruction_code(), map5, map6,map7,taskDtoIns);
|
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instruction.getInstruction_code(), map5, map6, map7, taskDtoIns);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||||
+ instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code()
|
+ instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code()
|
||||||
+ ",指令终点:" + instruction.getNext_device_code() + ",指令执行失败:" + e.getMessage());
|
+ ",指令终点:" + instruction.getNext_device_code() + ",指令执行失败:" + e.getMessage());
|
||||||
}
|
}
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
TaskDto taskDto = taskserver.findByStartCodeAndReady(startDeviceCode);
|
TaskDto taskDto = taskserver.findByStartCodeAndReady(startDeviceCode);
|
||||||
if (ObjectUtil.isNotEmpty(taskDto) && TaskTypeEnum.Truss_Task.getIndex().equals(taskDto.getTask_type())) {
|
if (ObjectUtil.isNotEmpty(taskDto) && TaskTypeEnum.Truss_Task.getIndex().equals(taskDto.getTask_type())) {
|
||||||
String start_device_code = taskDto.getStart_device_code();
|
String start_device_code = taskDto.getStart_device_code();
|
||||||
@@ -402,7 +402,7 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriverStar;
|
ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriverStar;
|
||||||
if (startDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) {
|
if (startDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) {
|
||||||
manipulatorCacheDeviceDriverStar = (ManipulatorCacheDeviceDriver) startDevice.getDeviceDriver();
|
manipulatorCacheDeviceDriverStar = (ManipulatorCacheDeviceDriver) startDevice.getDeviceDriver();
|
||||||
if (manipulatorCacheDeviceDriverStar.getMode() != 2 && manipulatorCacheDeviceDriverStar.getMode() !=1) {
|
if (manipulatorCacheDeviceDriverStar.getMode() != 2 && manipulatorCacheDeviceDriverStar.getMode() != 1) {
|
||||||
notCreateInstMessage = "universal_notCreateInstMessage3";
|
notCreateInstMessage = "universal_notCreateInstMessage3";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -411,7 +411,7 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriverEnd;
|
ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriverEnd;
|
||||||
if (nextDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) {
|
if (nextDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) {
|
||||||
manipulatorCacheDeviceDriverEnd = (ManipulatorCacheDeviceDriver) nextDevice.getDeviceDriver();
|
manipulatorCacheDeviceDriverEnd = (ManipulatorCacheDeviceDriver) nextDevice.getDeviceDriver();
|
||||||
if (manipulatorCacheDeviceDriverEnd.getMode() != 2 && manipulatorCacheDeviceDriverEnd.getMode() !=1) {
|
if (manipulatorCacheDeviceDriverEnd.getMode() != 2 && manipulatorCacheDeviceDriverEnd.getMode() != 1) {
|
||||||
notCreateInstMessage = "universal_notCreateInstMessage3";
|
notCreateInstMessage = "universal_notCreateInstMessage3";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -424,12 +424,16 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
String next_point_code = taskDto.getNext_point_code();
|
String next_point_code = taskDto.getNext_point_code();
|
||||||
String route_plan_code = taskDto.getRoute_plan_code();
|
String route_plan_code = taskDto.getRoute_plan_code();
|
||||||
Instruction instdto = new Instruction();
|
Instruction instdto = new Instruction();
|
||||||
packageData(instdto, route_plan_code, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code,start_device_code2,next_device_code2);
|
packageData(instdto, route_plan_code, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, start_device_code2, next_device_code2);
|
||||||
try {
|
try {
|
||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
notCreateInstMessage = e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code + "创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||||
@@ -448,7 +452,7 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
Map<String, Object> map6 = new HashMap<>();
|
Map<String, Object> map6 = new HashMap<>();
|
||||||
Map<String, Object> map7 = new HashMap<>();
|
Map<String, Object> map7 = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), map5, map6,map7,taskDto);
|
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), map5, map6, map7, taskDto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||||
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
|
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
|
||||||
|
|||||||
@@ -470,8 +470,11 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
notCreateInstMessage = e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
return false;
|
.device_code(device_code)
|
||||||
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto); return false;
|
||||||
}
|
}
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
task.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
task.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||||
|
|||||||
@@ -439,8 +439,11 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
notCreateInstMessage = e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
return false;
|
.device_code(device_code)
|
||||||
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto); return false;
|
||||||
}
|
}
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
task.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
task.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||||
|
|||||||
Reference in New Issue
Block a user