Commit 29221ceff72362606058928d711de6cd7de48ac0
1 parent
38c1231e
fix: 修改缓存key,匹配驾驶员字符
Showing
2 changed files
with
3 additions
and
3 deletions
Bsth-admin/src/main/java/com/ruoyi/common/cache/NowSchedulingCache.java
| ... | ... | @@ -39,7 +39,7 @@ public class NowSchedulingCache { |
| 39 | 39 | // 查询今天和昨天 |
| 40 | 40 | for (int i = 0; i > -2; i--) { |
| 41 | 41 | Map<String, List<DriverScheduling>> resultMap = new HashMap<>(800); |
| 42 | - String date = ConstDateUtil.formatDate(ConstDateUtil.getTheSpecifiedNumberOfDaysOfTime(i)); | |
| 42 | + String date = ConstDateUtil.formatDate("yyyy-MM-dd",ConstDateUtil.getTheSpecifiedNumberOfDaysOfTime(i)); | |
| 43 | 43 | List<DriverScheduling> schedulingList = schedulingMapper.queryToDay(date, null, null, null); |
| 44 | 44 | handlerResultMap(resultMap, schedulingList); |
| 45 | 45 | // 获取错误排班 |
| ... | ... | @@ -47,7 +47,7 @@ public class NowSchedulingCache { |
| 47 | 47 | // 插入错误排班 |
| 48 | 48 | errorJobcodeService.insertBatchErrorJobcode(errorScheduling); |
| 49 | 49 | // 更新缓存 |
| 50 | - cacheNowDayScheduling.put(date, resultMap); | |
| 50 | + cacheNowDayScheduling.put(date.replaceAll("-",""), resultMap); | |
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
| ... | ... | @@ -421,7 +421,7 @@ public class DriverServiceImpl implements IDriverService { |
| 421 | 421 | DriverSignInRecommendation recommendation = checkTime(dto, now); |
| 422 | 422 | if (BC_TYPE_OUT.equals(recommendation.getBcType())) { |
| 423 | 423 | // 售票员无需酒精测试 |
| 424 | - if (recommendation.getPosts().equals(PERSONNEL_POSTS_DRIVER)) | |
| 424 | + if (recommendation.getPosts().contains(PERSONNEL_POSTS_DRIVER)) | |
| 425 | 425 | vo = DriverResponseVo.createDriverResponseVo(recommendation.getTimestamps(), driver, SIGN_IN_STRING, alcoholFlag, schedulingFlag, recommendation.getNbbm(), recommendation.getLpName(), recommendation.getLineName()); |
| 426 | 426 | else |
| 427 | 427 | vo = DriverResponseVo.createDriverResponseVo(recommendation.getTimestamps(), driver, SIGN_IN_STRING, !alcoholFlag, schedulingFlag, recommendation.getNbbm(), recommendation.getLpName(), recommendation.getLineName()); | ... | ... |