Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -34,6 +34,7 @@ public class AgvWaitUtil {
|
|||||||
AcsToWmsService acsToWmsService;
|
AcsToWmsService acsToWmsService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@Lazy
|
||||||
InstructionService instructionService;
|
InstructionService instructionService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@@ -307,11 +307,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (paperTubePickSiteDeviceDriver.getMove() > 0 && paperTubePickSiteDeviceDriver.getAction() == 1
|
if (paperTubePickSiteDeviceDriver.getAction() == 1
|
||||||
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
||||||
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
||||||
}
|
}
|
||||||
@@ -478,11 +478,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (paperTubePickSiteDeviceDriver.getMove() == 0 && paperTubePickSiteDeviceDriver.getAction() == 1
|
if (paperTubePickSiteDeviceDriver.getAction() == 1
|
||||||
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足取货完成反馈,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足取货完成反馈,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
||||||
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
||||||
}
|
}
|
||||||
@@ -617,11 +617,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (paperTubePickSiteDeviceDriver.getMove() == 1 && paperTubePickSiteDeviceDriver.getAction() == 1
|
if (paperTubePickSiteDeviceDriver.getAction() == 1
|
||||||
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
||||||
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
||||||
}
|
}
|
||||||
@@ -792,10 +792,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (paperTubePickSiteDeviceDriver.getMove() == 0) {
|
if (paperTubePickSiteDeviceDriver.getAction() == 1
|
||||||
|
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
||||||
, paperTubePickSiteDeviceDriver.getError(), ikey);
|
, paperTubePickSiteDeviceDriver.getError(), ikey);
|
||||||
}
|
}
|
||||||
@@ -909,11 +910,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (paperTubePickSiteDeviceDriver.getMove() == 0 && paperTubePickSiteDeviceDriver.getAction() == 1
|
if (paperTubePickSiteDeviceDriver.getAction() == 1
|
||||||
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足放货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足放货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
||||||
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
||||||
}
|
}
|
||||||
@@ -1107,11 +1108,12 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (paperTubePickSiteDeviceDriver.getMove() == 1 && paperTubePickSiteDeviceDriver.getAction() == 1
|
if (paperTubePickSiteDeviceDriver.getAction() == 1
|
||||||
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
|
paperTubePickSiteDeviceDriver.setFlag(3);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},设备状态{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction()
|
||||||
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
, paperTubePickSiteDeviceDriver.getError(), paperTubePickSiteDeviceDriver.getMode(), ikey);
|
||||||
}
|
}
|
||||||
@@ -1237,7 +1239,8 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (paperTubePickSiteDeviceDriver.getMove() == 0) {
|
if (paperTubePickSiteDeviceDriver.getAction() == 1
|
||||||
|
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
@@ -1369,7 +1372,8 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (paperTubePickSiteDeviceDriver.getMove() > 0) {
|
if (paperTubePickSiteDeviceDriver.getAction() == 1
|
||||||
|
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + "光电信号:" + paperTubePickSiteDeviceDriver.getMove() + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
|
|||||||
@@ -183,18 +183,17 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
|||||||
|
|
||||||
} catch (Exception var17) {
|
} catch (Exception var17) {
|
||||||
var17.printStackTrace();
|
var17.printStackTrace();
|
||||||
feedMessage = var17.getMessage();
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol));
|
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == 0) {
|
if (mode == 0) {
|
||||||
this.setIsonline(false);
|
this.setIsonline(false);
|
||||||
message = "未联机";
|
message = "universal_off-line";
|
||||||
//有报警
|
//有报警
|
||||||
} else if (error != 0) {
|
} else if (error != 0) {
|
||||||
this.setIserror(true);
|
this.setIserror(true);
|
||||||
message = "有报警";
|
message = "universal_message3";
|
||||||
//无报警
|
//无报警
|
||||||
} else {
|
} else {
|
||||||
this.setIsonline(true);
|
this.setIsonline(true);
|
||||||
@@ -218,13 +217,13 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
|||||||
remark = "universal_no";
|
remark = "universal_no";
|
||||||
}
|
}
|
||||||
if (task != 0) {
|
if (task != 0) {
|
||||||
remark = LangProcess.msg("universal_remark4");
|
remark = "universal_remark4";
|
||||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||||
this.inst = null;
|
this.inst = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (requireSucess) {
|
if (requireSucess) {
|
||||||
remark = LangProcess.msg("universal_remark5");
|
remark = "universal_remark5";
|
||||||
}
|
}
|
||||||
this.setFeedMessage(remark);
|
this.setFeedMessage(remark);
|
||||||
//}
|
//}
|
||||||
@@ -261,7 +260,7 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
|||||||
applyManipulatorActionRequest.setQzz_no(String.valueOf(barcode));//气涨轴编码
|
applyManipulatorActionRequest.setQzz_no(String.valueOf(barcode));//气涨轴编码
|
||||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
if (applyManipulatorActionResponse.getCode() == 200) {
|
if (applyManipulatorActionResponse.getstatus() == 200) {
|
||||||
Map<String, String> data = applyManipulatorActionResponse.getData();
|
Map<String, String> data = applyManipulatorActionResponse.getData();
|
||||||
String point_code2 = data.get("point_code2");//目标站点
|
String point_code2 = data.get("point_code2");//目标站点
|
||||||
Device deviceByCode = deviceAppService.findDeviceByCode(point_code2);
|
Device deviceByCode = deviceAppService.findDeviceByCode(point_code2);
|
||||||
@@ -271,17 +270,20 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
|||||||
map.put("to_target", address);
|
map.put("to_target", address);
|
||||||
map.put("to_sub_volume_no", material_code);
|
map.put("to_sub_volume_no", material_code);
|
||||||
map.put("to_command", "1");
|
map.put("to_command", "1");
|
||||||
map.put("to_is_labeling",StrUtil.isNotEmpty(to_is_labeling)?"0":"1");
|
if (StrUtil.equals("1",to_is_labeling)){
|
||||||
|
map.put("to_is_labeling","1");
|
||||||
|
}else {
|
||||||
|
map.put("to_is_labeling","0");
|
||||||
|
}
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务,返回参数:" + applyManipulatorActionResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务,返回参数:" + applyManipulatorActionResponse);
|
||||||
message = "申请行架任务成功";
|
message = "universal_message12";
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
} else {
|
} else {
|
||||||
message = applyManipulatorActionResponse.getMessage();
|
|
||||||
map.put("to_command", 99);
|
map.put("to_command", 99);
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
message = "申请行架任务失败";
|
message = "universal_message13";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务反馈失败,返回参数:" + applyManipulatorActionResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务反馈失败,返回参数:" + applyManipulatorActionResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,10 +365,10 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
|||||||
map.put("isOnline", this.getIsonline());
|
map.put("isOnline", this.getIsonline());
|
||||||
map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||||
map.put("isError", this.getIserror());
|
map.put("isError", this.getIserror());
|
||||||
map.put("message", message);
|
map.put("message", LangProcess.msg(message));
|
||||||
/*jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
/*jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||||
jo.put("notCreateInstMessage",notCreateInstMessage);*/
|
jo.put("notCreateInstMessage",notCreateInstMessage);*/
|
||||||
map.put("feedMessage", feedMessage);
|
map.put("feedMessage", LangProcess.msg(feedMessage));
|
||||||
map.put("driver_type", "siemens_conveyor");
|
map.put("driver_type", "siemens_conveyor");
|
||||||
map.put("is_click", true);
|
map.put("is_click", true);
|
||||||
JSONObject jo = new JSONObject(map);
|
JSONObject jo = new JSONObject(map);
|
||||||
|
|||||||
@@ -278,13 +278,13 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
feedMessage = "universal_feedMessage1";
|
feedMessage = "universal_feedMessage1";
|
||||||
}
|
}
|
||||||
if (action != 5) {
|
if (action != 5) {
|
||||||
feedMessage = feedMessage + "two_message4";
|
feedMessage = "two_message4";
|
||||||
}
|
}
|
||||||
if (move != 1) {
|
if (move != 1) {
|
||||||
feedMessage = feedMessage + "universal_feedMessage7";
|
feedMessage = "universal_feedMessage7";
|
||||||
}
|
}
|
||||||
if (task == 0) {
|
if (task == 0) {
|
||||||
feedMessage = feedMessage + "universal_feedMessage8";
|
feedMessage = "universal_feedMessage8";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,7 +312,6 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
|
|
||||||
} catch (Exception var17) {
|
} catch (Exception var17) {
|
||||||
var17.printStackTrace();
|
var17.printStackTrace();
|
||||||
feedMessage = var17.getMessage();
|
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content("读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol))
|
.content("读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol))
|
||||||
@@ -350,21 +349,21 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
} else {
|
} else {
|
||||||
if (mode == 2) {
|
if (mode == 2) {
|
||||||
//if (!requireSucess) {
|
//if (!requireSucess) {
|
||||||
String remark = "未查找任务原因为:";
|
String remark = "universal_remark1";
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = remark + "工作模式(mode)不是待机状态";
|
remark = "universal_remark2";
|
||||||
}
|
}
|
||||||
if (move != 0) {
|
if (move != 0) {
|
||||||
remark = remark + "光电信号(move)为有货状态";
|
remark = "universal_remark3";
|
||||||
}
|
}
|
||||||
if (task != 0) {
|
if (task != 0) {
|
||||||
remark = remark + "当前上报任务号(task)应该为0";
|
remark = "universal_remark4";
|
||||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||||
this.inst = null;
|
this.inst = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (requireSucess) {
|
if (requireSucess) {
|
||||||
remark = remark + "右击该图标,将请求任务复位标记(requireSucess)改为否。";
|
remark ="universal_remark5";
|
||||||
}
|
}
|
||||||
this.setNotCreateTaskMessage(remark);
|
this.setNotCreateTaskMessage(remark);
|
||||||
//}
|
//}
|
||||||
@@ -420,10 +419,12 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
Device startDevice = deviceAppService.findDeviceByCode(startCode);
|
Device startDevice = deviceAppService.findDeviceByCode(startCode);
|
||||||
Device nextDevice = deviceAppService.findDeviceByCode(nextCode);
|
Device nextDevice = deviceAppService.findDeviceByCode(nextCode);
|
||||||
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
|
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
|
||||||
throw new BadRequestException(LangProcess.msg("device_checkAdd", startDevice.getDevice_code()));
|
notCreateInstMessage = "universal_notCreateInstMessage1";
|
||||||
|
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) {
|
if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) {
|
||||||
throw new BadRequestException(LangProcess.msg("device_checkAdd", nextDevice.getDevice_code()));
|
notCreateInstMessage = "universal_notCreateInstMessage1";
|
||||||
|
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||||
}
|
}
|
||||||
String startAddr = startDevice.getExtraValue().get("address").toString();
|
String startAddr = startDevice.getExtraValue().get("address").toString();
|
||||||
String nextAddr = nextDevice.getExtraValue().get("address").toString();
|
String nextAddr = nextDevice.getExtraValue().get("address").toString();
|
||||||
@@ -438,17 +439,23 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
Device startDevice2 = deviceAppService.findDeviceByCode(startCode2);
|
Device startDevice2 = deviceAppService.findDeviceByCode(startCode2);
|
||||||
Device nextDevice2 = deviceAppService.findDeviceByCode(nextCode2);
|
Device nextDevice2 = deviceAppService.findDeviceByCode(nextCode2);
|
||||||
if (ObjectUtil.isEmpty(startDevice2.getExtraValue().get("address"))) {
|
if (ObjectUtil.isEmpty(startDevice2.getExtraValue().get("address"))) {
|
||||||
throw new BadRequestException(LangProcess.msg("device_checkAdd", startDevice.getDevice_code()));
|
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(nextDevice2.getExtraValue().get("address"))) {
|
if (ObjectUtil.isEmpty(nextDevice2.getExtraValue().get("address"))) {
|
||||||
throw new BadRequestException(LangProcess.msg("device_checkAdd", nextDevice.getDevice_code()));
|
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||||
}
|
}
|
||||||
String start_addr2 = startDevice2.getExtraValue().get("address").toString();
|
String start_addr2 = startDevice2.getExtraValue().get("address").toString();
|
||||||
String next_addr2 = nextDevice2.getExtraValue().get("address").toString();
|
String next_addr2 = nextDevice2.getExtraValue().get("address").toString();
|
||||||
map.put("to_onset2", start_addr2);
|
map.put("to_onset2", start_addr2);
|
||||||
map.put("to_target2", next_addr2);
|
map.put("to_target2", next_addr2);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
this.writing(map);
|
this.writing(map);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||||
|
+ instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code()
|
||||||
|
+ ",指令终点:" + instruction.getNext_device_code() + ",指令执行失败:" + e.getMessage());
|
||||||
|
}
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@@ -500,33 +507,32 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
Device startDevice = deviceAppService.findDeviceByCode(instdto.getStart_device_code());
|
Device startDevice = deviceAppService.findDeviceByCode(instdto.getStart_device_code());
|
||||||
Device nextDevice = deviceAppService.findDeviceByCode(instdto.getNext_device_code());
|
Device nextDevice = deviceAppService.findDeviceByCode(instdto.getNext_device_code());
|
||||||
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
|
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
|
||||||
notCreateInstMessage = startDevice.getDevice_code() + LangProcess.msg("universal_notCreateInstMessage1");
|
notCreateInstMessage ="universal_notCreateInstMessage1";
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(startDevice.getDevice_code() + LangProcess.msg("universal_notCreateInstMessage1"))
|
.content(startDevice.getDevice_code() + "未设置电气调度号!")
|
||||||
.build();
|
.build();
|
||||||
logDto.setLog_level(2);
|
logDto.setLog_level(2);
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
throw new BadRequestException(LangProcess.msg("device_checkAdd", startDevice.getDevice_code()));
|
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) {
|
if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) {
|
||||||
notCreateInstMessage = nextDevice.getDevice_code() + LangProcess.msg("universal_notCreateInstMessage1");
|
notCreateInstMessage = "universal_notCreateInstMessage1";
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(nextDevice.getDevice_code() + LangProcess.msg("universal_notCreateInstMessage1"))
|
.content(nextDevice.getDevice_code() + "未设置电气调度号!")
|
||||||
.build();
|
.build();
|
||||||
logDto.setLog_level(2);
|
logDto.setLog_level(2);
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
throw new BadRequestException(LangProcess.msg("device_checkAdd", nextDevice.getDevice_code()));
|
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||||
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(LangProcess.msg("universal_message9") + e.getMessage())
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
.build();
|
.build();
|
||||||
logDto.setLog_level(2);
|
logDto.setLog_level(2);
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
@@ -549,10 +555,10 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
Device startDevice2 = deviceAppService.findDeviceByCode(startDeviceCode2);
|
Device startDevice2 = deviceAppService.findDeviceByCode(startDeviceCode2);
|
||||||
Device nextDevice2 = deviceAppService.findDeviceByCode(nextDeviceCode2);
|
Device nextDevice2 = deviceAppService.findDeviceByCode(nextDeviceCode2);
|
||||||
if (ObjectUtil.isEmpty(startDevice2.getExtraValue().get("address"))) {
|
if (ObjectUtil.isEmpty(startDevice2.getExtraValue().get("address"))) {
|
||||||
throw new BadRequestException(LangProcess.msg("device_checkAdd", startDevice2.getDevice_code()));
|
throw new BadRequestException("设备:" + startDevice2.getDevice_code() + "未设置电气调度号!");
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(nextDevice2.getExtraValue().get("address"))) {
|
if (ObjectUtil.isEmpty(nextDevice2.getExtraValue().get("address"))) {
|
||||||
throw new BadRequestException(LangProcess.msg("device_checkAdd", nextDevice2.getDevice_code()));
|
throw new BadRequestException("设备:" + nextDevice2.getDevice_code() + "未设置电气调度号!");
|
||||||
}
|
}
|
||||||
String start_addr2 = startDevice2.getExtraValue().get("address").toString();
|
String start_addr2 = startDevice2.getExtraValue().get("address").toString();
|
||||||
String next_addr2 = nextDevice2.getExtraValue().get("address").toString();
|
String next_addr2 = nextDevice2.getExtraValue().get("address").toString();
|
||||||
@@ -569,7 +575,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
notCreateInstMessage = "";
|
notCreateInstMessage = "";
|
||||||
notCreateTaskMessage = "";
|
notCreateTaskMessage = "";
|
||||||
} else {
|
} else {
|
||||||
notCreateInstMessage = "未找到关联设备的任务,指令无法创建";
|
notCreateInstMessage = "universal_notCreateInstMessage";
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -689,8 +695,8 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
|||||||
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||||
jo.put("isError", this.getIserror());
|
jo.put("isError", this.getIserror());
|
||||||
jo.put("message", LangProcess.msg(message));
|
jo.put("message", LangProcess.msg(message));
|
||||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
jo.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));
|
||||||
jo.put("notCreateInstMessage",notCreateInstMessage);
|
jo.put("notCreateInstMessage",LangProcess.msg(notCreateInstMessage));
|
||||||
jo.put("feedMessage", LangProcess.msg(feedMessage));
|
jo.put("feedMessage", LangProcess.msg(feedMessage));
|
||||||
jo.put("driver_type", "siemens_conveyor");
|
jo.put("driver_type", "siemens_conveyor");
|
||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.nl.acs.device_driver.two_conveyor.blanking_button;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -28,6 +29,7 @@ import org.nl.acs.monitor.DeviceStageMonitor;
|
|||||||
import org.nl.acs.opc.DeviceAppService;
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
import org.nl.acs.route.service.RouteLineService;
|
import org.nl.acs.route.service.RouteLineService;
|
||||||
import org.nl.acs.task.service.TaskService;
|
import org.nl.acs.task.service.TaskService;
|
||||||
|
import org.nl.acs.task.service.dto.TaskDto;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
@@ -35,10 +37,7 @@ import org.nl.config.lucene.service.dto.LuceneLogDto;
|
|||||||
import org.nl.system.service.param.ISysParamService;
|
import org.nl.system.service.param.ISysParamService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
/**
|
/**
|
||||||
* @author : TuQiang
|
* @author : TuQiang
|
||||||
* @date : 2024/3/14
|
* @date : 2024/3/14
|
||||||
@@ -102,7 +101,7 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
|||||||
Boolean iserror = false;
|
Boolean iserror = false;
|
||||||
|
|
||||||
|
|
||||||
String deviceCode;
|
String device_code;
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
|
|
||||||
@@ -118,7 +117,7 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
|
||||||
deviceCode = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
mode = this.itemProtocol.getItem_mode();
|
mode = this.itemProtocol.getItem_mode();
|
||||||
move = this.itemProtocol.getItem_move();
|
move = this.itemProtocol.getItem_move();
|
||||||
@@ -156,22 +155,31 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
|||||||
case 3:
|
case 3:
|
||||||
log.debug("运行中");
|
log.debug("运行中");
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 10:
|
||||||
// 表处下满料请求
|
// 表处下满料请求
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
applyTakeFullVolume();
|
boolean b = applyTake();
|
||||||
|
if (b) {
|
||||||
|
requireSucess = true;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
//表处上空轴请求
|
|
||||||
if (!requireSucess) {
|
|
||||||
applyTakeEmptyShaft();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
|
//表处上空轴请求
|
||||||
|
if (!requireSucess) {
|
||||||
|
boolean b = applyTake();
|
||||||
|
if (b) {
|
||||||
|
requireSucess = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
// 取消任务
|
// 取消任务
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
cancelTask();
|
boolean b = cancelTake();
|
||||||
|
if (b) {
|
||||||
|
requireSucess = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -184,110 +192,134 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
|||||||
lastMove = move;
|
lastMove = move;
|
||||||
lastAction = action;
|
lastAction = action;
|
||||||
lastError = error;
|
lastError = error;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private boolean cancelTake() {
|
||||||
* 表处下满料请求
|
Date date = new Date();
|
||||||
*/
|
boolean flag = false;
|
||||||
public synchronized void applyTakeFullVolume() {
|
if (date.getTime() - this.instructionRequireTime.getTime()
|
||||||
|
< (long) this.instructionRequireTimeOut) {
|
||||||
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instructionRequireTimeOut);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
String deviceCode = device_code + "_X";
|
||||||
|
//根据起点设备编号查询当前是否有就绪任务
|
||||||
|
TaskDto taskDto = taskserver.findByStartCodeAndReady(deviceCode);
|
||||||
|
if (ObjectUtil.isNotEmpty(taskDto)){
|
||||||
|
try {
|
||||||
|
taskserver.cancel(taskDto.getTask_id());
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("to_command", 9);
|
||||||
|
try {
|
||||||
|
this.writing(map);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发信号报错" + map)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(3);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
//根据终点设备编号查询当前是否有就绪任务
|
||||||
|
TaskDto dto = taskserver.findByEndCodeAndReady(deviceCode);
|
||||||
|
if (ObjectUtil.isNotEmpty(dto)){
|
||||||
|
try {
|
||||||
|
taskserver.cancel(dto.getTask_id());
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("to_command", 9);
|
||||||
|
try {
|
||||||
|
this.writing(map);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发信号报错" + map)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(3);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!flag){
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("to_command", 99);
|
||||||
|
try {
|
||||||
|
this.writing(map);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发信号报错" + map)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(3);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean applyTake() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instructionRequireTime.getTime()
|
if (date.getTime() - this.instructionRequireTime.getTime()
|
||||||
< (long) this.instructionRequireTimeOut) {
|
< (long) this.instructionRequireTimeOut) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instructionRequireTimeOut);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instructionRequireTimeOut);
|
||||||
return;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.instructionRequireTime = date;
|
JSONObject jo = new JSONObject();
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
jo.put("device_code", this.getDevice_code());
|
||||||
message = "two_message5";
|
if (this.mode==10) {
|
||||||
BlankingButtonRequest blankingButtonRequest = new BlankingButtonRequest();
|
jo.put("type",CommonFinalParam.TYPE_TWO);
|
||||||
blankingButtonRequest.setDevice_code(deviceCode);
|
|
||||||
blankingButtonRequest.setType(CommonFinalParam.TYPE_ONE);
|
|
||||||
BlankingButtonResponse response = acsToWmsService.applyBlankButtonTask(blankingButtonRequest);
|
|
||||||
if (ObjectUtil.isEmpty(response)) {
|
|
||||||
message = "two_message6";
|
|
||||||
} else {
|
|
||||||
if (response.getCode()== CommonFinalParam.STATUS_OPEN) {
|
|
||||||
this.writing("to_command","9");
|
|
||||||
message = "two_message7";
|
|
||||||
requireSucess = true;
|
|
||||||
} else {
|
|
||||||
requireSucess = false;
|
|
||||||
message = "two_message8";
|
|
||||||
this.writing("to_command","99");
|
|
||||||
}
|
}
|
||||||
|
if (this.mode==11) {
|
||||||
|
jo.put("type",CommonFinalParam.TYPE_THREE);
|
||||||
}
|
}
|
||||||
|
HttpResponse httpResponse = acsToWmsService.applyBlankButtonTask(jo);
|
||||||
|
JSONObject jsonObject = null;
|
||||||
|
if(ObjectUtil.isNotEmpty(httpResponse)){
|
||||||
|
String body = httpResponse.body();
|
||||||
|
jsonObject = JSONObject.parseObject(body);
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isNotNull(jsonObject) && jsonObject.getInteger("status") == 200){
|
||||||
|
Map map = new HashMap();
|
||||||
|
//反馈表处下满料请求
|
||||||
|
if (this.mode==10) {
|
||||||
|
map.put("to_command", 10);
|
||||||
|
}
|
||||||
|
//反馈表处上空轴请求
|
||||||
|
if (this.mode==11) {
|
||||||
|
map.put("to_command", 11);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
this.writing(map);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发信号报错" + map)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(3);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("反馈LMS表处按钮任务失败" + httpResponse.body())
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(3);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 取消任务
|
|
||||||
*/
|
|
||||||
public synchronized void cancelTask() {
|
|
||||||
Date date = new Date();
|
|
||||||
if (date.getTime() - this.instructionRequireTime.getTime()
|
|
||||||
< (long) this.instructionRequireTimeOut) {
|
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instructionRequireTimeOut);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
this.instructionRequireTime = date;
|
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
|
||||||
message = "two_message9";
|
|
||||||
BlankingButtonRequest blankingButtonRequest = new BlankingButtonRequest();
|
|
||||||
blankingButtonRequest.setDevice_code(deviceCode);
|
|
||||||
blankingButtonRequest.setType(CommonFinalParam.TYPE_SIX);
|
|
||||||
BlankingButtonResponse response = acsToWmsService.applyBlankButtonTask(blankingButtonRequest);
|
|
||||||
if (ObjectUtil.isEmpty(response)) {
|
|
||||||
message = "two_message10";
|
|
||||||
} else {
|
|
||||||
if (response.getCode()== CommonFinalParam.STATUS_OPEN) {
|
|
||||||
this.writing("to_command","10");
|
|
||||||
message = "two_message11";
|
|
||||||
requireSucess = true;
|
|
||||||
} else {
|
|
||||||
requireSucess = false;
|
|
||||||
message = "two_message12";
|
|
||||||
this.writing("to_command","99");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 表处上空轴请求
|
|
||||||
*/
|
|
||||||
public synchronized void applyTakeEmptyShaft() {
|
|
||||||
Date date = new Date();
|
|
||||||
if (date.getTime() - this.instructionRequireTime.getTime()
|
|
||||||
< (long) this.instructionRequireTimeOut) {
|
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instructionRequireTimeOut);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
this.instructionRequireTime = date;
|
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
|
||||||
message = "two_message13";
|
|
||||||
BlankingButtonRequest blankingButtonRequest = new BlankingButtonRequest();
|
|
||||||
blankingButtonRequest.setDevice_code(deviceCode);
|
|
||||||
blankingButtonRequest.setType(CommonFinalParam.TYPE_TWO);
|
|
||||||
BlankingButtonResponse response = acsToWmsService.applyBlankButtonTask(blankingButtonRequest);
|
|
||||||
if (ObjectUtil.isEmpty(response)) {
|
|
||||||
message = "two_message14";
|
|
||||||
} else {
|
|
||||||
if (response.getCode()== CommonFinalParam.STATUS_OPEN) {
|
|
||||||
this.writing("to_command","10");
|
|
||||||
message = "two_message15";
|
|
||||||
requireSucess = true;
|
|
||||||
} else {
|
|
||||||
requireSucess = false;
|
|
||||||
message = "two_message16";
|
|
||||||
this.writing("to_command","99");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void writing(String param, String value) {
|
public void writing(String param, String value) {
|
||||||
|
|
||||||
@@ -298,9 +330,9 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
|||||||
|
|
||||||
itemMap.put(to_param, Integer.parseInt(value));
|
itemMap.put(to_param, Integer.parseInt(value));
|
||||||
this.control(itemMap);
|
this.control(itemMap);
|
||||||
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(deviceCode)
|
.device_code(device_code)
|
||||||
.content("下发多个电气信号" + itemMap)
|
.content("下发多个电气信号" + itemMap)
|
||||||
.build();
|
.build();
|
||||||
logDto.setLog_level(3);
|
logDto.setLog_level(3);
|
||||||
@@ -369,4 +401,28 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
|||||||
public void setDeviceStatus(JSONObject data) {
|
public void setDeviceStatus(JSONObject data) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getToParam() {
|
||||||
|
return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + ".";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writing(Map<String, Object> map) throws Exception {
|
||||||
|
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||||
|
Map<String, Object> itemMap = new LinkedHashMap<>();
|
||||||
|
map.forEach((key, value) -> {
|
||||||
|
if (ObjectUtil.isNotEmpty(value)) {
|
||||||
|
itemMap.put(getToParam() + key, value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (ObjectUtil.isNotEmpty(itemMap)) {
|
||||||
|
this.checkcontrol(itemMap);
|
||||||
|
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(3);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
Boolean iserror = false;
|
Boolean iserror = false;
|
||||||
|
|
||||||
|
|
||||||
String deviceCode;
|
String device_code;
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
|
||||||
deviceCode = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
mode = this.itemProtocol.getItem_mode();
|
mode = this.itemProtocol.getItem_mode();
|
||||||
move = this.itemProtocol.getItem_move();
|
move = this.itemProtocol.getItem_move();
|
||||||
@@ -206,7 +206,7 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
||||||
message = "two_message17";
|
message = "two_message17";
|
||||||
ApplyGreenFoilButtonRequest applyGreenFoilButtonRequest = new ApplyGreenFoilButtonRequest();
|
ApplyGreenFoilButtonRequest applyGreenFoilButtonRequest = new ApplyGreenFoilButtonRequest();
|
||||||
applyGreenFoilButtonRequest.setDevice_code(deviceCode);
|
applyGreenFoilButtonRequest.setDevice_code(device_code);
|
||||||
applyGreenFoilButtonRequest.setType(String.valueOf(mode));
|
applyGreenFoilButtonRequest.setType(String.valueOf(mode));
|
||||||
ApplyGreenFoilButtonResponse response = acsToWmsService.applyGreenFoilButtonTask(applyGreenFoilButtonRequest);
|
ApplyGreenFoilButtonResponse response = acsToWmsService.applyGreenFoilButtonTask(applyGreenFoilButtonRequest);
|
||||||
if (ObjectUtil.isEmpty(response)) {
|
if (ObjectUtil.isEmpty(response)) {
|
||||||
@@ -242,9 +242,9 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
|
|
||||||
itemMap.put(to_param, Integer.parseInt(value));
|
itemMap.put(to_param, Integer.parseInt(value));
|
||||||
this.control(itemMap);
|
this.control(itemMap);
|
||||||
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(deviceCode)
|
.device_code(device_code)
|
||||||
.content("下发多个电气信号" + itemMap)
|
.content("下发多个电气信号" + itemMap)
|
||||||
.build();
|
.build();
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
Boolean iserror = false;
|
Boolean iserror = false;
|
||||||
|
|
||||||
|
|
||||||
String deviceCode;
|
String device_code;
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
|
||||||
deviceCode = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
mode = this.itemProtocol.getItem_mode();
|
mode = this.itemProtocol.getItem_mode();
|
||||||
move = this.itemProtocol.getItem_move();
|
move = this.itemProtocol.getItem_move();
|
||||||
@@ -139,9 +139,9 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(deviceCode)
|
.device_code(device_code)
|
||||||
.content("下发多个电气信号" + itemMap)
|
.content("下发多个电气信号" + itemMap)
|
||||||
.build();
|
.build();
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
@@ -163,7 +163,7 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
|
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(this.deviceCode)
|
.device_code(this.device_code)
|
||||||
.content("下发多个电气信号" + itemMap)
|
.content("下发多个电气信号" + itemMap)
|
||||||
.build();
|
.build();
|
||||||
logDto.setLog_level(3);
|
logDto.setLog_level(3);
|
||||||
|
|||||||
@@ -213,29 +213,26 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
|
|
||||||
if (mode == 0) {
|
if (mode == 0) {
|
||||||
this.setIsonline(false);
|
this.setIsonline(false);
|
||||||
message = LangProcess.msg("universal_off-line");
|
message = "universal_off-line";
|
||||||
//有报警
|
//有报警
|
||||||
} else if (error != 0) {
|
} else if (error != 0) {
|
||||||
this.setIserror(true);
|
this.setIserror(true);
|
||||||
message = LangProcess.msg("universal_message3");
|
message ="universal_message3";
|
||||||
//无报警
|
//无报警
|
||||||
} else {
|
} else {
|
||||||
this.setIsonline(true);
|
this.setIsonline(true);
|
||||||
this.setIserror(false);
|
this.setIserror(false);
|
||||||
message = "";
|
message = "";
|
||||||
if(requireSucess){
|
|
||||||
message = LangProcess.msg("universal_actionMessage5");
|
|
||||||
}
|
|
||||||
//插拔轴机工位申请任务
|
//插拔轴机工位申请任务
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 1:
|
case 1:
|
||||||
log.debug(LangProcess.msg("universal_stand-alone"));
|
log.debug("设备运转模式:等待工作");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
log.info(LangProcess.msg("universal_standby"));
|
log.info("待机");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
log.info(LangProcess.msg("universal_operation"));
|
log.info("运行中");
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
@@ -307,6 +304,13 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code+"当前mode值为:" + mode)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(2);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "当前mode值为:" + mode);
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||||
@@ -314,7 +318,13 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
//气涨轴尺寸
|
//气涨轴尺寸
|
||||||
applyPlugPullSiteRequest.setSize(String.valueOf(size));
|
applyPlugPullSiteRequest.setSize(String.valueOf(size));
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getCode() == CommonFinalParam.STATUS_OPEN) {
|
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||||
|
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("申请贴标成功:" + applyPlugPullSitResponse.getData())
|
||||||
|
.build();
|
||||||
|
logDto2.setLog_level(4);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||||
Map<String, String> data = applyPlugPullSitResponse.getData();
|
Map<String, String> data = applyPlugPullSitResponse.getData();
|
||||||
String number = data.get("number");
|
String number = data.get("number");
|
||||||
String leftSize = data.get("leftSize");
|
String leftSize = data.get("leftSize");
|
||||||
@@ -370,6 +380,13 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code+"当前mode值为:" + mode)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(2);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "当前mode值为:" + mode);
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||||
@@ -380,7 +397,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
applyPlugPullSiteRequest.setMaterial2(String.valueOf(material2));
|
applyPlugPullSiteRequest.setMaterial2(String.valueOf(material2));
|
||||||
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_TWO);
|
applyPlugPullSiteRequest.setType(CommonFinalParam.TYPE_TWO);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getCode() == CommonFinalParam.STATUS_OPEN) {
|
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||||
this.writeSignal(mode);
|
this.writeSignal(mode);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "反馈套管完成,返回参数:" + applyPlugPullSitResponse);
|
logServer.deviceExecuteLog(this.device_code, "", "", "反馈套管完成,返回参数:" + applyPlugPullSitResponse);
|
||||||
message = "套管完成成功";
|
message = "套管完成成功";
|
||||||
@@ -406,13 +423,20 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code+"当前mode值为:" + mode)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(2);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "当前mode值为:" + mode);
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
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);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getCode() == 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);
|
||||||
@@ -440,13 +464,20 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code+"当前mode值为:" + mode)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(2);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "当前mode值为:" + mode);
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
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);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getCode() == CommonFinalParam.STATUS_OPEN) {
|
if (applyPlugPullSitResponse.getstatus() == CommonFinalParam.STATUS_OPEN) {
|
||||||
Map<String, String> data = applyPlugPullSitResponse.getData();
|
Map<String, String> data = applyPlugPullSitResponse.getData();
|
||||||
//拔管1物料
|
//拔管1物料
|
||||||
Object to_material3 = data.get("currentLeft");
|
Object to_material3 = data.get("currentLeft");
|
||||||
@@ -502,13 +533,20 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content(device_code+"当前mode值为:" + mode)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(2);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "当前mode值为:" + mode);
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
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);
|
||||||
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest);
|
||||||
if (applyPlugPullSitResponse.getCode() == 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);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
|
|||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.one_manipulator.box_storage_manipulator.InteractionJsonDTO;
|
import org.nl.acs.device_driver.one_manipulator.box_storage_manipulator.InteractionJsonDTO;
|
||||||
|
import org.nl.acs.device_driver.two_conveyor.plug_pull_device_site.PlugPullDeviceSiteDeviceDriver;
|
||||||
import org.nl.acs.device_driver.two_conveyor.pull_head_manipulator.ItemProtocol;
|
import org.nl.acs.device_driver.two_conveyor.pull_head_manipulator.ItemProtocol;
|
||||||
import org.nl.acs.history.ErrorUtil;
|
import org.nl.acs.history.ErrorUtil;
|
||||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||||
@@ -379,6 +380,14 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ObjectUtil.isEmpty(task)) {
|
if (!ObjectUtil.isEmpty(task)) {
|
||||||
|
String nextDeviceCode = task.getNext_device_code();
|
||||||
|
Device device = deviceAppService.findDeviceByCode(nextDeviceCode);
|
||||||
|
PlugPullDeviceSiteDeviceDriver plugPullDeviceSiteDeviceDriver;
|
||||||
|
if (device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||||
|
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) device.getDeviceDriver();
|
||||||
|
if (plugPullDeviceSiteDeviceDriver.getMode() != 2 && plugPullDeviceSiteDeviceDriver.getMove() != 0)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
String taskId = task.getTask_id();
|
String taskId = task.getTask_id();
|
||||||
String taskCode = task.getTask_code();
|
String taskCode = task.getTask_code();
|
||||||
String vehicleCode = task.getVehicle_code();
|
String vehicleCode = task.getVehicle_code();
|
||||||
@@ -387,7 +396,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
String startDeviceCode = task.getStart_device_code();
|
String startDeviceCode = task.getStart_device_code();
|
||||||
String routePlanCode = task.getRoute_plan_code();
|
String routePlanCode = task.getRoute_plan_code();
|
||||||
String nextPointCode = task.getNext_point_code();
|
String nextPointCode = task.getNext_point_code();
|
||||||
String nextDeviceCode = task.getNext_device_code();
|
|
||||||
|
|
||||||
Instruction instdto = new Instruction();
|
Instruction instdto = new Instruction();
|
||||||
instdto.setInstruction_id(IdUtil.simpleUUID());
|
instdto.setInstruction_id(IdUtil.simpleUUID());
|
||||||
|
|||||||
@@ -224,10 +224,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
remark = "universal_remark2";
|
remark = "universal_remark2";
|
||||||
}
|
}
|
||||||
if (move1 != 0) {
|
if (move1 != 0) {
|
||||||
remark = remark + "universal_remark6";
|
remark = "universal_remark6";
|
||||||
}
|
}
|
||||||
if (move2 != 0) {
|
if (move2 != 0) {
|
||||||
remark = remark + "universal_remark7";
|
remark = "universal_remark7";
|
||||||
}
|
}
|
||||||
if (task != 0) {
|
if (task != 0) {
|
||||||
remark = "universal_remark4";
|
remark = "universal_remark4";
|
||||||
@@ -292,19 +292,19 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
feedMessage = "universal_feedMessage6";
|
feedMessage = "universal_feedMessage6";
|
||||||
} else {
|
} else {
|
||||||
if (mode != 3) {
|
if (mode != 3) {
|
||||||
feedMessage += "universal_feedMessage1";
|
feedMessage = "universal_feedMessage1";
|
||||||
}
|
}
|
||||||
if (action != 9) {
|
if (action != 9) {
|
||||||
feedMessage += "universal_feedMessage9";
|
feedMessage = "universal_feedMessage9";
|
||||||
}
|
}
|
||||||
if (move1 != 0) {
|
if (move1 != 0) {
|
||||||
feedMessage += "universal_feedMessage10";
|
feedMessage = "universal_feedMessage10";
|
||||||
}
|
}
|
||||||
if (move2 != 0) {
|
if (move2 != 0) {
|
||||||
feedMessage += "universal_feedMessage11";
|
feedMessage = "universal_feedMessage11";
|
||||||
}
|
}
|
||||||
if (task == 0) {
|
if (task == 0) {
|
||||||
feedMessage += "universal_feedMessage4";
|
feedMessage = "universal_feedMessage4";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -321,7 +321,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
} else {
|
} else {
|
||||||
this.instruction_head_time = date;
|
this.instruction_head_time = date;
|
||||||
String link_device_code = String.valueOf(this.getDevice().getExtraValue().get("link_device_code"));
|
String link_device_code = String.valueOf(this.getDevice().getExtraValue().get("link_device_code"));
|
||||||
Device device = deviceAppservice.findDeviceByCode(link_device_code);
|
List<String> extraDeviceCodes = getExtraDeviceCodes1(link_device_code);
|
||||||
|
String linkCode = extraDeviceCodes.get(0);
|
||||||
|
Device device = deviceAppservice.findDeviceByCode(linkCode);
|
||||||
SlitTwoManipulatorDeviceDriver slitTwoManipulatorDeviceDriver;
|
SlitTwoManipulatorDeviceDriver slitTwoManipulatorDeviceDriver;
|
||||||
if (device.getDeviceDriver() instanceof SlitTwoManipulatorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof SlitTwoManipulatorDeviceDriver) {
|
||||||
slitTwoManipulatorDeviceDriver = (SlitTwoManipulatorDeviceDriver) device.getDeviceDriver();
|
slitTwoManipulatorDeviceDriver = (SlitTwoManipulatorDeviceDriver) device.getDeviceDriver();
|
||||||
@@ -338,6 +340,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//没有生成异常取放货工位的任务 就生成正常关联取放货工位的任务
|
||||||
//抓取工位
|
//抓取工位
|
||||||
if (ObjectUtil.isEmpty(getDeviceCodeList)) {
|
if (ObjectUtil.isEmpty(getDeviceCodeList)) {
|
||||||
getDeviceCodeList = this.getExtraDeviceCodes("get_device_code");
|
getDeviceCodeList = this.getExtraDeviceCodes("get_device_code");
|
||||||
@@ -396,6 +399,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
} else {
|
} else {
|
||||||
this.instruction_head_time = date;
|
this.instruction_head_time = date;
|
||||||
//抓取工位
|
//抓取工位
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(getDeviceCodeList)) {
|
if (ObjectUtil.isEmpty(getDeviceCodeList)) {
|
||||||
getDeviceCodeList = this.getExtraDeviceCodes("error_get_device_code");
|
getDeviceCodeList = this.getExtraDeviceCodes("error_get_device_code");
|
||||||
}
|
}
|
||||||
@@ -426,7 +430,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
for (int j = 0; j < taskDtoList.size(); j++) {
|
for (int j = 0; j < taskDtoList.size(); j++) {
|
||||||
task = taskDtoList.get(j);
|
task = taskDtoList.get(j);
|
||||||
|
|
||||||
// 9 行架任务
|
// 6 行架任务
|
||||||
if (ObjectUtil.isNotEmpty(task) && !StrUtil.equals(task.getTask_type(), "6")) {
|
if (ObjectUtil.isNotEmpty(task) && !StrUtil.equals(task.getTask_type(), "6")) {
|
||||||
task = null;
|
task = null;
|
||||||
continue;
|
continue;
|
||||||
@@ -717,6 +721,26 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
|
|
||||||
|
|
||||||
//将扩展表中的字符串数组数据转换成集合
|
//将扩展表中的字符串数组数据转换成集合
|
||||||
|
public List<String> getExtraDeviceCodes1(String extraValue) {
|
||||||
|
if (StrUtil.isEmpty(extraValue)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
String devicesString = extraValue.substring(1, extraValue.length() - 1);
|
||||||
|
List<String> devicesList = new ArrayList<>();
|
||||||
|
String[] devices = devicesString.split(",");
|
||||||
|
for (int i = 0; i < devices.length; i++) {
|
||||||
|
String s = devices[i].replace("\"", "").replace("\"", "");
|
||||||
|
devicesList.add(s);
|
||||||
|
}
|
||||||
|
return devicesList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将扩展表中的字符串数据转换成集合
|
||||||
|
*
|
||||||
|
* @param extraName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<String> getExtraDeviceCodes(String extraName) {
|
public List<String> getExtraDeviceCodes(String extraName) {
|
||||||
String extraValue = (String) this.getDevice().getExtraValue().get(extraName);
|
String extraValue = (String) this.getDevice().getExtraValue().get(extraName);
|
||||||
@@ -839,7 +863,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
jo.put("message", message);
|
jo.put("message", message);
|
||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
jo.put("driver_type", "slit_two_manipulator");
|
jo.put("driver_type", "slit_two_manipulator");
|
||||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
jo.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));
|
||||||
jo.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
jo.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
||||||
jo.put("feedMessage", LangProcess.msg(feedMessage));
|
jo.put("feedMessage", LangProcess.msg(feedMessage));
|
||||||
return jo;
|
return jo;
|
||||||
|
|||||||
@@ -110,4 +110,12 @@ public class WmsToAcsController {
|
|||||||
return new ResponseEntity<>(wmstoacsService.putWeightAction(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(wmstoacsService.putWeightAction(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getTubeMsg")
|
||||||
|
@Log("wms下发废箔重量")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> getTubeMes(@RequestBody String whereJson) throws Exception {
|
||||||
|
return new ResponseEntity<>(wmstoacsService.getTubeMes(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public interface AcsToWmsService {
|
|||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
BlankingButtonResponse applyBlankButtonTask(BlankingButtonRequest param);
|
HttpResponse applyBlankButtonTask(JSONObject param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 向lms申请反馈
|
* 向lms申请反馈
|
||||||
|
|||||||
@@ -117,4 +117,5 @@ public interface WmsToAcsService {
|
|||||||
*/
|
*/
|
||||||
Map<String, Object> putWeightAction(String jsonObject) throws Exception;
|
Map<String, Object> putWeightAction(String jsonObject) throws Exception;
|
||||||
|
|
||||||
|
Map<String, Object> getTubeMes(String whereJson) throws Exception;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -381,8 +381,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApplyGreenFoilButtonResponse applyGreenFoilButtonTask(ApplyGreenFoilButtonRequest param) {
|
public ApplyGreenFoilButtonResponse applyGreenFoilButtonTask(ApplyGreenFoilButtonRequest param) {
|
||||||
try {
|
|
||||||
MDC.put(log_file_type, log_type);
|
|
||||||
ApplyGreenFoilButtonResponse applyGreenFoilButtonResponse = new ApplyGreenFoilButtonResponse();
|
ApplyGreenFoilButtonResponse applyGreenFoilButtonResponse = new ApplyGreenFoilButtonResponse();
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||||
@@ -409,49 +407,46 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
}
|
}
|
||||||
return applyGreenFoilButtonResponse;
|
return applyGreenFoilButtonResponse;
|
||||||
} finally {
|
|
||||||
MDC.remove(log_file_type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlankingButtonResponse applyBlankButtonTask(BlankingButtonRequest param) {
|
public HttpResponse applyBlankButtonTask(JSONObject param) {
|
||||||
|
HttpResponse result = null;
|
||||||
try {
|
try {
|
||||||
MDC.put(log_file_type, log_type);
|
|
||||||
BlankingButtonResponse blankingButtonResponse = new BlankingButtonResponse();
|
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
|
||||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||||
AddressDto addressDto = addressService.findByCode("applyButtonTask");
|
AddressDto addressDto = addressService.findByCode("applyButtonTask");
|
||||||
String methods_url = addressDto.getMethods_url();
|
String methods_url = addressDto.getMethods_url();
|
||||||
String url = wmsUrl + methods_url;
|
String url = wmsUrl + methods_url;
|
||||||
log.info("BlankingButtonRequest----请求参数{}", param);
|
log.info("applyBlankButtonTask----反馈表处按钮请求路径{}", url);
|
||||||
try {
|
try {
|
||||||
// String result = "";
|
result = HttpRequest.post(url)
|
||||||
String result = HttpRequest.post(url)
|
.header("Authorization", token)
|
||||||
.body(JSON.toJSONString(param))
|
.body(String.valueOf(param))
|
||||||
.execute().body();
|
.execute();
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
||||||
log.info("BlankingButtonResponse----返回参数{}", result);
|
|
||||||
blankingButtonResponse = JSONObject.toJavaObject(jsonObject, BlankingButtonResponse.class);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
JSONObject map = new JSONObject();
|
String message = e.getMessage();
|
||||||
map.put("status", 400);
|
log.info("applyBlankButtonTask----反馈表处按钮请求失败{}", message);
|
||||||
map.put("message", e.getMessage());
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyBlankButtonTask", String.valueOf(result.getStatus()),
|
||||||
return JSONObject.toJavaObject(map, BlankingButtonResponse.class);
|
JSON.toJSONString(result),
|
||||||
}
|
String.valueOf(result.body()), "反馈下发表处任务报错");
|
||||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"BlankingButtonRequest", String.valueOf(blankingButtonResponse.getCode()),
|
|
||||||
JSON.toJSONString(param), String.valueOf(blankingButtonResponse.getMessage()), "ACS向LMS申请表处下料位按钮任务");
|
|
||||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
}
|
}
|
||||||
return blankingButtonResponse;
|
log.info("applyBlankButtonTask - 反馈表处按钮{}", result.body());
|
||||||
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyBlankButtonTask", String.valueOf(result.getStatus()),
|
||||||
|
JSON.toJSONString(result.body()),
|
||||||
|
String.valueOf(result.body()), "反馈下发表处任务");
|
||||||
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
|
return result;
|
||||||
} finally {
|
} finally {
|
||||||
MDC.remove(log_file_type);
|
MDC.remove(log_file_type);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApplyPlugPullSitResponse applyPlugPullSiteRequest(ApplyPlugPullSiteRequest param) {
|
public ApplyPlugPullSitResponse applyPlugPullSiteRequest(ApplyPlugPullSiteRequest param) {
|
||||||
log.info("向LMS申请反馈,请求参数{}",param);
|
log.info("向LMS申请反馈,请求参数{}",param);
|
||||||
|
String result = "";
|
||||||
try {
|
try {
|
||||||
MDC.put(log_file_type, log_type);
|
MDC.put(log_file_type, log_type);
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse = new ApplyPlugPullSitResponse();
|
ApplyPlugPullSitResponse applyPlugPullSitResponse = new ApplyPlugPullSitResponse();
|
||||||
@@ -462,19 +457,25 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String url = wmsUrl + methods_url;
|
String url = wmsUrl + methods_url;
|
||||||
log.info("ApplyPlugPullSiteRequest----请求参数:{}", JSONObject.toJSONString(param));
|
log.info("ApplyPlugPullSiteRequest----请求参数:{}", JSONObject.toJSONString(param));
|
||||||
try {
|
try {
|
||||||
// String result = "";
|
//
|
||||||
String result = HttpRequest.post(url)
|
result = HttpRequest.post(url)
|
||||||
.body(JSON.toJSONString(param))
|
.body(JSON.toJSONString(param))
|
||||||
.execute().body();
|
.execute().body();
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
log.info("ApplyPlugPullSitResponse----返回参数{}", result);
|
log.info("ApplyPlugPullSitResponse----返回参数{}", result);
|
||||||
applyPlugPullSitResponse = JSONObject.toJavaObject(jsonObject, ApplyPlugPullSitResponse.class);
|
applyPlugPullSitResponse = JSONObject.toJavaObject(jsonObject, ApplyPlugPullSitResponse.class);
|
||||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"ApplyPlugPullSiteRequest", String.valueOf(applyPlugPullSitResponse.getCode()),
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "ApplyPlugPullSiteRequest", String.valueOf(applyPlugPullSitResponse.getstatus()),
|
||||||
JSON.toJSONString(param), String.valueOf(result), "ACS向LMS申请"
|
JSON.toJSONString(param), String.valueOf(result), "ACS向LMS申请"
|
||||||
+ ("1".equals(param.getType()) ? "套轴" : "2".equals(param.getType()) ? "套轴完成" : "3".equals(param.getType()) ? "拔轴完成" :
|
+ ("1".equals(param.getType()) ? "套轴" : "2".equals(param.getType()) ? "套轴完成" : "3".equals(param.getType()) ? "拔轴完成" :
|
||||||
"4".equals(param.getType()) ? "拔轴" : "缓存线已满,生成行架任务"));
|
"4".equals(param.getType()) ? "拔轴" : "缓存线已满,生成行架任务"));
|
||||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
log.info("ApplyPlugPullSitResponse----返回参数{}", result);
|
||||||
|
applyPlugPullSitResponse = JSONObject.toJavaObject(jsonObject, ApplyPlugPullSitResponse.class);
|
||||||
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "ApplyPlugPullSiteRequest", String.valueOf(applyPlugPullSitResponse.getstatus()),
|
||||||
|
JSON.toJSONString(param), String.valueOf(result), "ACS向LMS申请失败");
|
||||||
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("status", 400);
|
map.put("status", 400);
|
||||||
map.put("message", e.getMessage());
|
map.put("message", e.getMessage());
|
||||||
@@ -491,8 +492,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
@Override
|
@Override
|
||||||
public ApplyfeedbackSubVolumeWeightResponse applyfeedbackSubVolumeWeight(ApplyfeedbackSubVolumeWeightRequest param) {
|
public ApplyfeedbackSubVolumeWeightResponse applyfeedbackSubVolumeWeight(ApplyfeedbackSubVolumeWeightRequest param) {
|
||||||
log.info("向LMS申请反馈,请求参数{}", param);
|
log.info("向LMS申请反馈,请求参数{}", param);
|
||||||
try {
|
String result = "";
|
||||||
MDC.put(log_file_type, log_type);
|
|
||||||
ApplyfeedbackSubVolumeWeightResponse applyfeedbackSubVolumeWeightResponse = new ApplyfeedbackSubVolumeWeightResponse();
|
ApplyfeedbackSubVolumeWeightResponse applyfeedbackSubVolumeWeightResponse = new ApplyfeedbackSubVolumeWeightResponse();
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||||
@@ -501,14 +501,16 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String url = wmsUrl + methods_url;
|
String url = wmsUrl + methods_url;
|
||||||
log.info("applyfeedbackSubVolumeWeightRequest----请求参数:{}", JSONObject.toJSONString(param));
|
log.info("applyfeedbackSubVolumeWeightRequest----请求参数:{}", JSONObject.toJSONString(param));
|
||||||
try {
|
try {
|
||||||
// String result = "";
|
//
|
||||||
String result = HttpRequest.post(url)
|
result = HttpRequest.post(url)
|
||||||
.body(JSON.toJSONString(param))
|
.body(JSON.toJSONString(param))
|
||||||
.execute().body();
|
.execute().body();
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
log.info("applyfeedbackSubVolumeWeightRequest----返回参数{}", result);
|
log.info("applyfeedbackSubVolumeWeightRequest----返回参数{}", result);
|
||||||
applyfeedbackSubVolumeWeightResponse = JSONObject.toJavaObject(jsonObject, ApplyfeedbackSubVolumeWeightResponse.class);
|
applyfeedbackSubVolumeWeightResponse = JSONObject.toJavaObject(jsonObject, ApplyfeedbackSubVolumeWeightResponse.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
log.info("applyfeedbackSubVolumeWeightRequest----返回参数{}", result);
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("status", 400);
|
map.put("status", 400);
|
||||||
map.put("message", e.getMessage());
|
map.put("message", e.getMessage());
|
||||||
@@ -519,16 +521,12 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
}
|
}
|
||||||
return applyfeedbackSubVolumeWeightResponse;
|
return applyfeedbackSubVolumeWeightResponse;
|
||||||
} finally {
|
|
||||||
MDC.remove(log_file_type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApplyManipulatorActionResponse applyManipulatorActionRequest(ApplyManipulatorActionRequest param) {
|
public ApplyManipulatorActionResponse applyManipulatorActionRequest(ApplyManipulatorActionRequest param) {
|
||||||
log.info("向LMS申请反馈,请求参数{}", param);
|
log.info("向LMS申请反馈,请求参数{}", param);
|
||||||
try {
|
String result = "";
|
||||||
MDC.put(log_file_type, log_type);
|
|
||||||
ApplyManipulatorActionResponse applyManipulatorActionResponse = new ApplyManipulatorActionResponse();
|
ApplyManipulatorActionResponse applyManipulatorActionResponse = new ApplyManipulatorActionResponse();
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||||
@@ -537,28 +535,29 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String url = wmsUrl + methods_url;
|
String url = wmsUrl + methods_url;
|
||||||
log.info("ApplyManipulatorActionRequest----请求参数:{}", JSONObject.toJSONString(param));
|
log.info("ApplyManipulatorActionRequest----请求参数:{}", JSONObject.toJSONString(param));
|
||||||
try {
|
try {
|
||||||
// String result = "";
|
result = HttpRequest.post(url)
|
||||||
String result = HttpRequest.post(url)
|
|
||||||
.body(JSON.toJSONString(param))
|
.body(JSON.toJSONString(param))
|
||||||
.execute().body();
|
.execute().body();
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
log.info("ApplyManipulatorActionResponse----返回参数{}", result);
|
log.info("ApplyManipulatorActionResponse----返回参数{}", result);
|
||||||
applyManipulatorActionResponse = JSONObject.toJavaObject(jsonObject, ApplyManipulatorActionResponse.class);
|
applyManipulatorActionResponse = JSONObject.toJavaObject(jsonObject, ApplyManipulatorActionResponse.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
log.info("ApplyManipulatorActionResponse----返回参数{}", result);
|
||||||
|
applyManipulatorActionResponse = JSONObject.toJavaObject(jsonObject, ApplyManipulatorActionResponse.class);
|
||||||
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "ApplyManipulatorActionRequest", String.valueOf(applyManipulatorActionResponse.getCode()),
|
||||||
|
JSON.toJSONString(param), String.valueOf(applyManipulatorActionResponse), "ACS向LMS申请反馈子卷重量失败");
|
||||||
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("status", 400);
|
map.put("status", 400);
|
||||||
map.put("message", e.getMessage());
|
map.put("message", e.getMessage());
|
||||||
return JSONObject.toJavaObject(map, ApplyManipulatorActionResponse.class);
|
return JSONObject.toJavaObject(map, ApplyManipulatorActionResponse.class);
|
||||||
}
|
}
|
||||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "ApplyManipulatorActionRequest", String.valueOf(applyManipulatorActionResponse.getCode()),
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "ApplyManipulatorActionRequest", String.valueOf(applyManipulatorActionResponse.getCode()),
|
||||||
JSON.toJSONString(param), String.valueOf(applyManipulatorActionResponse), "ACS向LMS申请反馈子卷重量");
|
JSON.toJSONString(param), String.valueOf(applyManipulatorActionResponse), "ACS向LMS申请反馈子卷重量成功");
|
||||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
}
|
}
|
||||||
return applyManipulatorActionResponse;
|
return applyManipulatorActionResponse;
|
||||||
} finally {
|
|
||||||
MDC.remove(log_file_type);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import org.nl.acs.device_driver.one_conveyor.fold_disc_site.FoldDiscSiteDeviceDr
|
|||||||
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.BoxPackageManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.BoxPackageManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.conveyor.box_palletizing_manipulator.BoxPalletizingManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.conveyor.box_palletizing_manipulator.BoxPalletizingManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.paper_tube_device2.PaperTubeConveyor2DeviceDriver;
|
import org.nl.acs.device_driver.paper_tube_device2.PaperTubeConveyor2DeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.paper_tube_pick_site.PaperTubePickSiteDeviceDriver;
|
||||||
import org.nl.acs.device_driver.two_conveyor.blank_manipulator.BlankManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.two_conveyor.blank_manipulator.BlankManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.HongXiangStationDeviceDriver;
|
import org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.HongXiangStationDeviceDriver;
|
||||||
import org.nl.acs.device_driver.two_conveyor.hongxiang_device.HongXiangConveyorDeviceDriver;
|
import org.nl.acs.device_driver.two_conveyor.hongxiang_device.HongXiangConveyorDeviceDriver;
|
||||||
@@ -56,10 +57,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@@ -78,6 +76,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private InstructionService instructionService;
|
private InstructionService instructionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LuceneExecuteLogService luceneLogService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AcsToLiKuService acsToLiKuService;
|
private AcsToLiKuService acsToLiKuService;
|
||||||
|
|
||||||
@@ -489,9 +490,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PutActionResponse putAction(String jsonObject) throws Exception {
|
public PutActionResponse putAction(String jsonObject) throws Exception {
|
||||||
try {
|
|
||||||
MDC.put(log_file_type, log_type);
|
|
||||||
log.info("putAction--------------:输入参数" + jsonObject);
|
log.info("putAction--------------:输入参数" + jsonObject);
|
||||||
|
String date = new Date().toString();
|
||||||
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, jsonObject, date+"LMS反馈ACS动作信号");
|
||||||
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
JSONArray datas = JSONArray.parseArray(jsonObject);
|
JSONArray datas = JSONArray.parseArray(jsonObject);
|
||||||
PutActionResponse response = new PutActionResponse();
|
PutActionResponse response = new PutActionResponse();
|
||||||
JSONArray errArr = new JSONArray();
|
JSONArray errArr = new JSONArray();
|
||||||
@@ -548,21 +550,19 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
}
|
}
|
||||||
response.setStatus(200);
|
response.setStatus(200);
|
||||||
response.setMessage("success");
|
response.setMessage("success");
|
||||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"putAction", String.valueOf(response.getCode()),
|
LuceneLogDto luceneLogDto1 = new LuceneLogDto(4, "putAction", String.valueOf(response.getCode()),
|
||||||
jsonObject, String.valueOf(response), "LMS下发动作");
|
jsonObject, String.valueOf(response), "LMS下发动作");
|
||||||
luceneExecuteLogService.interfaceExecuteLog(luceneLogDto);
|
luceneExecuteLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
log.info("putAction--------------:输出参数:" + response);
|
log.info("putAction--------------:输出参数:" + response);
|
||||||
return response;
|
return response;
|
||||||
} finally {
|
|
||||||
MDC.remove(log_file_type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> putWeightAction(String jsonObject) throws Exception {
|
public Map<String, Object> putWeightAction(String jsonObject) throws Exception {
|
||||||
try {
|
|
||||||
MDC.put(log_file_type, log_type);
|
|
||||||
log.info("putWeightAction--------------:输入参数" + jsonObject);
|
log.info("putWeightAction--------------:输入参数" + jsonObject);
|
||||||
|
String date = new Date().toString();
|
||||||
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, jsonObject, date+"LMS反馈ACS废箔重量");
|
||||||
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
JSONArray datas = JSONArray.parseArray(jsonObject);
|
JSONArray datas = JSONArray.parseArray(jsonObject);
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
for (int i = 0; i < datas.size(); i++) {
|
for (int i = 0; i < datas.size(); i++) {
|
||||||
@@ -616,9 +616,52 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
resultJson.put("data", jo);
|
resultJson.put("data", jo);
|
||||||
log.info("putWeightAction--------------:输出参数" + resultJson.toString());
|
log.info("putWeightAction--------------:输出参数" + resultJson.toString());
|
||||||
return resultJson;
|
return resultJson;
|
||||||
} finally {
|
|
||||||
MDC.remove(log_file_type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getTubeMes(String jsonObject) throws Exception {
|
||||||
|
log.info("getTubeMes--------------:输入参数" + jsonObject);
|
||||||
|
String date = new Date().toString();
|
||||||
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4, jsonObject, date+"获取管芯信息");
|
||||||
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
|
JSONArray datas = JSONArray.parseArray(jsonObject);
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
for (int i = 0; i < datas.size(); i++) {
|
||||||
|
JSONObject data = (JSONObject) datas.get(i);
|
||||||
|
String device_code = data.getString("device_code");
|
||||||
|
String to_material = data.getString("to_material");
|
||||||
|
String to_spec = data.getString("to_spec");
|
||||||
|
String to_qty = data.getString("to_qty");
|
||||||
|
|
||||||
|
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||||
|
if (ObjectUtil.isEmpty(device)) {
|
||||||
|
throw new Exception("未找到对应设备:" + device_code);
|
||||||
|
}
|
||||||
|
PaperTubePickSiteDeviceDriver paperTubePickSiteDeviceDriver;
|
||||||
|
if (device.getDeviceDriver() instanceof WasteFoilWeighingStationDriver) {
|
||||||
|
paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver();
|
||||||
|
try {
|
||||||
|
//反馈管芯信息
|
||||||
|
Thread.sleep(1000); //休眠1秒
|
||||||
|
while (true) {
|
||||||
|
if (paperTubePickSiteDeviceDriver.getMode() == 2 && paperTubePickSiteDeviceDriver.getFlag() == 3) {
|
||||||
|
jo.put("to_material", to_material);//当前重量
|
||||||
|
jo.put("to_spec", to_spec);//上一次重量
|
||||||
|
jo.put("to_qty", to_qty);//重量差
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
resultJson.put("status", HttpStatus.OK.value());
|
||||||
|
resultJson.put("message", "操作成功");
|
||||||
|
resultJson.put("data", jo);
|
||||||
|
log.info("putWeightAction--------------:输出参数" + resultJson.toString());
|
||||||
|
return resultJson;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.nl.acs.instruction.service.dto.InstructionQueryParam;
|
|||||||
import org.nl.acs.common.base.PageInfo;
|
import org.nl.acs.common.base.PageInfo;
|
||||||
import org.nl.acs.common.base.CommonService;
|
import org.nl.acs.common.base.CommonService;
|
||||||
import org.nl.acs.instruction.domain.Instruction;
|
import org.nl.acs.instruction.domain.Instruction;
|
||||||
|
import org.nl.acs.task.service.dto.TaskDto;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -333,6 +334,22 @@ public interface InstructionService extends CommonService<InstructionMybatis> {
|
|||||||
*/
|
*/
|
||||||
Instruction findByDeviceCodeFromCache(String devicecode);
|
Instruction findByDeviceCodeFromCache(String devicecode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据起点设备编号查询当前是否有就绪指令
|
||||||
|
*
|
||||||
|
* @param device_code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Instruction findByStartCodeAndReady(String device_code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据终点设备编号查询当前是否有就绪指令
|
||||||
|
*
|
||||||
|
* @param device_code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Instruction findByEndCodeAndReady(String device_code);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据终点查询指令
|
* 根据终点查询指令
|
||||||
|
|||||||
@@ -1725,6 +1725,24 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Instruction findByStartCodeAndReady(String device_code) {
|
||||||
|
Optional<Instruction> optionalInstruction = instructions.stream()
|
||||||
|
.filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), device_code)
|
||||||
|
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()))
|
||||||
|
.findFirst();
|
||||||
|
return optionalInstruction.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Instruction findByEndCodeAndReady(String device_code) {
|
||||||
|
Optional<Instruction> optionalInstruction = instructions.stream()
|
||||||
|
.filter(instruction -> StrUtil.equals(instruction.getNext_device_code(), device_code)
|
||||||
|
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()))
|
||||||
|
.findFirst();
|
||||||
|
return optionalInstruction.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Instruction> findByDeviceCodes(Instruction instruction1, Boolean flay) {
|
public List<Instruction> findByDeviceCodes(Instruction instruction1, Boolean flay) {
|
||||||
List<Instruction> instructionList = new ArrayList<>();
|
List<Instruction> instructionList = new ArrayList<>();
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ public class DeviceStageMonitorServiceImpl implements DeviceStageMonitorService
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getData(JSONArray jsonArray) throws Exception {
|
public JSONArray
|
||||||
|
getData(JSONArray jsonArray) throws Exception {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
JSONObject obj = new JSONObject();
|
JSONObject obj = new JSONObject();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public @interface Query {
|
|||||||
// Dong ZhaoYang 2017/8/7 查询方式
|
// Dong ZhaoYang 2017/8/7 查询方式
|
||||||
Type type() default Type.EQUAL;
|
Type type() default Type.EQUAL;
|
||||||
|
|
||||||
/**
|
/**r
|
||||||
* 连接查询的属性名,如User类中的dept
|
* 连接查询的属性名,如User类中的dept
|
||||||
*/
|
*/
|
||||||
String joinName() default "";
|
String joinName() default "";
|
||||||
|
|||||||
@@ -92,13 +92,18 @@ public class LuceneLogDto {
|
|||||||
final String requestparam, final String responseparam, final String content) {
|
final String requestparam, final String responseparam, final String content) {
|
||||||
super();
|
super();
|
||||||
this.log_level = log_level;
|
this.log_level = log_level;
|
||||||
this.method = method;
|
|
||||||
this.status_code = status;
|
|
||||||
this.requestparam = requestparam;
|
this.requestparam = requestparam;
|
||||||
this.responseparam = responseparam;
|
this.responseparam = responseparam;
|
||||||
this.content = content;
|
this.content = content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LuceneLogDto(final Integer log_level, final String requestparam, final String content) {
|
||||||
|
super();
|
||||||
|
this.log_level = log_level;
|
||||||
|
this.requestparam = requestparam;
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
public LuceneLogDto(final String device_code, final String remark) {
|
public LuceneLogDto(final String device_code, final String remark) {
|
||||||
super();
|
super();
|
||||||
this.device_code = device_code;
|
this.device_code = device_code;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ spring:
|
|||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lzhl_two_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lzhl_two_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_two_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.10.67}:${DB_PORT:3306}/${DB_NAME:lzhl_acs2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||||
|
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
# password: ${DB_PWD:Root.123456}
|
# password: ${DB_PWD:Root.123456}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ universal_message8=\u8BFB\u53D6\u4FE1\u53F7\u503C\u65F6\u51FA\u73B0\u5F02\u5E38:
|
|||||||
universal_message9=\u521B\u5EFA\u6307\u4EE4\u65F6\u51FA\u73B0\u5F02\u5E38:
|
universal_message9=\u521B\u5EFA\u6307\u4EE4\u65F6\u51FA\u73B0\u5F02\u5E38:
|
||||||
universal_message10=\u4E0B\u53D1\u591A\u4E2A\u7535\u6C14\u4FE1\u53F7:
|
universal_message10=\u4E0B\u53D1\u591A\u4E2A\u7535\u6C14\u4FE1\u53F7:
|
||||||
universal_message11=\u4FE1\u53F7\u8FDE\u63A5\u5F02\u5E38\uFF01
|
universal_message11=\u4FE1\u53F7\u8FDE\u63A5\u5F02\u5E38\uFF01
|
||||||
|
universal_message12=\u7533\u8BF7\u884C\u67B6\u4EFB\u52A1\u6210\u529F\uFF01
|
||||||
|
universal_message13=\u7533\u8BF7\u884C\u67B6\u4EFB\u52A1\u5931\u8D25\uFF01
|
||||||
universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001
|
universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001
|
||||||
universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001
|
universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001
|
||||||
universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001
|
universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ universal_message8=An exception occurred when reading the signal value:
|
|||||||
universal_message9=An exception occurred while creating the directive
|
universal_message9=An exception occurred while creating the directive
|
||||||
universal_message10=Multiple electrical signals are issued
|
universal_message10=Multiple electrical signals are issued
|
||||||
universal_message11=The signal connection is abnormal!
|
universal_message11=The signal connection is abnormal!
|
||||||
|
universal_message12=Successfully applied for shelving task!
|
||||||
|
universal_message13=Application for shelving task failed!
|
||||||
universal_feedMessage1=mode is not in the running state
|
universal_feedMessage1=mode is not in the running state
|
||||||
universal_feedMessage2=action signal (action signal) is not a release completed status
|
universal_feedMessage2=action signal (action signal) is not a release completed status
|
||||||
universal_feedMessage3=Photoelectric signal (move) is not out of stock
|
universal_feedMessage3=Photoelectric signal (move) is not out of stock
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ universal_message7=Misi tercapai ...
|
|||||||
universal_message8=Pengecualian terjadi saat membaca nilai sinyal:
|
universal_message8=Pengecualian terjadi saat membaca nilai sinyal:
|
||||||
universal_message9=Pengecualian terjadi saat membuat direktif
|
universal_message9=Pengecualian terjadi saat membuat direktif
|
||||||
universal_message10=Beberapa sinyal listrik dikeluarkan
|
universal_message10=Beberapa sinyal listrik dikeluarkan
|
||||||
|
universal_message12=Aplikasi untuk tugas perancah berhasil!
|
||||||
|
universal_message13=Gagal melamar tugas memeras!
|
||||||
universal_message11=Koneksi sinyal tidak normal!
|
universal_message11=Koneksi sinyal tidak normal!
|
||||||
universal_feedMessage1=Mode kerja tidak untuk mode dalam mode
|
universal_feedMessage1=Mode kerja tidak untuk mode dalam mode
|
||||||
universal_feedMessage2=Sinyal aksi tidak lengkap untuk penempatan
|
universal_feedMessage2=Sinyal aksi tidak lengkap untuk penempatan
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ universal_message8=\u8BFB\u53D6\u4FE1\u53F7\u503C\u65F6\u51FA\u73B0\u5F02\u5E38:
|
|||||||
universal_message9=\u521B\u5EFA\u6307\u4EE4\u65F6\u51FA\u73B0\u5F02\u5E38:
|
universal_message9=\u521B\u5EFA\u6307\u4EE4\u65F6\u51FA\u73B0\u5F02\u5E38:
|
||||||
universal_message10=\u4E0B\u53D1\u591A\u4E2A\u7535\u6C14\u4FE1\u53F7
|
universal_message10=\u4E0B\u53D1\u591A\u4E2A\u7535\u6C14\u4FE1\u53F7
|
||||||
universal_message11=\u4FE1\u53F7\u8FDE\u63A5\u5F02\u5E38\uFF01
|
universal_message11=\u4FE1\u53F7\u8FDE\u63A5\u5F02\u5E38\uFF01
|
||||||
|
universal_message12=\u7533\u8BF7\u884C\u67B6\u4EFB\u52A1\u6210\u529F\uFF01
|
||||||
|
universal_message13=\u7533\u8BF7\u884C\u67B6\u4EFB\u52A1\u5931\u8D25\uFF01
|
||||||
universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001
|
universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001
|
||||||
universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001
|
universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001
|
||||||
universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001
|
universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export default {
|
|||||||
'Starting_layer': 'Starting Layer',
|
'Starting_layer': 'Starting Layer',
|
||||||
'Destination': 'Destination',
|
'Destination': 'Destination',
|
||||||
'Destination2': 'Destination 2',
|
'Destination2': 'Destination 2',
|
||||||
|
'Interaction_json': 'Interaction Fields',
|
||||||
'Ending_column': 'Ending Column',
|
'Ending_column': 'Ending Column',
|
||||||
'Ending_layer': 'Ending Layer',
|
'Ending_layer': 'Ending Layer',
|
||||||
'Description': 'Description',
|
'Description': 'Description',
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export default {
|
|||||||
'Starting_layer': 'Lapisan Awal',
|
'Starting_layer': 'Lapisan Awal',
|
||||||
'Destination': 'Tujuan',
|
'Destination': 'Tujuan',
|
||||||
'Destination2': 'Tujuan 2',
|
'Destination2': 'Tujuan 2',
|
||||||
|
'Interaction_json': 'Bidang Interaksi',
|
||||||
'Ending_column': 'Kolom Akhir',
|
'Ending_column': 'Kolom Akhir',
|
||||||
'Ending_layer': 'Lapisan Akhir',
|
'Ending_layer': 'Lapisan Akhir',
|
||||||
'Description': 'Deskripsi',
|
'Description': 'Deskripsi',
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export default {
|
|||||||
'Starting_layer': '起点-层',
|
'Starting_layer': '起点-层',
|
||||||
'Destination': '终点',
|
'Destination': '终点',
|
||||||
'Destination2': '终点2',
|
'Destination2': '终点2',
|
||||||
|
'Interaction_json': '交互字段',
|
||||||
'Ending_column': '终点-列',
|
'Ending_column': '终点-列',
|
||||||
'Ending_layer': '终点-层',
|
'Ending_layer': '终点-层',
|
||||||
'Description': '描述信息',
|
'Description': '描述信息',
|
||||||
|
|||||||
@@ -295,6 +295,7 @@
|
|||||||
<el-table-column prop="next_point_code" :label="$t('task.select.Destination')" />
|
<el-table-column prop="next_point_code" :label="$t('task.select.Destination')" />
|
||||||
<el-table-column prop="start_point_code2" :label="$t('TaskRecord.table.Starting_point_two')" :min-width="flexWidth('start_point_code2',crud.data,$t('TaskRecord.table.Starting_point_two'))" />
|
<el-table-column prop="start_point_code2" :label="$t('TaskRecord.table.Starting_point_two')" :min-width="flexWidth('start_point_code2',crud.data,$t('TaskRecord.table.Starting_point_two'))" />
|
||||||
<el-table-column prop="next_point_code2" :label="$t('TaskRecord.table.Endpoint_two')" :min-width="flexWidth('next_point_code2',crud.data,$t('TaskRecord.table.Endpoint_two'))" />
|
<el-table-column prop="next_point_code2" :label="$t('TaskRecord.table.Endpoint_two')" :min-width="flexWidth('next_point_code2',crud.data,$t('TaskRecord.table.Endpoint_two'))" />
|
||||||
|
<el-table-column prop="interaction_json" :label="$t('task.select.Interaction_json')" :show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" />
|
<el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" />
|
||||||
<el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" />
|
<el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" />
|
||||||
<el-table-column prop="remark" :label="$t('task.select.Remark')" />
|
<el-table-column prop="remark" :label="$t('task.select.Remark')" />
|
||||||
@@ -329,6 +330,7 @@ const defaultForm = {
|
|||||||
start_point_code: null,
|
start_point_code: null,
|
||||||
start_device_code: null,
|
start_device_code: null,
|
||||||
next_point_code: null,
|
next_point_code: null,
|
||||||
|
start_point_code: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
material: null,
|
material: null,
|
||||||
route_plan_code: 'normal',
|
route_plan_code: 'normal',
|
||||||
|
|||||||
@@ -502,6 +502,7 @@
|
|||||||
<el-table-column prop="next_point_code" :label="$t('task.select.Delivery_point')" :min-width="flexWidth('next_point_code',crud.data,$t('task.select.Delivery_point'))" />
|
<el-table-column prop="next_point_code" :label="$t('task.select.Delivery_point')" :min-width="flexWidth('next_point_code',crud.data,$t('task.select.Delivery_point'))" />
|
||||||
<el-table-column prop="start_point_code2" :label="$t('task.select.Start_point2')" :min-width="flexWidth('start_point_code2',crud.data,$t('task.select.Start_point2'))" />
|
<el-table-column prop="start_point_code2" :label="$t('task.select.Start_point2')" :min-width="flexWidth('start_point_code2',crud.data,$t('task.select.Start_point2'))" />
|
||||||
<el-table-column prop="next_point_code2" :label="$t('task.select.Destination2')" :min-width="flexWidth('next_point_code2',crud.data,$t('task.select.Destination2'))" />
|
<el-table-column prop="next_point_code2" :label="$t('task.select.Destination2')" :min-width="flexWidth('next_point_code2',crud.data,$t('task.select.Destination2'))" />
|
||||||
|
<el-table-column prop="interaction_json" :label="$t('task.select.Interaction_json')" show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="put_point_code" :label="$t('TaskRecord.table.Transit_point')" :min-width="flexWidth('put_point_code',crud.data,$t('TaskRecord.table.Transit_point'))" />
|
<el-table-column prop="put_point_code" :label="$t('TaskRecord.table.Transit_point')" :min-width="flexWidth('put_point_code',crud.data,$t('TaskRecord.table.Transit_point'))" />
|
||||||
<el-table-column prop="remark" :label="$t('task.select.Remark')" :min-width="flexWidth('remark',crud.data,$t('task.select.Remark'))" />
|
<el-table-column prop="remark" :label="$t('task.select.Remark')" :min-width="flexWidth('remark',crud.data,$t('task.select.Remark'))" />
|
||||||
<el-table-column prop="create_by" :label="$t('task.select.Creator')" :min-width="flexWidth('create_by',crud.data,$t('task.select.Creator'))" />
|
<el-table-column prop="create_by" :label="$t('task.select.Creator')" :min-width="flexWidth('create_by',crud.data,$t('task.select.Creator'))" />
|
||||||
@@ -671,6 +672,7 @@ export default {
|
|||||||
start_device_code2: null,
|
start_device_code2: null,
|
||||||
next_point_code: null,
|
next_point_code: null,
|
||||||
next_point_code2: null,
|
next_point_code2: null,
|
||||||
|
interaction_json: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
material: null,
|
material: null,
|
||||||
route_plan_code: 'normal',
|
route_plan_code: 'normal',
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ export default {
|
|||||||
dialogFormVisible10: false,
|
dialogFormVisible10: false,
|
||||||
Stages: [],
|
Stages: [],
|
||||||
stage_code: 'stage_code',
|
stage_code: 'stage_code',
|
||||||
|
stage_name: '二楼监控',
|
||||||
form: {
|
form: {
|
||||||
device_code: '',
|
device_code: '',
|
||||||
hasGoodStatus: null,
|
hasGoodStatus: null,
|
||||||
@@ -505,7 +506,7 @@ export default {
|
|||||||
this.arr = [] // 清空
|
this.arr = [] // 清空
|
||||||
if (item.device_code && item.data) {
|
if (item.device_code && item.data) {
|
||||||
console.log('item', item)
|
console.log('item', item)
|
||||||
/* let tempDeviceName = ''
|
let tempDeviceName = ''
|
||||||
if (this.language === 'zh') {
|
if (this.language === 'zh') {
|
||||||
tempDeviceName = item.data.zh_device_name
|
tempDeviceName = item.data.zh_device_name
|
||||||
}
|
}
|
||||||
@@ -514,7 +515,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.language === 'in') {
|
if (this.language === 'in') {
|
||||||
tempDeviceName = item.data.in_device_name
|
tempDeviceName = item.data.in_device_name
|
||||||
} */
|
}
|
||||||
this.arr = [
|
this.arr = [
|
||||||
{ name: i18n.t('monitor.click.equipment_number'), value: item.device_code },
|
{ name: i18n.t('monitor.click.equipment_number'), value: item.device_code },
|
||||||
{ name: i18n.t('monitor.click.device_name'), value: item.device_name }
|
{ name: i18n.t('monitor.click.device_name'), value: item.device_name }
|
||||||
|
|||||||
@@ -312,6 +312,7 @@ public class StructivtServiceImpl implements StructivtService {
|
|||||||
mp.put("净重", json.getString("net_weight"));
|
mp.put("净重", json.getString("net_weight"));
|
||||||
mp.put("毛重", json.getString("box_weight"));
|
mp.put("毛重", json.getString("box_weight"));
|
||||||
mp.put("长度", json.getString("length"));
|
mp.put("长度", json.getString("length"));
|
||||||
|
mp.put("接头数", json.getString("joint_type"));
|
||||||
mp.put("计划外分切的子卷", json.getString("is_un_plan_production"));
|
mp.put("计划外分切的子卷", json.getString("is_un_plan_production"));
|
||||||
mp.put("子卷的物性值1", json.getString("un_plan_product_property1"));
|
mp.put("子卷的物性值1", json.getString("un_plan_product_property1"));
|
||||||
mp.put("子卷的物性值2", json.getString("un_plan_product_property2"));
|
mp.put("子卷的物性值2", json.getString("un_plan_product_property2"));
|
||||||
|
|||||||
@@ -90,7 +90,8 @@
|
|||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '3'
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '3'
|
||||||
END
|
END
|
||||||
END AS sub_type,
|
END AS sub_type,
|
||||||
DATEDIFF( NOW(), sub.date_of_production ) AS stock_age
|
DATEDIFF( NOW(), sub.date_of_production ) AS stock_age,
|
||||||
|
sub.joint_type
|
||||||
|
|
||||||
FROM
|
FROM
|
||||||
ST_IVT_StructIvt ivt
|
ST_IVT_StructIvt ivt
|
||||||
@@ -243,7 +244,8 @@
|
|||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '1'
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '1'
|
||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '3'
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '3'
|
||||||
END AS sub_type,
|
END AS sub_type,
|
||||||
DATEDIFF( NOW(), ivt.instorage_time ) AS stock_age
|
DATEDIFF( NOW(), ivt.instorage_time ) AS stock_age,
|
||||||
|
sub.joint_type
|
||||||
FROM
|
FROM
|
||||||
ST_IVT_StructIvt ivt
|
ST_IVT_StructIvt ivt
|
||||||
LEFT JOIN st_ivt_structattr attr ON ivt.struct_id = attr.struct_id
|
LEFT JOIN st_ivt_structattr attr ON ivt.struct_id = attr.struct_id
|
||||||
|
|||||||
@@ -240,6 +240,7 @@
|
|||||||
<el-table-column prop="warehousing_qty" label="待入数" :formatter="rounding"/>
|
<el-table-column prop="warehousing_qty" label="待入数" :formatter="rounding"/>
|
||||||
<el-table-column prop="unit_name" label="计量单位"/>
|
<el-table-column prop="unit_name" label="计量单位"/>
|
||||||
<el-table-column prop="instorage_time" label="入库时间" min-width="150"/>
|
<el-table-column prop="instorage_time" label="入库时间" min-width="150"/>
|
||||||
|
<el-table-column prop="joint_type" label="接头数" min-width="150"/>
|
||||||
<el-table-column prop="sub_type" label="子卷状态" min-width="150" :formatter="formatSubType"/>
|
<el-table-column prop="sub_type" label="子卷状态" min-width="150" :formatter="formatSubType"/>
|
||||||
<el-table-column prop="stock_age" label="生产时长(天)" min-width="120" />
|
<el-table-column prop="stock_age" label="生产时长(天)" min-width="120" />
|
||||||
<el-table-column prop="paper_type" label="管件类型" min-width="150"/>
|
<el-table-column prop="paper_type" label="管件类型" min-width="150"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user