fix: 内包间行架任务被输送线给下发命令

This commit is contained in:
yanps
2023-12-20 18:23:30 +08:00
parent 6e425d4b3c
commit ee6fd716bc
2 changed files with 15 additions and 5 deletions

View File

@@ -127,6 +127,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
String message = null; String message = null;
String device_code; String device_code;
String remark = "";
@Override @Override
public Device getDevice() { public Device getDevice() {
@@ -208,7 +209,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
logServer.deviceExecuteLog(this.device_code, "", "", "信号qty" + last_qty + "->" + qty); logServer.deviceExecuteLog(this.device_code, "", "", "信号qty" + last_qty + "->" + qty);
} }
if (move != 0 && task > 0 ) { if (move != 0 && task > 0) {
update_instruction_status(); update_instruction_status();
} }
@@ -248,6 +249,14 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
//申请套管校验 //申请套管校验
// apply_for_casing_inspection(material1, material2); // apply_for_casing_inspection(material1, material2);
bushingSucess(); bushingSucess();
} else if (move != 1) {
remark += "套管工位没有货";
} else if (task < 1) {
remark += "纸管库的任务号为空";
} else if (task1 < 1) {
remark += "行架任务为空";
} else if (requireSucess) {
remark += "requrieSucess为" + requireSucess;
} }
break; break;
default: default:
@@ -411,15 +420,15 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
} else if (this.getMode() == 1) { } else if (this.getMode() == 1) {
mode = "单机"; mode = "单机";
} else if (this.getMode() == 2) { } else if (this.getMode() == 2) {
mode = "联机"; mode = "联机";
} else if (this.getMode() == 3) { } else if (this.getMode() == 3) {
mode = "运行中"; mode = "运行中";
} else if (this.getMode() == 4) { } else if (this.getMode() == 4) {
mode = "套管完成"; mode = "套管完成";
} }
if(this.getMove() ==0){ if (this.getMove() == 0) {
move = "无货"; move = "无货";
}else if(this.getMove() == 1){ } else if (this.getMove() == 1) {
move = "有托盘"; move = "有托盘";
} }
jo.put("device_name", this.getDevice().getDevice_name()); jo.put("device_name", this.getDevice().getDevice_name());
@@ -431,6 +440,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
jo.put("material1", material1); jo.put("material1", material1);
jo.put("material2", material2); jo.put("material2", material2);
jo.put("isOnline", this.getIsonline()); jo.put("isOnline", this.getIsonline());
jo.put("message", ObjectUtil.isNotEmpty(remark)?"反馈套管失败的原因:"+remark:remark);
return jo; return jo;
} }

View File

@@ -843,7 +843,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
return false; return false;
} }
//当起点为行架任务的时候不需要请求下发 //当起点为行架任务的时候不需要请求下发
if (StrUtil.equals(inst.getInstruction_type(), "6")) { if (StrUtil.equals(inst.getInstruction_type(), "6") || StrUtil.equals(inst.getInstruction_type(),"9")) {
return false; return false;
} }
Device nextdevice = deviceAppservice.findDeviceByCode(inst.getNext_device_code()); Device nextdevice = deviceAppservice.findDeviceByCode(inst.getNext_device_code());