add: 添加创建任务的字段

This commit is contained in:
yanps
2023-12-13 15:55:28 +08:00
parent b517f41682
commit d3dbb4191f
3 changed files with 62 additions and 8 deletions

View File

@@ -108,6 +108,8 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
int qty = 0;
int last_qty = 0;
int out_finish = 0;
//下发命令
int to_command = 0;
@@ -400,7 +402,36 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
@Override
public JSONObject getDeviceStatusName() throws Exception {
return null;
JSONObject jo = new JSONObject();
String mode = "";
String move = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3) {
mode = "运行中";
} else if (this.getMode() == 4) {
mode = "套管完成";
}
if(this.getMove() ==0){
move = "无货";
}else if(this.getMove() == 1){
move = "有托盘";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
jo.put("move", move);
jo.put("inventory_qty", qty);
jo.put("out_finish", out_finish);
jo.put("material", material1);
jo.put("isOnline", this.getIsonline());
return jo;
}
@Override

View File

@@ -688,6 +688,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode = "";
String move = "";
if (this.getMode() == 0) {
mode = "未联机";
@@ -696,16 +697,22 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3) {
mode = "入库";
mode = "运行";
} else if (this.getMode() == 4) {
mode = "出库中";
mode = "申请出纸管";
}
if(this.getMove() == 0){
move = "无货";
}else if(this.getMove() == 1){
move = "有托盘";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
jo.put("inventory_qty", inventory_qty);
jo.put("inventory_qty", item_qty1);
jo.put("move", move);
jo.put("out_finish", out_finish);
jo.put("material", material);
jo.put("material", item_material1);
jo.put("isOnline", this.getIsonline());
return jo;