diff --git a/acs/nladmin-system/nlsso-server/pom.xml b/acs/nladmin-system/nlsso-server/pom.xml
index 0283300..586c571 100644
--- a/acs/nladmin-system/nlsso-server/pom.xml
+++ b/acs/nladmin-system/nlsso-server/pom.xml
@@ -431,6 +431,22 @@
${commons-csv.version}
+
+ org.apache.poi
+ poi
+ 4.0.0
+
+
+ org.apache.poi
+ poi-ooxml
+ 4.0.0
+
+
+ org.apache.poi
+ poi-ooxml-schemas
+ 4.0.0
+
+
diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/ItemProtocol.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/ItemProtocol.java
index 66dff9e..0c5d1ac 100644
--- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/ItemProtocol.java
+++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/standard_inspect/ItemProtocol.java
@@ -34,7 +34,7 @@ public class ItemProtocol {
public int getOpcIntegerValue(String protocol) {
Integer value = this.driver.getIntegeregerValue(protocol);
if (value == null) {
- log.error("读取错误!");
+// log.error("读取错误!");
} else {
return value;
}
diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/ItemProtocol.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/ItemProtocol.java
index c3cb409..c45a251 100644
--- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/ItemProtocol.java
+++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/ItemProtocol.java
@@ -51,7 +51,7 @@ public class ItemProtocol {
public int getOpcIntegerValue(String protocol) {
Integer value = this.driver.getIntegeregerValue(protocol);
if (value == null) {
- log.error("读取错误!");
+// log.error("读取错误!");
} else {
return value;
}
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml b/acs/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml
index af346c8..9395b82 100644
--- a/acs/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml
@@ -1,22 +1,26 @@
server:
- port: 8010
+ port: 8011
#配置数据源
spring:
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
- url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.4.121}:${DB_PORT:3306}/${DB_NAME:yy_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
+ # url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
+ url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:cw_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
username: ${DB_USER:root}
+ # password: ${DB_PWD:Root.123456}
password: ${DB_PWD:123456}
# 初始连接数
initial-size: 5
# 最小连接数
min-idle: 15
# 最大连接数
- max-active: 60
+ max-active: 30
+ # 超时时间(以秒数为单位)
+ remove-abandoned-timeout: 180
# 获取连接超时时间
- max-wait: 5000
+ max-wait: 3000
# 连接有效性检测时间
time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间
@@ -36,11 +40,8 @@ spring:
enabled: true
stat-view-servlet:
enabled: true
- # 控制台管理用户名和密码
url-pattern: /druid/*
reset-enable: false
- login-username: admin
- login-password: 123456
filter:
stat:
enabled: true
@@ -51,24 +52,30 @@ spring:
wall:
config:
multi-statement-allow: true
+ flyway:
+ # 是否启用flyway
+ enabled: true
+ # 编码格式,默认UTF-8
+ encoding: UTF-8
+ # 迁移sql脚本文件存放路径,默认db/migration
+ locations: classpath:db/migration
+ # 迁移sql脚本文件名称的前缀,默认V
+ sql-migration-prefix: V
+ # 迁移sql脚本文件名称的分隔符,默认2个下划线__
+ sql-migration-separator: __
+ # 迁移sql脚本文件名称的后缀
+ sql-migration-suffixes: .sql
+ # 迁移时是否进行校验,默认true
+ validate-on-migrate: true
+ # 当迁移发现数据库非空且存在没有元数据的表时,自动执行基准迁移,新建schema_version表
+ baseline-on-migrate: true
redis:
#数据库索引
+ database: ${REDIS_DB:2}
host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379}
- password: ${REDIS_PWD:}
- #连接超时时间
- timeout: 5000
- redisson:
- config: |
- threads: 4
- nettyThreads: 4
- singleServerConfig:
- database: 1
- connectionMinimumIdleSize: 8
- connectionPoolSize: 8
- address: redis://127.0.0.1:6379
- idleConnectionTimeout: 10000
- timeout: 3000
+# password: ${REDIS_PWD:}
+
# 登录相关配置
login:
# 登录缓存
@@ -87,47 +94,22 @@ login:
heigth: 36
# 内容长度
length: 2
- # 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可
+ # 字体名称,为空则使用默认字体
font-name:
# 字体大小
font-size: 25
-#jwt
-jwt:
- header: Authorization
- # 令牌前缀
- token-start-with: Bearer
- # 必须使用最少88位的Base64对该令牌进行编码
- base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
- # 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
- token-validity-in-seconds: 7200000
- # 在线用户key
- online-key: online-token-
- # 验证码
- code-key: code-key-
- # token 续期检查时间范围(默认30分钟,单位默认毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期
- detect: 1800000
- # 续期时间范围,默认 1小时,这里单位毫秒
- renew: 3600000
-
-# IP 本地解析
-ip:
- local-parsing: true
-
#是否允许生成代码,生产环境设置为false
generator:
- enabled: false
-
-#如果生产环境要开启swagger,需要配置请求地址
-#springfox:
-# documentation:
-# swagger:
-# v2:
-# host: # 接口域名或外网ip
+ enabled: true
#是否开启 swagger-ui
swagger:
- enabled: false
+ enabled: true
+
+# IP 本地解析
+ip:
+ local-parsing: true
# 文件存储路径
file:
@@ -145,7 +127,7 @@ file:
avatarMaxSize: 5
logging:
file:
- path: /app/jar/logs
+ path: C:\log\wms
config: classpath:logback-spring.xml
# Sa-Token配置
@@ -167,5 +149,32 @@ sa-token:
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
# token 前缀
token-prefix: Bearer
- is-read-cookie: false
- is-read-body: false
+ sso:
+ # Ticket有效期 (单位: 秒),默认五分钟
+ ticket-timeout: 300
+ # 所有允许的授权回调地址
+ allow-url: "*"
+ # 是否打开单点注销功能
+ is-slo: true
+
+ # ------- SSO-模式三相关配置 (下面的配置在SSO模式三并且 is-slo=true 时打开)
+ # 是否打开模式三
+ isHttp: true
+ # 接口调用秘钥(用于SSO模式三的单点注销功能)
+ secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
+ # ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
+ is-read-cookie: true
+ is-print: false
+ # 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
+ token-session-check-login: false
+ alone-redis:
+ # Redis数据库索引(默认为0)
+ database: 2
+ # Redis服务器地址
+ host: 127.0.0.1
+ # Redis服务器连接端口
+ port: 6379
+ # Redis服务器连接密码(默认为空)
+ password:
+ # 连接超时时间
+ timeout: 10s
diff --git a/acs/nladmin-ui/src/layout/components/Navbar.vue b/acs/nladmin-ui/src/layout/components/Navbar.vue
index c5615e2..9ae208c 100644
--- a/acs/nladmin-ui/src/layout/components/Navbar.vue
+++ b/acs/nladmin-ui/src/layout/components/Navbar.vue
@@ -134,11 +134,11 @@ export default {
this.websock.onmessage = this.webSocketOnMessage
},
webSocketOnError(e) {
- this.$notify({
- title: 'WebSocket连接发生错误',
- type: 'error',
- duration: 0
- })
+ // this.$notify({
+ // title: 'WebSocket连接发生错误',
+ // type: 'error',
+ // duration: 0
+ // })
},
webSocketOnMessage(e) {
const data = JSON.parse(e.data)
diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java
index 2bebcc8..00b7ead 100644
--- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java
+++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java
@@ -99,7 +99,7 @@ public abstract class AbstractTask {
SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper()
.eq(SchBaseTaskconfig::getConfig_code, config_code));
taskDto.setPriority(taskConfig.getPriority());
- taskDto.setTask_type(taskConfig.getAcs_task_type());
+ taskDto.setTask_type(taskConfig.getTask_type());
taskDto.setRoute_plan_code(taskConfig.getRoute_plan_code());
return taskDto;
}
diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java
index 27a20db..750dc60 100644
--- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java
+++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java
@@ -94,7 +94,7 @@ public class BPSLTask extends AbstractTask {
//发起任务时先把点位占用,防止发起重复任务
point.setIng_task_code(task.getTask_code());
- point.setVehicle_qty(point.getVehicle_qty() - 1);
+// point.setVehicle_qty(point.getVehicle_qty() - 1);
point.setVehicle_type(materialType);
pointService.update(point);
@@ -111,8 +111,15 @@ public class BPSLTask extends AbstractTask {
* @return
*/
private SchBasePoint findNextPoint(JSONObject extGroupData) {
- String regionCode = "HCQ1";
+ String regionCode = "";
String materialType = extGroupData.getString("material_type");
+ if("1".equals(materialType)){
+ regionCode="HCQ4";
+ }else if("2".equals(materialType)){
+ regionCode="HCQ1";
+ }else if ("3".equals(materialType)){
+ regionCode="HCQ2";
+ }
List schBasePointList = pointMapper.findPointByRegion(regionCode,"2");
for(int i=schBasePointList.size()-1;i>=0;i--){
SchBasePoint schBasePoint=schBasePointList.get(i);
@@ -179,6 +186,7 @@ public class BPSLTask extends AbstractTask {
}
startPointObj.setVehicle_code(vehicle_code.toString());
}
+ startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() - 1);
startPointObj.setIng_task_code("");
startPointObj.setUpdate_time(DateUtil.now());
pointService.updateById(startPointObj);
@@ -198,7 +206,7 @@ public class BPSLTask extends AbstractTask {
// 起点解锁
if (ObjectUtil.isNotEmpty(startPointObj)) {
startPointObj.setIng_task_code("");
- startPointObj.setVehicle_qty(startPointObj.getVehicle_qty()+1);
+// startPointObj.setVehicle_qty(startPointObj.getVehicle_qty()+1);
pointService.update(endPointObj);
}
taskObj.setRemark("任务取消");
@@ -223,6 +231,7 @@ public class BPSLTask extends AbstractTask {
JSONObject jsonObject = JSONObject.parseObject(schBaseTask.getExt_group_data());
SchBasePoint point = this.findNextPoint(jsonObject);
// 设置起点并修改创建成功状态
- schBaseTask.setPoint_code1(point.getPoint_code());
+ List vehicleCodeList = Arrays.stream(point.getVehicle_code().split(",")).collect(Collectors.toList());
+ schBaseTask.setPoint_code1(point.getPoint_code()+"0"+vehicleCodeList.size());
}
}
diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java
index e34a3f2..ba71d24 100644
--- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java
+++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java
@@ -80,18 +80,17 @@ public class MJXLTask extends AbstractTask {
task.setRemark("未找到所需点位!");
taskService.update(task);
// 消息通知
- log.info("满架下料未找到当前符合条件的点位materialType:{},",materialType);
+ log.info("满架下料未找到当前符合条件的点位materialType:{},", materialType);
continue;
}
// 设置终点并修改创建成功状态
- task.setPoint_code2(point.getPoint_code());
+ task.setPoint_code2(point.getNext_wait_point());
task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark("");
taskService.update(task);
//发起任务时先把点位占用,防止发起重复任务
point.setIng_task_code(task.getTask_code());
- point.setVehicle_qty(point.getVehicle_qty() + 1);
point.setVehicle_type(materialType);
pointService.update(point);
@@ -122,17 +121,17 @@ public class MJXLTask extends AbstractTask {
//TBX2找B区
regionCode = "GHS2";
}
- List schBasePointList = pointMapper.findPointByRegion(regionCode,"2");
+ List schBasePointList = pointMapper.findPointByRegion(regionCode, "2");
for (SchBasePoint schBasePoint : schBasePointList) {
if (!schBasePoint.getPoint_code().endsWith("01") &&
!schBasePoint.getPoint_code().endsWith("06")) {
continue;
}
- if ((ObjectUtil.isEmpty(schBasePoint.getVehicle_type())||
+ if ((ObjectUtil.isEmpty(schBasePoint.getVehicle_type()) ||
materialType.equals(schBasePoint.getVehicle_type()))
&& "2".equals(schBasePoint.getPoint_status())
&& schBasePoint.getVehicle_qty() < 3) {
- log.info("满架下料找到当前符合条件的点位{}",schBasePoint.getPoint_code());
+ log.info("满架下料找到当前符合条件的点位{}", schBasePoint.getPoint_code());
return schBasePoint;
}
}
@@ -163,7 +162,7 @@ public class MJXLTask extends AbstractTask {
.eq(PdmBdWorkorder::getWorkorder_code, extGroupData.getString("workorder_code")))
: null;
String startPoint = taskObj.getPoint_code1(); // 获取起点
- String endPoint = taskObj.getPoint_code2(); // 获取终点
+ String endPoint = taskObj.getPoint_code2().substring(0,taskObj.getPoint_code2().length()-2); // 获取终点
SchBasePoint startPointObj = pointService.getById(startPoint);
SchBasePoint endPointObj = pointService.getById(endPoint);
// 根据传来的类型去对任务进行操作
@@ -179,6 +178,7 @@ public class MJXLTask extends AbstractTask {
// 终点解锁
endPointObj.setIng_task_code("");
endPointObj.setVehicle_code(ObjectUtil.isEmpty(endPointObj.getVehicle_code()) ? vehicle_code + "," : endPointObj.getVehicle_code() + vehicle_code + ",");
+ endPointObj.setVehicle_qty(endPointObj.getVehicle_qty() + 1);
pointService.update(endPointObj);
// 要把数据存到组盘表 -> 改造公共方法,返回id
SchBaseVehiclematerialgroup groupEntity = new SchBaseVehiclematerialgroup();
@@ -222,8 +222,7 @@ public class MJXLTask extends AbstractTask {
if (ObjectUtil.isNotEmpty(endPointObj)) {
endPointObj.setIng_task_code("");
//任务取消把原先占用的位置释放
- endPointObj.setVehicle_qty(endPointObj.getVehicle_qty()-1);
- if(endPointObj.getVehicle_qty()<=0){
+ if (endPointObj.getVehicle_qty() <= 0) {
endPointObj.setVehicle_type(null);
}
pointService.update(endPointObj);
@@ -245,7 +244,16 @@ public class MJXLTask extends AbstractTask {
}
@Override
- protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) {
- //无需重算,返回当前点位即可
+ protected void feedbackTaskState(JSONObject param, SchBaseTask schBaseTask, BaseResponse result) {
+ //重新计算固化室放货点位
+ try {
+ JSONObject extGroupData = JSONObject.parseObject(schBaseTask.getExt_group_data());
+ SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper()
+ .eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1()));
+ SchBasePoint point = findNextPoint(startPoint, extGroupData);
+ schBaseTask.setPoint_code2(point.getPoint_code()+"0"+(point.getVehicle_qty()+1));
+ } catch (Exception e) {
+ log.error("error:{}", e, e.getMessage());
+ }
}
}
diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java
index 0e4b895..fb96dfd 100644
--- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java
+++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java
@@ -113,12 +113,12 @@ public class TBXBKJTask extends AbstractTask {
private SchBasePoint findNextPoint(SchBasePoint startPoint) {
String regionCode = null;
if ("TBX1".equals(startPoint.getRegion_code())) {
- //KGHJ1找A区
- regionCode = "KGHJ1";
+ //TBX1找A区
+ regionCode = "HCQ3";
} else if ("TBX2".equals(startPoint.getRegion_code())) {
- //KGHJ2找B区
- regionCode = "KGHJ2";
+ //TBX2找B区
+ regionCode = "KGHJ1";
}
List schBasePointList = pointMapper.findPointByRegion(regionCode,null);
for (SchBasePoint schBasePoint : schBasePointList) {
diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java
index 2a549eb..4e49fc4 100644
--- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java
+++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java
@@ -156,6 +156,7 @@ public class GHSQHTask extends AbstractTask {
/**
* 1.根据当前固化室所处区域,判断到哪个区的缓存位
+ * 正极板到HCQ4,负极板到HCQ1,边负极板到HCQ2
* 2.从1010列到0101列倒叙判断当前列物料类型是否与起点一致且存在空位
* 3.将当前点位设置为目标点
* 4.如果没有符合条件的点位,跳过执行暂时等待
@@ -163,12 +164,15 @@ public class GHSQHTask extends AbstractTask {
private SchBasePoint findNextPoint(SchBasePoint startPoint) {
String regionCode = null;
String materialType = startPoint.getVehicle_type();
- if ("GHS1".equals(startPoint.getRegion_code())) {
- //HCQ1找A区
- regionCode = "HCQ1";
+ if ("1".equals(startPoint.getVehicle_type())) {
+ //正极板到缓存区4
+ regionCode = "HCQ4";
- } else if ("GHS2".equals(startPoint.getRegion_code())) {
- //GHS2找B区
+ } else if ("2".equals(startPoint.getVehicle_type())) {
+ //负极板到缓存区1
+ regionCode = "HCQ1";
+ } else if ("3".equals(startPoint.getVehicle_type())) {
+ //边负极板到缓存区1
regionCode = "HCQ2";
}
List schBasePointList = pointMapper.findPointByRegion(regionCode,"2");
@@ -306,6 +310,7 @@ public class GHSQHTask extends AbstractTask {
if(ObjectUtil.isEmpty(nextPoint)){
throw new Exception("当前起点"+schBaseTask.getPoint_code1()+"未找到合适的放货点位");
}
- schBaseTask.setPoint_code2(nextPoint.getPoint_code());
+ //上位记的是整一个缓存区三个点,整体搬运时反馈点位带01
+ schBaseTask.setPoint_code2(nextPoint.getPoint_code()+"01");
}
}
diff --git a/lms/nladmin-ui/src/layout/components/Navbar.vue b/lms/nladmin-ui/src/layout/components/Navbar.vue
index db8b7e9..e2f7891 100644
--- a/lms/nladmin-ui/src/layout/components/Navbar.vue
+++ b/lms/nladmin-ui/src/layout/components/Navbar.vue
@@ -135,11 +135,11 @@ export default {
this.websock.onmessage = this.webSocketOnMessage
},
webSocketOnError(e) {
- this.$notify({
- title: 'WebSocket连接发生错误',
- type: 'error',
- duration: 0
- })
+ // this.$notify({
+ // title: 'WebSocket连接发生错误',
+ // type: 'error',
+ // duration: 0
+ // })
},
webSocketOnMessage(e) {
const data = JSON.parse(e.data)