Commit b50d4e36995d8bc7a9dd7659beea66004753f838
1 parent
2689f82d
1.加入电科所用的4个接口,以及接口对应的数据生成
Showing
1 changed file
with
4 additions
and
1 deletions
src/main/java/com/bsth/server_rs/dks/DksRestService.java
| @@ -91,6 +91,7 @@ public class DksRestService { | @@ -91,6 +91,7 @@ public class DksRestService { | ||
| 91 | for (int i = 0, len = configs.size();i < len;i++) { | 91 | for (int i = 0, len = configs.size();i < len;i++) { |
| 92 | LineServiceConfig config = configs.get(i); | 92 | LineServiceConfig config = configs.get(i); |
| 93 | if (i == 0) { | 93 | if (i == 0) { |
| 94 | + oldLineCode = config.getLineCode(); | ||
| 94 | vo = new LineServiceConfigVo(); | 95 | vo = new LineServiceConfigVo(); |
| 95 | vo.setLineName(config.getLineName()); | 96 | vo.setLineName(config.getLineName()); |
| 96 | vo.setMonth(month); | 97 | vo.setMonth(month); |
| @@ -100,6 +101,7 @@ public class DksRestService { | @@ -100,6 +101,7 @@ public class DksRestService { | ||
| 100 | result.add(vo); | 101 | result.add(vo); |
| 101 | } else { | 102 | } else { |
| 102 | if (!oldLineCode.equals(config.getLineCode())) { | 103 | if (!oldLineCode.equals(config.getLineCode())) { |
| 104 | + oldLineCode = config.getLineCode(); | ||
| 103 | result.add(vo); | 105 | result.add(vo); |
| 104 | vo = new LineServiceConfigVo(); | 106 | vo = new LineServiceConfigVo(); |
| 105 | vo.setLineName(config.getLineName()); | 107 | vo.setLineName(config.getLineName()); |
| @@ -199,8 +201,9 @@ public class DksRestService { | @@ -199,8 +201,9 @@ public class DksRestService { | ||
| 199 | return result; | 201 | return result; |
| 200 | } | 202 | } |
| 201 | 203 | ||
| 202 | - @Scheduled(cron = "0 0 23 * * ?") | 204 | + @Scheduled(cron = "0 0/25 23 * * ?") |
| 203 | public void statisticalComputation() { | 205 | public void statisticalComputation() { |
| 206 | + log.info("执行电科所接口数据统计计算"); | ||
| 204 | DateTime dateTime = DateTime.now().plusDays(1); | 207 | DateTime dateTime = DateTime.now().plusDays(1); |
| 205 | try { | 208 | try { |
| 206 | for (int i = 0;i < 3;i++) { | 209 | for (int i = 0;i < 3;i++) { |