feat:项目结构调整
This commit is contained in:
@@ -191,7 +191,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
// 解析错误信息,提取action和mode不满足的原因
|
||||
String error_action = null;
|
||||
String error_mode = null;
|
||||
|
||||
|
||||
// 根据不同设备驱动类型,提取action和mode信息
|
||||
if (deviceDriver instanceof WasteFoilWeighingStationDriver) {
|
||||
WasteFoilWeighingStationDriver driver = (WasteFoilWeighingStationDriver) deviceDriver;
|
||||
@@ -201,14 +201,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if (driver.getMode() != 2) {
|
||||
error_mode = "模式:" + driver.getMode() + "不满足条件";
|
||||
}
|
||||
} else if (deviceDriver instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
StandardOrdinarySiteDeviceDriver driver = (StandardOrdinarySiteDeviceDriver) deviceDriver;
|
||||
if (driver.getAction() != 1) {
|
||||
error_action = "动作信号:" + driver.getAction() + "不满足条件";
|
||||
}
|
||||
if (driver.getMode() != 2) {
|
||||
error_mode = "模式:" + driver.getMode() + "不满足条件";
|
||||
}
|
||||
} else if (deviceDriver instanceof HongXiangStationDeviceDriver) {
|
||||
HongXiangStationDeviceDriver driver = (HongXiangStationDeviceDriver) deviceDriver;
|
||||
if (driver.getAction() != 1) {
|
||||
@@ -225,14 +217,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if (driver.getMode() != 2) {
|
||||
error_mode = "模式:" + driver.getMode() + "不满足条件";
|
||||
}
|
||||
} else if (deviceDriver instanceof RangingStationsDeviceDriver) {
|
||||
RangingStationsDeviceDriver driver = (RangingStationsDeviceDriver) deviceDriver;
|
||||
if (driver.getAction() != 1) {
|
||||
error_action = "动作信号:" + driver.getAction() + "不满足条件";
|
||||
}
|
||||
if (driver.getMode() != 2) {
|
||||
error_mode = "模式:" + driver.getMode() + "不满足条件";
|
||||
}
|
||||
} else if (deviceDriver instanceof StandardInspectSiteDeviceDriver) {
|
||||
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) deviceDriver;
|
||||
if (driver.getAction() != 1) {
|
||||
@@ -242,28 +226,28 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
error_mode = "模式:" + driver.getMode() + "不满足条件";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 创建AGV状态对象
|
||||
TwoFloorAgvStatus agvStatus = new TwoFloorAgvStatus();
|
||||
|
||||
|
||||
// 设置AGV车辆代码
|
||||
String vehicleCode = String.format("AGV%02d", carno);
|
||||
agvStatus.setVehicle_code(vehicleCode);
|
||||
|
||||
|
||||
// 设置错误信息
|
||||
agvStatus.setIs_error(true);
|
||||
agvStatus.setStatus("error");
|
||||
agvStatus.setError_message(message);
|
||||
agvStatus.setError_action(error_action);
|
||||
agvStatus.setError_mode(error_mode);
|
||||
|
||||
|
||||
// 更新到服务
|
||||
agvStatusService.updateAgvStatus(agvStatus);
|
||||
} catch (Exception e) {
|
||||
log.error("记录任务卡住原因失败: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public synchronized void processSocket(int[] arr) throws Exception {
|
||||
device_code = this.getDeviceCode();
|
||||
byte[] data = null;
|
||||
|
||||
@@ -44,7 +44,6 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 输送线
|
||||
@@ -40,7 +40,6 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 一楼木箱机械手、子卷机械手对接位
|
||||
@@ -40,7 +40,6 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 一楼出库捆轧贴标位
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.nl.acs.device_driver.lk_conveyor.finished_product_out_with_bind_lable_conveyor;
|
||||
|
||||
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
|
||||
import org.nl.acs.device_driver.lk_conveyor.finished_product_out_with_bind_lable_conveyor.FinishedProductOutBindLableDeviceDriver;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -42,7 +42,6 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 拆叠盘机
|
||||
@@ -44,7 +44,6 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 出入库输送线工位-带扫码称重
|
||||
@@ -548,7 +547,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
param.put("weight", this.weight);
|
||||
}
|
||||
param.put("type", type);
|
||||
HttpResponse httpResponse = acsToWmsService.c(param);
|
||||
HttpResponse httpResponse = acsToWmsService.applyTwo(param);
|
||||
if (ObjectUtil.isNotEmpty(httpResponse)) {
|
||||
JSONObject resp = JSONObject.parseObject(httpResponse.body());
|
||||
if (resp != null && resp.getIntValue("status") == 200) {
|
||||
Reference in New Issue
Block a user