Commit 5598699ebc3bcfb14cadd3dfeb0c1b573aed3ad4
1 parent
a903de90
feat: 修改获取人员数据的方法名
Showing
3 changed files
with
8 additions
and
11 deletions
Bsth-admin/src/main/java/com/ruoyi/common/cache/TempCache.java
Bsth-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
| ... | ... | @@ -4,7 +4,6 @@ import java.io.File; |
| 4 | 4 | import java.io.IOException; |
| 5 | 5 | import java.io.InputStream; |
| 6 | 6 | import java.nio.file.Paths; |
| 7 | -import java.time.LocalDate; | |
| 8 | 7 | import java.time.LocalDateTime; |
| 9 | 8 | import java.time.temporal.ChronoUnit; |
| 10 | 9 | import java.util.*; |
| ... | ... | @@ -12,8 +11,6 @@ import java.util.stream.Collectors; |
| 12 | 11 | |
| 13 | 12 | import cn.hutool.core.collection.CollectionUtil; |
| 14 | 13 | import cn.hutool.http.HttpUtil; |
| 15 | -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
| 16 | -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | |
| 17 | 14 | import com.github.pagehelper.util.StringUtil; |
| 18 | 15 | import com.ruoyi.common.cache.NowSchedulingCache; |
| 19 | 16 | import com.ruoyi.common.cache.SchedulingCache; |
| ... | ... | @@ -28,7 +25,6 @@ import com.ruoyi.common.utils.DateUtils; |
| 28 | 25 | import com.ruoyi.common.utils.file.FileUploadUtils; |
| 29 | 26 | import com.ruoyi.common.utils.file.FileUtils; |
| 30 | 27 | import com.ruoyi.common.utils.file.MimeTypeUtils; |
| 31 | -import com.ruoyi.domain.RuleAttendanceMain; | |
| 32 | 28 | import com.ruoyi.equipment.mapper.EquipmentMapper; |
| 33 | 29 | import com.ruoyi.framework.config.ServerConfig; |
| 34 | 30 | import com.ruoyi.job.DriverJob; |
| ... | ... | @@ -42,7 +38,6 @@ import com.ruoyi.pojo.response.DriverResponseVo; |
| 42 | 38 | import com.ruoyi.pojo.response.ResponseSchedulingDto; |
| 43 | 39 | import com.ruoyi.pojo.response.personnel.PersonnelResultResponseVo; |
| 44 | 40 | import com.ruoyi.pojo.response.personnel.TokenResponseVo; |
| 45 | -import com.ruoyi.service.AttendanceService; | |
| 46 | 41 | import com.ruoyi.service.RuleAttendanceMainService; |
| 47 | 42 | import com.ruoyi.service.SchedulingService; |
| 48 | 43 | import com.ruoyi.service.ThreadJobService; |
| ... | ... | @@ -70,7 +65,6 @@ import javax.servlet.http.HttpServletResponse; |
| 70 | 65 | import static com.ruoyi.common.ApiProperties.PERSONNEL_API_KEY; |
| 71 | 66 | import static com.ruoyi.common.ConstDriverProperties.*; |
| 72 | 67 | import static com.ruoyi.common.ConstSignInConstSignInProperties.*; |
| 73 | -import static com.ruoyi.common.RuleSchedulingProperties.WORK_FLAG; | |
| 74 | 68 | import static com.ruoyi.common.redispre.GlobalRedisPreName.DRIVER_SCHEDULING_PRE; |
| 75 | 69 | import static com.ruoyi.common.redispre.GlobalRedisPreName.REDIS_SIGN_IN_DRIVER_ALCOHOL_OVERFLOW; |
| 76 | 70 | |
| ... | ... | @@ -637,9 +631,9 @@ public class DriverServiceImpl implements IDriverService { |
| 637 | 631 | PersonnelResultResponseVo vo = DriverJob.getPersonInfo(tokenVo.getAccessToken(), pageSize, 1); |
| 638 | 632 | int countPage = vo.getTotalCount() / pageSize; |
| 639 | 633 | countPage = vo.getTotalCount() % pageSize == 0 ? countPage : countPage + 1; |
| 640 | - List<Driver> drivers = DriverJob.getDrivers(date, vo); | |
| 634 | + List<Driver> drivers = DriverJob.handlerDrivers(date, vo); | |
| 641 | 635 | for (int i = 2; i <= countPage; i++) { |
| 642 | - drivers.addAll(DriverJob.getDrivers(date, DriverJob.getPersonInfo(tokenVo.getAccessToken(), 100, i))); | |
| 636 | + drivers.addAll(DriverJob.handlerDrivers(date, DriverJob.getPersonInfo(tokenVo.getAccessToken(), 100, i))); | |
| 643 | 637 | } |
| 644 | 638 | if (CollectionUtil.isNotEmpty(drivers)) { |
| 645 | 639 | driverMapper.updateDriverBaseInfoByJobCodes(drivers, 1); | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/job/DriverJob.java
| ... | ... | @@ -422,9 +422,9 @@ public class DriverJob implements InitializingBean { |
| 422 | 422 | PersonnelResultResponseVo vo = getPersonInfo(accessToken, pageSize, 1); |
| 423 | 423 | int countPage = vo.getTotalCount() / pageSize; |
| 424 | 424 | countPage = vo.getTotalCount() % pageSize == 0 ? countPage : countPage + 1; |
| 425 | - List<Driver> drivers = getDrivers(date, vo); | |
| 425 | + List<Driver> drivers = handlerDrivers(date, vo); | |
| 426 | 426 | for (int i = 2; i <= countPage; i++) { |
| 427 | - drivers.addAll(getDrivers(date, getPersonInfo(accessToken, 100, i))); | |
| 427 | + drivers.addAll(handlerDrivers(date, getPersonInfo(accessToken, 100, i))); | |
| 428 | 428 | } |
| 429 | 429 | List<String> jobList = drivers.stream().map(Driver::getJobCode).distinct().collect(Collectors.toList()); |
| 430 | 430 | // 删除离职员工 |
| ... | ... | @@ -486,7 +486,7 @@ public class DriverJob implements InitializingBean { |
| 486 | 486 | DRIVER_SERVICE.deleteNotEmptyJob(jobList); |
| 487 | 487 | } |
| 488 | 488 | |
| 489 | - public static List<Driver> getDrivers(Date date, PersonnelResultResponseVo vo) { | |
| 489 | + public static List<Driver> handlerDrivers(Date date, PersonnelResultResponseVo vo) { | |
| 490 | 490 | List<Driver> drivers = vo.getData().stream().map(item -> { |
| 491 | 491 | Driver driver = new Driver(); |
| 492 | 492 | FormData formData = item.getFormData(); | ... | ... |