From ebf0db91e09be33fcbfe97ed5b91965dc2e61dfd Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期四, 01 八月 2024 10:54:26 +0800
Subject: [PATCH] 1. 托盘管理 2. 入库通知档导入功能 3. 工作档明细 新增来源单据类型及单据编号 4. 库存明细统计表 增加一栏ERP数量(需跟ERP确认接口实现方式)。 5. 存货档案、单据管理、库存管理可以支持模糊搜索(各个单据界面)。

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/aspect/OperationLogAspect.java |   54 ++++++++++++++++++++++++++++++------------------------
 1 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/aspect/OperationLogAspect.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/aspect/OperationLogAspect.java
index 54ac18f..a698bbb 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/aspect/OperationLogAspect.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/aspect/OperationLogAspect.java
@@ -4,9 +4,9 @@
 import com.zy.asrs.common.utils.IpTools;
 import com.zy.asrs.framework.common.Cools;
 import com.zy.asrs.wcs.common.annotation.OperationLog;
-import com.zy.asrs.wcs.sys.entity.OperationRecord;
-import com.zy.asrs.wcs.sys.entity.User;
-import com.zy.asrs.wcs.sys.service.OperationRecordService;
+import com.zy.asrs.wcs.system.entity.OperationRecord;
+import com.zy.asrs.wcs.system.entity.User;
+import com.zy.asrs.wcs.system.service.OperationRecordService;
 import com.zy.asrs.wcs.utils.Utils;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.*;
@@ -67,6 +67,20 @@
      * 淇濆瓨鎿嶄綔璁板綍
      */
     private void saveLog(JoinPoint joinPoint, Object result, Exception e) {
+        // 璁板綍妯″潡鍚嶃�佹搷浣滃姛鑳姐�佽姹傛柟娉曘�佽姹傚弬鏁般�佽繑鍥炵粨鏋�
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+        if (null == method) {
+            return;
+        }
+        OperationLog ol = method.getAnnotation(OperationLog.class);
+        if (null == ol) {
+            return;
+        }
+        String desc = getDescription(method, ol);
+        if (Cools.isEmpty(desc)) {
+            return;
+        }
         OperationRecord record = new OperationRecord();
         Long endTime = startTime.get();
         record.setCreateTime(new Date());
@@ -95,27 +109,19 @@
         } else {
             record.setResult(1);
         }
-        // 璁板綍妯″潡鍚嶃�佹搷浣滃姛鑳姐�佽姹傛柟娉曘�佽姹傚弬鏁般�佽繑鍥炵粨鏋�
-        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-        Method method = signature.getMethod();
-        if (method != null) {
-            OperationLog ol = method.getAnnotation(OperationLog.class);
-            if (ol != null) {
-                // 璁板綍鎿嶄綔鍔熻兘
-                record.setNamespace(getDescription(method, ol));
-                // 璁板綍澶囨敞
-                if (!Cools.isEmpty(ol.comments())) {
-                    record.setMemo(ol.comments());
-                }
-                // 璁板綍璇锋眰鍙傛暟
-                if (ol.param() && request != null) {
-                    record.setRequest(Utils.sub(getParams(joinPoint, request), MAX_LENGTH));
-                }
-                // 璁板綍璇锋眰缁撴灉
-                if (ol.result() && result != null) {
-                    record.setResponse(Utils.sub(JSON.toJSONString(result), MAX_LENGTH));
-                }
-            }
+        // 璁板綍鎿嶄綔鍔熻兘
+        record.setNamespace(desc);
+        // 璁板綍澶囨敞
+        if (!Cools.isEmpty(ol.comments())) {
+            record.setMemo(ol.comments());
+        }
+        // 璁板綍璇锋眰鍙傛暟
+        if (ol.param() && request != null) {
+            record.setRequest(Utils.sub(getParams(joinPoint, request), MAX_LENGTH));
+        }
+        // 璁板綍璇锋眰缁撴灉
+        if (ol.result() && result != null) {
+            record.setResponse(Utils.sub(JSON.toJSONString(result), MAX_LENGTH));
         }
         operationRecordService.saveAsync(record);
     }

--
Gitblit v1.9.1