更新
This commit is contained in:
@@ -771,7 +771,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
list.add(map5);
|
list.add(map5);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
message ="申请贴标成功";
|
message ="申请捆扎成功";
|
||||||
requireApplyLaStrangulationSuccess = true;
|
requireApplyLaStrangulationSuccess = true;
|
||||||
} else {
|
} else {
|
||||||
message = "未返回尺寸信息";
|
message = "未返回尺寸信息";
|
||||||
|
|||||||
@@ -142,16 +142,19 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
weight = this.itemProtocol.getWeight();
|
weight = this.itemProtocol.getWeight();
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
requireSucess = false;
|
if( mode == 2){
|
||||||
requireApplyLabelingSuccess = false;
|
requireSucess = false;
|
||||||
requireApplyLaStrangulationSuccess =false;
|
requireApplyLabelingSuccess = false;
|
||||||
requireEmptyInSuccess =false;
|
requireApplyLaStrangulationSuccess =false;
|
||||||
requireEmptyOutSuccess =false;
|
requireEmptyInSuccess =false;
|
||||||
|
requireEmptyOutSuccess =false;
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode +"复位请求标记");
|
||||||
|
}
|
||||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||||
}
|
}
|
||||||
if (move != last_move) {
|
if (move != last_move) {
|
||||||
if(move == 0 ){
|
if(move == 0 && mode == 2 ){
|
||||||
this.clearWrite();
|
this.clearWrite();
|
||||||
}
|
}
|
||||||
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
||||||
|
|||||||
@@ -236,11 +236,13 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
case 2:
|
case 2:
|
||||||
//申请任务
|
//申请任务
|
||||||
String newBarcode = null;
|
String newBarcode = null;
|
||||||
if(plcbarcode_length != 0){
|
|
||||||
newBarcode = plcbarcode;
|
if(!StrUtil.isEmpty(barcode())){
|
||||||
|
newBarcode = barcode();
|
||||||
} else {
|
} else {
|
||||||
if(!StrUtil.isEmpty(barcode())){
|
//
|
||||||
newBarcode = barcode();
|
if(plcbarcode_length>2){
|
||||||
|
newBarcode = plcbarcode;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -614,6 +616,17 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
JSONObject jo = JSON.parseObject(str);
|
JSONObject jo = JSON.parseObject(str);
|
||||||
if (ObjectUtil.isEmpty(jo)) {
|
if (ObjectUtil.isEmpty(jo)) {
|
||||||
message = "接口不通";
|
message = "接口不通";
|
||||||
|
List list = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code","to_target");
|
||||||
|
map.put("value","1011");
|
||||||
|
list.add(map);
|
||||||
|
Map map2 = new HashMap();
|
||||||
|
map2.put("code","to_command");
|
||||||
|
map2.put("value","1");
|
||||||
|
list.add(map2);
|
||||||
|
this.writing(list);
|
||||||
|
message = "申请任务失败接口不通下发退回";
|
||||||
} else {
|
} else {
|
||||||
if (jo.getInteger("status") == 200) {
|
if (jo.getInteger("status") == 200) {
|
||||||
message = "申请任务成功";
|
message = "申请任务成功";
|
||||||
@@ -622,6 +635,18 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
} else {
|
} else {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
message = jo.get("message").toString();
|
message = jo.get("message").toString();
|
||||||
|
List list = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code","to_target");
|
||||||
|
map.put("value","1011");
|
||||||
|
list.add(map);
|
||||||
|
Map map2 = new HashMap();
|
||||||
|
map2.put("code","to_command");
|
||||||
|
map2.put("value","1");
|
||||||
|
list.add(map2);
|
||||||
|
this.writing(list);
|
||||||
|
message = "申请任务失败下发退回,"+message;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// requireSucess = true;
|
// requireSucess = true;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
|
|||||||
String status = requestParam.getState();
|
String status = requestParam.getState();
|
||||||
Instruction inst = instructionService.findByCodeFromCache(inst_code);
|
Instruction inst = instructionService.findByCodeFromCache(inst_code);
|
||||||
TaskDto task = taskService.findByCodeFromCache(inst.getTask_code());
|
TaskDto task = taskService.findByCodeFromCache(inst.getTask_code());
|
||||||
// 1 已接收 2 开始执行 3执行完成 4 阻挡 5 空洞
|
// 1 已接收 2 开始执行 3执行完成 4 5 取消
|
||||||
if(StrUtil.equals(status,"1") || StrUtil.equals(status,"2") ){
|
if(StrUtil.equals(status,"1") || StrUtil.equals(status,"2") ){
|
||||||
task.setTask_status("1");
|
task.setTask_status("1");
|
||||||
taskService.update(task);
|
taskService.update(task);
|
||||||
@@ -73,47 +73,11 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
|
|||||||
inst.setInstruction_status("2");
|
inst.setInstruction_status("2");
|
||||||
instructionService.finish(inst.getInstruction_id());
|
instructionService.finish(inst.getInstruction_id());
|
||||||
} else if(StrUtil.equals(status,"4")) {
|
} else if(StrUtil.equals(status,"4")) {
|
||||||
UpdateLKTaskRequest updateLKTaskRequest = new UpdateLKTaskRequest();
|
|
||||||
updateLKTaskRequest.setVehicle_code(inst.getVehicle_code());
|
// 5 取消指令
|
||||||
updateLKTaskRequest.setExt_task_id(task.getExt_task_id());
|
|
||||||
updateLKTaskRequest.setDtl_type(task.getStorage_task_type());
|
|
||||||
updateLKTaskRequest.setSrcLocation(inst.getNext_point_code());
|
|
||||||
updateLKTaskRequest.setType("1");
|
|
||||||
//调用LMS接口申请获取新库位
|
|
||||||
UpdateLKTaskResponse updateLKTaskResponse = acsToWmsService.updateLKTaskRequest(updateLKTaskRequest);
|
|
||||||
if(updateLKTaskResponse.getstatus() == 200){
|
|
||||||
String srcLocation = updateLKTaskResponse.getParameters().get("srcLocation");
|
|
||||||
String destLocation = updateLKTaskResponse.getParameters().get("destLocation ");
|
|
||||||
InStoreResetRequest inStoreResetRequest = new InStoreResetRequest();
|
|
||||||
inStoreResetRequest.setFloorNo(Integer.parseInt(inst.getTo_z()));
|
|
||||||
inStoreResetRequest.setSrcLocation(srcLocation);
|
|
||||||
inStoreResetRequest.setDestLocation(destLocation);
|
|
||||||
inStoreResetRequest.setPalletCode(inst.getVehicle_code());
|
|
||||||
inStoreResetRequest.setOrderId(inst.getInstruction_code());
|
|
||||||
acsToLiKuService.inStoreReset(inStoreResetRequest);
|
|
||||||
}
|
|
||||||
} else if(StrUtil.equals(status,"5")) {
|
} else if(StrUtil.equals(status,"5")) {
|
||||||
UpdateLKTaskRequest updateLKTaskRequest = new UpdateLKTaskRequest();
|
|
||||||
updateLKTaskRequest.setVehicle_code(inst.getVehicle_code());
|
|
||||||
updateLKTaskRequest.setExt_task_id(task.getExt_task_id());
|
|
||||||
updateLKTaskRequest.setDtl_type(task.getStorage_task_type());
|
|
||||||
updateLKTaskRequest.setSrcLocation(inst.getNext_point_code());
|
|
||||||
updateLKTaskRequest.setType("2");
|
|
||||||
//调用LMS接口申请获取新库位
|
|
||||||
UpdateLKTaskResponse updateLKTaskResponse = acsToWmsService.updateLKTaskRequest(updateLKTaskRequest);
|
|
||||||
if(updateLKTaskResponse.getstatus() == 200){
|
|
||||||
String srcLocation = updateLKTaskResponse.getParameters().get("srcLocation");
|
|
||||||
String destLocation = updateLKTaskResponse.getParameters().get("destLocation ");
|
|
||||||
|
|
||||||
InStoreResetRequest inStoreResetRequest = new InStoreResetRequest();
|
instructionService.cancel(inst.getInstruction_id());
|
||||||
inStoreResetRequest.setFloorNo(Integer.parseInt(inst.getTo_z()));
|
|
||||||
inStoreResetRequest.setSrcLocation(srcLocation);
|
|
||||||
inStoreResetRequest.setDestLocation(destLocation);
|
|
||||||
inStoreResetRequest.setPalletCode(inst.getVehicle_code());
|
|
||||||
inStoreResetRequest.setOrderId(inst.getInstruction_code());
|
|
||||||
acsToLiKuService.inStoreReset(inStoreResetRequest);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
InStoreReportResponse inStoreReportResponse = new InStoreReportResponse();
|
InStoreReportResponse inStoreReportResponse = new InStoreReportResponse();
|
||||||
inStoreReportResponse.setOrderId(inst_code);
|
inStoreReportResponse.setOrderId(inst_code);
|
||||||
@@ -150,25 +114,11 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
|
|||||||
} else if(StrUtil.equals(status,"3")){
|
} else if(StrUtil.equals(status,"3")){
|
||||||
inst.setInstruction_status("2");
|
inst.setInstruction_status("2");
|
||||||
instructionService.finish(inst.getInstruction_id());
|
instructionService.finish(inst.getInstruction_id());
|
||||||
//出库任务起点无货
|
|
||||||
} else if(StrUtil.equals(status,"4")){
|
|
||||||
UpdateLKTaskRequest updateLKTaskRequest = new UpdateLKTaskRequest();
|
|
||||||
updateLKTaskRequest.setVehicle_code(inst.getVehicle_code());
|
|
||||||
updateLKTaskRequest.setExt_task_id(task.getExt_task_id());
|
|
||||||
updateLKTaskRequest.setDtl_type(task.getStorage_task_type());
|
|
||||||
updateLKTaskRequest.setSrcLocation(inst.getStart_point_code());
|
|
||||||
updateLKTaskRequest.setType("5");
|
|
||||||
//调用LMS接口
|
|
||||||
UpdateLKTaskResponse updateLKTaskResponse = acsToWmsService.updateLKTaskRequest(updateLKTaskRequest);
|
|
||||||
|
|
||||||
|
} else if(StrUtil.equals(status,"4")){
|
||||||
|
//5 取消指令
|
||||||
} else if(StrUtil.equals(status,"5")){
|
} else if(StrUtil.equals(status,"5")){
|
||||||
UpdateLKTaskRequest updateLKTaskRequest = new UpdateLKTaskRequest();
|
instructionService.cancel(inst.getInstruction_id());
|
||||||
updateLKTaskRequest.setVehicle_code(inst.getVehicle_code());
|
|
||||||
updateLKTaskRequest.setExt_task_id(task.getExt_task_id());
|
|
||||||
updateLKTaskRequest.setDtl_type(task.getStorage_task_type());
|
|
||||||
updateLKTaskRequest.setSrcLocation(inst.getStart_point_code());
|
|
||||||
updateLKTaskRequest.setType("6");
|
|
||||||
UpdateLKTaskResponse updateLKTaskResponse = acsToWmsService.updateLKTaskRequest(updateLKTaskRequest);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
OutStoreReportResponse outStoreReportResponse = new OutStoreReportResponse();
|
OutStoreReportResponse outStoreReportResponse = new OutStoreReportResponse();
|
||||||
@@ -211,49 +161,10 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
|
|||||||
inst.setInstruction_status("2");
|
inst.setInstruction_status("2");
|
||||||
instructionService.finish(inst.getInstruction_id());
|
instructionService.finish(inst.getInstruction_id());
|
||||||
} else if(StrUtil.equals(status,"4")){
|
} else if(StrUtil.equals(status,"4")){
|
||||||
UpdateLKTaskRequest updateLKTaskRequest = new UpdateLKTaskRequest();
|
|
||||||
updateLKTaskRequest.setVehicle_code(inst.getVehicle_code());
|
|
||||||
updateLKTaskRequest.setExt_task_id(task.getExt_task_id());
|
|
||||||
updateLKTaskRequest.setDtl_type(task.getStorage_task_type());
|
|
||||||
updateLKTaskRequest.setSrcLocation(inst.getStart_point_code());
|
|
||||||
updateLKTaskRequest.setType("3");
|
|
||||||
//调用LMS接口
|
|
||||||
UpdateLKTaskResponse updateLKTaskResponse = acsToWmsService.updateLKTaskRequest(updateLKTaskRequest);
|
|
||||||
if(updateLKTaskResponse.getstatus() == 200){
|
|
||||||
String srcLocation = updateLKTaskResponse.getParameters().get("srcLocation");
|
|
||||||
String destLocation = updateLKTaskResponse.getParameters().get("destLocation ");
|
|
||||||
|
|
||||||
InStoreResetRequest inStoreResetRequest = new InStoreResetRequest();
|
|
||||||
inStoreResetRequest.setFloorNo(Integer.parseInt(inst.getTo_z()));
|
|
||||||
inStoreResetRequest.setSrcLocation(srcLocation);
|
|
||||||
inStoreResetRequest.setDestLocation(destLocation);
|
|
||||||
inStoreResetRequest.setPalletCode(inst.getVehicle_code());
|
|
||||||
inStoreResetRequest.setOrderId(inst.getInstruction_code());
|
|
||||||
acsToLiKuService.inStoreReset(inStoreResetRequest);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if(StrUtil.equals(status,"5")){
|
} else if(StrUtil.equals(status,"5")){
|
||||||
UpdateLKTaskRequest updateLKTaskRequest = new UpdateLKTaskRequest();
|
instructionService.cancel(inst.getInstruction_id());
|
||||||
updateLKTaskRequest.setVehicle_code(inst.getVehicle_code());
|
|
||||||
updateLKTaskRequest.setExt_task_id(task.getExt_task_id());
|
|
||||||
updateLKTaskRequest.setDtl_type(task.getStorage_task_type());
|
|
||||||
updateLKTaskRequest.setSrcLocation(inst.getNext_point_code());
|
|
||||||
updateLKTaskRequest.setType("4");
|
|
||||||
UpdateLKTaskResponse updateLKTaskResponse = acsToWmsService.updateLKTaskRequest(updateLKTaskRequest);
|
|
||||||
if(updateLKTaskResponse.getstatus() == 200){
|
|
||||||
String srcLocation = updateLKTaskResponse.getParameters().get("srcLocation");
|
|
||||||
String destLocation = updateLKTaskResponse.getParameters().get("destLocation ");
|
|
||||||
|
|
||||||
InStoreResetRequest inStoreResetRequest = new InStoreResetRequest();
|
|
||||||
inStoreResetRequest.setFloorNo(Integer.parseInt(inst.getTo_z()));
|
|
||||||
inStoreResetRequest.setSrcLocation(srcLocation);
|
|
||||||
inStoreResetRequest.setDestLocation(destLocation);
|
|
||||||
inStoreResetRequest.setPalletCode(inst.getVehicle_code());
|
|
||||||
inStoreResetRequest.setOrderId(inst.getInstruction_code());
|
|
||||||
acsToLiKuService.inStoreReset(inStoreResetRequest);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
MoveStoreReportResponse moveStoreReportResponse = new MoveStoreReportResponse();
|
MoveStoreReportResponse moveStoreReportResponse = new MoveStoreReportResponse();
|
||||||
moveStoreReportResponse.setOrderId(inst_code);
|
moveStoreReportResponse.setOrderId(inst_code);
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ public class OpcUtl {
|
|||||||
// throw new BusinessException(message.toString());
|
// throw new BusinessException(message.toString());
|
||||||
System.out.println("下发信号失败:"+message.toString());
|
System.out.println("下发信号失败:"+message.toString());
|
||||||
log.info("下发信号失败:"+message.toString());
|
log.info("下发信号失败:"+message.toString());
|
||||||
|
group.write(requests);
|
||||||
}
|
}
|
||||||
} catch (JIException arg7) {
|
} catch (JIException arg7) {
|
||||||
// throw new BusinessException(arg7);
|
// throw new BusinessException(arg7);
|
||||||
|
|||||||
Reference in New Issue
Block a user