Commit 8684c715913e1b4effed68dbd7424d068cc71911
1 parent
d5821bad
feat: 修改推荐逻辑
Showing
1 changed file
with
3 additions
and
3 deletions
Bsth-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
| ... | ... | @@ -162,10 +162,10 @@ public class DriverServiceImpl implements IDriverService { |
| 162 | 162 | if (!Objects.isNull(timeMap.get(index).getSignInId()) && dto.size() > 1) { |
| 163 | 163 | LocalDateTime endTime = ConstDateUtil.getLocalDateTimeByLongTime(timeMap.get(index).getTimestamps()); |
| 164 | 164 | long nowBetween = ChronoUnit.MINUTES.between(endTime, nowTime); |
| 165 | - // 如果当前有效范围内签到记录无效如酒精测试异常则重复当前操作 | |
| 166 | - if ((Math.abs(nowBetween) <= 60) && timeMap.get(index).getExType().equals(SIGN_ALCOHOL_EX_NUM) && timeMap.get(index).getBcType().equals(BC_TYPE_OUT)) { | |
| 165 | + // 如果当前有效范围内签 | |
| 166 | + if ((Math.abs(nowBetween) <= 60)) { | |
| 167 | 167 | return timeMap.get(index); |
| 168 | - } else { | |
| 168 | + } else if (nowBetween > 60L) { | |
| 169 | 169 | index = index < timeMap.size() - 1 ? index + 1 : index; |
| 170 | 170 | } |
| 171 | 171 | } | ... | ... |