周俊杰 1 year ago
parent
commit
3947063034
  1. 2
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/DeviceDriver.java
  2. 5
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  3. 34
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java
  4. 34
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ConveyorPressStationDeviceDriver.java
  5. 22
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDeviceDriver.java
  6. 24
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/LnshFoldDiscSiteDeviceDriver.java
  7. 23
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_kiln_lane/LnshKilnLaneDeviceDriver.java
  8. 24
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_mixing_mill/LnshMixingMillDeviceDriver.java
  9. 23
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_line/LnshPackageLineDeviceDriver.java
  10. 24
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/LnshPackageSiteDeviceDriver.java
  11. 21
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java
  12. 42
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java
  13. 27
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java
  14. 33
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java
  15. 21
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/package_site/PackageSiteDeviceDriver.java
  16. 3
      acs/nladmin-ui/src/views/acs/monitor/device/index.vue
  17. 3
      acs/nladmin-ui/src/views/system/monitor/device/index.vue

2
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/DeviceDriver.java

@ -46,7 +46,7 @@ public interface DeviceDriver {
} else {
mode = RequestMethodEnum.getName(mode);
}
return ObjectUtil.isEmpty(mode)? "未定义":mode;
return ObjectUtil.isEmpty(mode)? "无效的请求,驱动中未配置":mode;
}
}

5
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -1099,7 +1099,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
}
}
//标准版-下发条码输送线
//标准版-下发条码输送线 需要下发条码
if (device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver) {
conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver();
if (conveyorBarcodeDeviceDriver.getMode() != 0
@ -1107,6 +1107,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
inst.setExecute_status("6");
instructionService.update(inst);
conveyorBarcodeDeviceDriver.writing(5);
if(ObjectUtil.isNotEmpty(inst.getVehicle_code())){
conveyorBarcodeDeviceDriver.writing("to_barcode",inst.getVehicle_code());
}
data = AgvService.sendAgvOneModeInst(phase, index, 0);
TaskDto task=taskService.findByCode(inst.getTask_code());
String material=task.getDirection();

34
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java

@ -377,38 +377,10 @@ public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver impleme
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String move;
String action;
String io_action;
boolean hasGoods;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 4:
mode = "叫料";
break;
case 5:
mode = "申请空盘";
break;
case 6:
mode = "申请入库";
break;
case 11:
mode = "半托缓存强制去包装";
break;
case 15:
mode = "送空托盘";
break;
default:
mode = String.valueOf(this.mode);
}
if (this.move == 0) {
move = "无货";
hasGoods = false;
@ -469,6 +441,12 @@ public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver impleme
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);

34
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ConveyorPressStationDeviceDriver.java

@ -357,38 +357,10 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String move;
String action;
String io_action;
boolean hasGoods;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 4:
mode = "叫料";
break;
case 5:
mode = "申请空盘";
break;
case 6:
mode = "申请入库";
break;
case 11:
mode = "半托缓存强制去包装";
break;
case 15:
mode = "送空托盘";
break;
default:
mode = String.valueOf(this.mode);
}
if (this.move == 0) {
move = "无货";
hasGoods = false;
@ -449,6 +421,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);

22
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSON;
@ -334,24 +335,9 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String move;
boolean hasGoods;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "运行中";
break;
default:
mode = String.valueOf(this.mode);
}
if (this.move == 0) {
move = "无货";
hasGoods = false;
@ -384,6 +370,12 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("move", move);
jo.put("container_type", container_type);
jo.put("error", error);

24
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/LnshFoldDiscSiteDeviceDriver.java

@ -347,26 +347,8 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String status;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "排产确认";
break;
case 4:
mode = "工单完成";
break;
default:
mode = String.valueOf(this.mode);
}
switch (this.status) {
case 1:
status = "待机";
@ -405,6 +387,12 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("status", status);
jo.put("error", error);
jo.put("open_time", open_time);

23
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_kiln_lane/LnshKilnLaneDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.lnsh.lnsh_kiln_lane;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;
@ -252,23 +253,7 @@ public class LnshKilnLaneDeviceDriver extends AbstractOpcDeviceDriver implements
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String status;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "运行中";
break;
default:
mode = String.valueOf(this.mode);
}
switch (this.status) {
case 1:
status = "待机";
@ -286,6 +271,12 @@ public class LnshKilnLaneDeviceDriver extends AbstractOpcDeviceDriver implements
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("status", status);
jo.put("open_time", open_time);
jo.put("standby_time", standby_time);

24
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_mixing_mill/LnshMixingMillDeviceDriver.java

@ -289,26 +289,8 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String status;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "排产确认";
break;
case 4:
mode = "工单完成";
break;
default:
mode = String.valueOf(this.mode);
}
switch (this.status) {
case 1:
status = "待机";
@ -347,6 +329,12 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("status", status);
jo.put("error", error);
jo.put("open_time", open_time);

23
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_line/LnshPackageLineDeviceDriver.java

@ -358,23 +358,7 @@ public class LnshPackageLineDeviceDriver extends AbstractOpcDeviceDriver impleme
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String status;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "运行中";
break;
default:
mode = String.valueOf(this.mode);
}
switch (this.status) {
case 1:
status = "待机";
@ -392,7 +376,12 @@ public class LnshPackageLineDeviceDriver extends AbstractOpcDeviceDriver impleme
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
jo.put("status", status);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
} jo.put("status", status);
jo.put("error", error);
jo.put("open_time", open_time);
jo.put("standby_time", standby_time);

24
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_site/LnshPackageSiteDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.lnsh.lnsh_package_site;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@ -243,26 +244,10 @@ public class LnshPackageSiteDeviceDriver extends AbstractOpcDeviceDriver impleme
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String move;
String action;
String io_action;
boolean hasGoods;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "运行中";
break;
default:
mode = String.valueOf(this.mode);
}
if (this.move == 0) {
move = "无货";
hasGoods = false;
@ -322,7 +307,12 @@ public class LnshPackageSiteDeviceDriver extends AbstractOpcDeviceDriver impleme
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);

21
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java

@ -612,23 +612,8 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
String mode;
String status;
String action;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "运行中";
break;
default:
mode = String.valueOf(this.mode);
}
switch (this.status) {
case 1:
status = "待机";
@ -680,6 +665,12 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("status", status);
jo.put("action", action);
jo.put("error", error);

42
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java

@ -1201,46 +1201,10 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
@Override
public JSONObject getDeviceStatusName() {
String mode;
String move;
String action;
String io_action;
boolean hasGoods;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 4:
mode = "叫料";
break;
case 5:
mode = "叫空托盘";
break;
case 6:
mode = "送空托盘";
break;
case 7:
mode = "码垛完成";
break;
case 8:
mode = "强制码垛完成";
break;
case 9:
mode = "获取托盘信息";
break;
case 11:
mode = "强制去包装(打包)";
break;
case 14:
mode = "强制去包装(不打包)";
default:
mode = String.valueOf(this.mode);
}
if (this.move == 0) {
move = "无货";
hasGoods = false;
@ -1307,6 +1271,12 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);

27
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java

@ -87,7 +87,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
private Date instruction_require_time = new Date();
private Date instruction_finished_time = new Date();
private int instruction_require_time_out;
private int instruction_require_time_out = 3000;
boolean requireSucess = false;
private int instruction_finished_time_out;
@ -477,26 +477,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String status;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "排产确认";
break;
case 4:
mode = "工单完成";
break;
default:
mode = String.valueOf(this.mode);
}
switch (this.status) {
case 1:
status = "待机";
@ -535,6 +516,12 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("status", status);
jo.put("error", error);
jo.put("open_time", open_time);

33
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java

@ -418,38 +418,11 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String move;
String action;
String io_action;
boolean hasGoods;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 4:
mode = "叫料";
break;
case 5:
mode = "申请空盘";
break;
case 6:
mode = "申请入库";
break;
case 11:
mode = "半托缓存强制去包装";
break;
case 15:
mode = "送空托盘";
break;
default:
mode = String.valueOf(this.mode);
}
if (this.move == 0) {
move = "无货";
hasGoods = false;
@ -510,6 +483,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);

21
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/package_site/PackageSiteDeviceDriver.java

@ -316,26 +316,11 @@ public class PackageSiteDeviceDriver extends AbstractOpcDeviceDriver implements
@Override
public JSONObject getDeviceStatusName() throws Exception {
String mode;
String move;
String action;
String io_action;
boolean hasGoods;
switch (this.mode) {
case 0:
mode = "脱机";
break;
case 2:
mode = "待机";
break;
case 3:
mode = "运行中";
break;
default:
mode = String.valueOf(this.mode);
}
if (this.move == 0) {
move = "无货";
hasGoods = false;
@ -396,6 +381,12 @@ public class PackageSiteDeviceDriver extends AbstractOpcDeviceDriver implements
JSONObject jo = new JSONObject();
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
Object requestNo = this.getExtraValue().get(String.valueOf(this.mode));
if(ObjectUtil.isNotEmpty(requestNo)){
jo.put("modeName", this.getModeName(String.valueOf(requestNo)));
} else {
jo.put("modeName", "无效的请求,驱动中未配置");
}
jo.put("move", move);
jo.put("action", action);
jo.put("io_action", io_action);

3
acs/nladmin-ui/src/views/acs/monitor/device/index.vue

@ -780,6 +780,9 @@ export default {
}else if (val==='positionCode'){
const obj = { name: '位置编码', value: data[val] }
this.arr.push(obj)
}else if (val==='modeName'){
const obj = { name: '模式名称', value: data[val] }
this.arr.push(obj)
}
}
}

3
acs/nladmin-ui/src/views/system/monitor/device/index.vue

@ -535,6 +535,9 @@ export default {
} else if (val === 'task_code') {
const obj = { name: '当前执行任务号', value: data[val] }
this.arr.push(obj)
}else if (val==='modeName'){
const obj = { name: '模式名称', value: data[val] }
this.arr.push(obj)
}
}
}

Loading…
Cancel
Save