更新
This commit is contained in:
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.nl.acs.AcsConfig;
|
||||
@@ -178,6 +179,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
|
||||
if (move != 0 && task > 0) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "输送线任务开始反馈任务状态,指令号:" + task);
|
||||
//inst_message
|
||||
inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||
if (inst != null) {
|
||||
@@ -186,6 +188,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
inst.setInstruction_status("1");
|
||||
inst.setExecute_device_code(this.device_code);
|
||||
instructionService.update(inst);
|
||||
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈执行中状态,反馈成功,指令号:" + task);
|
||||
}
|
||||
if (mode == 2 || mode == 8) {
|
||||
if (StrUtil.equals(inst.getInstruction_status(), "1")) {
|
||||
@@ -193,6 +196,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
vehicle_code = inst.getVehicle_code();
|
||||
inst.setExecute_device_code(this.device_code);
|
||||
finish_instruction();
|
||||
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task);
|
||||
} else {
|
||||
if (!StrUtil.equals(inst.getExecute_code(), this.device_code)) {
|
||||
inst.setExecute_device_code(this.device_code);
|
||||
@@ -202,6 +206,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "输送线任务开始反馈任务状态,反馈失败,查询不到指令号:" + task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -733,6 +739,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
|
||||
//申请捆扎
|
||||
@SneakyThrows
|
||||
public synchronized void applyLaStrangulation() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.require_apply_strangulation_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
@@ -796,6 +803,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
list.add(map5);
|
||||
this.writing(list);
|
||||
// this.writing(list);
|
||||
|
||||
message = "申请捆扎成功";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
|
||||
@@ -142,19 +142,19 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
task = this.itemProtocol.getTask();
|
||||
weight = this.itemProtocol.getWeight();
|
||||
if (mode != last_mode) {
|
||||
if( mode == 2){
|
||||
if (mode == 2) {
|
||||
requireSucess = false;
|
||||
requireApplyLabelingSuccess = false;
|
||||
requireApplyLaStrangulationSuccess =false;
|
||||
requireEmptyInSuccess =false;
|
||||
requireEmptyOutSuccess =false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode +"复位请求标记");
|
||||
requireApplyLaStrangulationSuccess = false;
|
||||
requireEmptyInSuccess = false;
|
||||
requireEmptyOutSuccess = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "复位请求标记成功!");
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
if(move == 0 && mode == 2 ){
|
||||
if (move == 0 && mode == 2) {
|
||||
this.clearWrite();
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
||||
@@ -174,6 +174,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
}
|
||||
|
||||
if (mode == 2 && move != 0 && task > 0) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈任务状态,指令号:" + task);
|
||||
//inst_message
|
||||
inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||
if (inst != null) {
|
||||
@@ -181,11 +182,16 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
if (StrUtil.equals(inst.getInstruction_status(), "1") && StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
|
||||
vehicle_code = inst.getVehicle_code();
|
||||
finish_instruction();
|
||||
}
|
||||
if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task);
|
||||
} else if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) {
|
||||
inst.setInstruction_status("1");
|
||||
instructionService.update(inst);
|
||||
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈执行中状态,反馈成功,指令号:" + task);
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈执行中状态,反馈失败任务状态不为就绪或者执行中状态,指令号:" + task);
|
||||
}
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "入库输送线任务开始反馈任务状态,反馈失败,查询不到指令号:" + task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +245,6 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
//申请贴标
|
||||
if (move > 0 && !requireSucess) {
|
||||
applyLabeling();
|
||||
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
@@ -287,32 +292,32 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
|
||||
List list = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code","to_target");
|
||||
map.put("value","0");
|
||||
map.put("code", "to_target");
|
||||
map.put("value", "0");
|
||||
list.add(map);
|
||||
Map map2 = new HashMap();
|
||||
map2.put("code","to_task");
|
||||
map2.put("value","0");
|
||||
map2.put("code", "to_task");
|
||||
map2.put("value", "0");
|
||||
list.add(map2);
|
||||
Map map3 = new HashMap();
|
||||
map3.put("code","to_command");
|
||||
map3.put("value","0");
|
||||
map3.put("code", "to_command");
|
||||
map3.put("value", "0");
|
||||
list.add(map3);
|
||||
Map map4 = new HashMap();
|
||||
map4.put("code","to_strap_times");
|
||||
map4.put("value","0");
|
||||
map4.put("code", "to_strap_times");
|
||||
map4.put("value", "0");
|
||||
list.add(map4);
|
||||
Map map5 = new HashMap();
|
||||
map5.put("code","to_length");
|
||||
map5.put("value","0");
|
||||
map5.put("code", "to_length");
|
||||
map5.put("value", "0");
|
||||
list.add(map5);
|
||||
Map map6 = new HashMap();
|
||||
map6.put("code","to_weight");
|
||||
map6.put("value","0");
|
||||
map6.put("code", "to_weight");
|
||||
map6.put("value", "0");
|
||||
list.add(map6);
|
||||
Map map7 = new HashMap();
|
||||
map7.put("code","to_height");
|
||||
map7.put("value","0");
|
||||
map7.put("code", "to_height");
|
||||
map7.put("value", "0");
|
||||
list.add(map7);
|
||||
this.writing(list);
|
||||
message = null;
|
||||
@@ -398,11 +403,11 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
move = "有托盘有货";
|
||||
jo.put("hasGoods", true);
|
||||
}
|
||||
String requireApplyLabelingSuccess ="0";
|
||||
String requireApplyLabelingSuccess = "0";
|
||||
if (this.requireApplyLabelingSuccess) {
|
||||
requireApplyLabelingSuccess = "1";
|
||||
}
|
||||
String requireApplyLaStrangulationSuccess ="0";
|
||||
String requireApplyLaStrangulationSuccess = "0";
|
||||
if (this.requireApplyLaStrangulationSuccess) {
|
||||
requireApplyLaStrangulationSuccess = "1";
|
||||
}
|
||||
@@ -439,7 +444,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
String requestSucess = data.getString("requireSucess");
|
||||
if (StrUtil.equals(requestSucess, "0")) {
|
||||
this.requireSucess = false;
|
||||
} else if(StrUtil.equals(requestSucess, "1")) {
|
||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
}
|
||||
@@ -482,33 +487,33 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
// }
|
||||
//需要判断当前设备是否已经存在就绪的指令 如果存在就直接下发 不存在则创建
|
||||
Instruction inst = instructionService.findByTaskcodeAndStatus(taskdto.getTask_code());
|
||||
if(ObjectUtil.isNotEmpty(inst)){
|
||||
if (ObjectUtil.isNotEmpty(inst)) {
|
||||
List list = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
|
||||
if(StrUtil.isNotEmpty(taskdto.getTo_z())){
|
||||
if(StrUtil.equals(taskdto.getTo_z(),"01")){
|
||||
map.put("code","to_target");
|
||||
map.put("value","102");
|
||||
} else if(StrUtil.equals(taskdto.getTo_z(),"02")){
|
||||
map.put("code","to_target");
|
||||
map.put("value","201");
|
||||
} else if(StrUtil.equals(taskdto.getTo_z(),"03")){
|
||||
map.put("code","to_target");
|
||||
map.put("value","301");
|
||||
if (StrUtil.isNotEmpty(taskdto.getTo_z())) {
|
||||
if (StrUtil.equals(taskdto.getTo_z(), "01")) {
|
||||
map.put("code", "to_target");
|
||||
map.put("value", "102");
|
||||
} else if (StrUtil.equals(taskdto.getTo_z(), "02")) {
|
||||
map.put("code", "to_target");
|
||||
map.put("value", "201");
|
||||
} else if (StrUtil.equals(taskdto.getTo_z(), "03")) {
|
||||
map.put("code", "to_target");
|
||||
map.put("value", "301");
|
||||
}
|
||||
}
|
||||
list.add(map);
|
||||
Map map2 = new HashMap();
|
||||
map2.put("code","to_task");
|
||||
map2.put("value",inst.getInstruction_code());
|
||||
map2.put("code", "to_task");
|
||||
map2.put("value", inst.getInstruction_code());
|
||||
list.add(map2);
|
||||
Map map3 = new HashMap();
|
||||
map3.put("code","to_command");
|
||||
map3.put("value","1");
|
||||
map3.put("code", "to_command");
|
||||
map3.put("value", "1");
|
||||
list.add(map3);
|
||||
this.writing(list);
|
||||
if( task != Integer.parseInt(inst.getInstruction_code())){
|
||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||
this.writing(list);
|
||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||
}
|
||||
@@ -518,7 +523,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
}
|
||||
|
||||
// type 5 输送任务
|
||||
if(!StrUtil.equals(taskdto.getTask_type(),"5")){
|
||||
if (!StrUtil.equals(taskdto.getTask_type(), "5")) {
|
||||
return false;
|
||||
}
|
||||
String taskid = taskdto.getTask_id();
|
||||
@@ -596,30 +601,30 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
|
||||
List list = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code","to_target");
|
||||
map.put("value",next_addr);
|
||||
map.put("code", "to_target");
|
||||
map.put("value", next_addr);
|
||||
list.add(map);
|
||||
Map map2 = new HashMap();
|
||||
map2.put("code","to_task");
|
||||
map2.put("value",instdto.getInstruction_code());
|
||||
map2.put("code", "to_task");
|
||||
map2.put("value", instdto.getInstruction_code());
|
||||
list.add(map2);
|
||||
Map map3 = new HashMap();
|
||||
map3.put("code","to_command");
|
||||
map3.put("value","1");
|
||||
map3.put("code", "to_command");
|
||||
map3.put("value", "1");
|
||||
list.add(map3);
|
||||
this.writing(list);
|
||||
if( task != Integer.parseInt(inst.getInstruction_code())){
|
||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||
this.writing(list);
|
||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||
}
|
||||
} else {
|
||||
//如果不存在则直接找对应指令
|
||||
Instruction inst = instructionService.findByDeviceCodeFromCache(this.device_code);
|
||||
if(ObjectUtil.isEmpty(inst)){
|
||||
if (ObjectUtil.isEmpty(inst)) {
|
||||
return false;
|
||||
}
|
||||
//当起点为行架任务的时候不需要请求下发
|
||||
if(StrUtil.equals(inst.getInstruction_type(),"6")){
|
||||
if (StrUtil.equals(inst.getInstruction_type(), "6")) {
|
||||
return false;
|
||||
}
|
||||
Device nextdevice = deviceAppservice.findDeviceByCode(inst.getNext_device_code());
|
||||
@@ -627,21 +632,21 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
|
||||
List list = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code","to_target");
|
||||
map.put("value",next_addr);
|
||||
map.put("code", "to_target");
|
||||
map.put("value", next_addr);
|
||||
list.add(map);
|
||||
Map map2 = new HashMap();
|
||||
map2.put("code","to_task");
|
||||
map2.put("value",inst.getInstruction_code());
|
||||
map2.put("code", "to_task");
|
||||
map2.put("value", inst.getInstruction_code());
|
||||
list.add(map2);
|
||||
Map map3 = new HashMap();
|
||||
map3.put("code","to_command");
|
||||
map3.put("value","1");
|
||||
map3.put("code", "to_command");
|
||||
map3.put("value", "1");
|
||||
list.add(map3);
|
||||
this.writing(list);
|
||||
if( task != Integer.parseInt(inst.getInstruction_code())){
|
||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||
this.writing(list);
|
||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -657,26 +662,25 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
} else {
|
||||
this.require_apply_labeling_time = date;
|
||||
String vehicle_code = "";
|
||||
if(weight == 0 ){
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请贴标电气设备重量:"+weight+"异常");
|
||||
message = "申请贴标电气设备重量:"+weight+"异常";
|
||||
if (weight == 0) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请贴标电气设备重量:" + weight + "异常");
|
||||
message = "申请贴标电气设备重量:" + weight + "异常";
|
||||
throw new RuntimeException("重量为空!");
|
||||
}
|
||||
if(task >0 ){
|
||||
if (task > 0) {
|
||||
Instruction instruction = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||
if (ObjectUtil.isEmpty(instruction)){
|
||||
if (ObjectUtil.isEmpty(instruction)) {
|
||||
instruction = instructionService.findByCode(String.valueOf(task));
|
||||
}
|
||||
vehicle_code = instruction.getVehicle_code();
|
||||
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请贴标电气设备任务号:"+task+"异常");
|
||||
message = "申请贴标电气设备任务号:"+task+"异常";
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请贴标电气设备任务号:" + task + "异常");
|
||||
message = "申请贴标电气设备任务号:" + task + "异常";
|
||||
throw new RuntimeException("任务号为空!");
|
||||
}
|
||||
if(StrUtil.isEmpty(vehicle_code)){
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请贴标电气设备任务号:"+task+"未找到载具号");
|
||||
message = "申请贴标电气设备任务号:"+task+"未找到载具号";
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请贴标电气设备任务号:" + task + "未找到载具号");
|
||||
message = "申请贴标电气设备任务号:" + task + "未找到载具号";
|
||||
throw new RuntimeException("载具号为空!");
|
||||
}
|
||||
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
||||
@@ -689,22 +693,22 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
|
||||
applyLabelingAndBindingRequest.setType("1");
|
||||
applyLabelingAndBindingRequest.setVehicle_code(vehicle_code);
|
||||
applyLabelingAndBindingRequest.setWeight(String.valueOf(weight/100));
|
||||
applyLabelingAndBindingRequest.setWeight(String.valueOf(weight / 100));
|
||||
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
||||
|
||||
if(applyLabelingAndBindingResponse.getstatus() == 200){
|
||||
message ="申请贴标成功";
|
||||
if (applyLabelingAndBindingResponse.getstatus() == 200) {
|
||||
message = "申请贴标成功";
|
||||
List list = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code","to_command");
|
||||
map.put("value","5");
|
||||
map.put("code", "to_command");
|
||||
map.put("value", "5");
|
||||
list.add(map);
|
||||
this.writing(list);
|
||||
this.writing(list);
|
||||
message ="申请贴标下发电气信号成功";
|
||||
message = "申请贴标下发电气信号成功";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
message = "申请贴标失败,"+applyLabelingAndBindingResponse.getMessage();
|
||||
message = "申请贴标失败," + applyLabelingAndBindingResponse.getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -718,17 +722,17 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
} else {
|
||||
this.require_apply_strangulation_time = date;
|
||||
String vehicle_code = "";
|
||||
if(task >0 ){
|
||||
if (task > 0) {
|
||||
Instruction instruction = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||
vehicle_code = instruction.getVehicle_code();
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:"+task+"异常");
|
||||
message = "申请捆扎电气设备任务号:"+task+"异常";
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:" + task + "异常");
|
||||
message = "申请捆扎电气设备任务号:" + task + "异常";
|
||||
throw new RuntimeException("任务号为空!");
|
||||
}
|
||||
if(StrUtil.isEmpty(vehicle_code)){
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:"+task+"未找到载具号");
|
||||
message = "申请捆扎电气设备任务号:"+task+"未找到载具号";
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:" + task + "未找到载具号");
|
||||
message = "申请捆扎电气设备任务号:" + task + "未找到载具号";
|
||||
throw new RuntimeException("载具号为空!");
|
||||
}
|
||||
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
||||
@@ -742,8 +746,8 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
applyLabelingAndBindingRequest.setType("2");
|
||||
applyLabelingAndBindingRequest.setVehicle_code(vehicle_code);
|
||||
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
||||
if(applyLabelingAndBindingResponse.getstatus() == 200) {
|
||||
if(ObjectUtil.isNotEmpty( applyLabelingAndBindingResponse.getData())){
|
||||
if (applyLabelingAndBindingResponse.getstatus() == 200) {
|
||||
if (ObjectUtil.isNotEmpty(applyLabelingAndBindingResponse.getData())) {
|
||||
Map datas = applyLabelingAndBindingResponse.getData();
|
||||
String length = datas.get("box_length").toString();
|
||||
String width = datas.get("box_width").toString();
|
||||
@@ -752,28 +756,28 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
|
||||
List list = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code","to_length");
|
||||
map.put("value",length);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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");
|
||||
map5.put("code", "to_command");
|
||||
map5.put("value", "4");
|
||||
list.add(map5);
|
||||
this.writing(list);
|
||||
this.writing(list);
|
||||
message ="申请贴标成功";
|
||||
message = "申请贴标成功";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
message = "未返回尺寸信息";
|
||||
@@ -798,7 +802,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
message = "申请空盘入库任务中...";
|
||||
JSONObject apply = new JSONObject();
|
||||
apply.put("device_code", device_code);
|
||||
apply.put("type","2");
|
||||
apply.put("type", "2");
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
if (ObjectUtil.isEmpty(jo)) {
|
||||
@@ -809,7 +813,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
requireEmptyInSuccess = true;
|
||||
} else {
|
||||
requireEmptyInSuccess = false;
|
||||
message = "申请空盘入库失败,"+jo.get("message").toString();
|
||||
message = "申请空盘入库失败," + jo.get("message").toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -828,7 +832,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
message = "申请AGV搬运任务中...";
|
||||
JSONObject apply = new JSONObject();
|
||||
apply.put("device_code", device_code);
|
||||
apply.put("type","1");
|
||||
apply.put("type", "1");
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
if (ObjectUtil.isEmpty(jo)) {
|
||||
@@ -839,7 +843,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
requireEmptyOutSuccess = true;
|
||||
} else {
|
||||
requireEmptyOutSuccess = false;
|
||||
message = "申请AGV搬运任务失败,"+jo.get("message").toString();
|
||||
message = "申请AGV搬运任务失败," + jo.get("message").toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -858,7 +862,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
message = "申请空盘出库任务中...";
|
||||
JSONObject apply = new JSONObject();
|
||||
apply.put("device_code", device_code);
|
||||
apply.put("type","3");
|
||||
apply.put("type", "3");
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
if (ObjectUtil.isEmpty(jo)) {
|
||||
@@ -869,7 +873,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
||||
requireEmptyOutSuccess = true;
|
||||
} else {
|
||||
requireEmptyOutSuccess = false;
|
||||
message = "申请空盘出库失败,"+jo.get("message").toString();
|
||||
message = "申请空盘出库失败," + jo.get("message").toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user