Jelajahi Sumber

Merge branch 'dev' into sky_v2

15928045575 2 tahun lalu
induk
melakukan
7325244407

+ 15 - 5
slope-common/slope-common-log/src/main/java/com/sckw/log/TraceLog/aop/TraceIdAspect.java

@@ -72,10 +72,12 @@ public class TraceIdAspect {
         String param = JSON.toJSONString(logArgs);
         String param = JSON.toJSONString(logArgs);
         String exception = "";
         String exception = "";
         try {
         try {
+            log.info("请求参数 param:{} ",param);
             long start = System.currentTimeMillis();
             long start = System.currentTimeMillis();
             //执行结果,返回参数
             //执行结果,返回参数
             result = joinPoint.proceed();
             result = joinPoint.proceed();
             long end = System.currentTimeMillis();
             long end = System.currentTimeMillis();
+            log.info("响应结果 result:{} ",JSON.toJSONString(result));
             log.info("方法耗时:{} ms", end - start);
             log.info("方法耗时:{} ms", end - start);
         } catch (Throwable e) {
         } catch (Throwable e) {
             exception = e.getMessage();
             exception = e.getMessage();
@@ -85,13 +87,21 @@ public class TraceIdAspect {
             Date endTime = new Date();
             Date endTime = new Date();
             long time = endTime.getTime() - startTime.getTime();
             long time = endTime.getTime() - startTime.getTime();
             Boolean slowRequest = (time > 1500L);
             Boolean slowRequest = (time > 1500L);
-            log.info("{}:{}.{}," +
-                            "param={}," +
-                            "result={}," +
+//            log.info("{}:{}.{}," +
+//                            "param={}," +
+//                            "result={}," +
+//                            "exception={}," +
+//                            "[{}->{}],slowRequest{}=[{}]", l.description(), targetName, methodName,
+//                    param,
+//                    JSON.toJSONString(result),
+//                    exception,
+//                    DateFormatUtils.format(startTime, TIME_PATTERN),
+//                    DateFormatUtils.format(endTime, TIME_PATTERN),
+//                    slowRequest,
+//                    time);
+                        log.info("{}:{}.{}," +
                             "exception={}," +
                             "exception={}," +
                             "[{}->{}],slowRequest{}=[{}]", l.description(), targetName, methodName,
                             "[{}->{}],slowRequest{}=[{}]", l.description(), targetName, methodName,
-                    param,
-                    JSON.toJSONString(result),
                     exception,
                     exception,
                     DateFormatUtils.format(startTime, TIME_PATTERN),
                     DateFormatUtils.format(startTime, TIME_PATTERN),
                     DateFormatUtils.format(endTime, TIME_PATTERN),
                     DateFormatUtils.format(endTime, TIME_PATTERN),

+ 3 - 2
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/service/CommonService.java

@@ -123,6 +123,7 @@ public class CommonService {
     }
     }
 
 
     private static final Long equatorial_circumference = 40075020000L;
     private static final Long equatorial_circumference = 40075020000L;
+    private static final Long LATITUDE_REFERENCE = 111000000L;
 
 
     @Autowired
     @Autowired
     KwsDeviceReferenceMapper deviceReferenceMapper;
     KwsDeviceReferenceMapper deviceReferenceMapper;
@@ -142,7 +143,7 @@ public class CommonService {
         }
         }
         BigDecimal subtract = new BigDecimal(value).subtract((deviceRelation == null ? new BigDecimal("0.00") : deviceRelation.getCurrentValue()));
         BigDecimal subtract = new BigDecimal(value).subtract((deviceRelation == null ? new BigDecimal("0.00") : deviceRelation.getCurrentValue()));
         if (DictItemEnum.LATITUDE_Y.getValue().equals(itemName)) {
         if (DictItemEnum.LATITUDE_Y.getValue().equals(itemName)) {
-            offsetValue = new BigDecimal(equatorial_circumference).multiply(subtract);
+            offsetValue = new BigDecimal(LATITUDE_REFERENCE).multiply(subtract);
         }
         }
         double angleInRadians = 0;
         double angleInRadians = 0;
         if (DictItemEnum.LONGITUDE_X.getValue().equals(itemName)) {
         if (DictItemEnum.LONGITUDE_X.getValue().equals(itemName)) {
@@ -177,7 +178,7 @@ public class CommonService {
         }
         }
         BigDecimal subtract = new BigDecimal(value).subtract((deviceRelation == null ? new BigDecimal("0.00") : deviceRelation.getOriginalValue()));
         BigDecimal subtract = new BigDecimal(value).subtract((deviceRelation == null ? new BigDecimal("0.00") : deviceRelation.getOriginalValue()));
         if (DictItemEnum.LATITUDE_Y.getValue().equals(itemName)) {
         if (DictItemEnum.LATITUDE_Y.getValue().equals(itemName)) {
-            offsetValue = new BigDecimal(equatorial_circumference).multiply(subtract);
+            offsetValue = new BigDecimal(LATITUDE_REFERENCE).multiply(subtract);
         }
         }
         double angleInRadians = 0;
         double angleInRadians = 0;
         if (DictItemEnum.LONGITUDE_X.getValue().equals(itemName)) {
         if (DictItemEnum.LONGITUDE_X.getValue().equals(itemName)) {