当前企业可绑定车辆查询
This commit is contained in:
@@ -28,6 +28,7 @@ import org.dromara.common.log.annotation.Log;
|
|||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -83,6 +84,17 @@ public class HotVehicleController extends BaseController {
|
|||||||
public TableDataInfo<HotVehicleVo> listByStatus(HotVehicleStatusBo bo, PageQuery pageQuery) {
|
public TableDataInfo<HotVehicleVo> listByStatus(HotVehicleStatusBo bo, PageQuery pageQuery) {
|
||||||
return hotVehicleService.queryPageListByStatus(bo, pageQuery);
|
return hotVehicleService.queryPageListByStatus(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前企业可绑定的车辆列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/bindableList")
|
||||||
|
@Operation(summary = "查询当前企业可绑定的车辆列表")
|
||||||
|
public R<List<HotVehicleVo>> bindableList(HotVehicleBo bo) {
|
||||||
|
bo.setCompanyId(LoginHelper.getLoginUser().getCompanyId());
|
||||||
|
return R.ok(hotVehicleService.queryBindableList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入车辆
|
* 导入车辆
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -62,6 +62,14 @@ public interface IHotVehicleService {
|
|||||||
*/
|
*/
|
||||||
TableDataInfo<HotVehicleVo> queryPageListByStatus(HotVehicleStatusBo bo, PageQuery pageQuery);
|
TableDataInfo<HotVehicleVo> queryPageListByStatus(HotVehicleStatusBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前企业可绑定的车辆列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 可绑定车辆列表
|
||||||
|
*/
|
||||||
|
List<HotVehicleVo> queryBindableList(HotVehicleBo bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询符合条件的公司车辆信息列表
|
* 查询符合条件的公司车辆信息列表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -197,6 +197,30 @@ public class HotVehicleServiceImpl implements IHotVehicleService {
|
|||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前企业可绑定的车辆列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 可绑定车辆列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HotVehicleVo> queryBindableList(HotVehicleBo bo) {
|
||||||
|
LambdaQueryWrapper<HotVehicle> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(HotVehicle::getArchiveNo)
|
||||||
|
.orderByAsc(HotVehicle::getPlateNumber)
|
||||||
|
.eq(bo.getCompanyId() != null, HotVehicle::getCompanyId, bo.getCompanyId())
|
||||||
|
.eq(HotVehicle::getVehicleStatus, 1L)
|
||||||
|
.eq(HotVehicle::getOperationStatus, 1L)
|
||||||
|
.eq(HotVehicle::getIsDeleted, 0L)
|
||||||
|
.and(wrapper -> wrapper.isNull(HotVehicle::getCurrentDriver)
|
||||||
|
.or()
|
||||||
|
.eq(HotVehicle::getCurrentDriver, ""))
|
||||||
|
.like(StringUtils.isNotBlank(bo.getPlateNumber()), HotVehicle::getPlateNumber, bo.getPlateNumber())
|
||||||
|
.eq(StringUtils.isNotBlank(bo.getVehicleType()), HotVehicle::getVehicleType, bo.getVehicleType())
|
||||||
|
.eq(StringUtils.isNotBlank(bo.getVehicleCategory()), HotVehicle::getVehicleCategory, bo.getVehicleCategory());
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询符合条件的公司车辆信息列表
|
* 查询符合条件的公司车辆信息列表
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user