Merge remote-tracking branch 'origin/master'
# Conflicts: # acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/xg_agv_car/XgAgvCarDeviceDriver.java
This commit is contained in:
@@ -59,7 +59,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
boolean bConnected = true;
|
||||
|
||||
boolean isReConnect = false;
|
||||
int i = 1 ;
|
||||
int i = 1;
|
||||
boolean requireSucessRegion = false;
|
||||
boolean requireSucessTake = false;
|
||||
boolean requireSucessPut = false;
|
||||
@@ -191,7 +191,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
inst.setAgv_jobno(String.valueOf(index));
|
||||
inst.setSend_status("1");
|
||||
instructionService.update(inst);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
}
|
||||
flag = true;
|
||||
}
|
||||
@@ -219,13 +219,13 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
}
|
||||
//请求删除任务
|
||||
//(需要WCS反馈)
|
||||
else if (phase == 0x30) {
|
||||
// data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0,0,0);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0, 0, 0);
|
||||
}
|
||||
//任务删除确认
|
||||
//(需要WCS反馈)
|
||||
@@ -244,21 +244,20 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
if (ObjectUtil.isNotEmpty(device)) {
|
||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
standardAutodoorDeviceDriver.writing("to_open", "1");
|
||||
standardAutodoorDeviceDriver.writing("to_close", "0");
|
||||
} catch (Exception e) {
|
||||
log.info("下发电气信号失败:" + e.getMessage());
|
||||
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());
|
||||
}
|
||||
try {
|
||||
standardAutodoorDeviceDriver.writing("to_open", "1");
|
||||
standardAutodoorDeviceDriver.writing("to_close", "0");
|
||||
} catch (Exception e) {
|
||||
log.info("下发电气信号失败:" + e.getMessage());
|
||||
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());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log.info(agvaddr + "对应设备号为空!");
|
||||
}
|
||||
@@ -271,16 +270,20 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
if (ObjectUtil.isNotEmpty(device)) {
|
||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
standardAutodoorDeviceDriver.writing("to_close", "1");
|
||||
standardAutodoorDeviceDriver.writing("to_open", "0");
|
||||
} catch (Exception e) {
|
||||
log.info("下发电气信号失败:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
try {
|
||||
standardAutodoorDeviceDriver.writing("to_close", "1");
|
||||
standardAutodoorDeviceDriver.writing("to_open", "0");
|
||||
} catch (Exception e) {
|
||||
log.info("下发电气信号失败:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
// }
|
||||
if (standardAutodoorDeviceDriver.getClose() == 1) {
|
||||
log.info("读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
} else {
|
||||
log.info("未下发NDC信号原因: 读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log.info(device_code + "对应设备号为空!");
|
||||
}
|
||||
|
||||
@@ -893,6 +893,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
celldto.setCreate_time(now);
|
||||
StorageCell entity = ConvertUtil.convert(celldto, StorageCell.class);
|
||||
storageCellMapper.insert(entity);
|
||||
storageCells.add(celldto);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1015,6 +1015,21 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
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) {
|
||||
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
@@ -1053,6 +1068,21 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
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) {
|
||||
paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
|
||||
@@ -216,9 +216,9 @@ public class XgAgvCarDeviceDriver extends AbstractDeviceDriver implements Device
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
try{
|
||||
try {
|
||||
getAgvStatus();
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
message = "获取机器人状态报错";
|
||||
}
|
||||
String isError;
|
||||
@@ -248,8 +248,8 @@ public class XgAgvCarDeviceDriver extends AbstractDeviceDriver implements Device
|
||||
map.put("message", message);
|
||||
map.put("agv_task_type", taskType);
|
||||
map.put("unconfirmed_reloc", unconfirmed_reloc ? "未确认定位" : "正常");
|
||||
map.put("unlock", unlock == 0 ? "控制权在core手上" : unlock == 1 ? "控制权被其他人抢走" : unlock == 2 ?"控制权没有被抢占" : "未知");
|
||||
|
||||
map.put("unlock", unlock == 0 ? "控制权在core手上" : unlock == 1 ? "控制权被其他人抢走" : unlock == 2 ? "控制权没有被抢占" : "未知");
|
||||
map.put("move_2","有货");
|
||||
JSONObject jo = new JSONObject(map);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@@ -66,18 +66,11 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号open:" + last_open + "->" + open);
|
||||
}
|
||||
if (close != last_close) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号close:" + last_close + "->" + close);
|
||||
if(close ==1 ){
|
||||
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_close = close;
|
||||
last_toClose = toClose;
|
||||
@@ -86,11 +79,15 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
|
||||
public void writing(String param, String value) {
|
||||
// String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
// + "." + param;
|
||||
// Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
// itemMap.put(to_param, Integer.parseInt(value));
|
||||
|
||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + param;
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_param, Integer.parseInt(value));
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("下发多个电气信号" + itemMap)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
try {
|
||||
this.toDoorCommandControl.control(param,value);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -304,6 +304,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
logServer.deviceExecuteLog(this.device_code,"","","申请套管");
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(device_code + "当前mode值为:" + mode)
|
||||
@@ -317,6 +318,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_ONE);
|
||||
//气涨轴尺寸
|
||||
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);
|
||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
@@ -399,6 +405,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
logServer.deviceExecuteLog(this.device_code,"","","套管完成");
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(device_code + "当前mode值为:" + mode)
|
||||
@@ -415,6 +422,14 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
applyPlugPullSiteRequest.setWeight2(String.valueOf(weight2));
|
||||
applyPlugPullSiteRequest.setMaterial2(String.valueOf(material2));
|
||||
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);
|
||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
@@ -432,8 +447,8 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
map.put("to_command", 99);
|
||||
this.writing(map);
|
||||
requireSucess = true;
|
||||
message = "申请套管失败";
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请套管反馈失败,返回参数:" + applyPlugPullSitResponse);
|
||||
message = "套管完成失败";
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "反馈套管完成失败,返回参数:" + applyPlugPullSitResponse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,6 +463,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
logServer.deviceExecuteLog(this.device_code,"","","拔轴完成");
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(device_code + "当前mode值为:" + mode)
|
||||
@@ -460,13 +476,18 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||
applyPlugPullSiteRequest.setBarcode(String.valueOf(barcode));
|
||||
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);
|
||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", mode);
|
||||
this.writing(map);
|
||||
requireSucess = true;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴,返回参数:" + applyPlugPullSitResponse);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴完成,返回参数:" + applyPlugPullSitResponse);
|
||||
message = "拔轴完成成功";
|
||||
} else {
|
||||
message = applyPlugPullSitResponse.getMessage();
|
||||
@@ -475,7 +496,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
this.writing(map);
|
||||
requireSucess = true;
|
||||
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);
|
||||
return;
|
||||
} else {
|
||||
logServer.deviceExecuteLog(this.device_code,"","","申请拔轴");
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(device_code + "当前mode值为:" + mode)
|
||||
@@ -501,6 +523,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||
applyPlugPullSiteRequest.setQzz_no(String.valueOf(barcode));
|
||||
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);
|
||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||
Map<String, String> data = applyPlugPullSitResponse.getData();
|
||||
@@ -558,6 +585,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
logServer.deviceExecuteLog(this.device_code,"","","缓存线已满,生成行架任务");
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(device_code + "当前mode值为:" + mode)
|
||||
@@ -570,19 +598,24 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||
applyPlugPullSiteRequest.setSize(String.valueOf(size));
|
||||
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);
|
||||
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", mode);
|
||||
this.writing(map);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴,返回参数:" + applyPlugPullSitResponse);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务,返回参数:" + applyPlugPullSitResponse);
|
||||
message = "生成行架任务成功";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
message = applyPlugPullSitResponse.getMessage();
|
||||
requireSucess = true;
|
||||
message = "申请行架任务失败";
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴反馈失败,返回参数:" + applyPlugPullSitResponse);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务失败,返回参数:" + applyPlugPullSitResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
map.put("feedMessage", feedMessage);
|
||||
map.put("driver_type", "siemens_conveyor");
|
||||
map.put("is_click", true);
|
||||
map.put("message", message);
|
||||
map.put("message", LangProcess.msg(message));
|
||||
map.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));
|
||||
map.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
||||
map.put("error", ErrorUtil.getDictDetail("bqhj_error_type", String.valueOf(this.getError())));
|
||||
|
||||
@@ -215,10 +215,16 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
|
||||
//反馈重量
|
||||
if (mode == 3 && action == 5 && move == 0 && StrUtil.isNotEmpty(sub_volume_no) && !requireSucess) {
|
||||
logServer.deviceExecuteLog(this.device_code,"","","反馈重量");
|
||||
ApplyfeedbackSubVolumeWeightRequest applyfeedbackSubVolumeWeightRequest = new ApplyfeedbackSubVolumeWeightRequest();
|
||||
ApplyfeedbackSubVolumeWeightResponse applyPlugPullSitResponse;
|
||||
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);
|
||||
if(applyPlugPullSitResponse.getCode() == CommonFinalParam.STATUS_OPEN){
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
|
||||
@@ -190,16 +190,16 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
// } else
|
||||
if (mode == 0) {
|
||||
this.setIsonline(false);
|
||||
message = "universal_off-line";
|
||||
message = LangProcess.msg("universal_off-line");
|
||||
//有报警
|
||||
} else if (error != 0) {
|
||||
this.setIserror(true);
|
||||
message = "universal_message3";
|
||||
message = LangProcess.msg("universal_message3");
|
||||
//无报警
|
||||
} else {
|
||||
this.setIsonline(true);
|
||||
this.setIserror(false);
|
||||
message = "universal_operation";
|
||||
message = LangProcess.msg("universal_operation");
|
||||
switch (mode) {
|
||||
case 1:
|
||||
log.debug("设备运转模式:等待工作");
|
||||
|
||||
@@ -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){
|
||||
Query termQuery = new TermQuery(new Term("method", (String) whereJson.get("method")));
|
||||
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);
|
||||
searcher.search(booleanQueryBuilder.build(), collector);
|
||||
@@ -177,17 +181,13 @@ public class LuceneServiceImpl implements LuceneService {
|
||||
for (ScoreDoc scoreDoc : scoreDocs) {
|
||||
Document doc = open.document(scoreDoc.doc);
|
||||
JSONObject object = new JSONObject();
|
||||
if (ObjectUtil.isNotEmpty(doc.get("method"))) {
|
||||
object.put("content", doc.get("fieldContent"));
|
||||
object.put("logTime", doc.get("logTime") );
|
||||
object.put("method", doc.get("method"));
|
||||
object.put("requestparam", doc.get("requestparam"));
|
||||
object.put("responseparam", doc.get("responseparam"));
|
||||
if (doc.get("fieldContent") != null) {
|
||||
list.add(object);
|
||||
}
|
||||
|
||||
|
||||
object.put("content", doc.get("fieldContent"));
|
||||
object.put("logTime", doc.get("logTime") );
|
||||
object.put("method", doc.get("method"));
|
||||
object.put("requestparam", doc.get("requestparam"));
|
||||
object.put("responseparam", doc.get("responseparam"));
|
||||
if (ObjectUtil.isNotEmpty(doc.get("fieldContent"))) {
|
||||
list.add(object);
|
||||
}
|
||||
}
|
||||
open.close();
|
||||
|
||||
@@ -22,6 +22,7 @@ export default {
|
||||
'Task': 'Task',
|
||||
'start_or_end': 'Origin Or Destination',
|
||||
'time': 'Time',
|
||||
'empty_shaft_position': 'Empty shaft position',
|
||||
'extension_field': 'Extension Field'
|
||||
},
|
||||
'select': {
|
||||
|
||||
@@ -22,6 +22,7 @@ export default {
|
||||
'Task': 'Tugas',
|
||||
'start_or_end': 'Asal Atau Tujuan',
|
||||
'time': 'Waktu',
|
||||
'empty_shaft_position': 'Posisi poros kosong',
|
||||
'extension_field': 'Bidang Perluasan'
|
||||
},
|
||||
'select': {
|
||||
|
||||
@@ -22,6 +22,7 @@ export default {
|
||||
'Task': '任务',
|
||||
'start_or_end': '起点或终点',
|
||||
'time': '时间段',
|
||||
'empty_shaft_position': '空轴位',
|
||||
'extension_field': '扩展字段'
|
||||
},
|
||||
'select': {
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="dbr_value2">
|
||||
<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 slot-scope="scope">
|
||||
<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)
|
||||
})
|
||||
},
|
||||
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() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="关联设备" prop="device_code" label-width="135px">
|
||||
<el-select
|
||||
v-model="form.link_device_code"
|
||||
@@ -89,7 +89,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
@@ -429,8 +429,21 @@
|
||||
<el-form-item :label="$t('task.txt_box.Vehicle_number')">
|
||||
<el-input v-model="form.vehicle_code" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="空轴位">
|
||||
<el-input v-model="form.empty_site" style="width: 370px;" @change="isDisabled=false" />
|
||||
<el-form-item :label="$t('task.txt_box.empty_shaft_position')">
|
||||
<el-select
|
||||
v-model="form.empty_site"
|
||||
style="width: 370px;"
|
||||
filterable
|
||||
clearable
|
||||
:placeholder="$t('task.txt_box.empty_shaft_position')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.empty_shaft_position"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('task.txt_box.extension_field')">
|
||||
<div>
|
||||
@@ -615,7 +628,7 @@ import i18n from '@/i18n'
|
||||
export default {
|
||||
name: 'Task',
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
dicts: ['task_status', 'task_type', 'agv_system_type', 'storage_task_type', 'kezhuan'],
|
||||
dicts: ['task_status', 'task_type', 'agv_system_type', 'storage_task_type', 'kezhuan', 'empty_shaft_position'],
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: i18n.t('task.txt_box.Task'), url: 'api/task', idField: 'task_id', sort: 'task_id,desc',
|
||||
@@ -677,6 +690,7 @@ export default {
|
||||
formDia: false,
|
||||
isDisabled: false,
|
||||
deviceList: [],
|
||||
empty_shaft_position: [],
|
||||
materialList: [],
|
||||
statusList: [],
|
||||
routeList: [],
|
||||
|
||||
@@ -8,14 +8,18 @@
|
||||
<!-- style="width: 200px;"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- />-->
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="query.method"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的方法名"
|
||||
style="width: 200px;"
|
||||
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
|
||||
v-model="query.requestparam"
|
||||
clearable
|
||||
@@ -104,7 +108,7 @@ export default {
|
||||
queryAddressCodeList().then(data => {
|
||||
this.methods = data.content
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
<!-- <el-table-column v-if="false" prop="id" label="id"/>-->
|
||||
<el-table-column prop="device_code" label="设备号" width="100px" />
|
||||
<el-table-column prop="device_code" label="设备号" width="120px" />
|
||||
<!-- <el-table-column prop="trace_id" label="链路追踪" /> -->
|
||||
<el-table-column prop="task_code" label="任务编号" width="100px" />
|
||||
<el-table-column prop="instruct_code" label="指令编号" width="100px" />
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
page: 0
|
||||
},
|
||||
query: {
|
||||
createTime: [new Date(new Date().setTime(new Date().getTime() - 3600 * 1000)), new Date(new Date().setTime(new Date().getTime() + 3600 * 1000))],
|
||||
createTime: [new Date(new Date().setTime(new Date().getTime() - 3600 * 1000)), new Date(new Date().setTime(new Date().getTime() + 3600 * 1000))]
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -641,7 +641,7 @@ export default {
|
||||
const obj = { name: i18n.t('monitor.click.AGV_power'), value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'move_2') {
|
||||
const obj = { name: i18n.t('monitor.click.station_photoelectric_signal'), value: data[val] }
|
||||
const obj = { name: i18n.t('monitor.click.post-station_photoelectric_signal'), value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'action_1') {
|
||||
const obj = { name: i18n.t('monitor.click.front_station_action_signal'), value: data[val] }
|
||||
|
||||
Reference in New Issue
Block a user