代码更新
This commit is contained in:
@@ -65,6 +65,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
//判断角色名字是否存在
|
||||
SysRole role = roleMapper.selectOne(new LambdaQueryWrapper<SysRole>().eq(SysRole::getName, sysRole.getName()));
|
||||
if (ObjectUtil.isNotEmpty(role)) throw new BadRequestException("角色【" + name + "】已存在!");
|
||||
|
||||
String userId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
package org.nl.wms.sch.task.core.task;
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.nl.wms.sch.task.core.task;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
|
||||
/**
|
||||
* @author ldjun
|
||||
* @version 1.0
|
||||
* @date 2023年05月08日 13:59
|
||||
* @desc desc
|
||||
*/
|
||||
public class TaskServiceImpl {
|
||||
String create(JSONObject param) throws BadRequestException {
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void beforeToCreate(JSONObject param) throws BadRequestException {
|
||||
String point_code = param.getString("point_code");
|
||||
Assert.notEmpty(point_code, "点位编码为空!");
|
||||
//1、查找点位
|
||||
//2、校验点位是否启用
|
||||
//3、校验点位是否自动
|
||||
//4、任务类型
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void createAfter(JSONObject param) throws BadRequestException {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
package org.nl.wms.sch.task.core.task.core;
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.nl.wms.sch.task.core.task.core;
|
||||
|
||||
/**
|
||||
* @author ldjun
|
||||
* @version 1.0
|
||||
* @date 2023年05月08日 13:35
|
||||
* @desc desc
|
||||
*/
|
||||
public class BaseTaskDto {
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
package org.nl.wms.sch.task.core.task.core;
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.nl.wms.sch.task.core.task.core;
|
||||
|
||||
/**
|
||||
* @author ldjun
|
||||
* @version 1.0
|
||||
* @date 2023年05月08日 10:27
|
||||
* @desc desc
|
||||
*/
|
||||
|
||||
public enum TaskApplyType {
|
||||
SEND_MATERIAL(1, "送料", "送料"),
|
||||
SEND_EMPTY(2, "送空载具", "送空载具"),
|
||||
CALL_MATERIAL(3, "叫料", "叫料"),
|
||||
CALL_EMPTY(4, "叫空载具", "叫空载具");
|
||||
|
||||
TaskApplyType(int code, String name, String desc) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
// 操作设备类型编码
|
||||
private int code;
|
||||
// 操作设备类型名字
|
||||
private String name;
|
||||
//操作设备类型类型
|
||||
private String desc;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.nl.wms.sch.task.core.task.core;
|
||||
|
||||
/**
|
||||
* @author ldjun
|
||||
* @version 1.0
|
||||
* @date 2023年05月08日 13:41
|
||||
* @desc desc
|
||||
*/
|
||||
public class TaskDto {
|
||||
private String task_code;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
package org.nl.wms.sch.task.core.task.core;
|
||||
@@ -0,0 +1 @@
|
||||
package org.nl.wms.sch.task.core.task.core;
|
||||
@@ -0,0 +1 @@
|
||||
package org.nl.wms.sch.task.core.task.core;
|
||||
@@ -0,0 +1 @@
|
||||
package org.nl.wms.sch.task.core.task.tasks;
|
||||
@@ -2,6 +2,7 @@ package org.nl.wms.sch.task.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -21,10 +22,10 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务实现
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
* @author lyd
|
||||
* @description 服务实现
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SchBaseTaskconfigServiceImpl extends ServiceImpl<SchBaseTaskconfigMapper, SchBaseTaskconfig> implements ISchBaseTaskconfigService {
|
||||
@@ -33,7 +34,7 @@ public class SchBaseTaskconfigServiceImpl extends ServiceImpl<SchBaseTaskconfigM
|
||||
private SchBaseTaskconfigMapper schBaseTaskconfigMapper;
|
||||
|
||||
@Override
|
||||
public IPage<SchBaseTaskconfig> queryAll(Map whereJson, PageQuery page){
|
||||
public IPage<SchBaseTaskconfig> queryAll(Map whereJson, PageQuery page) {
|
||||
LambdaQueryWrapper<SchBaseTaskconfig> lam = new LambdaQueryWrapper<>();
|
||||
IPage<SchBaseTaskconfig> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
schBaseTaskconfigMapper.selectPage(pages, lam);
|
||||
@@ -42,11 +43,14 @@ public class SchBaseTaskconfigServiceImpl extends ServiceImpl<SchBaseTaskconfigM
|
||||
|
||||
@Override
|
||||
public void create(SchBaseTaskconfig entity) {
|
||||
SchBaseTaskconfig schBaseTaskconfig = schBaseTaskconfigMapper.selectOne(new LambdaQueryWrapper<SchBaseTaskconfig>().eq(SchBaseTaskconfig::getConfig_code, entity.getConfig_code()));
|
||||
if (ObjectUtil.isNotEmpty(schBaseTaskconfig))
|
||||
throw new BadRequestException("任务配置【" + entity.getConfig_code() + "】已存在!");
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
entity.setConfig_code(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
entity.setCreate_id(currentUserId);
|
||||
entity.setCreate_name(nickName);
|
||||
entity.setCreate_time(now);
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
# 端口
|
||||
server:
|
||||
port: 9000
|
||||
|
||||
# Sa-Token 配置
|
||||
sa-token:
|
||||
# ------- SSO-模式一相关配置 (非模式一不需要配置)
|
||||
|
||||
# 配置 Cookie 作用域
|
||||
|
||||
# ------- SSO-模式二相关配置
|
||||
sso:
|
||||
# Ticket有效期 (单位: 秒),默认五分钟
|
||||
ticket-timeout: 300
|
||||
# 所有允许的授权回调地址比较重要
|
||||
allow-url: "*"
|
||||
# 是否打开单点注销功能
|
||||
is-slo: true
|
||||
# ------- SSO-模式三相关配置 (下面的配置在SSO模式三并且 is-slo=true 时打开)
|
||||
# # 是否打开模式三
|
||||
isHttp: true
|
||||
# # 接口调用秘钥(用于SSO模式三的单点注销功能)
|
||||
secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
|
||||
token-name: EL-ADMIN-TOEKN
|
||||
# # ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
|
||||
#
|
||||
spring:
|
||||
#配置 Jpa
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: none
|
||||
open-in-view: true
|
||||
properties:
|
||||
hibernate:
|
||||
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
enable_lazy_load_no_trans: true
|
||||
# 数据源
|
||||
datasource:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:whxr_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:whxr}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:P@ssw0rd}
|
||||
# username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:root}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
min-idle: 15
|
||||
# 最大连接数
|
||||
max-active: 30
|
||||
# 是否自动回收超时连接
|
||||
remove-abandoned: true
|
||||
# 超时时间(以秒数为单位)
|
||||
remove-abandoned-timeout: 180
|
||||
# 获取连接超时时间
|
||||
max-wait: 300
|
||||
# 连接有效性检测时间
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 连接在池中最小生存的时间
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# 连接在池中最大生存的时间
|
||||
max-evictable-idle-time-millis: 900000
|
||||
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
|
||||
test-while-idle: true
|
||||
# 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
|
||||
test-on-borrow: true
|
||||
# 是否在归还到池中前进行检验
|
||||
test-on-return: false
|
||||
# 检测连接是否有效
|
||||
validation-query: select 1
|
||||
# 配置监控统计
|
||||
# webStatFilter:
|
||||
# enabled: true
|
||||
# stat-view-servlet:
|
||||
# enabled: true
|
||||
# url-pattern: /druid/*
|
||||
# reset-enable: false
|
||||
# filter:
|
||||
# stat:
|
||||
# enabled: true
|
||||
# # 记录慢SQL
|
||||
# log-slow-sql: true
|
||||
# slow-sql-millis: 1000
|
||||
# merge-sql: true
|
||||
# wall:
|
||||
# config:
|
||||
# multi-statement-allow: true
|
||||
|
||||
# Redis配置 (SSO模式一和模式二使用Redis来同步会话)
|
||||
redis:
|
||||
# Redis数据库索引(默认为0)
|
||||
database: 1
|
||||
# Redis服务器地址
|
||||
host: 47.96.133.178
|
||||
# Redis服务器连接端口
|
||||
port: 6479
|
||||
# Redis服务器连接密码(默认为空)
|
||||
password: 942464Yy
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池最大连接数
|
||||
max-active: 200
|
||||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 10
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
|
||||
forest:
|
||||
# 关闭 forest 请求日志打印
|
||||
log-enabled: false
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:nl-sso-server}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:stand_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}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:12356}
|
||||
password: ${DB_PWD:P@ssw0rd}
|
||||
# password: ${DB_PWD:P@ssw0rd}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
|
||||
Reference in New Issue
Block a user