package com.gci.boot.modules.basedata.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gci.boot.modules.basedata.entity.TbVehicle;
import com.gci.boot.modules.dataview.vo.VehicleTypeVo;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 2464
 * @since 2023-08-25
 */
public interface TbVehicleMapper extends BaseMapper<TbVehicle> {

	//清空所属项目id
	@Update("update tb_vehicle set project_id = 'INNER_PROJECT' where project_id = #{projectId}")
	void clearProductId(String projectId);

	//按车辆种类统计资产
	List<VehicleTypeVo> getVehicleTypeCount(String projectId);

	//按项目统计资产
	List<VehicleTypeVo> getVehicleProjectCount();

	//查询正常项目车辆
	List<TbVehicle> getProjectVehicle();

}
