Browse Source

惠氏更新

master
loujf 2 years ago
parent
commit
ffa9ff130a
  1. 23
      hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java
  2. 8
      hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_inspect_site/StandardInspectSiteDeviceDriver.java
  3. 21
      hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/HsDeviceStatus.java
  4. 11
      hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/HsSaveTask.java

23
hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java

@ -22,6 +22,7 @@ import org.nl.acs.device_driver.ndxy_special_two.NdxySpecialTwoDeviceDriver;
import org.nl.acs.device_driver.special_ordinary_site.SpecialOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.special_ordinary_site.SpecialOrdinarySiteDeviceDriver;
import org.nl.acs.device_driver.standard_autodoor.StandardAutodoorDeviceDriver; import org.nl.acs.device_driver.standard_autodoor.StandardAutodoorDeviceDriver;
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver; import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
import org.nl.acs.device_driver.standard_inspect_site_smart200.StandardInspectSiteSmartDeviceDriver;
import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver; import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver;
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
import org.nl.acs.device_driver.standard_storage.StandardStorageDeviceDriver; import org.nl.acs.device_driver.standard_storage.StandardStorageDeviceDriver;
@ -813,6 +814,7 @@ public class AgvServiceImpl implements AgvService {
SpecialOrdinarySiteDeviceDriver specialOrdinarySiteDeviceDriver; SpecialOrdinarySiteDeviceDriver specialOrdinarySiteDeviceDriver;
YzjaSpecialDeviceDriver yzjaSpecialDeviceDriver; YzjaSpecialDeviceDriver yzjaSpecialDeviceDriver;
StandardManipulatorInspectSiteDeviceDriver standardManipulatorInspectSiteDeviceDriver; StandardManipulatorInspectSiteDeviceDriver standardManipulatorInspectSiteDeviceDriver;
StandardInspectSiteSmartDeviceDriver standardInspectSiteSmartDeviceDriver;
//请求进入 //请求进入
if ("onEntry".equals(type)) { if ("onEntry".equals(type)) {
@ -957,6 +959,27 @@ public class AgvServiceImpl implements AgvService {
} }
} }
}
if (addressdevice.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) addressdevice.getDeviceDriver();
//取货完成
if ("Load".equals(action)) {
if (standardInspectSiteSmartDeviceDriver.getMode() != 0 && standardInspectSiteSmartDeviceDriver.getMove() == 0) {
inst.setExecute_device_code(processingVehicle);
inst.setExecute_status("2");
standardInspectSiteSmartDeviceDriver.writing(2);
is_feedback = true;
}
//放货完成
} else if ("Unload".equals(action)) {
if (standardInspectSiteSmartDeviceDriver.getMode() != 0 && standardInspectSiteSmartDeviceDriver.getMove() > 0) {
inst.setExecute_device_code(address);
inst.setExecute_status("4");
standardInspectSiteSmartDeviceDriver.writing(3);
is_feedback = true;
}
}
} }
if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver(); standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver();

8
hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_inspect_site/StandardInspectSiteDeviceDriver.java

@ -98,12 +98,14 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
private int instruction_finished_time_out; private int instruction_finished_time_out;
int branchProtocol = 0; int branchProtocol = 0;
Boolean islock = false;
//备注 //备注
String remark; String remark = "";
//数量 //数量
String qty; String qty = "";
//物料 //物料
String material; String material = "";
//批次 //批次
String batch; String batch;
//当前指令 //当前指令

21
hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/HsDeviceStatus.java

@ -6,6 +6,7 @@ import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import org.nl.acs.device.service.DeviceService; import org.nl.acs.device.service.DeviceService;
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
import org.nl.acs.opc.Device; import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppService;
@ -47,6 +48,7 @@ public class HsDeviceStatus {
String device_code = MapUtil.getStr(whereJson1, "device_code"); String device_code = MapUtil.getStr(whereJson1, "device_code");
Device deviceApp = deviceAppService.findDeviceByCode(device_code); Device deviceApp = deviceAppService.findDeviceByCode(device_code);
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
if (deviceApp.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (deviceApp.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) deviceApp.getDeviceDriver(); standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) deviceApp.getDeviceDriver();
jo.put("device_code", device_code); jo.put("device_code", device_code);
@ -56,6 +58,15 @@ public class HsDeviceStatus {
jo.put("remark", standardOrdinarySiteDeviceDriver.getRemark()); jo.put("remark", standardOrdinarySiteDeviceDriver.getRemark());
jo.put("islock", standardOrdinarySiteDeviceDriver.getIslock()); jo.put("islock", standardOrdinarySiteDeviceDriver.getIslock());
} }
if (deviceApp.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) deviceApp.getDeviceDriver();
jo.put("device_code", device_code);
jo.put("quantity", standardInspectSiteDeviceDriver.getQty());
jo.put("material_type", standardInspectSiteDeviceDriver.getMaterial());
jo.put("hasGood", standardInspectSiteDeviceDriver.getHasGoods());
jo.put("remark", standardInspectSiteDeviceDriver.getRemark());
jo.put("islock", standardInspectSiteDeviceDriver.getIslock());
}
device.add(jo); device.add(jo);
} }
for (int i = 0; i < array2.size(); i++) { for (int i = 0; i < array2.size(); i++) {
@ -63,6 +74,7 @@ public class HsDeviceStatus {
String device_code = MapUtil.getStr(whereJson2, "device_code"); String device_code = MapUtil.getStr(whereJson2, "device_code");
Device deviceApp = deviceAppService.findDeviceByCode(device_code); Device deviceApp = deviceAppService.findDeviceByCode(device_code);
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
if (deviceApp.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (deviceApp.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) deviceApp.getDeviceDriver(); standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) deviceApp.getDeviceDriver();
jo.put("device_code", device_code); jo.put("device_code", device_code);
@ -72,6 +84,15 @@ public class HsDeviceStatus {
jo.put("remark", standardOrdinarySiteDeviceDriver.getRemark()); jo.put("remark", standardOrdinarySiteDeviceDriver.getRemark());
jo.put("islock", standardOrdinarySiteDeviceDriver.getIslock()); jo.put("islock", standardOrdinarySiteDeviceDriver.getIslock());
} }
if (deviceApp.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) deviceApp.getDeviceDriver();
jo.put("device_code", device_code);
jo.put("quantity", standardInspectSiteDeviceDriver.getQty());
jo.put("material_type", standardInspectSiteDeviceDriver.getMaterial());
jo.put("hasGood", standardInspectSiteDeviceDriver.getHasGoods());
jo.put("remark", standardInspectSiteDeviceDriver.getRemark());
jo.put("islock", standardInspectSiteDeviceDriver.getIslock());
}
device2.add(jo); device2.add(jo);
} }
json.put("device", device); json.put("device", device);

11
hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/HsSaveTask.java

@ -6,6 +6,7 @@ import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import org.nl.acs.device.service.DeviceService; import org.nl.acs.device.service.DeviceService;
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
import org.nl.acs.opc.Device; import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppService;
@ -44,6 +45,7 @@ public class HsSaveTask {
String device_code = MapUtil.getStr(whereJson1, "device_code"); String device_code = MapUtil.getStr(whereJson1, "device_code");
Device deviceApp = deviceAppService.findDeviceByCode(device_code); Device deviceApp = deviceAppService.findDeviceByCode(device_code);
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
if (deviceApp.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (deviceApp.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) deviceApp.getDeviceDriver(); standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) deviceApp.getDeviceDriver();
jo.put("device_code", device_code); jo.put("device_code", device_code);
@ -53,6 +55,15 @@ public class HsSaveTask {
jo.put("remark", standardOrdinarySiteDeviceDriver.getRemark()); jo.put("remark", standardOrdinarySiteDeviceDriver.getRemark());
jo.put("islock", standardOrdinarySiteDeviceDriver.getIslock()); jo.put("islock", standardOrdinarySiteDeviceDriver.getIslock());
} }
if (deviceApp.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) deviceApp.getDeviceDriver();
jo.put("device_code", device_code);
jo.put("quantity", standardInspectSiteDeviceDriver.getQty());
jo.put("material_type", standardInspectSiteDeviceDriver.getMaterial());
jo.put("hasGood", standardInspectSiteDeviceDriver.getHasGoods());
jo.put("remark", standardInspectSiteDeviceDriver.getRemark());
jo.put("islock", standardInspectSiteDeviceDriver.getIslock());
}
device.add(jo); device.add(jo);
} }
json.put("device", device); json.put("device", device);

Loading…
Cancel
Save