Commit 1b7bcae89566286ed748c6364e0114a5ffe35eea
1 parent
23708446
fix: 修改备注报错问题,修改项目启动提示语。
Showing
3 changed files
with
7 additions
and
4 deletions
Bsth-admin/src/main/java/com/ruoyi/common/cache/NowSchedulingCache.java
| ... | ... | @@ -28,7 +28,7 @@ public class NowSchedulingCache { |
| 28 | 28 | public NowSchedulingCache(DriverSchedulingMapper driverSchedulingMapper,IErrorJobcodeService errorJobcodeService) { |
| 29 | 29 | this.schedulingMapper = driverSchedulingMapper; |
| 30 | 30 | this.errorJobcodeService = errorJobcodeService; |
| 31 | - log.info("项目启动加载中获取排班表-----"); | |
| 31 | + log.info("项目启动加载中获取排班表并存入缓存-----"); | |
| 32 | 32 | cacheNowDaySchedulingInit(); |
| 33 | 33 | } |
| 34 | 34 | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/common/cache/SchedulingCache.java
Bsth-admin/src/main/java/com/ruoyi/service/SchedulingService.java
| ... | ... | @@ -155,13 +155,16 @@ public class SchedulingService { |
| 155 | 155 | sb.append(signIn.getRemark()); |
| 156 | 156 | } |
| 157 | 157 | if (SIGN_ALCOHOL_EX_NUM.equals(signIn.getExType())) { |
| 158 | - sb.append("," + signIn.getRemark().substring(signIn.getRemark().indexOf(ALCOHOL_SIGN_IN_ERROR))); | |
| 158 | + int index = signIn.getRemark().indexOf(ALCOHOL_SIGN_IN_ERROR); | |
| 159 | + if (index != -1) { | |
| 160 | + sb.append("," + signIn.getRemark().substring(index)); | |
| 161 | + | |
| 162 | + } | |
| 159 | 163 | } |
| 160 | 164 | return sb.toString(); |
| 161 | 165 | } |
| 162 | 166 | |
| 163 | 167 | |
| 164 | - | |
| 165 | 168 | private void handlerRecord(List<DriverScheduling> dto, SignIn signIn, GlobalIndex globalIndex) { |
| 166 | 169 | if (globalIndex.getIndex() == dto.size() - 1) { |
| 167 | 170 | return; | ... | ... |