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 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 + "对应设备号为空!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -893,6 +893,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
|||||||
celldto.setCreate_time(now);
|
celldto.setCreate_time(now);
|
||||||
StorageCell entity = ConvertUtil.convert(celldto, StorageCell.class);
|
StorageCell entity = ConvertUtil.convert(celldto, StorageCell.class);
|
||||||
storageCellMapper.insert(entity);
|
storageCellMapper.insert(entity);
|
||||||
|
storageCells.add(celldto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -216,9 +216,9 @@ public class XgAgvCarDeviceDriver extends AbstractDeviceDriver implements Device
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject getDeviceStatusName() {
|
public JSONObject getDeviceStatusName() {
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
try{
|
try {
|
||||||
getAgvStatus();
|
getAgvStatus();
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
message = "获取机器人状态报错";
|
message = "获取机器人状态报错";
|
||||||
}
|
}
|
||||||
String isError;
|
String isError;
|
||||||
@@ -248,8 +248,8 @@ public class XgAgvCarDeviceDriver extends AbstractDeviceDriver implements Device
|
|||||||
map.put("message", message);
|
map.put("message", message);
|
||||||
map.put("agv_task_type", taskType);
|
map.put("agv_task_type", taskType);
|
||||||
map.put("unconfirmed_reloc", unconfirmed_reloc ? "未确认定位" : "正常");
|
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);
|
JSONObject jo = new JSONObject(map);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -729,7 +729,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
map.put("feedMessage", feedMessage);
|
map.put("feedMessage", feedMessage);
|
||||||
map.put("driver_type", "siemens_conveyor");
|
map.put("driver_type", "siemens_conveyor");
|
||||||
map.put("is_click", true);
|
map.put("is_click", true);
|
||||||
map.put("message", message);
|
map.put("message", LangProcess.msg(message));
|
||||||
map.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));
|
map.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));
|
||||||
map.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
map.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
||||||
map.put("error", ErrorUtil.getDictDetail("bqhj_error_type", String.valueOf(this.getError())));
|
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) {
|
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<>();
|
||||||
|
|||||||
@@ -190,16 +190,16 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
// } else
|
// } else
|
||||||
if (mode == 0) {
|
if (mode == 0) {
|
||||||
this.setIsonline(false);
|
this.setIsonline(false);
|
||||||
message = "universal_off-line";
|
message = LangProcess.msg("universal_off-line");
|
||||||
//有报警
|
//有报警
|
||||||
} else if (error != 0) {
|
} else if (error != 0) {
|
||||||
this.setIserror(true);
|
this.setIserror(true);
|
||||||
message = "universal_message3";
|
message = LangProcess.msg("universal_message3");
|
||||||
//无报警
|
//无报警
|
||||||
} else {
|
} else {
|
||||||
this.setIsonline(true);
|
this.setIsonline(true);
|
||||||
this.setIserror(false);
|
this.setIserror(false);
|
||||||
message = "universal_operation";
|
message = LangProcess.msg("universal_operation");
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 1:
|
case 1:
|
||||||
log.debug("设备运转模式:等待工作");
|
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){
|
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();
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export default {
|
|||||||
'Task': 'Task',
|
'Task': 'Task',
|
||||||
'start_or_end': 'Origin Or Destination',
|
'start_or_end': 'Origin Or Destination',
|
||||||
'time': 'Time',
|
'time': 'Time',
|
||||||
|
'empty_shaft_position': 'Empty shaft position',
|
||||||
'extension_field': 'Extension Field'
|
'extension_field': 'Extension Field'
|
||||||
},
|
},
|
||||||
'select': {
|
'select': {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export default {
|
|||||||
'Task': 'Tugas',
|
'Task': 'Tugas',
|
||||||
'start_or_end': 'Asal Atau Tujuan',
|
'start_or_end': 'Asal Atau Tujuan',
|
||||||
'time': 'Waktu',
|
'time': 'Waktu',
|
||||||
|
'empty_shaft_position': 'Posisi poros kosong',
|
||||||
'extension_field': 'Bidang Perluasan'
|
'extension_field': 'Bidang Perluasan'
|
||||||
},
|
},
|
||||||
'select': {
|
'select': {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export default {
|
|||||||
'Task': '任务',
|
'Task': '任务',
|
||||||
'start_or_end': '起点或终点',
|
'start_or_end': '起点或终点',
|
||||||
'time': '时间段',
|
'time': '时间段',
|
||||||
|
'empty_shaft_position': '空轴位',
|
||||||
'extension_field': '扩展字段'
|
'extension_field': '扩展字段'
|
||||||
},
|
},
|
||||||
'select': {
|
'select': {
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="关联设备" prop="device_code" label-width="135px">
|
<el-form-item label="关联设备" prop="device_code" label-width="135px">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.link_device_code"
|
v-model="form.link_device_code"
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -429,8 +429,21 @@
|
|||||||
<el-form-item :label="$t('task.txt_box.Vehicle_number')">
|
<el-form-item :label="$t('task.txt_box.Vehicle_number')">
|
||||||
<el-input v-model="form.vehicle_code" style="width: 370px;" @change="isDisabled=false" />
|
<el-input v-model="form.vehicle_code" style="width: 370px;" @change="isDisabled=false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="空轴位">
|
<el-form-item :label="$t('task.txt_box.empty_shaft_position')">
|
||||||
<el-input v-model="form.empty_site" style="width: 370px;" @change="isDisabled=false" />
|
<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>
|
||||||
<el-form-item :label="$t('task.txt_box.extension_field')">
|
<el-form-item :label="$t('task.txt_box.extension_field')">
|
||||||
<div>
|
<div>
|
||||||
@@ -615,7 +628,7 @@ import i18n from '@/i18n'
|
|||||||
export default {
|
export default {
|
||||||
name: 'Task',
|
name: 'Task',
|
||||||
components: { pagination, crudOperation, rrOperation },
|
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()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: i18n.t('task.txt_box.Task'), url: 'api/task', idField: 'task_id', sort: 'task_id,desc',
|
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,
|
formDia: false,
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
deviceList: [],
|
deviceList: [],
|
||||||
|
empty_shaft_position: [],
|
||||||
materialList: [],
|
materialList: [],
|
||||||
statusList: [],
|
statusList: [],
|
||||||
routeList: [],
|
routeList: [],
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
>
|
>
|
||||||
<!-- <el-table-column type="selection" width="55"/>-->
|
<!-- <el-table-column type="selection" width="55"/>-->
|
||||||
<!-- <el-table-column v-if="false" prop="id" label="id"/>-->
|
<!-- <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="trace_id" label="链路追踪" /> -->
|
||||||
<el-table-column prop="task_code" label="任务编号" width="100px" />
|
<el-table-column prop="task_code" label="任务编号" width="100px" />
|
||||||
<el-table-column prop="instruct_code" label="指令编号" width="100px" />
|
<el-table-column prop="instruct_code" label="指令编号" width="100px" />
|
||||||
@@ -53,7 +53,7 @@ export default {
|
|||||||
page: 0
|
page: 0
|
||||||
},
|
},
|
||||||
query: {
|
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] }
|
const obj = { name: i18n.t('monitor.click.AGV_power'), value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
} else if (val === 'move_2') {
|
} 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)
|
this.arr.push(obj)
|
||||||
} else if (val === 'action_1') {
|
} else if (val === 'action_1') {
|
||||||
const obj = { name: i18n.t('monitor.click.front_station_action_signal'), value: data[val] }
|
const obj = { name: i18n.t('monitor.click.front_station_action_signal'), value: data[val] }
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
|||||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
|
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
|
||||||
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
||||||
|
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||||
import org.nl.wms.pda.st.service.ProductInstorService;
|
import org.nl.wms.pda.st.service.ProductInstorService;
|
||||||
import org.nl.wms.sch.tasks.CutConveyorTask;
|
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||||
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
||||||
@@ -31,6 +32,7 @@ import org.redisson.api.RedissonClient;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -59,6 +61,8 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
|
|
||||||
private final WmsToAcsService wmsToAcsService;
|
private final WmsToAcsService wmsToAcsService;
|
||||||
|
|
||||||
|
private final LmsToMesService lmsToMesService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject boxQuery(JSONObject whereJson) {
|
public JSONObject boxQuery(JSONObject whereJson) {
|
||||||
String box_no = whereJson.getString("box_no");
|
String box_no = whereJson.getString("box_no");
|
||||||
@@ -194,6 +198,25 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
throw new BadRequestException("二期仓库木箱,请进行虚拟入库!");
|
throw new BadRequestException("二期仓库木箱,请进行虚拟入库!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重量阈值系统参数
|
||||||
|
double weight_sys = Double.parseDouble(SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("weight_sys").getValue());
|
||||||
|
// 木箱系统重量
|
||||||
|
double box_weight = sub_jo.getDoubleValue("box_weight");
|
||||||
|
// 木箱实称重重量
|
||||||
|
double real_weight = sub_jo.getDoubleValue("real_weight");
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(sub_jo.getString("real_weight"))) {
|
||||||
|
throw new BadRequestException("请先进行木箱称重校验!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断木箱毛重是否超标
|
||||||
|
if (NumberUtil.sub(box_weight, weight_sys) <= real_weight && NumberUtil.add(box_weight, weight_sys) >= real_weight) {
|
||||||
|
} else {
|
||||||
|
// 将木箱重量告知飞书
|
||||||
|
notifyMes(sub_jo);
|
||||||
|
throw new BadRequestException("重量不合格!系统重量浮动超过"+weight_sys+"KG,当前木称重重量:"+real_weight);
|
||||||
|
}
|
||||||
|
|
||||||
//判断是该包装计划是否存在长宽高
|
//判断是该包装计划是否存在长宽高
|
||||||
Double box_length = sub_jo.getDoubleValue("box_length");
|
Double box_length = sub_jo.getDoubleValue("box_length");
|
||||||
Double box_width = sub_jo.getDoubleValue("box_width");
|
Double box_width = sub_jo.getDoubleValue("box_width");
|
||||||
@@ -292,6 +315,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
throw new BadRequestException("请扫描内包间入库点位!");
|
throw new BadRequestException("请扫描内包间入库点位!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//创建二楼去一楼的任务
|
//创建二楼去一楼的任务
|
||||||
JSONObject form = new JSONObject();
|
JSONObject form = new JSONObject();
|
||||||
form.put("point_code1", point_code);
|
form.put("point_code1", point_code);
|
||||||
@@ -574,19 +598,71 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
JSONObject data = jsonObject.getJSONArray("data").getJSONObject(0);
|
JSONObject data = jsonObject.getJSONArray("data").getJSONObject(0);
|
||||||
double weight_now = NumberUtil.div(data.getDoubleValue("weight"), 10);
|
double weight_now = NumberUtil.div(data.getDoubleValue("weight"), 10);
|
||||||
|
|
||||||
// 获取系统参数
|
// 获取系统参数1
|
||||||
double weight_sys = Double.parseDouble(SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("weight_sys").getValue());
|
double weight_sys = Double.parseDouble(SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("weight_sys").getValue());
|
||||||
|
// 获取系统参数2
|
||||||
|
double weight_sys_2 = Double.parseDouble(SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("weight_sys_2").getValue());
|
||||||
|
|
||||||
// 查询子卷包装关系
|
// 查询子卷包装关系
|
||||||
JSONObject jsonSub = subTab.query("package_box_sn = '" + box_no + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("package_box_sn = '" + box_no + "'").uniqueResult(0);
|
||||||
double box_weight = jsonSub.getDoubleValue("box_weight");
|
double box_weight = jsonSub.getDoubleValue("box_weight");
|
||||||
|
|
||||||
if (NumberUtil.sub(box_weight, weight_sys) <= weight_now && NumberUtil.add(box_weight, weight_sys) >= weight_now) {
|
if (NumberUtil.sub(box_weight, weight_sys) <= weight_now && NumberUtil.add(box_weight, weight_sys) >= weight_now) {
|
||||||
jo.put("message", "重量合格!当前称重重量:"+weight_now);
|
// 校验重量上下付浮动是否超过2
|
||||||
|
if (NumberUtil.sub(box_weight, weight_sys_2) <= weight_now && NumberUtil.add(box_weight, weight_sys_2) >= weight_now) {
|
||||||
|
jo.put("message", "重量合格!当前称重重量:"+weight_now);
|
||||||
|
} else {
|
||||||
|
jo.put("message", "重量警告!系统重量浮动超过"+weight_sys_2+"KG,当前称重重量:"+weight_now);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
jo.put("message", "重量不合格!当前称重重量:"+weight_now);
|
jo.put("message", "重量不合格!系统重量浮动超过"+weight_sys+"KG,当前称重重量:"+weight_now);
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// 更新当前木箱实际重量
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("real_weight",weight_now);
|
||||||
|
subTab.update(json,"package_box_sn = '"+box_no+"'");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成输送任务时通知木箱重量不合格
|
||||||
|
* @param sub_jo {子卷包装关系对象}
|
||||||
|
*/
|
||||||
|
private void notifyMes(JSONObject sub_jo) {
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
|
||||||
|
// 飞书用户集合
|
||||||
|
JSONArray UserList = new JSONArray();
|
||||||
|
// 系统参数
|
||||||
|
String userList = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("USER_LIST_FEISHU_2").getValue();
|
||||||
|
|
||||||
|
String[] split = userList.split(",");
|
||||||
|
if (split.length > 0) {
|
||||||
|
for (String s : split) {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("User", s);
|
||||||
|
UserList.add(jo);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("User", "");
|
||||||
|
UserList.add(jo);
|
||||||
|
}
|
||||||
|
param.put("UserList", UserList);
|
||||||
|
// 标签code
|
||||||
|
param.put("Code", "ctp_AA65DNXr3svo");
|
||||||
|
|
||||||
|
// 组织标签内容
|
||||||
|
JSONObject content = new JSONObject();
|
||||||
|
double box_weight = NumberUtil.round(sub_jo.getDoubleValue("box_weight"), 2).doubleValue();
|
||||||
|
double real_weight = NumberUtil.round(sub_jo.getDoubleValue("real_weight"), 2).doubleValue();
|
||||||
|
|
||||||
|
content.put("title", "【LMS通知】木箱超重警告");
|
||||||
|
content.put("Message", "木箱号:"+sub_jo.getString("package_box_sn")+",系统木箱重量:"+box_weight+"KG,实际木箱重量:"+real_weight+"KG");
|
||||||
|
param.put("card", content);
|
||||||
|
|
||||||
|
// 调用mes接口
|
||||||
|
lmsToMesService.proudDayData(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user