更新
This commit is contained in:
@@ -777,80 +777,41 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
} else {
|
} else {
|
||||||
this.require_apply_strangulation_time = date;
|
this.require_apply_strangulation_time = date;
|
||||||
String vehicle_code = "";
|
String vehicle_code = "";
|
||||||
// if (task > 0) {
|
if (task > 0) {
|
||||||
// Instruction instruction = instructionService.findByCodeFromCache(String.valueOf(task));
|
Instruction instruction = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||||
// if(ObjectUtil.isEmpty(instruction)){
|
if(ObjectUtil.isEmpty(instruction)){
|
||||||
// message = "申请捆扎电气设备任务号:" + task + "未找到对应指令";
|
message = "申请捆扎电气设备任务号:" + task + "未找到对应指令";
|
||||||
// throw new RuntimeException("该电气任务号未找到对应指令!");
|
throw new RuntimeException("该电气任务号未找到对应指令!");
|
||||||
// }
|
}
|
||||||
// vehicle_code = instruction.getVehicle_code();
|
vehicle_code = instruction.getVehicle_code();
|
||||||
// } else {
|
} else {
|
||||||
// logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:" + task + "异常");
|
logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:" + task + "异常");
|
||||||
// message = "申请捆扎电气设备任务号:" + task + "异常";
|
message = "申请捆扎电气设备任务号:" + task + "异常";
|
||||||
// throw new RuntimeException("任务号为空!");
|
throw new RuntimeException("任务号为空!");
|
||||||
// }
|
}
|
||||||
// if (StrUtil.isEmpty(vehicle_code)) {
|
if (StrUtil.isEmpty(vehicle_code)) {
|
||||||
// logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:" + task + "未找到载具号");
|
logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:" + task + "未找到载具号");
|
||||||
// message = "申请捆扎电气设备任务号:" + task + "未找到载具号";
|
message = "申请捆扎电气设备任务号:" + task + "未找到载具号";
|
||||||
// throw new RuntimeException("载具号为空!");
|
throw new RuntimeException("载具号为空!");
|
||||||
// }
|
}
|
||||||
// ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
||||||
// new ApplyLabelingAndBindingRequest();
|
new ApplyLabelingAndBindingRequest();
|
||||||
// JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0);
|
JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0);
|
||||||
// String start_point_code = null;
|
String start_point_code = null;
|
||||||
// if (!ObjectUtil.isEmpty(device_json)) {
|
if (!ObjectUtil.isEmpty(device_json)) {
|
||||||
// start_point_code = (String) device_json.get("parent_storage_code") == null ? this.device_code : (String) device_json.get("parent_storage_code");
|
start_point_code = (String) device_json.get("parent_storage_code") == null ? this.device_code : (String) device_json.get("parent_storage_code");
|
||||||
// }
|
}
|
||||||
// applyLabelingAndBindingRequest.setDevice_code(start_point_code);
|
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
|
||||||
// applyLabelingAndBindingRequest.setType("2");
|
applyLabelingAndBindingRequest.setType("2");
|
||||||
// applyLabelingAndBindingRequest.setVehicle_code(vehicle_code);
|
applyLabelingAndBindingRequest.setVehicle_code(vehicle_code);
|
||||||
// ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
||||||
// if (applyLabelingAndBindingResponse.getstatus() == 200) {
|
if (applyLabelingAndBindingResponse.getstatus() == 200) {
|
||||||
// if (ObjectUtil.isNotEmpty(applyLabelingAndBindingResponse.getData())) {
|
if (ObjectUtil.isNotEmpty(applyLabelingAndBindingResponse.getData())) {
|
||||||
// Map datas = applyLabelingAndBindingResponse.getData();
|
Map datas = applyLabelingAndBindingResponse.getData();
|
||||||
// String length = datas.get("box_length").toString();
|
String length = datas.get("box_length").toString();
|
||||||
// String width = datas.get("box_width").toString();
|
String width = datas.get("box_width").toString();
|
||||||
// String box_high = datas.get("box_high").toString();
|
String box_high = datas.get("box_high").toString();
|
||||||
// String bundle_times = datas.get("bundle_times").toString();
|
String bundle_times = datas.get("bundle_times").toString();
|
||||||
//
|
|
||||||
// List list = new ArrayList();
|
|
||||||
// Map map = new HashMap();
|
|
||||||
// map.put("code", "to_length");
|
|
||||||
// map.put("value", length);
|
|
||||||
// list.add(map);
|
|
||||||
// Map map2 = new HashMap();
|
|
||||||
// map2.put("code", "to_weight");
|
|
||||||
// map2.put("value", width);
|
|
||||||
// list.add(map2);
|
|
||||||
// Map map3 = new HashMap();
|
|
||||||
// map3.put("code", "to_height");
|
|
||||||
// map3.put("value", box_high);
|
|
||||||
// list.add(map3);
|
|
||||||
// Map map4 = new HashMap();
|
|
||||||
// map4.put("code", "to_strap_times");
|
|
||||||
// map4.put("value", bundle_times);
|
|
||||||
// list.add(map4);
|
|
||||||
// Map map5 = new HashMap();
|
|
||||||
// map5.put("code", "to_command");
|
|
||||||
// map5.put("value", "4");
|
|
||||||
// list.add(map5);
|
|
||||||
// this.writing(list);
|
|
||||||
//// this.writing(list);
|
|
||||||
//
|
|
||||||
// message = "申请捆扎成功";
|
|
||||||
// requireSucess = true;
|
|
||||||
// } else {
|
|
||||||
// message = "未返回尺寸信息";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// } else {
|
|
||||||
// message = applyLabelingAndBindingResponse.getMessage();
|
|
||||||
// }
|
|
||||||
Thread.sleep(10000);
|
|
||||||
String length = "1280";
|
|
||||||
String width = "800";
|
|
||||||
String box_high = "400";
|
|
||||||
String bundle_times = "2";
|
|
||||||
|
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
@@ -877,6 +838,14 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
// this.writing(list);
|
// this.writing(list);
|
||||||
|
|
||||||
message = "申请捆扎成功";
|
message = "申请捆扎成功";
|
||||||
|
requireSucess = true;
|
||||||
|
} else {
|
||||||
|
message = "未返回尺寸信息";
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
message = applyLabelingAndBindingResponse.getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user