fix
This commit is contained in:
@@ -18,6 +18,7 @@ import org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position.Empty
|
|||||||
import org.nl.acs.device_driver.basedriver.hailiang_smart_plc_test.HailiangSmartplcTestDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_smart_plc_test.HailiangSmartplcTestDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.paint_conveyor.PaintConveyorDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.paint_conveyor.PaintConveyorDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.tianneng.site.SiteDeviceDriver;
|
||||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||||
import org.nl.acs.instruction.domain.Instruction;
|
import org.nl.acs.instruction.domain.Instruction;
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
import org.nl.acs.instruction.service.InstructionService;
|
||||||
@@ -31,6 +32,8 @@ import org.nl.system.service.param.ISysParamService;
|
|||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@@ -38,6 +41,7 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
|||||||
private final ISysParamService paramService;
|
private final ISysParamService paramService;
|
||||||
private final InstructionService instructionService;
|
private final InstructionService instructionService;
|
||||||
private final DeviceService deviceService;
|
private final DeviceService deviceService;
|
||||||
|
private final DeviceAppService deviceAppService;
|
||||||
@LokiLog(type = LokiLogType.AGV)
|
@LokiLog(type = LokiLogType.AGV)
|
||||||
@Override
|
@Override
|
||||||
public HttpResponse sendAgvInstToAgv(Instruction inst) throws Exception {
|
public HttpResponse sendAgvInstToAgv(Instruction inst) throws Exception {
|
||||||
@@ -225,6 +229,15 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
|||||||
.timeout(20000)//超时,毫秒
|
.timeout(20000)//超时,毫秒
|
||||||
.execute();
|
.execute();
|
||||||
log.info("下发agv任务请求反馈:{}", result2);
|
log.info("下发agv任务请求反馈:{}", result2);
|
||||||
|
String startPoint=inst.getStart_point_code();
|
||||||
|
Device start_device = deviceAppService.findDeviceByCode(startPoint);
|
||||||
|
if (start_device.getDeviceDriver() instanceof SiteDeviceDriver) {
|
||||||
|
SiteDeviceDriver siteDeviceDriver=(SiteDeviceDriver)start_device.getDeviceDriver();
|
||||||
|
if(siteDeviceDriver.getMode()!=10) {
|
||||||
|
siteDeviceDriver.writing(10);
|
||||||
|
siteDeviceDriver.writing(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//放货的进入前等待和离开等待
|
//放货的进入前等待和离开等待
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ public class QueryZDAgvTaskStatus {
|
|||||||
@Autowired
|
@Autowired
|
||||||
ZheDaAgvService agvService;
|
ZheDaAgvService agvService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private DeviceAppService deviceAppService;
|
|
||||||
|
|
||||||
|
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
try {
|
try {
|
||||||
@@ -76,15 +73,6 @@ public class QueryZDAgvTaskStatus {
|
|||||||
}
|
}
|
||||||
} else if ("FINISHED".equals(status)) {
|
} else if ("FINISHED".equals(status)) {
|
||||||
if (inst != null){
|
if (inst != null){
|
||||||
String startPoint=inst.getStart_point_code();
|
|
||||||
Device device = deviceAppService.findDeviceByCode(startPoint);
|
|
||||||
if (device.getDeviceDriver() instanceof SiteDeviceDriver) {
|
|
||||||
SiteDeviceDriver siteDeviceDriver=(SiteDeviceDriver)device.getDeviceDriver();
|
|
||||||
if(siteDeviceDriver.getMode()!=10) {
|
|
||||||
siteDeviceDriver.writing(10);
|
|
||||||
siteDeviceDriver.writing(10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
inst.setInstruction_status("2");
|
inst.setInstruction_status("2");
|
||||||
instructionService.finish(inst);
|
instructionService.finish(inst);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ spring:
|
|||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: prod
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//实时反馈点位状态,空架输送线全部点位
|
//实时反馈点位状态,空架输送线全部点位
|
||||||
pointMapper.updatePointStatus(device_code,state);
|
pointMapper.updatePointQty(device_code,state);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ public interface PointMapper {
|
|||||||
|
|
||||||
void updatePointStatus(String device_code,String state);
|
void updatePointStatus(String device_code,String state);
|
||||||
|
|
||||||
|
void updatePointQty(String device_code,String qty);
|
||||||
|
|
||||||
void updateVehicleType(String device_code,String vehicle_type);
|
void updateVehicleType(String device_code,String vehicle_type);
|
||||||
void updatePointType(String device_code,String point_type);
|
void updatePointType(String device_code,String point_type);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,11 @@
|
|||||||
where point_code like CONCAT('%', #{device_code}, '%')
|
where point_code like CONCAT('%', #{device_code}, '%')
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updatePointQty">
|
||||||
|
update sch_base_point set vehicle_qty = #{state}
|
||||||
|
where point_code like CONCAT('%', #{device_code}, '%')
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="updateVehicleType">
|
<update id="updateVehicleType">
|
||||||
update sch_base_point set vehicle_type = #{vehicle_type}
|
update sch_base_point set vehicle_type = #{vehicle_type}
|
||||||
where point_code like CONCAT('%', #{device_code}, '%')
|
where point_code like CONCAT('%', #{device_code}, '%')
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ public class TBXQKTask extends AbstractTask {
|
|||||||
.or()
|
.or()
|
||||||
.eq(SchBasePoint::getIng_task_code, ""))
|
.eq(SchBasePoint::getIng_task_code, ""))
|
||||||
.eq(SchBasePoint::getBlock_num, "1")
|
.eq(SchBasePoint::getBlock_num, "1")
|
||||||
|
.eq(SchBasePoint::getVehicle_qty, "1")
|
||||||
.eq(SchBasePoint::getIs_used, true);
|
.eq(SchBasePoint::getIs_used, true);
|
||||||
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
||||||
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
|
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
|
||||||
|
|||||||
@@ -1,22 +1,26 @@
|
|||||||
server:
|
server:
|
||||||
port: 8011
|
port: 8010
|
||||||
#配置数据源
|
#配置数据源
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:101.37.151.193}:${DB_PORT:53306}/${DB_NAME:xftn_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:stand_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:P@ssW0rd123}
|
password: ${DB_PWD:123456}
|
||||||
|
# password: ${DB_PWD:P@ssw0rd}
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
min-idle: 15
|
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
|
time-between-eviction-runs-millis: 60000
|
||||||
# 连接在池中最小生存的时间
|
# 连接在池中最小生存的时间
|
||||||
@@ -36,11 +40,8 @@ spring:
|
|||||||
enabled: true
|
enabled: true
|
||||||
stat-view-servlet:
|
stat-view-servlet:
|
||||||
enabled: true
|
enabled: true
|
||||||
# 控制台管理用户名和密码
|
|
||||||
url-pattern: /druid/*
|
url-pattern: /druid/*
|
||||||
reset-enable: false
|
reset-enable: false
|
||||||
login-username: admin
|
|
||||||
login-password: 123456
|
|
||||||
filter:
|
filter:
|
||||||
stat:
|
stat:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -53,12 +54,11 @@ spring:
|
|||||||
multi-statement-allow: true
|
multi-statement-allow: true
|
||||||
redis:
|
redis:
|
||||||
#数据库索引
|
#数据库索引
|
||||||
database: ${REDIS_DB:15}
|
database: ${REDIS_DB:5}
|
||||||
host: ${REDIS_HOST:127.0.0.1}
|
host: ${REDIS_HOST:10.44.101.19}
|
||||||
port: ${REDIS_PORT:6379}
|
port: ${REDIS_PORT:6379}
|
||||||
password: ${REDIS_PWD:}
|
password: ${REDIS_PWD:}
|
||||||
#连接超时时间
|
|
||||||
timeout: 5000
|
|
||||||
# 登录相关配置
|
# 登录相关配置
|
||||||
login:
|
login:
|
||||||
# 登录缓存
|
# 登录缓存
|
||||||
@@ -77,48 +77,23 @@ login:
|
|||||||
heigth: 36
|
heigth: 36
|
||||||
# 内容长度
|
# 内容长度
|
||||||
length: 2
|
length: 2
|
||||||
# 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可
|
# 字体名称,为空则使用默认字体
|
||||||
font-name:
|
font-name:
|
||||||
# 字体大小
|
# 字体大小
|
||||||
font-size: 25
|
font-size: 25
|
||||||
|
|
||||||
#jwt
|
#是否允许生成代码,生产环境设置为false
|
||||||
jwt:
|
generator:
|
||||||
header: Authorization
|
enabled: true
|
||||||
# 令牌前缀
|
|
||||||
token-start-with: Bearer
|
#是否开启 swagger-ui
|
||||||
# 必须使用最少88位的Base64对该令牌进行编码
|
swagger:
|
||||||
base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
|
enabled: true
|
||||||
# 令牌过期时间 此处单位/毫秒 ,默认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 本地解析
|
||||||
ip:
|
ip:
|
||||||
local-parsing: true
|
local-parsing: true
|
||||||
|
|
||||||
#是否允许生成代码,生产环境设置为false
|
|
||||||
generator:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
#如果生产环境要开启swagger,需要配置请求地址
|
|
||||||
#springfox:
|
|
||||||
# documentation:
|
|
||||||
# swagger:
|
|
||||||
# v2:
|
|
||||||
# host: # 接口域名或外网ip
|
|
||||||
|
|
||||||
#是否开启 swagger-ui
|
|
||||||
swagger:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# 文件存储路径
|
# 文件存储路径
|
||||||
file:
|
file:
|
||||||
mac:
|
mac:
|
||||||
@@ -135,7 +110,7 @@ file:
|
|||||||
avatarMaxSize: 5
|
avatarMaxSize: 5
|
||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
path: /app/jar/logs
|
path: C:\log\wms
|
||||||
config: classpath:logback-spring.xml
|
config: classpath:logback-spring.xml
|
||||||
|
|
||||||
# Sa-Token配置
|
# Sa-Token配置
|
||||||
@@ -157,5 +132,32 @@ sa-token:
|
|||||||
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
||||||
# token 前缀
|
# token 前缀
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
is-read-cookie: false
|
sso:
|
||||||
is-read-body: false
|
# 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: 5
|
||||||
|
# Redis服务器地址
|
||||||
|
host: 10.44.101.19
|
||||||
|
# Redis服务器连接端口
|
||||||
|
port: 6379
|
||||||
|
# Redis服务器连接密码(默认为空)
|
||||||
|
password:
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ spring:
|
|||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: prod
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
data:
|
data:
|
||||||
|
|||||||
Reference in New Issue
Block a user