diff --git a/acs2/nladmin-system/nlsso-server/pom.xml b/acs2/nladmin-system/nlsso-server/pom.xml
index ecfd722..de224fa 100644
--- a/acs2/nladmin-system/nlsso-server/pom.xml
+++ b/acs2/nladmin-system/nlsso-server/pom.xml
@@ -436,6 +436,11 @@
poi-ooxml-schemas
4.1.2
+
+ com.reader
+ reader
+ 1.0.0
+
org.springframework.retry
spring-retry
@@ -463,6 +468,7 @@
org.nl.AppRun
true
+ true
diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java
index 2c9e125..5db31bc 100644
--- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java
+++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java
@@ -169,7 +169,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
String to_taskNum = null;
String last_to_taskNum = null;
-
+ Integer outbound_task_num = null;
//子卷条码
String material_barcode = null;
@@ -329,12 +329,14 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
// 1. 查询设备
Device device = deviceAppService.findDeviceByCode(device_code);
+ Integer result = updateOutboundTaskNum(-1,true);
+
// 2. 更新任务数
- device.setOutbound_task_num(device.getOutbound_task_num() - 1);
+ device.setOutbound_task_num(result);
// 3. 保存更新(假设需要显式保存)
deviceservice.update(new UpdateWrapper()
- .set("outbound_task_num",device.getOutbound_task_num())
+ .set("outbound_task_num",result)
.eq("device_code",device.getDevice_code()));
// 更新task的出库完成数
@@ -350,7 +352,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
list1.add(map);
Map map2 = new HashMap();
map2.put("code", "to_taskNum");//下发出库数
- map2.put("value", device.getOutbound_task_num());
+ map2.put("value", result);
this.writing(list1);
// 5. 只有成功后才设置标记
@@ -431,7 +433,6 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
// luceneExecuteLogService.deviceExecuteLog(logDto);
// }
-
/**
* 申请任务
*/
@@ -549,6 +550,15 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
return true;
}
+ public synchronized Integer updateOutboundTaskNum(Integer num,Boolean addFlag) throws Exception {
+ if(addFlag) {
+ this.outbound_task_num = this.outbound_task_num + num;
+ } else{
+ this.outbound_task_num = num;
+ }
+ return this.outbound_task_num;
+ }
+
@Override
public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject();
diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
index ae86ceb..ae60d68 100644
--- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
+++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
@@ -1929,8 +1929,8 @@ public class InstructionServiceImpl extends CommonServiceImpl instructionsList = instructions.stream()
.filter(item -> StrUtil.equals(item.getNext_device_code(), deviceCode)
- && StrUtil.equals(item.getInstruction_status(), TaskStatusEnum.READY.getIndex())
- && StrUtil.equals(item.getInstruction_status(), TaskStatusEnum.BUSY.getIndex())).collect(Collectors.toList());
+ && (StrUtil.equals(item.getInstruction_status(), TaskStatusEnum.READY.getIndex())
+ || StrUtil.equals(item.getInstruction_status(), TaskStatusEnum.BUSY.getIndex()))).collect(Collectors.toList());
return instructionsList.size();
}
diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java
index e794d5a..19eb816 100644
--- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java
+++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java
@@ -198,6 +198,7 @@ public class AutoCreateInst {
if (beltConveyorDeviceDriver.getType() == 2) {
//因为已经创建成功,因此这个时候可以+1了
int count = instructionService.queryInstructionCount(next_device_code);
+ beltConveyorDeviceDriver.updateOutboundTaskNum(count,false);
beltConveyorDeviceDriver.writing("to_taskNum", count + "");
nextdevice.setOutbound_task_num(count);
}
diff --git a/acs2/nladmin-ui/.env.production b/acs2/nladmin-ui/.env.production
index 7db94e9..2283a82 100644
--- a/acs2/nladmin-ui/.env.production
+++ b/acs2/nladmin-ui/.env.production
@@ -2,6 +2,6 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
-VUE_APP_BASE_API = 'http://192.168.229.70:8011'
+VUE_APP_BASE_API = 'http://172.19.10.71:8011'
# 如果接口是 http 形式, wss 需要改为 ws
-VUE_APP_WS_API = 'ws://192.168.229.70:8011'
+VUE_APP_WS_API = 'ws://172.19.10.71:8011'
diff --git a/acs2/nladmin-ui/public/config.js b/acs2/nladmin-ui/public/config.js
index 07ec11d..2809f39 100644
--- a/acs2/nladmin-ui/public/config.js
+++ b/acs2/nladmin-ui/public/config.js
@@ -3,7 +3,7 @@ window.g = {
VUE_APP_BASE_API: 'http://127.0.0.1:8011'
},
prod: {
- VUE_APP_BASE_API: 'http://192.168.229.70:8011'
+ VUE_APP_BASE_API: 'http://172.19.10.71:8011'
}
}