| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.TOrderPrivateCar; |
| | | import com.stylefeng.guns.modular.system.model.TReassign; |
| | | import com.stylefeng.guns.modular.system.dao.TReassignMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.service.ITReassignService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TReassignServiceImpl extends ServiceImpl<TReassignMapper, TReassign> implements ITReassignService { |
| | | |
| | | @Autowired |
| | | private ITOrderPrivateCarService itOrderPrivateCarService; |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getPrivateCarReassignOrderList(Page<Map<String, Object>> page, Integer roleType, Integer nowUserId, String beginTime, String endTime, String originalDriverName, String originalDriverPhone, String orderNum, String nowDriverName, String nowDriverPhone, Integer orderState, Integer state) { |
| | | return this.baseMapper.getPrivateCarReassignOrderList(page, roleType, nowUserId, beginTime, endTime, originalDriverName, originalDriverPhone, orderNum, nowDriverName, nowDriverPhone, orderState, state); |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCanSelectPrivateCarDriverList(Page<Map<String, Object>> page, Integer companyId, String name, String phone) { |
| | | return this.baseMapper.getCanSelectPrivateCarDriverList(page, companyId, name, phone); |
| | | List<Map<String, Object>> driverList = this.baseMapper.getCanSelectPrivateCarDriverList(page, companyId, name, phone); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (Map<String, Object> map : driverList) { |
| | | String driverId = map.get("id").toString(); |
| | | int count = itOrderPrivateCarService.selectCount(new EntityWrapper<TOrderPrivateCar>().eq("driverId", driverId) |
| | | .in("state", Arrays.asList(2, 3, 4, 5, 6, 11)).eq("isDelete", 1)); |
| | | if(0 == count){ |
| | | list.add(map); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |