rev:默认有货及子卷下线任务状态更新
This commit is contained in:
@@ -71,7 +71,7 @@ public class ItemProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*是否有货
|
* 是否有货
|
||||||
*/
|
*/
|
||||||
public int hasGoods(int move) {
|
public int hasGoods(int move) {
|
||||||
return move;
|
return move;
|
||||||
@@ -80,6 +80,17 @@ public class ItemProtocol {
|
|||||||
Boolean isonline;
|
Boolean isonline;
|
||||||
|
|
||||||
public int getOpcIntegerValue(String protocol) {
|
public int getOpcIntegerValue(String protocol) {
|
||||||
|
if (protocol.equals(item_move)) {
|
||||||
|
Integer value = this.driver.getIntegeregerValue(protocol);
|
||||||
|
if (value == null) {
|
||||||
|
// log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!");
|
||||||
|
setIsonline(false);
|
||||||
|
} else {
|
||||||
|
setIsonline(true);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
Integer value = this.driver.getIntegeregerValue(protocol);
|
Integer value = this.driver.getIntegeregerValue(protocol);
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
// log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!");
|
// log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!");
|
||||||
@@ -89,7 +100,6 @@ public class ItemProtocol {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
|
|||||||
@@ -236,7 +236,6 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String remark = "";
|
String remark = "";
|
||||||
;
|
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = "universal_remark2";
|
remark = "universal_remark2";
|
||||||
}
|
}
|
||||||
@@ -334,24 +333,23 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateInstructionStatus() {
|
private void updateInstructionStatus() {
|
||||||
|
//更改指令状态
|
||||||
|
if (task > 0) {
|
||||||
|
Instruction inst = checkInst();
|
||||||
|
if (inst != null) {
|
||||||
|
if (StrUtil.equals(inst.getInstruction_status(), "0")) {
|
||||||
|
inst.setInstruction_status(CommonFinalParam.ONE);
|
||||||
|
inst.setExecute_device_code(this.device_code);
|
||||||
|
instructionService.update(inst);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "修改指令状态为执行中");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.instruction_update_time = date;
|
this.instruction_update_time = date;
|
||||||
//更改指令状态
|
|
||||||
if (task > 0) {
|
|
||||||
Instruction inst = checkInst();
|
|
||||||
if (inst != null) {
|
|
||||||
if (StrUtil.equals(inst.getInstruction_status(), "0")) {
|
|
||||||
inst.setInstruction_status(CommonFinalParam.ONE);
|
|
||||||
inst.setExecute_device_code(this.device_code);
|
|
||||||
instructionService.update(inst);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//放货完成
|
//放货完成
|
||||||
if (action == 4 && move == 0) {
|
if (action == 4 && move == 0) {
|
||||||
if (inst != null) {
|
if (inst != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user