diff --git a/wms_pro/hd/nladmin-system/pom.xml b/wms_pro/hd/nladmin-system/pom.xml index 5f561df4..12221dd8 100644 --- a/wms_pro/hd/nladmin-system/pom.xml +++ b/wms_pro/hd/nladmin-system/pom.xml @@ -289,12 +289,6 @@ com.yomahub tlog-all-spring-boot-starter 1.5.0 - - - tlog-hutool-http - com.yomahub - - diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/common/utils/SecurityUtils.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/common/utils/SecurityUtils.java index 46f37edb..9593f2ac 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/common/utils/SecurityUtils.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/common/utils/SecurityUtils.java @@ -2,8 +2,8 @@ package org.nl.common.utils; import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.nl.wms.system_manage.service.user.dto.CurrentUser; @@ -24,19 +24,15 @@ public class SecurityUtils { */ public static CurrentUser getCurrentUser() { try { - JSONObject json = (JSONObject) StpUtil.getExtra("loginInfo"); - if (ObjectUtil.isNotEmpty(json)) { - return json.toBean(CurrentUser.class); - } + return JSONObject.parseObject(String.valueOf(StpUtil.getExtra("loginInfo")),CurrentUser.class); } catch (Exception e) { e.printStackTrace(); CurrentUser currentUser = new CurrentUser(); - currentUser.setId("1"); + currentUser.setId("2"); currentUser.setPresonName("外部系统用户"); currentUser.setUsername("admin"); return currentUser; } - return null; } /** @@ -89,7 +85,7 @@ public class SecurityUtils { JSONObject json = (JSONObject) StpUtil.getExtra("loginInfo"); JSONArray permissions = json.getJSONArray("permissions"); if (permissions.size() > 0) { - return permissions.toList(String.class); + return permissions.toJavaList(String.class); } return null; } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/secutiry/impl/HandLoginServiceImpl.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/secutiry/impl/HandLoginServiceImpl.java index 834959e4..9f4a3e14 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/secutiry/impl/HandLoginServiceImpl.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/secutiry/impl/HandLoginServiceImpl.java @@ -71,7 +71,7 @@ public class HandLoginServiceImpl implements HandLoginService { // SaLoginModel 配置登录相关参数 StpUtil.login(userInfo.getUser_id(), new SaLoginModel() .setDevice("PE") // 此次登录的客户端设备类型, 用于[同端互斥登录]时指定此次登录的设备类型 - .setExtra("loginInfo", user) // Token挂载的扩展参数 (此方法只有在集成jwt插件时才会生效) + .setExtra("loginInfo", JSONObject.toJSONString(user)) // Token挂载的扩展参数 (此方法只有在集成jwt插件时才会生效) ); // 返回 token 与 用户信息 diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/user/impl/ISysUserServiceImpl.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/user/impl/ISysUserServiceImpl.java index 395fdccd..d7618fe8 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/user/impl/ISysUserServiceImpl.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/user/impl/ISysUserServiceImpl.java @@ -59,9 +59,6 @@ public class ISysUserServiceImpl extends ServiceImpl imp @Autowired private RedisUtils redisUtils; - @Value("${sa-token.cookie.domain}") - private String domain; - @Override public Map updateAvatar(MultipartFile multipartFile) { SysUser user = this.getOne(new QueryWrapper().eq("username", SecurityUtils.getCurrentUsername())); @@ -210,12 +207,11 @@ public class ISysUserServiceImpl extends ServiceImpl imp // SaLoginModel 配置登录相关参数 StpUtil.login(userInfo.getUser_id(), new SaLoginModel() .setDevice("PC") // 此次登录的客户端设备类型, 用于[同端互斥登录]时指定此次登录的设备类型 - .setExtra("loginInfo", user) // Token挂载的扩展参数 (此方法只有在集成jwt插件时才会生效) + .setExtra("loginInfo", JSONObject.toJSONString(user)) // Token挂载的扩展参数 (此方法只有在集成jwt插件时才会生效) ); JSONObject result = new JSONObject(); result.put("token", StpUtil.getTokenValue()); result.put("roles", permissionList); - result.put("domain", domain); result.put("user", user); return result; } diff --git a/wms_pro/hd/nladmin-system/src/main/resources/config/application-dev3.yml b/wms_pro/hd/nladmin-system/src/main/resources/config/application-dev3.yml index 712f4c35..4e618701 100644 --- a/wms_pro/hd/nladmin-system/src/main/resources/config/application-dev3.yml +++ b/wms_pro/hd/nladmin-system/src/main/resources/config/application-dev3.yml @@ -149,9 +149,6 @@ sa-token: jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq # token 前缀 token-prefix: - cookie: - # 配置 Cookie 作用域:根据二级域名实现sso登入如lms.sso.com;acs.sso.com - domain: is-read-cookie: false is-print: false schedulerFile: /Users/mima0000/Desktop/scheduler.xml diff --git a/wms_pro/hd/nladmin-system/src/main/resources/config/application.yml b/wms_pro/hd/nladmin-system/src/main/resources/config/application.yml index c370b8e1..bb88c0df 100644 --- a/wms_pro/hd/nladmin-system/src/main/resources/config/application.yml +++ b/wms_pro/hd/nladmin-system/src/main/resources/config/application.yml @@ -112,4 +112,4 @@ pageheiper: params: count=countSgl tlog: enable-invoke-time-print: true - pattern: "[$traceId]" \ No newline at end of file + pattern: "[$traceId]" diff --git a/wms_pro/qd/src/settings.js b/wms_pro/qd/src/settings.js index 1d46e5eb..22fe90be 100644 --- a/wms_pro/qd/src/settings.js +++ b/wms_pro/qd/src/settings.js @@ -40,7 +40,7 @@ module.exports = { /** * @description token key */ - TokenKey: 'EL-ADMIN-TOEKN', + TokenKey: 'Authorization', /** * @description 请求超时时间,毫秒(默认2分钟) */ diff --git a/wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue b/wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue index 44584f82..a65c40a8 100644 --- a/wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue +++ b/wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue @@ -235,7 +235,6 @@ const defaultForm = { code: '', bill_type: '', status: '', - product_area: '', source_form_type: '', source_form_id: '', source_form_date: '', @@ -337,6 +336,14 @@ export default { this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO) return false } + if (!this.form.bill_type) { + this.crud.notify('单据类型不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } + if (!this.form.form_data.product_area) { + this.crud.notify('车间不能为空', CRUD.NOTIFICATION_TYPE.INFO) + return false + } this.form.item = this.tableData },