diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/xg_agv/XgagvDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/xg_agv/XgagvDeviceDriver.java index 6855a4e..6cbb792 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/xg_agv/XgagvDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/xg_agv/XgagvDeviceDriver.java @@ -363,8 +363,8 @@ public class XgagvDeviceDriver extends AbstractOpcDeviceDriver implements Device jo.put("device_code", this.device_code); jo.put("task_code", inst.getTask_code()); ja.add(jo); -// HttpResponse resp = acsToWmsService.feedAgvTaskStatus(ja); - if (1==1) { + HttpResponse resp = acsToWmsService.feedAgvTaskStatus(ja); + if (resp.getStatus() ==200) { LuceneLogDto logDto = new LuceneLogDto(); logDto.setDevice_code(device_code); logDto.setInstruct_code(inst.getInstruction_code()); @@ -387,8 +387,8 @@ public class XgagvDeviceDriver extends AbstractOpcDeviceDriver implements Device jo.put("device_code", this.device_code); jo.put("task_code", inst.getTask_code()); ja.add(jo); -// HttpResponse resp = acsToWmsService.feedAgvTaskStatus(ja); - if (1==1) { + HttpResponse resp = acsToWmsService.feedAgvTaskStatus(ja); + if (resp.getStatus() ==200) { LuceneLogDto logDto = new LuceneLogDto(); logDto.setDevice_code(device_code); logDto.setInstruct_code(inst.getInstruction_code()); @@ -411,8 +411,8 @@ public class XgagvDeviceDriver extends AbstractOpcDeviceDriver implements Device jo.put("device_code", this.device_code); jo.put("task_code", inst.getTask_code()); ja.add(jo); -// HttpResponse resp = acsToWmsService.feedAgvTaskStatus(ja); - if (1==1) { + HttpResponse resp = acsToWmsService.feedAgvTaskStatus(ja); + if (resp.getStatus() ==200) { LuceneLogDto logDto = new LuceneLogDto(); logDto.setDevice_code(device_code); logDto.setInstruct_code(inst.getInstruction_code()); @@ -434,8 +434,8 @@ public class XgagvDeviceDriver extends AbstractOpcDeviceDriver implements Device jo.put("device_code", this.device_code); jo.put("task_code", inst.getTask_code()); ja.add(jo); -// HttpResponse resp = acsToWmsService.feedAgvTaskStatus(ja); - if (1==1) { + HttpResponse resp = acsToWmsService.feedAgvTaskStatus(ja); + if (resp.getStatus() ==200) { LuceneLogDto logDto = new LuceneLogDto(); logDto.setDevice_code(device_code); logDto.setInstruct_code(inst.getInstruction_code()); diff --git a/acs/nladmin-system/src/main/resources/config/application-dev.yml b/acs/nladmin-system/src/main/resources/config/application-dev.yml index c226248..ed0f80a 100644 --- a/acs/nladmin-system/src/main/resources/config/application-dev.yml +++ b/acs/nladmin-system/src/main/resources/config/application-dev.yml @@ -12,12 +12,12 @@ spring: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy # url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true - url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:huNanHunYuan_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:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true +# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:huNanHunYuan_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:hunanhunyuan_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true username: ${DB_USER:root} # password: ${DB_PWD:P@ssw0rd} - password: ${DB_PWD:Root.123456} -# password: ${DB_PWD:password} +# password: ${DB_PWD:Root.123456} + password: ${DB_PWD:123456} # 初始连接数 initial-size: 5 diff --git a/acs/nladmin-system/src/main/resources/config/application-prod.yml b/acs/nladmin-system/src/main/resources/config/application-prod.yml index e22d641..1c92b30 100644 --- a/acs/nladmin-system/src/main/resources/config/application-prod.yml +++ b/acs/nladmin-system/src/main/resources/config/application-prod.yml @@ -11,17 +11,24 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + # url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + # url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:huNanHunYuan_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:hunanhunyuan_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true username: ${DB_USER:root} + # password: ${DB_PWD:P@ssw0rd} + # 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 # 连接在池中最小生存的时间 @@ -41,11 +48,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 @@ -58,12 +62,11 @@ spring: multi-statement-allow: true redis: #数据库索引 - database: ${REDIS_DB:9} + database: ${REDIS_DB:15} host: ${REDIS_HOST:127.0.0.1} port: ${REDIS_PORT:6379} password: ${REDIS_PWD:} - #连接超时时间 - timeout: 5000 + # 登录相关配置 login: # 登录缓存 @@ -82,7 +85,7 @@ login: heigth: 36 # 内容长度 length: 2 - # 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可 + # 字体名称,为空则使用默认字体 font-name: # 字体大小 font-size: 25 @@ -94,35 +97,28 @@ jwt: token-start-with: Bearer # 必须使用最少88位的Base64对该令牌进行编码 base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI= - # 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html - token-validity-in-seconds: 7200000 + # 令牌过期时间 此处单位/毫秒 ,默认4小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html + token-validity-in-seconds: 14400000 # 在线用户key online-key: online-token- # 验证码 code-key: code-key- - # token 续期检查时间范围(默认30分钟,单位默认毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期 + # token 续期检查时间范围(默认30分钟,单位毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期 detect: 1800000 - # 续期时间范围,默认 1小时,这里单位毫秒 + # 续期时间范围,默认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: @@ -142,6 +138,9 @@ logging: file: path: D:\acs_log config: classpath:logback-spring.xml +lucene: + index: + path: D:\lucene\index # Sa-Token配置 sa-token: @@ -164,5 +163,9 @@ sa-token: token-prefix: Bearer loki: - url: http://localhost:3100/loki/api/v1 + url: http://127.0.0.1:3100/loki/api/v1 systemName: acs + +embedded-lucene: + entity-packages: \ + index-path: D:\testlucene \ No newline at end of file