Commit 783a58c63f059dcf55b06a2a7e0e580a13ad3374
1 parent
8f4a8505
update...
Showing
1 changed file
with
21 additions
and
1 deletions
src/main/java/com/bsth/controller/realcontrol/ServiceDataInterface.java
| ... | ... | @@ -12,7 +12,7 @@ import java.util.ArrayList; |
| 12 | 12 | import java.util.List; |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | - * 对外的营运数据接口,主要输出当日的数据 | |
| 15 | + * 对外的营运数据接口 | |
| 16 | 16 | * Created by panzhao on 2017/3/15. |
| 17 | 17 | */ |
| 18 | 18 | @RestController |
| ... | ... | @@ -78,4 +78,24 @@ public class ServiceDataInterface { |
| 78 | 78 | } |
| 79 | 79 | return rs; |
| 80 | 80 | } |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 获取全量的进出场数据, 仅供接口项目调用。 由接口项目负责对外所有场站输出 | |
| 84 | + * @return | |
| 85 | + */ | |
| 86 | + @RequestMapping("/findCurrInAndOut") | |
| 87 | + public List<ScheduleRealInfo> findCurrInAndOut(@RequestParam String secretKey){ | |
| 88 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 89 | + return null; | |
| 90 | + | |
| 91 | + | |
| 92 | + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()), rs = new ArrayList<>(); | |
| 93 | + for (ScheduleRealInfo sch : all) { | |
| 94 | + if (sch.getBcType().equals("in") | |
| 95 | + || sch.getBcType().equals("out")) { | |
| 96 | + rs.add(sch); | |
| 97 | + } | |
| 98 | + } | |
| 99 | + return rs; | |
| 100 | + } | |
| 81 | 101 | } | ... | ... |