| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.dataInterchange.api.feignClient.UPExgMsgReportDriverInfoClient; |
| | | import com.ruoyi.dataInterchange.api.vo.UPExgMsgReportDriverInfoVo; |
| | | import com.ruoyi.system.api.model.Driver; |
| | | import com.ruoyi.system.api.model.Enterprise; |
| | | import com.ruoyi.system.mapper.DriverMapper; |
| | | import com.ruoyi.system.query.DriverListReq; |
| | | import com.ruoyi.system.query.DriverListResp; |
| | | import com.ruoyi.system.service.IDriverService; |
| | | import com.ruoyi.system.service.IEnterpriseService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | createTime = driver.getUpdateTime().toEpochSecond(ZoneOffset.ofHours(8)); |
| | | } |
| | | List<UPExgMsgReportDriverInfoVo> list = upExgMsgReportDriverInfoClient.getUPExgMsgReportDriverInfoListIsAfterCreateTime(createTime).getData(); |
| | | if (null == list || list.isEmpty()) { |
| | | return; |
| | | } |
| | | List<Enterprise> list1 = enterpriseService.list(); |
| | | List<Driver> driverList = new ArrayList<>(); |
| | | for (UPExgMsgReportDriverInfoVo vo : list) { |
| | |
| | | driver.setStatus(1); |
| | | driver.setFlag(1); |
| | | driver.setUpdateTime(LocalDateTime.now()); |
| | | driver.setVehicleNumber(vo.getVehicleNo()); |
| | | driverList.add(driver); |
| | | } |
| | | this.saveBatch(driverList); |
| | | if (driverList.size() > 0) { |
| | | this.saveBatch(driverList); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取司机列表 |
| | | * |
| | | * @param driverListReq |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageInfo<DriverListResp> getDriverList(DriverListReq driverListReq) { |
| | | PageInfo<DriverListResp> pageInfo = new PageInfo<>(driverListReq.getPageCurr(), driverListReq.getPageSize()); |
| | | return this.baseMapper.getDriverList(pageInfo, driverListReq); |
| | | } |
| | | } |