Explorar o código

完善opc展示页面

hfxc226 %!s(int64=2) %!d(string=hai) anos
pai
achega
5c145fc789

+ 1 - 2
platform-opc/src/main/java/com/platform/opc/servie/OpcService.java

@@ -53,9 +53,8 @@ public class OpcService {
     }
 
     /**
-     *
+     * 保存的不能异步,因为要写入数据库,必须同步执行
      */
-    @Async
     public void saveValue(String id) {
         String jsonStr = RedisUtils.getString(RedisKeyConstants.DCS_PREFIX + id);
         if (StringUtils.isNotBlank(jsonStr)) {

+ 1 - 1
platform-service/src/main/java/com/platform/service/big/impl/BigScreenSbInfoServiceImpl.java

@@ -290,7 +290,7 @@ public class BigScreenSbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, Sb
             }
         } else {// 月:统计每天的:需要当天0点减去前天0点的:注意23号0点减去22号0点,是22号的
             LocalDate localDate = LocalDate.of(record.getYear(), record.getMonth(), 1);
-            int nowDay = localDate.getDayOfMonth();
+            int nowDay = LocalDate.now().getDayOfMonth();
             int days = localDate.lengthOfMonth();
 
             // 找到下个月1号晚上0点的,用来计算这个月最后一天的耗电量