add 载具号提示
This commit is contained in:
@@ -118,7 +118,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
String message = null;
|
||||
Boolean iserror = false;
|
||||
|
||||
String barcode = null;
|
||||
String hand_barcode = null;
|
||||
|
||||
Integer heartbeat_tag;
|
||||
private Date instruction_require_time = new Date();
|
||||
@@ -201,7 +201,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
message = null;
|
||||
if (move == 0) {
|
||||
inst_message = null;
|
||||
this.barcode = null;
|
||||
this.hand_barcode = null;
|
||||
this.clearWrite();
|
||||
}
|
||||
if (move == 0 && last_move == 1) {
|
||||
@@ -516,7 +516,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", this.getMessage());
|
||||
jo.put("barcode", barcode);
|
||||
jo.put("hand_barcode", hand_barcode);
|
||||
jo.put("barcode", this.getMove() == 0 ? null : instructionService.findByCodeFromCache(String.valueOf(task)) == null ? vehicle_code : instructionService.findByCodeFromCache(String.valueOf(task)).getVehicle_code());
|
||||
jo.put("is_click", true);
|
||||
jo.put("requireSucess", requireSucess);
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
@@ -531,7 +532,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
this.barcode = data.getString("barcode");
|
||||
this.hand_barcode = data.getString("hand_barcode");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -839,7 +840,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
// this.writing(list);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请捆扎,返回参数:" + applyLabelingAndBindingResponse);
|
||||
message = "申请捆扎成功";
|
||||
requireSucess = true;
|
||||
//requireSucess = true;
|
||||
} else {
|
||||
message = "未返回尺寸信息";
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请捆扎,返回参数:" + applyLabelingAndBindingResponse);
|
||||
@@ -863,7 +864,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
this.require_empty_in_time = date;
|
||||
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
message = "申请空盘入库任务中...";
|
||||
//message = "申请空盘入库任务中...";
|
||||
|
||||
// if(taskserver.querySameOriginTask(this.device_code) > 0 ){
|
||||
// message = "已存在空盘出库任务不再请求";
|
||||
@@ -901,12 +902,12 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
this.instruction_require_time = date;
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
//判断是否有手动补码 如果有就申请补码agv任务
|
||||
if (StrUtil.isNotEmpty(barcode)) {
|
||||
if (StrUtil.isNotEmpty(hand_barcode)) {
|
||||
message = "申请补码AGV搬运任务中...";
|
||||
JSONObject apply = new JSONObject();
|
||||
apply.put("device_code", device_code);
|
||||
apply.put("type", "4");
|
||||
apply.put("vehicle_code", barcode);
|
||||
apply.put("vehicle_code", hand_barcode);
|
||||
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,请求参数:" + apply + ",响应参数," + str);
|
||||
|
||||
@@ -103,6 +103,7 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
int hasGoods = 0;
|
||||
String message = null;
|
||||
Boolean iserror = false;
|
||||
String hand_barcode = null;
|
||||
String barcode = null;
|
||||
|
||||
Integer heartbeat_tag;
|
||||
@@ -186,10 +187,16 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceItemValue(this.device_code, "task", String.valueOf(task));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
}
|
||||
|
||||
if (move != last_move) {
|
||||
message = null;
|
||||
if (move == 0) {
|
||||
inst_message = null;
|
||||
hand_barcode = null;
|
||||
barcode = null;
|
||||
requireSucess = false;
|
||||
this.clearWrite();
|
||||
@@ -212,10 +219,7 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
||||
}
|
||||
if (task != last_task) {
|
||||
logServer.deviceItemValue(this.device_code, "task", String.valueOf(task));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||
}
|
||||
|
||||
|
||||
if (move != 0 && task > 0) {
|
||||
inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||
@@ -461,7 +465,8 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
jo.put("task", task);
|
||||
jo.put("last_task", last_task);
|
||||
jo.put("task_code", task_code);
|
||||
jo.put("barcode", barcode);
|
||||
jo.put("hand_barcode", hand_barcode);
|
||||
jo.put("barcode", this.getMove() == 0 ? null : instructionService.findByCodeFromCache(String.valueOf(task)) == null ? null : instructionService.findByCodeFromCache(String.valueOf(task)).getVehicle_code());
|
||||
// jo.put("last_task", last_task);
|
||||
jo.put("inst_message", this.inst_message);
|
||||
jo.put("last_inst_message", this.last_inst_message);
|
||||
@@ -483,8 +488,8 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
String barcode = data.getString("barcode");
|
||||
this.setBarcode(barcode);
|
||||
String hand_barcode = data.getString("hand_barcode");
|
||||
this.setHand_barcode(hand_barcode);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -528,12 +533,12 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
return false;
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
if (!StrUtil.isEmpty(barcode) && task == 0) {
|
||||
Instruction inst = instructionService.findByBarcodeFromCache(barcode);
|
||||
if (!StrUtil.isEmpty(hand_barcode) && task == 0) {
|
||||
Instruction inst = instructionService.findByBarcodeFromCache(hand_barcode);
|
||||
if (ObjectUtil.isEmpty(inst)) {
|
||||
TaskDto taskDto = taskserver.findByContainer(barcode);
|
||||
TaskDto taskDto = taskserver.findByContainer(hand_barcode);
|
||||
if (ObjectUtil.isEmpty(taskDto)) {
|
||||
message = "未找到手动补码:" + barcode + "对应立库指令,请检查";
|
||||
message = "未找到手动补码:" + hand_barcode + "对应立库指令,请检查";
|
||||
return false;
|
||||
}
|
||||
String next_device_code = taskDto.getNext_device_code();
|
||||
@@ -545,7 +550,7 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
instdto.setQuantity(taskDto.getQuantity());
|
||||
instdto.setTask_id(taskDto.getTask_id());
|
||||
instdto.setTask_code(taskDto.getTask_code());
|
||||
instdto.setVehicle_code(barcode);
|
||||
instdto.setVehicle_code(hand_barcode);
|
||||
String now = DateUtil.now();
|
||||
instdto.setCreate_time(now);
|
||||
instdto.setCreate_by("auto");
|
||||
|
||||
@@ -469,6 +469,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("barcode", this.getMove() == 0 ? null : instructionService.findByCodeFromCache(String.valueOf(task)) == null ? vehicle_code : instructionService.findByCodeFromCache(String.valueOf(task)).getVehicle_code());
|
||||
jo.put("message", this.getMessage());
|
||||
jo.put("is_click", true);
|
||||
jo.put("requireSucess", requireSucess);
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<el-input v-model="form.device_code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="条码" label-width="120px">
|
||||
<el-input v-model="form.barcode" :disabled="false" />
|
||||
<el-input v-model="form.hand_barcode" :disabled="false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="请求标记" prop="requireSucess" label-width="120px">
|
||||
<el-radio-group v-model="form.requireSucess">
|
||||
@@ -216,6 +216,7 @@ export default {
|
||||
device_code: '',
|
||||
hasGoodStatus: null,
|
||||
barcode: '',
|
||||
hand_barcode: '',
|
||||
suspended: null,
|
||||
material_type: '',
|
||||
requireSucess: '',
|
||||
@@ -376,6 +377,7 @@ export default {
|
||||
this.form.is_disable = clickObj.data.is_disable1
|
||||
this.form.applySucess = clickObj.data.applySucess
|
||||
this.form.barcode = clickObj.data.barcode
|
||||
this.form.hand_barcode = clickObj.data.hand_barcode
|
||||
},
|
||||
moveShow(nodeData) { // 点击之后显示出来的数据----只需要设备信息
|
||||
let item = ''
|
||||
@@ -563,6 +565,9 @@ export default {
|
||||
} else if (val === 'inventory_qty') {
|
||||
const obj = { name: '库存数量', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'hand_barcode') {
|
||||
const obj = { name: '手补条码', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user