fix : 现场问题解决
This commit is contained in:
@@ -211,7 +211,7 @@ public class XgAgvCarDeviceDriver extends AbstractDeviceDriver implements Device
|
||||
@Override
|
||||
public void execute() {
|
||||
try {
|
||||
getAgvStatus();
|
||||
// getAgvStatus();
|
||||
} catch (Exception e) {
|
||||
message = "获取机器人状态报错";
|
||||
}
|
||||
|
||||
@@ -236,7 +236,25 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
if (container_type == 0) {
|
||||
message = "托盘类型为空";
|
||||
} else {
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode);
|
||||
//已经存在空托入库的任务
|
||||
TaskDto byStarCodeAndExcute = taskserver.findByStarCodeAndExcute(device_code);
|
||||
if (byStarCodeAndExcute != null) {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("已经存在空托入库的任务")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
List list1 = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code", "to_command");
|
||||
map.put("value", mode);
|
||||
list1.add(map);
|
||||
this.writing(list1);
|
||||
this.requireSucess = true;
|
||||
}else {
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -624,6 +642,12 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
jsonObject = JSONObject.parseObject(body);
|
||||
}
|
||||
message = "申请空托盘出入库,参数,接口返回:" + jsonObject;
|
||||
LuceneLogDto logDto3 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("测试申请空托盘出入库,参数,接口返回:" + jsonObject)
|
||||
.build();
|
||||
logDto3.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto3);
|
||||
if (ObjectUtil.isNotNull(jsonObject) && jsonObject.getInteger("status") == 200) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
|
||||
@@ -366,6 +366,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||
+ instructionReady.getInstruction_code() + ",指令起点:" + instructionReady.getStart_device_code()
|
||||
+ ",指令终点:" + instructionReady.getNext_device_code() + ",交互参数:" + interactionJsonDTO.toString() + ",指令执行失败:" + e.getMessage());
|
||||
this.setRequireSucess(true);
|
||||
return false;
|
||||
}
|
||||
this.setRequireSucess(true);
|
||||
@@ -410,7 +411,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
taskDto = dto;
|
||||
}else {
|
||||
forceMove(nextDevice);
|
||||
// forceMove(nextDevice);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("当前任务号:" + dto.getTask_code() + " " + next_device_code + "当前move值为:" + beltConveyorDeviceDriverEnd.getMove() + ",当前mode值为:"+beltConveyorDeviceDriverEnd.getMode())
|
||||
|
||||
@@ -180,13 +180,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
log.info("applyTaskToWmsError-----请求异常输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyTwo", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期入库申请任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2;
|
||||
|
||||
} finally {
|
||||
|
||||
@@ -501,4 +501,6 @@ public interface InstructionService extends CommonService<InstructionMybatis> {
|
||||
List<Instruction> findByNextCode(String nextDeviceCode);
|
||||
|
||||
List<Instruction> findReadyIns();
|
||||
|
||||
Instruction findByStarCodeAndExcute(String deviceCode);
|
||||
}
|
||||
|
||||
@@ -2053,6 +2053,16 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
return instructionsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Instruction findByStarCodeAndExcute(String start_code) {
|
||||
Optional<Instruction> optionalInstruction = instructions.stream()
|
||||
.filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), start_code)
|
||||
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()))
|
||||
.findFirst();
|
||||
return optionalInstruction.orElse(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private boolean regional(String start_device_code, String next_device_code) {
|
||||
Device startdevice = deviceAppService.findDeviceByCode(start_device_code);
|
||||
|
||||
@@ -446,6 +446,13 @@ public interface TaskService extends CommonService<Task> {
|
||||
TaskDto findByCodeAndExcute(String start_code,String next_code);
|
||||
|
||||
|
||||
/**
|
||||
* 查询起点执行的任务
|
||||
* @param start_code
|
||||
* @return
|
||||
*/
|
||||
TaskDto findByStarCodeAndExcute(String start_code);
|
||||
|
||||
/**
|
||||
* 根据终点设备编号查询当前是否有就绪任务
|
||||
*
|
||||
|
||||
@@ -1005,6 +1005,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
routeLineService.getShortPathLines(
|
||||
start_device_code, acsTask.getNext_device_code(), route_plan_code);
|
||||
Device startDevice = deviceAppService.findDeviceByCode(start_device_code);
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||
RouteLineDto routeLineDto = shortPathsList.get(0);
|
||||
String path = routeLineDto.getPath();
|
||||
String type = routeLineDto.getType();
|
||||
@@ -1014,7 +1015,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
for (int m = 0; m < pathlist.size(); m++) {
|
||||
if (pathlist.get(m).equals(start_device_code)) {
|
||||
//起点为货架跳过堆垛机
|
||||
if (startDevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) {
|
||||
if (startDevice.getDeviceDriver() instanceof StandardStorageDeviceDriver || nextDevice.getDeviceDriver() instanceof StandardStorageDeviceDriver ) {
|
||||
index = m + 2;
|
||||
}else {
|
||||
index = m + 1;
|
||||
@@ -1231,6 +1232,17 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TaskDto findByStarCodeAndExcute(String start_code) {
|
||||
Optional<TaskDto> optionalTask = tasks.stream()
|
||||
.filter(task -> StrUtil.equals(task.getStart_device_code(), start_code)
|
||||
&& (StrUtil.equals(task.getTask_status(), TaskStatusEnum.BUSY.getIndex())||StrUtil.equals(task.getTask_status(), TaskStatusEnum.READY.getIndex())))
|
||||
.findFirst();
|
||||
return optionalTask.orElse(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public TaskDto findByEndCodeAndReady(String device_code) {
|
||||
Optional<TaskDto> optionalTask = tasks.stream()
|
||||
|
||||
@@ -1,22 +1,29 @@
|
||||
server:
|
||||
port: 8010
|
||||
server:
|
||||
port: 8011
|
||||
#配置数据源
|
||||
spring:
|
||||
messages:
|
||||
basename: language/login/login,language/error/error,language/buss/buss,language/monitor/universal/universal,language/monitor/one_device/one_device,language/monitor/two_device/two_device,language/task/task
|
||||
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:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lzhl_two_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_two_acs}?serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:NLABC&hl123}
|
||||
# password: ${DB_PWD:p@ssw0rd}
|
||||
# 初始连接数
|
||||
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 +43,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 +55,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,36 +97,19 @@ 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
|
||||
#是否允许生成代码,生产环境设置为false
|
||||
generator:
|
||||
enabled: true
|
||||
|
||||
# IP 本地解析
|
||||
ip:
|
||||
local-parsing: true
|
||||
|
||||
#是否允许生成代码,生产环境设置为false
|
||||
generator:
|
||||
enabled: false
|
||||
# 文件存储路径
|
||||
file:
|
||||
mac:
|
||||
@@ -133,8 +126,11 @@ file:
|
||||
avatarMaxSize: 5
|
||||
logging:
|
||||
file:
|
||||
path: /app/jar/logs
|
||||
path: D:\acs_log # /Users/onepiece/myFile/acs_logs
|
||||
config: classpath:logback-spring.xml
|
||||
lucene:
|
||||
index:
|
||||
path: /lucene
|
||||
|
||||
# Sa-Token配置
|
||||
sa-token:
|
||||
@@ -155,10 +151,35 @@ 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
|
||||
|
||||
|
||||
agvToAcs:
|
||||
addr: http://http://10.1.3.96:8011
|
||||
agvToAcs:
|
||||
addr: http://10.1.3.96:8011
|
||||
|
||||
@@ -72,7 +72,7 @@ spring:
|
||||
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计,优雅关闭线程池,默认true
|
||||
awaitTerminationSeconds: 5 # 优雅关闭线程池时,阻塞等待线程池中任务执行时间,默认3,单位(s)
|
||||
preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
|
||||
runTimeout: 2000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
runTimeout: 5000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
queueTimeout: 1000 # 任务在队列等待超时阈值,单位(ms),默认0(不统计)
|
||||
- threadPoolName: scheduled_pool # 线程池名称,必填
|
||||
threadPoolAliasName: scheduled_thread # 线程池别名,可选
|
||||
@@ -89,7 +89,7 @@ spring:
|
||||
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计,优雅关闭线程池,默认true
|
||||
awaitTerminationSeconds: 5 # 优雅关闭线程池时,阻塞等待线程池中任务执行时间,默认3,单位(s)
|
||||
preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
|
||||
runTimeout: 2000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
runTimeout: 5000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
queueTimeout: 1000 # 任务在队列等待超时阈值,单位(ms),默认0(不统计)
|
||||
task:
|
||||
pool:
|
||||
|
||||
Reference in New Issue
Block a user