Commit 916cd930d380e628822bef52c370ffe48117a788
1 parent
512d2f0f
1.加入接口可以获取对应车辆当日排班列表
Showing
1 changed file
with
16 additions
and
0 deletions
src/main/java/com/bsth/server_rs/schedule/real/ScheduleRealService.java
| ... | ... | @@ -318,6 +318,22 @@ public class ScheduleRealService implements InitializingBean { |
| 318 | 318 | return result; |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | + @GET | |
| 322 | + @Path("/shiftsForDevice/{device}") | |
| 323 | + public List<ScheduleRealInfo> shiftsForDevice(@PathParam("device") String device) { | |
| 324 | + List<ScheduleRealInfo> list = new ArrayList<>(); | |
| 325 | + try { | |
| 326 | + if (StringUtils.isEmpty(device)) | |
| 327 | + return list; | |
| 328 | + | |
| 329 | + StringBuilder sb = HttpClientUtils.get(url + "/shiftsForDevice?secretKey=" + secretKey + "&device=" + device); | |
| 330 | + list = JSON.parseArray(sb.toString(), ScheduleRealInfo.class); | |
| 331 | + } catch (Exception e) { | |
| 332 | + logger.error("", e); | |
| 333 | + } | |
| 334 | + return list; | |
| 335 | + } | |
| 336 | + | |
| 321 | 337 | @Override |
| 322 | 338 | public void afterPropertiesSet() throws Exception { |
| 323 | 339 | url = appProperties.getControlUrl(); | ... | ... |