rev 模式显示
This commit is contained in:
@@ -46,7 +46,7 @@ public interface DeviceDriver {
|
||||
} else {
|
||||
mode = RequestMethodEnum.getName(mode);
|
||||
}
|
||||
return ObjectUtil.isEmpty(mode)? "未定义":mode;
|
||||
return ObjectUtil.isEmpty(mode)? "无效的请求,驱动中未配置":mode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1099,7 +1099,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
}
|
||||
}
|
||||
//标准版-下发条码输送线
|
||||
//标准版-下发条码输送线 需要下发条码
|
||||
if (device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver) {
|
||||
conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver();
|
||||
if (conveyorBarcodeDeviceDriver.getMode() != 0
|
||||
@@ -1107,6 +1107,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
inst.setExecute_status("6");
|
||||
instructionService.update(inst);
|
||||
conveyorBarcodeDeviceDriver.writing(5);
|
||||
if(ObjectUtil.isNotEmpty(inst.getVehicle_code())){
|
||||
conveyorBarcodeDeviceDriver.writing("to_barcode",inst.getVehicle_code());
|
||||
}
|
||||
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
TaskDto task=taskService.findByCode(inst.getTask_code());
|
||||
String material=task.getDirection();
|
||||
|
||||
@@ -377,38 +377,10 @@ public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String move;
|
||||
String action;
|
||||
String io_action;
|
||||
boolean hasGoods;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 4:
|
||||
mode = "叫料";
|
||||
break;
|
||||
case 5:
|
||||
mode = "申请空盘";
|
||||
break;
|
||||
case 6:
|
||||
mode = "申请入库";
|
||||
break;
|
||||
case 11:
|
||||
mode = "半托缓存强制去包装";
|
||||
break;
|
||||
case 15:
|
||||
mode = "送空托盘";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
if (this.move == 0) {
|
||||
move = "无货";
|
||||
hasGoods = false;
|
||||
@@ -469,6 +441,12 @@ public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("io_action", io_action);
|
||||
|
||||
@@ -357,38 +357,10 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String move;
|
||||
String action;
|
||||
String io_action;
|
||||
boolean hasGoods;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 4:
|
||||
mode = "叫料";
|
||||
break;
|
||||
case 5:
|
||||
mode = "申请空盘";
|
||||
break;
|
||||
case 6:
|
||||
mode = "申请入库";
|
||||
break;
|
||||
case 11:
|
||||
mode = "半托缓存强制去包装";
|
||||
break;
|
||||
case 15:
|
||||
mode = "送空托盘";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
if (this.move == 0) {
|
||||
move = "无货";
|
||||
hasGoods = false;
|
||||
@@ -449,6 +421,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("io_action", io_action);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@@ -334,24 +335,9 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String move;
|
||||
boolean hasGoods;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "运行中";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
if (this.move == 0) {
|
||||
move = "无货";
|
||||
hasGoods = false;
|
||||
@@ -384,6 +370,12 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("move", move);
|
||||
jo.put("container_type", container_type);
|
||||
jo.put("error", error);
|
||||
|
||||
@@ -347,26 +347,8 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String status;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "排产确认";
|
||||
break;
|
||||
case 4:
|
||||
mode = "工单完成";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
switch (this.status) {
|
||||
case 1:
|
||||
status = "待机";
|
||||
@@ -405,6 +387,12 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("status", status);
|
||||
jo.put("error", error);
|
||||
jo.put("open_time", open_time);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.lnsh.lnsh_kiln_lane;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -252,23 +253,7 @@ public class LnshKilnLaneDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String status;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "运行中";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
switch (this.status) {
|
||||
case 1:
|
||||
status = "待机";
|
||||
@@ -286,6 +271,12 @@ public class LnshKilnLaneDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("status", status);
|
||||
jo.put("open_time", open_time);
|
||||
jo.put("standby_time", standby_time);
|
||||
|
||||
@@ -289,26 +289,8 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String status;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "排产确认";
|
||||
break;
|
||||
case 4:
|
||||
mode = "工单完成";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
switch (this.status) {
|
||||
case 1:
|
||||
status = "待机";
|
||||
@@ -347,6 +329,12 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("status", status);
|
||||
jo.put("error", error);
|
||||
jo.put("open_time", open_time);
|
||||
|
||||
@@ -358,23 +358,7 @@ public class LnshPackageLineDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String status;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "运行中";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
switch (this.status) {
|
||||
case 1:
|
||||
status = "待机";
|
||||
@@ -392,7 +376,12 @@ public class LnshPackageLineDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("status", status);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
} jo.put("status", status);
|
||||
jo.put("error", error);
|
||||
jo.put("open_time", open_time);
|
||||
jo.put("standby_time", standby_time);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.lnsh.lnsh_package_site;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -243,26 +244,10 @@ public class LnshPackageSiteDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String move;
|
||||
String action;
|
||||
String io_action;
|
||||
boolean hasGoods;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "运行中";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
if (this.move == 0) {
|
||||
move = "无货";
|
||||
hasGoods = false;
|
||||
@@ -322,7 +307,12 @@ public class LnshPackageSiteDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("io_action", io_action);
|
||||
|
||||
@@ -612,23 +612,8 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode;
|
||||
String status;
|
||||
String action;
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "运行中";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
switch (this.status) {
|
||||
case 1:
|
||||
status = "待机";
|
||||
@@ -680,6 +665,12 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
||||
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("status", status);
|
||||
jo.put("action", action);
|
||||
jo.put("error", error);
|
||||
|
||||
@@ -1201,46 +1201,10 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
String mode;
|
||||
String move;
|
||||
String action;
|
||||
String io_action;
|
||||
boolean hasGoods;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 4:
|
||||
mode = "叫料";
|
||||
break;
|
||||
case 5:
|
||||
mode = "叫空托盘";
|
||||
break;
|
||||
case 6:
|
||||
mode = "送空托盘";
|
||||
break;
|
||||
case 7:
|
||||
mode = "码垛完成";
|
||||
break;
|
||||
case 8:
|
||||
mode = "强制码垛完成";
|
||||
break;
|
||||
case 9:
|
||||
mode = "获取托盘信息";
|
||||
break;
|
||||
case 11:
|
||||
mode = "强制去包装(打包)";
|
||||
break;
|
||||
case 14:
|
||||
mode = "强制去包装(不打包)";
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
if (this.move == 0) {
|
||||
move = "无货";
|
||||
hasGoods = false;
|
||||
@@ -1307,6 +1271,12 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("io_action", io_action);
|
||||
|
||||
@@ -87,7 +87,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
|
||||
private Date instruction_require_time = new Date();
|
||||
private Date instruction_finished_time = new Date();
|
||||
|
||||
private int instruction_require_time_out;
|
||||
private int instruction_require_time_out = 3000;
|
||||
boolean requireSucess = false;
|
||||
|
||||
private int instruction_finished_time_out;
|
||||
@@ -477,26 +477,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String status;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "排产确认";
|
||||
break;
|
||||
case 4:
|
||||
mode = "工单完成";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
switch (this.status) {
|
||||
case 1:
|
||||
status = "待机";
|
||||
@@ -535,6 +516,12 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("status", status);
|
||||
jo.put("error", error);
|
||||
jo.put("open_time", open_time);
|
||||
|
||||
@@ -418,38 +418,11 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String move;
|
||||
String action;
|
||||
String io_action;
|
||||
boolean hasGoods;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 4:
|
||||
mode = "叫料";
|
||||
break;
|
||||
case 5:
|
||||
mode = "申请空盘";
|
||||
break;
|
||||
case 6:
|
||||
mode = "申请入库";
|
||||
break;
|
||||
case 11:
|
||||
mode = "半托缓存强制去包装";
|
||||
break;
|
||||
case 15:
|
||||
mode = "送空托盘";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
if (this.move == 0) {
|
||||
move = "无货";
|
||||
hasGoods = false;
|
||||
@@ -510,6 +483,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("io_action", io_action);
|
||||
|
||||
@@ -316,26 +316,11 @@ public class PackageSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
String mode;
|
||||
String move;
|
||||
String action;
|
||||
String io_action;
|
||||
boolean hasGoods;
|
||||
|
||||
switch (this.mode) {
|
||||
case 0:
|
||||
mode = "脱机";
|
||||
break;
|
||||
case 2:
|
||||
mode = "待机";
|
||||
break;
|
||||
case 3:
|
||||
mode = "运行中";
|
||||
break;
|
||||
default:
|
||||
mode = String.valueOf(this.mode);
|
||||
}
|
||||
|
||||
if (this.move == 0) {
|
||||
move = "无货";
|
||||
hasGoods = false;
|
||||
@@ -396,6 +381,12 @@ public class PackageSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
|
||||
if(ObjectUtil.isNotEmpty(requestNo)){
|
||||
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
|
||||
} else {
|
||||
jo.put("modeName", "无效的请求,驱动中未配置");
|
||||
}
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("io_action", io_action);
|
||||
|
||||
@@ -780,6 +780,9 @@ export default {
|
||||
}else if (val==='positionCode'){
|
||||
const obj = { name: '位置编码', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
}else if (val==='modeName'){
|
||||
const obj = { name: '模式名称', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -535,6 +535,9 @@ export default {
|
||||
} else if (val === 'task_code') {
|
||||
const obj = { name: '当前执行任务号', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
}else if (val==='modeName'){
|
||||
const obj = { name: '模式名称', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user