Commit 092527461190fed46827bbad1e8d2b64228e95b4
1 parent
5fa49347
1.新增获取当天排班中变更过的排班数据接口
Showing
1 changed file
with
2 additions
and
6 deletions
src/main/java/com/bsth/server_rs/schedule/real/ScheduleRealService.java
| @@ -39,8 +39,6 @@ import java.util.*; | @@ -39,8 +39,6 @@ import java.util.*; | ||
| 39 | @Produces({MediaType.APPLICATION_JSON}) | 39 | @Produces({MediaType.APPLICATION_JSON}) |
| 40 | public class ScheduleRealService { | 40 | public class ScheduleRealService { |
| 41 | 41 | ||
| 42 | - private volatile long timestamp = 0L; | ||
| 43 | - | ||
| 44 | @Autowired | 42 | @Autowired |
| 45 | ScheduleRedisService redisService; | 43 | ScheduleRedisService redisService; |
| 46 | 44 | ||
| @@ -210,13 +208,11 @@ public class ScheduleRealService { | @@ -210,13 +208,11 @@ public class ScheduleRealService { | ||
| 210 | } | 208 | } |
| 211 | 209 | ||
| 212 | @GET | 210 | @GET |
| 213 | - @Path("/sch_jk4modify/{company}/{rq}") | ||
| 214 | - public List<ScheduleRealInfoDTO_JK> sch_jk4modify(@PathParam("company") String company, @PathParam("rq") String rq) { | ||
| 215 | - long now = System.currentTimeMillis(); | 211 | + @Path("/sch_jk4modify/{company}/{rq}/{timestamp}") |
| 212 | + public List<ScheduleRealInfoDTO_JK> sch_jk4modify(@PathParam("company") String company, @PathParam("rq") String rq, @PathParam("timestamp") long timestamp) { | ||
| 216 | DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyyMMdd"); | 213 | DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyyMMdd"); |
| 217 | DateTime dateTime = fmt.parseDateTime(rq); | 214 | DateTime dateTime = fmt.parseDateTime(rq); |
| 218 | List<ScheduleRealInfoDTO_JK> result = ScheduleRealInfoDTO_JK.getMultiInstance(scheduleRealInfoRepository.findByDateAndCompany(dateTime.toString("yyyy-MM-dd"), company, new Date(timestamp))); | 215 | List<ScheduleRealInfoDTO_JK> result = ScheduleRealInfoDTO_JK.getMultiInstance(scheduleRealInfoRepository.findByDateAndCompany(dateTime.toString("yyyy-MM-dd"), company, new Date(timestamp))); |
| 219 | - timestamp = now; | ||
| 220 | 216 | ||
| 221 | return result; | 217 | return result; |
| 222 | } | 218 | } |