Kaynağa Gözat

add 增加设备信息离线补偿处理

18339543638 3 yıl önce
ebeveyn
işleme
3b312cd84b

+ 6 - 4
nb-common/log-common/src/main/java/com/nb/common/log/aop/LogAspect.java

@@ -53,19 +53,21 @@ public class LogAspect {
         Long startTime = System.currentTimeMillis();
         Object obj = null;
         Exception exception = null;
+        List<Object> param = new ArrayList<>();
         try {
+            param = Arrays.stream(point.getArgs()).filter(item -> Objects.nonNull(item) && !isFilterObject(item)).collect(Collectors.toList());
             obj = point.proceed();
         } catch (Exception e) {
             exception = e;
             throw e;
         } finally {
             Long endTime = System.currentTimeMillis();
-            handleLog(point, exception, obj, endTime - startTime);
+            handleLog(point,param, exception, obj, endTime - startTime);
         }
         return obj;
     }
 
-    protected void handleLog(final JoinPoint joinPoint, final Exception e, Object retValue, long time) {
+    protected void handleLog(final JoinPoint joinPoint, List<Object> param, final Exception e, Object retValue, long time) {
         try {
             // 获得注解
             Signature signature = joinPoint.getSignature();
@@ -86,8 +88,8 @@ public class LogAspect {
             String methodName = joinPoint.getSignature().getName();
             sysLog.setRequsetMethod(className + "." + methodName + "()");
 
-            List<Object> objectList = Arrays.stream(joinPoint.getArgs()).filter(item -> Objects.nonNull(item) && !isFilterObject(item)).collect(Collectors.toList());
-            sysLog.setRequsetParams(JSONUtil.toJsonStr(objectList));
+
+            sysLog.setRequsetParams(JSONUtil.toJsonStr(param));
             sysLog.setResponseResult(JSONUtil.toJsonStr(retValue));
             sysLog.setRequsetTime(String.valueOf(time));
 

+ 1 - 0
nb-service/web-service/src/main/java/com/nb/web/service/bus/hospital/HospitalManager.java

@@ -107,6 +107,7 @@ public class HospitalManager {
                     .forEach(infusionInfo->{
                         BusDeviceRunningEntity source = BeanUtil.toBean(infusionInfo, BusDeviceRunningEntity.class);
                         source.setInfusionId(infusionInfo.getId());
+                        extraConfigHandler.handler(source);
                         autoUndoConfigHandler.handler(source);
                         finishMonitorConfigHandler.handler(source);
                     });