fix: 出库联调修改

This commit is contained in:
2024-05-27 09:32:02 +08:00
parent 67120342ac
commit 7abf41f2f4
7 changed files with 46 additions and 38 deletions

View File

@@ -318,12 +318,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
//申请AGV任务
if (move == 1 && !requireSucess) {
applyAgvTask();
List list1 = new ArrayList();
Map map = new HashMap();
map.put("code", "mode");
map.put("value", 5);
list1.add(map);
this.writing(list1);
}
break;
@@ -417,6 +412,12 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
} else {
if (jo.getInteger("status") == 200) {
message = "one_message16";
List list1 = new ArrayList();
Map map = new HashMap();
map.put("code", "to_command");
map.put("value", 8);
list1.add(map);
this.writing(list1);
List list = new ArrayList();
while (!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDevice_code() + ".to_command").toString()
, "8")) {

View File

@@ -330,6 +330,12 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
param.put("device_code", device_code);
param.put("vehicle_code", inst.getVehicle_code());
param.put("type", AcsToLmsApplyTaskTypeEnum.LABEL_BIND.getType());
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("申请捆扎,请求参数:" + param)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
String response = acsToWmsService.deviceApplyTwo(param);
JSONObject jo = JSON.parseObject(response);
if (StrUtil.isNotEmpty(jo.getString("body")) || jo.getInteger("status") == 200) {
@@ -420,8 +426,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
String bindingTemplate = jo.get("bindingTemplate").toString();
String printDevice = jo.get("printDevice").toString();
String bundleTimes = jo.get("bundleTimes").toString();
String case1 = jo.get("case").toString();
String direction = jo.get("direction").toString();
List list = new ArrayList();
if (mode == 10 || mode == 16) {
@@ -529,21 +534,15 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
map12.put("code", "to_labeling_template");
map12.put("value", labelingTemplate);
Map map13 = new HashMap();
map13.put("code", "to_length");
map13.put("value", length);
list.add(map13);
Map map14 = new HashMap();
map14.put("code", "to_width");
map14.put("value", width);
list.add(map14);
Map map15 = new HashMap();
map15.put("code", "to_height");
map15.put("value", height);
list.add(map15);
Map map11 = new HashMap();
map11.put("code", "to_binding_times");
map11.put("value", bundleTimes);
list.add(map11);
}
if(mode == 17){
String case1 = jo.get("case").toString();
String direction = jo.get("direction").toString();
Map map = new HashMap();
map.put("code", "to_length");
map.put("value", length);

View File

@@ -240,15 +240,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode);
}
if (error == 20){
applyErrorHeight();
List list2 = new ArrayList();
Map map2 = new HashMap();
map2.put("code", "to_command");
map2.put("value", 23);
list2.add(map2);
this.writing(list2);
}
if(move !=last_move){
if (ObjectUtil.isNotEmpty(inst)){
@@ -319,6 +311,10 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
if (mode == 18 && move == 1 && !requireSucess){
applyBoxReturnTask(StorageTypeEnum.BOX_RETURN.getType(), mode);
}
if (mode == 23 && !requireSucess){
applyErrorHeight();
}
//申请入库指令、异常位指令
@@ -403,7 +399,12 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
map.put("value", heightLevel);
list1.add(map);
this.writing(list1);
this.requireSucess = true;
List list2 = new ArrayList();
Map map2 = new HashMap();
map2.put("code", "to_command");
map2.put("value", 23);
list2.add(map2);
this.writing(list2);
}else {
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)

View File

@@ -27,7 +27,7 @@ public class ItemProtocol {
/**
* 托盘方向
*/
public static String item_carrier_direction = "carrier_direction";
public static String item_container_direction = "container_direction";
/**
* 物料条码
@@ -139,7 +139,7 @@ public class ItemProtocol {
}
public int getCarrier_direction() {
return this.getOpcIntegerValue(item_carrier_direction);
return this.getOpcIntegerValue(item_container_direction);
}
public int getError() {
@@ -197,7 +197,7 @@ public class ItemProtocol {
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0"));
list.add(new ItemDto(item_mode, "工作模式", "DB600.B2"));
list.add(new ItemDto(item_move, "光电信号", "DB600.B3"));
list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB600.B4"));
list.add(new ItemDto(item_container_direction, "托盘方向", "DB600.B4"));
list.add(new ItemDto(item_action, "动作信号", "DB600.B5"));
list.add(new ItemDto(item_error, "报警信号", "DB600.B6"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB101.B7"));

View File

@@ -28,4 +28,9 @@ public class InteractionJsonDTO {
*/
private String containerType;
/**
* 高度等级
*/
private String heightLevel;
}

View File

@@ -483,6 +483,12 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
map9.put("value", interactionJsonDTO.getContainerType());
list.add(map9);
}
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getHeightLevel())) {
Map<String, Object> map11 = new HashMap<>();
map11.put("code", "to_height_level");
map11.put("value", interactionJsonDTO.getHeightLevel());
list.add(map11);
}
}
this.writing(list);

View File

@@ -52,10 +52,7 @@ public class ItemProtocol {
public static String item_y = "y";
/**
* 下发托盘类型
*/
public static String item_to_container_type = "to_container_type";
/**
@@ -220,7 +217,6 @@ public class ItemProtocol {
list.add(new ItemDto(item_to_target, "下发目标站", "DB2.W4"));
list.add(new ItemDto(item_to_task, "下发任务号", "DB2.D6"));
list.add(new ItemDto(item_to_onset, "下发起始站", "DB2.W2"));
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB102.B8"));
list.add(new ItemDto(item_to_length, "木箱长度", "DB601.W10"));
list.add(new ItemDto(item_to_width, "木箱宽度", "DB601.W12"));
list.add(new ItemDto(item_to_height, "木箱高度", "DB601.W14"));