Commit 312bc8722799813fc10ebad0ec0e00687447c74f
1 parent
60943b09
feat: 过滤工种
Showing
1 changed file
with
13 additions
and
0 deletions
ruoyi-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
| ... | ... | @@ -61,6 +61,7 @@ import javax.servlet.http.HttpServletResponse; |
| 61 | 61 | import static com.ruoyi.common.ApiProperties.PERSONNEL_API_KEY; |
| 62 | 62 | import static com.ruoyi.common.ConstDriverProperties.*; |
| 63 | 63 | import static com.ruoyi.common.ConstSignInConstSignInProperties.*; |
| 64 | +import static com.ruoyi.common.ErrorTypeProperties.WORK_DAY_ERROR; | |
| 64 | 65 | import static com.ruoyi.common.redispre.GlobalRedisPreName.DRIVER_SCHEDULING_PRE; |
| 65 | 66 | |
| 66 | 67 | /** |
| ... | ... | @@ -575,11 +576,23 @@ public class DriverServiceImpl implements IDriverService { |
| 575 | 576 | |
| 576 | 577 | private List<DriverSignInRecommendation> handleTimeOutPerson(List<DriverSignInRecommendation> nowTimerList) { |
| 577 | 578 | return nowTimerList.stream() |
| 579 | + // 只需要签到 | |
| 580 | + .filter(item-> BC_TYPE_OUT.equals(item.getBcType()) && checkPosts(item)) | |
| 578 | 581 | // 筛选应签未签人员 |
| 579 | 582 | .filter(item -> Objects.isNull(item.getSignTime()) || item.getTimestamps() - item.getSignTime() < 0) |
| 580 | 583 | .collect(Collectors.toList()); |
| 581 | 584 | } |
| 582 | 585 | |
| 586 | + private boolean checkPosts(DriverSignInRecommendation item) { | |
| 587 | + switch (item.getPosts()){ | |
| 588 | + case "驾驶员": | |
| 589 | + case "售票员": | |
| 590 | + case "科员": | |
| 591 | + return true; | |
| 592 | + } | |
| 593 | + return false; | |
| 594 | + } | |
| 595 | + | |
| 583 | 596 | /** |
| 584 | 597 | * 获取新的imageUrl |
| 585 | 598 | * | ... | ... |