rev:优化测试出现的问题
This commit is contained in:
@@ -59,7 +59,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
boolean bConnected = true;
|
boolean bConnected = true;
|
||||||
|
|
||||||
boolean isReConnect = false;
|
boolean isReConnect = false;
|
||||||
int i = 1 ;
|
int i = 1;
|
||||||
boolean requireSucessRegion = false;
|
boolean requireSucessRegion = false;
|
||||||
boolean requireSucessTake = false;
|
boolean requireSucessTake = false;
|
||||||
boolean requireSucessPut = false;
|
boolean requireSucessPut = false;
|
||||||
@@ -191,7 +191,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
inst.setAgv_jobno(String.valueOf(index));
|
inst.setAgv_jobno(String.valueOf(index));
|
||||||
inst.setSend_status("1");
|
inst.setSend_status("1");
|
||||||
instructionService.update(inst);
|
instructionService.update(inst);
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
}
|
}
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
@@ -219,13 +219,13 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
}
|
}
|
||||||
//请求删除任务
|
//请求删除任务
|
||||||
//(需要WCS反馈)
|
//(需要WCS反馈)
|
||||||
else if (phase == 0x30) {
|
else if (phase == 0x30) {
|
||||||
// data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0);
|
// data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0);
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0,0,0);
|
data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0, 0, 0);
|
||||||
}
|
}
|
||||||
//任务删除确认
|
//任务删除确认
|
||||||
//(需要WCS反馈)
|
//(需要WCS反馈)
|
||||||
@@ -244,21 +244,20 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
if (ObjectUtil.isNotEmpty(device)) {
|
if (ObjectUtil.isNotEmpty(device)) {
|
||||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||||
try {
|
try {
|
||||||
standardAutodoorDeviceDriver.writing("to_open", "1");
|
standardAutodoorDeviceDriver.writing("to_open", "1");
|
||||||
standardAutodoorDeviceDriver.writing("to_close", "0");
|
standardAutodoorDeviceDriver.writing("to_close", "0");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("下发电气信号失败:" + e.getMessage());
|
log.info("下发电气信号失败:" + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
|
||||||
if (standardAutodoorDeviceDriver.getOpen() == 1 && standardAutodoorDeviceDriver.getToOpen() == 1) {
|
|
||||||
log.info("下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getOpen());
|
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
|
||||||
} else {
|
|
||||||
log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// }
|
if (standardAutodoorDeviceDriver.getOpen() == 1 && standardAutodoorDeviceDriver.getToOpen() == 1) {
|
||||||
|
log.info("下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getOpen());
|
||||||
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
} else {
|
||||||
|
log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose());
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.info(agvaddr + "对应设备号为空!");
|
log.info(agvaddr + "对应设备号为空!");
|
||||||
}
|
}
|
||||||
@@ -271,16 +270,20 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
if (ObjectUtil.isNotEmpty(device)) {
|
if (ObjectUtil.isNotEmpty(device)) {
|
||||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||||
try {
|
try {
|
||||||
standardAutodoorDeviceDriver.writing("to_close", "1");
|
standardAutodoorDeviceDriver.writing("to_close", "1");
|
||||||
standardAutodoorDeviceDriver.writing("to_open", "0");
|
standardAutodoorDeviceDriver.writing("to_open", "0");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("下发电气信号失败:" + e.getMessage());
|
log.info("下发电气信号失败:" + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
|
||||||
}
|
}
|
||||||
// }
|
if (standardAutodoorDeviceDriver.getClose() == 1) {
|
||||||
|
log.info("读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
|
||||||
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
} else {
|
||||||
|
log.info("未下发NDC信号原因: 读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.info(device_code + "对应设备号为空!");
|
log.info(device_code + "对应设备号为空!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1015,6 +1015,21 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
.build();
|
.build();
|
||||||
logDto.setLog_level(4);
|
logDto.setLog_level(4);
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
String task_code = inst.getTask_code();
|
||||||
|
EXECUTOR.submit(() -> {
|
||||||
|
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms"))
|
||||||
|
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("task_code", task_code);
|
||||||
|
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||||
|
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
|
||||||
|
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode())
|
||||||
|
.build();
|
||||||
|
logDto1.setLog_level(4);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||||
|
acsToWmsService.actionFinishRequest2(jsonObject);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
||||||
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
|
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
|
||||||
try {
|
try {
|
||||||
@@ -1053,6 +1068,21 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
.build();
|
.build();
|
||||||
logDto.setLog_level(4);
|
logDto.setLog_level(4);
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
String task_code = inst.getTask_code();
|
||||||
|
EXECUTOR.submit(() -> {
|
||||||
|
if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms"))
|
||||||
|
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("task_code", task_code);
|
||||||
|
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||||
|
.device_code(manipulatorAgvStationDeviceDriver.getDevice_code())
|
||||||
|
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||||
|
.build();
|
||||||
|
logDto1.setLog_level(4);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||||
|
acsToWmsService.actionFinishRequest2(jsonObject);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) {
|
||||||
paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver();
|
paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -66,18 +66,11 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号open:" + last_open + "->" + open);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号open:" + last_open + "->" + open);
|
||||||
}
|
}
|
||||||
if (close != last_close) {
|
if (close != last_close) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号close:" + last_close + "->" + close);
|
|
||||||
if(close ==1 ){
|
if(close ==1 ){
|
||||||
this.writing("to_close","0");
|
this.writing("to_close","0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (toClose != last_toClose) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号toClose:" + last_toClose + "->" + toClose);
|
|
||||||
|
|
||||||
}
|
|
||||||
if (toOpen != last_toOpen) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号toOpen:" + last_toOpen + "->" + toOpen);
|
|
||||||
}
|
|
||||||
last_open = open;
|
last_open = open;
|
||||||
last_close = close;
|
last_close = close;
|
||||||
last_toClose = toClose;
|
last_toClose = toClose;
|
||||||
@@ -86,11 +79,15 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
|
|
||||||
|
|
||||||
public void writing(String param, String value) {
|
public void writing(String param, String value) {
|
||||||
// String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
// + "." + param;
|
+ "." + param;
|
||||||
// Map<String, Object> itemMap = new HashMap<String, Object>();
|
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||||
// itemMap.put(to_param, Integer.parseInt(value));
|
itemMap.put(to_param, Integer.parseInt(value));
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
try {
|
try {
|
||||||
this.toDoorCommandControl.control(param,value);
|
this.toDoorCommandControl.control(param,value);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -304,6 +304,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
logServer.deviceExecuteLog(this.device_code,"","","申请套管");
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(device_code + "当前mode值为:" + mode)
|
.content(device_code + "当前mode值为:" + mode)
|
||||||
@@ -317,6 +318,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_ONE);
|
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_ONE);
|
||||||
//气涨轴尺寸
|
//气涨轴尺寸
|
||||||
applyPlugPullSiteRequest.setSize(String.valueOf(size));
|
applyPlugPullSiteRequest.setSize(String.valueOf(size));
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("device_code", device_code);
|
||||||
|
param.put("type", CommonFinalParam.TYPE_ONE);
|
||||||
|
param.put("size", String.valueOf(size));
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴请求,参数:" + param);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||||
@@ -399,6 +405,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
logServer.deviceExecuteLog(this.device_code,"","","套管完成");
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(device_code + "当前mode值为:" + mode)
|
.content(device_code + "当前mode值为:" + mode)
|
||||||
@@ -415,6 +422,14 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
applyPlugPullSiteRequest.setWeight2(String.valueOf(weight2));
|
applyPlugPullSiteRequest.setWeight2(String.valueOf(weight2));
|
||||||
applyPlugPullSiteRequest.setMaterial2(String.valueOf(material2));
|
applyPlugPullSiteRequest.setMaterial2(String.valueOf(material2));
|
||||||
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_TWO);
|
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_TWO);
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("device_code", device_code);
|
||||||
|
param.put("type", CommonFinalParam.TYPE_TWO);
|
||||||
|
param.put("weight1", String.valueOf(weight1));
|
||||||
|
param.put("material1", String.valueOf(material1));
|
||||||
|
param.put("weight1", String.valueOf(weight1));
|
||||||
|
param.put("material1", String.valueOf(material1));
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "套管完成请求,参数:" + param);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||||
@@ -432,8 +447,8 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
map.put("to_command", 99);
|
map.put("to_command", 99);
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
message = "申请套管失败";
|
message = "套管完成失败";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请套管反馈失败,返回参数:" + applyPlugPullSitResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "反馈套管完成失败,返回参数:" + applyPlugPullSitResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,6 +463,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
logServer.deviceExecuteLog(this.device_code,"","","拔轴完成");
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(device_code + "当前mode值为:" + mode)
|
.content(device_code + "当前mode值为:" + mode)
|
||||||
@@ -460,13 +476,18 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||||
applyPlugPullSiteRequest.setBarcode(String.valueOf(barcode));
|
applyPlugPullSiteRequest.setBarcode(String.valueOf(barcode));
|
||||||
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_THREE);
|
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_THREE);
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("device_code", device_code);
|
||||||
|
param.put("type", CommonFinalParam.TYPE_THREE);
|
||||||
|
param.put("barcode", String.valueOf(barcode));
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "拔轴完成请求,参数:" + param);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", mode);
|
map.put("to_command", mode);
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴,返回参数:" + applyPlugPullSitResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴完成,返回参数:" + applyPlugPullSitResponse);
|
||||||
message = "拔轴完成成功";
|
message = "拔轴完成成功";
|
||||||
} else {
|
} else {
|
||||||
message = applyPlugPullSitResponse.getMessage();
|
message = applyPlugPullSitResponse.getMessage();
|
||||||
@@ -475,7 +496,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
this.writing(map);
|
this.writing(map);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
message = "拔轴完成失败";
|
message = "拔轴完成失败";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴反馈失败,返回参数:" + applyPlugPullSitResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴完成反馈失败,返回参数:" + applyPlugPullSitResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -489,6 +510,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
logServer.deviceExecuteLog(this.device_code,"","","申请拔轴");
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(device_code + "当前mode值为:" + mode)
|
.content(device_code + "当前mode值为:" + mode)
|
||||||
@@ -501,6 +523,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||||
applyPlugPullSiteRequest.setQzz_no(String.valueOf(barcode));
|
applyPlugPullSiteRequest.setQzz_no(String.valueOf(barcode));
|
||||||
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_FOUR);
|
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_FOUR);
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("device_code", device_code);
|
||||||
|
param.put("type", CommonFinalParam.TYPE_FOUR);
|
||||||
|
param.put("barcode", String.valueOf(barcode));
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴请求,参数:" + param);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||||
Map<String, String> data = applyPlugPullSitResponse.getData();
|
Map<String, String> data = applyPlugPullSitResponse.getData();
|
||||||
@@ -558,6 +585,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
logServer.deviceExecuteLog(this.device_code,"","","缓存线已满,生成行架任务");
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(device_code + "当前mode值为:" + mode)
|
.content(device_code + "当前mode值为:" + mode)
|
||||||
@@ -570,19 +598,24 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||||
applyPlugPullSiteRequest.setSize(String.valueOf(size));
|
applyPlugPullSiteRequest.setSize(String.valueOf(size));
|
||||||
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_FIVE);
|
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_FIVE);
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("device_code", device_code);
|
||||||
|
param.put("type", CommonFinalParam.TYPE_FIVE);
|
||||||
|
param.put("size", String.valueOf(size));
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务,参数:" + param);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", mode);
|
map.put("to_command", mode);
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴,返回参数:" + applyPlugPullSitResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务,返回参数:" + applyPlugPullSitResponse);
|
||||||
message = "生成行架任务成功";
|
message = "生成行架任务成功";
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
} else {
|
} else {
|
||||||
message = applyPlugPullSitResponse.getMessage();
|
message = applyPlugPullSitResponse.getMessage();
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
message = "申请行架任务失败";
|
message = "申请行架任务失败";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴反馈失败,返回参数:" + applyPlugPullSitResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务失败,返回参数:" + applyPlugPullSitResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,10 +215,16 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
|
|
||||||
//反馈重量
|
//反馈重量
|
||||||
if (mode == 3 && action == 5 && move == 0 && StrUtil.isNotEmpty(sub_volume_no) && !requireSucess) {
|
if (mode == 3 && action == 5 && move == 0 && StrUtil.isNotEmpty(sub_volume_no) && !requireSucess) {
|
||||||
|
logServer.deviceExecuteLog(this.device_code,"","","反馈重量");
|
||||||
ApplyfeedbackSubVolumeWeightRequest applyfeedbackSubVolumeWeightRequest = new ApplyfeedbackSubVolumeWeightRequest();
|
ApplyfeedbackSubVolumeWeightRequest applyfeedbackSubVolumeWeightRequest = new ApplyfeedbackSubVolumeWeightRequest();
|
||||||
ApplyfeedbackSubVolumeWeightResponse applyPlugPullSitResponse;
|
ApplyfeedbackSubVolumeWeightResponse applyPlugPullSitResponse;
|
||||||
applyfeedbackSubVolumeWeightRequest.setSub_volume(sub_volume_no);
|
applyfeedbackSubVolumeWeightRequest.setSub_volume(sub_volume_no);
|
||||||
applyfeedbackSubVolumeWeightRequest.setWeight1(String.valueOf(weight));
|
applyfeedbackSubVolumeWeightRequest.setWeight1(weight);
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("device_code", device_code);
|
||||||
|
param.put("sub_volume", sub_volume_no);
|
||||||
|
param.put("weight1", weight);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "反馈重量,参数:" + param);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyfeedbackSubVolumeWeight(applyfeedbackSubVolumeWeightRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyfeedbackSubVolumeWeight(applyfeedbackSubVolumeWeightRequest);
|
||||||
if(applyPlugPullSitResponse.getCode() == CommonFinalParam.STATUS_OPEN){
|
if(applyPlugPullSitResponse.getCode() == CommonFinalParam.STATUS_OPEN){
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
|
|||||||
@@ -13,6 +13,6 @@ public class ApplyfeedbackSubVolumeWeightRequest {
|
|||||||
/**
|
/**
|
||||||
* 子卷重量
|
* 子卷重量
|
||||||
*/
|
*/
|
||||||
private String weight1;
|
private double weight1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,6 +166,10 @@ public class LuceneServiceImpl implements LuceneService {
|
|||||||
if (whereJson.get("method") != null){
|
if (whereJson.get("method") != null){
|
||||||
Query termQuery = new TermQuery(new Term("method", (String) whereJson.get("method")));
|
Query termQuery = new TermQuery(new Term("method", (String) whereJson.get("method")));
|
||||||
booleanQueryBuilder.add(termQuery,BooleanClause.Occur.MUST);
|
booleanQueryBuilder.add(termQuery,BooleanClause.Occur.MUST);
|
||||||
|
} else {
|
||||||
|
// 使用 TermRangeQuery 来检查字段是否存在和不为空
|
||||||
|
Query rangeQuery = TermRangeQuery.newStringRange("method", null, null, false, false);
|
||||||
|
booleanQueryBuilder.add(rangeQuery, BooleanClause.Occur.MUST);
|
||||||
}
|
}
|
||||||
TopFieldCollector collector = TopFieldCollector.create(new Sort(new SortField("logTime", SortField.Type.LONG,true)), 20000, 0);
|
TopFieldCollector collector = TopFieldCollector.create(new Sort(new SortField("logTime", SortField.Type.LONG,true)), 20000, 0);
|
||||||
searcher.search(booleanQueryBuilder.build(), collector);
|
searcher.search(booleanQueryBuilder.build(), collector);
|
||||||
@@ -177,17 +181,13 @@ public class LuceneServiceImpl implements LuceneService {
|
|||||||
for (ScoreDoc scoreDoc : scoreDocs) {
|
for (ScoreDoc scoreDoc : scoreDocs) {
|
||||||
Document doc = open.document(scoreDoc.doc);
|
Document doc = open.document(scoreDoc.doc);
|
||||||
JSONObject object = new JSONObject();
|
JSONObject object = new JSONObject();
|
||||||
if (ObjectUtil.isNotEmpty(doc.get("method"))) {
|
object.put("content", doc.get("fieldContent"));
|
||||||
object.put("content", doc.get("fieldContent"));
|
object.put("logTime", doc.get("logTime") );
|
||||||
object.put("logTime", doc.get("logTime") );
|
object.put("method", doc.get("method"));
|
||||||
object.put("method", doc.get("method"));
|
object.put("requestparam", doc.get("requestparam"));
|
||||||
object.put("requestparam", doc.get("requestparam"));
|
object.put("responseparam", doc.get("responseparam"));
|
||||||
object.put("responseparam", doc.get("responseparam"));
|
if (ObjectUtil.isNotEmpty(doc.get("fieldContent"))) {
|
||||||
if (doc.get("fieldContent") != null) {
|
list.add(object);
|
||||||
list.add(object);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open.close();
|
open.close();
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="dbr_value2">
|
<el-table-column prop="dbr_value2">
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
<el-link type="primary" :underline="false" @click.native="test_read1()">测试读</el-link>
|
<el-link type="primary" :underline="false" @click.native="test_read2()">测试读</el-link>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="data2[scope.$index].dbr_value" size="mini" class="edit-input" />
|
<el-input v-model="data2[scope.$index].dbr_value" size="mini" class="edit-input" />
|
||||||
@@ -354,6 +354,15 @@ export default {
|
|||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
test_read2() {
|
||||||
|
testRead(this.data2, this.opc_id).then(data => {
|
||||||
|
this.data2 = data
|
||||||
|
console.log(this.data2)
|
||||||
|
this.notify('操作成功!', 'success')
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err.response.data.message)
|
||||||
|
})
|
||||||
|
},
|
||||||
doSubmit() {
|
doSubmit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|||||||
@@ -8,14 +8,18 @@
|
|||||||
<!-- style="width: 200px;"-->
|
<!-- style="width: 200px;"-->
|
||||||
<!-- class="filter-item"-->
|
<!-- class="filter-item"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<el-input
|
<el-select
|
||||||
v-model="query.method"
|
v-model="query.method"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入你要搜索的方法名"
|
placeholder="请输入你要搜索的方法名"
|
||||||
style="width: 200px;"
|
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
/>
|
style="width: 200px"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in methods" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.requestparam"
|
v-model="query.requestparam"
|
||||||
clearable
|
clearable
|
||||||
@@ -104,7 +108,7 @@ export default {
|
|||||||
queryAddressCodeList().then(data => {
|
queryAddressCodeList().then(data => {
|
||||||
this.methods = data.content
|
this.methods = data.content
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user