Pārlūkot izejas kodu

层级树增加定时任务-首页弹窗山东总装机容量修改

wangb 2 gadi atpakaļ
vecāks
revīzija
aa54e7ac09

+ 0 - 6
web/backmanagerconfig/src/main/java/com/gyee/backconfig/config/CacheContext.java

@@ -6,8 +6,6 @@ import com.gyee.backconfig.model.auto.*;
 import com.gyee.backconfig.service.auto.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.CommandLineRunner;
-import org.springframework.cache.Cache;
-import org.springframework.cache.CacheManager;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
@@ -26,10 +24,6 @@ import java.util.Map;
 @Component
 public class CacheContext implements CommandLineRunner {
 
-
-
-
-
     @Autowired
     private IRegionService regionService;//区域
 

+ 2 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/NewtreeController.java

@@ -4,6 +4,7 @@ import com.gyee.backconfig.config.R;
 import com.gyee.backconfig.model.auto.Companys;
 import com.gyee.backconfig.service.NewtreeService;
 import com.gyee.common.model.StringUtils;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -21,6 +22,7 @@ public class NewtreeController {
      *
      * @return
      */
+    @Scheduled(cron = "*/5 * * * * ?")
     @GetMapping(value = "/treels")
     @ResponseBody
     @CrossOrigin(origins = "*", maxAge = 3600)

+ 1 - 1
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/WindpowerstationPGService.java

@@ -712,7 +712,7 @@ public class WindpowerstationPGService implements BaseService<WindpowerstationPG
         tcsd.put("sdgsgfzjrl", MathUtil.twoBit(sdqjnysum));
         tcsd.put("sdgsfd", sdqjnyfd.size());
         tcsd.put("sdgsfdzjrl", MathUtil.twoBit(sdqjnyfdsum));
-        tcsd.put("sdgszjrl", MathUtil.twoBit(sdqjnysum + sdqjnyfdsum));
+        tcsd.put("sdgszzjrl", MathUtil.twoBit(sdqjnysum + sdqjnyfdsum));
 
         List<Map> tcjh = new ArrayList<>();
         tcjh.add(tcsx);