光电驱动fix&缓存区路线遮挡问题优化

This commit is contained in:
psh
2024-07-09 17:46:42 +08:00
parent dd4fa22af8
commit 50c928af7a
7 changed files with 58 additions and 49 deletions

View File

@@ -19,14 +19,14 @@ public class ItemProtocol {
public static String item_pallet_type = "pallet_type";
public static String item_to_command = "to_command";
public static String open_time = "open_time";
public static String off_time = "off_time";
public static String standby_time1 = "standby_time1";
public static String production_time1 = "production_time1";
public static String error_time1 = "error_time1";
public static String standby_time2 = "standby_time2";
public static String production_time2 = "production_time2";
public static String error_time2 = "error_time2";
// public static String open_time = "open_time";
// public static String off_time = "off_time";
// public static String standby_time1 = "standby_time1";
// public static String production_time1 = "production_time1";
// public static String error_time1 = "error_time1";
// public static String standby_time2 = "standby_time2";
// public static String production_time2 = "production_time2";
// public static String error_time2 = "error_time2";
@@ -128,18 +128,18 @@ public class ItemProtocol {
return list;
}
public static List<ItemDto> getReadableItemDtos4() {
ArrayList list = new ArrayList();
list.add(new ItemDto(open_time, "开机上报 ", "DB6.DTL770"));
list.add(new ItemDto(off_time, "关机上报", "DB6.DTL782"));
list.add(new ItemDto(standby_time1, "当前待机时间1", "DB6.DBD794"));
list.add(new ItemDto(production_time1, "当前生产时间1", "DB6.DBD798"));
list.add(new ItemDto(error_time1, "当前故障时间1", "DB6.DBD802"));
list.add(new ItemDto(standby_time2, "当前待机时间2", "DB6.DBD806"));
list.add(new ItemDto(production_time2, "当前生产时间2", "DB6.DBD810"));
list.add(new ItemDto(error_time2, "当前故障时间2", "DB6.DBD814"));
return list;
}
// public static List<ItemDto> getReadableItemDtos4() {
// ArrayList list = new ArrayList();
// list.add(new ItemDto(open_time, "开机上报 ", "DB6.DTL770"));
// list.add(new ItemDto(off_time, "关机上报", "DB6.DTL782"));
// list.add(new ItemDto(standby_time1, "当前待机时间1", "DB6.DBD794"));
// list.add(new ItemDto(production_time1, "当前生产时间1", "DB6.DBD798"));
// list.add(new ItemDto(error_time1, "当前故障时间1", "DB6.DBD802"));
// list.add(new ItemDto(standby_time2, "当前待机时间2", "DB6.DBD806"));
// list.add(new ItemDto(production_time2, "当前生产时间2", "DB6.DBD810"));
// list.add(new ItemDto(error_time2, "当前故障时间2", "DB6.DBD814"));
// return list;
// }

View File

@@ -67,9 +67,9 @@ public class SiteDefination implements OpcDeviceDriverDefination {
return ItemProtocol.getReadableItemDtos3();
}
public List<ItemDto> getReadableItemDtos4() {
return ItemProtocol.getReadableItemDtos4();
}
// public List<ItemDto> getReadableItemDtos4() {
// return ItemProtocol.getReadableItemDtos4();
// }

View File

@@ -397,11 +397,22 @@ public class SiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceD
return false;
} else {
this.time = date;
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setDevice_code(device_code);
request.setRequest_medthod_code(String.valueOf(type));
String resp = acsToWmsService.applyTask(request);
JSONObject res_jo = JSONObject.parseObject(resp);
JSONObject jsonObject = new JSONObject();
String device_code = this.device_code;
jsonObject.put("device_code", device_code);
jsonObject.put("requestDate", new Date());
jsonObject.put("vehicle_type",this.pallet_type);
jsonObject.put("requestNo", IdUtil.simpleUUID());
switch (type) {
case 7:
jsonObject.put("request_method_code", "TBXQKTask");
break;
case 8:
jsonObject.put("request_method_code", "KJQKTask");
break;
}
String result=acsToWmsService.applyTaskToWms(jsonObject);
JSONObject res_jo = JSONObject.parseObject(result);
if (StrUtil.equals(res_jo.getString("code"), "200")) {
this.writing(type);
this.setRequireSucess(true);