From 19fe6936cbe4deef1f18186350a71acff4dff58e Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 14 一月 2025 17:06:18 +0800
Subject: [PATCH] # 24. PDA出库成功后,界面数据重置,避免重复操作  (已修复) 25. PDA接口请求,添加一个Loading遮档  (已修复) 27. 非平库单据,在平库可做入库操作  (已修复) 29. 平库入库后,订单明细没有添加(已修复) 30. 平库入库后,单据类型没有修改(已修复) 31. 没有绑定播种位,不能进行播种,前后端都需加判定(已修复) 33. 平库入库未修改入库已完成数量(已修复)

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/BaseController.java |  141 +++++++++++++++++++++++------------------------
 1 files changed, 69 insertions(+), 72 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/BaseController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/BaseController.java
index ddece93..b3a784b 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/BaseController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/BaseController.java
@@ -1,72 +1,69 @@
-package com.zy.asrs.wms.system.controller;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.zy.asrs.common.domain.enums.LoginSystemType;
-import com.zy.asrs.wms.common.domain.BaseParam;
-import com.zy.asrs.wms.system.entity.Role;
-import com.zy.asrs.wms.system.entity.User;
-import com.zy.asrs.wms.system.entity.UserLogin;
-import com.zy.asrs.wms.system.service.UserLoginService;
-import com.zy.asrs.wms.system.service.UserRoleService;
-import com.zy.asrs.wms.system.service.UserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by vincent on 1/30/2024
- */
-public class BaseController {
-
-    @Autowired
-    private UserLoginService userLoginService;
-    @Autowired
-    private UserRoleService userRoleService;
-    @Autowired
-    private UserService userService;
-
-    public User getLoginUser() {
-        try {
-            Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
-            if (authentication != null) {
-                Object object = authentication.getPrincipal();
-                if (object instanceof User) {
-                    return (User) object;
-                }
-                if(object instanceof UserLogin) {
-                    UserLogin userLogin = (UserLogin) object;
-                    User user = userService.superGetById(userLogin.getUserId());
-                    return user;
-                }
-            }
-        } catch (Exception e) {
-            System.out.println(e.getMessage());
-        }
-        return null;
-    }
-
-    public Long getLoginUserId() {
-        User loginUser = getLoginUser();
-        return loginUser == null ? null : loginUser.getId();
-    }
-
-    public Long getHostId() {
-        User loginUser = getLoginUser();
-        return loginUser.getHostId();
-    }
-
-    public <T extends BaseParam> T buildParam(Map<String, Object> map, Class<T> clz) {
-        T t  = null;
-        try {
-            t = clz.getDeclaredConstructor().newInstance();
-            t.syncMap(map);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return t;
-    }
-
-}
+package com.zy.asrs.wms.system.controller;
+
+import com.zy.asrs.wms.common.domain.BaseParam;
+import com.zy.asrs.wms.system.entity.User;
+import com.zy.asrs.wms.system.entity.UserLogin;
+import com.zy.asrs.wms.system.service.UserLoginService;
+import com.zy.asrs.wms.system.service.UserRoleService;
+import com.zy.asrs.wms.system.service.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import java.util.*;
+
+/**
+ * Created by vincent on 1/30/2024
+ */
+public class BaseController {
+
+    protected static final String RANGE_TIME_LINK = " - ";
+
+    @Autowired
+    private UserLoginService userLoginService;
+    @Autowired
+    private UserRoleService userRoleService;
+    @Autowired
+    private UserService userService;
+
+    public User getLoginUser() {
+        try {
+            Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+            if (authentication != null) {
+                Object object = authentication.getPrincipal();
+                if (object instanceof User) {
+                    return (User) object;
+                }
+                if(object instanceof UserLogin) {
+                    UserLogin userLogin = (UserLogin) object;
+                    User user = userService.superGetById(userLogin.getUserId());
+                    return user;
+                }
+            }
+        } catch (Exception e) {
+            System.out.println(e.getMessage());
+        }
+        return null;
+    }
+
+    public Long getLoginUserId() {
+        User loginUser = getLoginUser();
+        return loginUser == null ? 1 : loginUser.getId();
+    }
+
+    public Long getHostId() {
+        User loginUser = getLoginUser();
+        return loginUser == null ? 1 : loginUser.getHostId();
+    }
+
+    public <T extends BaseParam> T buildParam(Map<String, Object> map, Class<T> clz) {
+        T t  = null;
+        try {
+            t = clz.getDeclaredConstructor().newInstance();
+            t.syncMap(map);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return t;
+    }
+
+}

--
Gitblit v1.9.1