车辆管理系统更新2
parent
ebe49db774
commit
1840d1acc8
|
@ -1,156 +1,156 @@
|
|||
//package com.god.base.domain;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.annotation.TableId;
|
||||
//import com.baomidou.mybatisplus.annotation.TableName;
|
||||
//import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
//import com.god.base.domain.request.CarRequest;
|
||||
//import com.god.common.core.annotation.Excel;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import lombok.Builder;
|
||||
//import lombok.Data;
|
||||
//import lombok.NoArgsConstructor;
|
||||
//
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// * 车辆信息管理对象
|
||||
// */
|
||||
//@Data
|
||||
//@AllArgsConstructor
|
||||
//@NoArgsConstructor
|
||||
//@Builder
|
||||
//@TableName(value = "t_car")
|
||||
//public class Car {
|
||||
//
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /**
|
||||
// * 车辆Vin 主键
|
||||
// */
|
||||
// @Excel(name = "车辆carVibId")
|
||||
// @TableId
|
||||
// private String carVinId;
|
||||
// /**
|
||||
// * 单位id
|
||||
// */
|
||||
// private long userId;
|
||||
// /**
|
||||
// * 车辆类型id
|
||||
// */
|
||||
// @Excel(name = "车辆类型ID")
|
||||
// private long carTypeId;
|
||||
// /**
|
||||
// * 电池箱信息id
|
||||
// */
|
||||
// private long batteryBoxId;
|
||||
// /**
|
||||
// * 电池组id
|
||||
// */
|
||||
// private long cellId;
|
||||
// /**
|
||||
// * 单体电池id
|
||||
// */
|
||||
// private long batteryCellId;
|
||||
// /**
|
||||
// * 电池组模块id
|
||||
// */
|
||||
// private long batteryPackInformationId;
|
||||
// /**
|
||||
// * 电子围栏ID
|
||||
// */
|
||||
// @Excel(name = "电子围栏ID")
|
||||
// private long fenceId;
|
||||
// /**
|
||||
// * 车牌号
|
||||
// */
|
||||
// private String carNumber;
|
||||
// /**
|
||||
// * 驱动机主键
|
||||
// */
|
||||
// private long driveMotorId;
|
||||
// /**
|
||||
// * 车辆总里程
|
||||
// */
|
||||
// private String carMileage;
|
||||
// /**
|
||||
// * 创建者
|
||||
// */
|
||||
// private String createBy;
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @Excel(name = "开始时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
// private Date createTime;
|
||||
// /**
|
||||
// * 更新者
|
||||
// */
|
||||
// private String updateBy;
|
||||
// /**
|
||||
// * 更新时间
|
||||
// */
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @Excel(name = "结束时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
// private Date updateTime;
|
||||
// /**
|
||||
// * 区域
|
||||
// */
|
||||
// private String address;
|
||||
// /**
|
||||
// * 电池厂商
|
||||
// */
|
||||
// @Excel(name = "电池厂商")
|
||||
// private String batteryManufacturer;
|
||||
// /**
|
||||
// * 电机厂商
|
||||
// */
|
||||
// @Excel(name = "电机厂商")
|
||||
// private String motorManufacturer;
|
||||
// /**
|
||||
// * 电机编号
|
||||
// */
|
||||
// @Excel(name = "电机编号")
|
||||
// private String motorNumber;
|
||||
// /**
|
||||
// * 电池编号
|
||||
// */
|
||||
// @Excel(name = "电池编号")
|
||||
// private String batteryNumber;
|
||||
// /**
|
||||
// * 逻辑删除
|
||||
// */
|
||||
// private int isDelete;
|
||||
// /**
|
||||
// * 车辆状态
|
||||
// */
|
||||
// @Excel(name = "车辆状态")
|
||||
// private int status;
|
||||
//
|
||||
// /**
|
||||
// * 电子围栏名称
|
||||
// */
|
||||
// private String fenceName;
|
||||
// /**
|
||||
// * 车辆类型名称
|
||||
// */
|
||||
// private String carTypeName;
|
||||
//
|
||||
// /**
|
||||
// * 车辆绑定的主题
|
||||
// */
|
||||
// private String topic;
|
||||
//
|
||||
// public static Car carBuildAdd(CarRequest carRequest){
|
||||
// return Car.builder()
|
||||
// .carVinId(carRequest.getCarVinId())
|
||||
// .carTypeId(carRequest.getCarTypeId())
|
||||
// .fenceId(carRequest.getFenceId())
|
||||
// .status(carRequest.getStatus())
|
||||
// .batteryManufacturer(carRequest.getBatteryManufacturer())
|
||||
// .motorManufacturer(carRequest.getMotorManufacturer())
|
||||
// .motorNumber(carRequest.getMotorNumber())
|
||||
// .batteryNumber(carRequest.getBatteryNumber())
|
||||
// .build();
|
||||
// }
|
||||
//
|
||||
//}
|
||||
package com.god.base.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.god.base.domain.request.CarRequest;
|
||||
import com.god.common.core.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆信息管理对象
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@TableName(value = "t_car")
|
||||
public class Car {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 车辆Vin 主键
|
||||
*/
|
||||
@Excel(name = "车辆carVibId")
|
||||
@TableId
|
||||
private String carVinId;
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
private long userId;
|
||||
/**
|
||||
* 车辆类型id
|
||||
*/
|
||||
@Excel(name = "车辆类型ID")
|
||||
private long carTypeId;
|
||||
/**
|
||||
* 电池箱信息id
|
||||
*/
|
||||
private long batteryBoxId;
|
||||
/**
|
||||
* 电池组id
|
||||
*/
|
||||
private long cellId;
|
||||
/**
|
||||
* 单体电池id
|
||||
*/
|
||||
private long batteryCellId;
|
||||
/**
|
||||
* 电池组模块id
|
||||
*/
|
||||
private long batteryPackInformationId;
|
||||
/**
|
||||
* 电子围栏ID
|
||||
*/
|
||||
@Excel(name = "电子围栏ID")
|
||||
private long fenceId;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carNumber;
|
||||
/**
|
||||
* 驱动机主键
|
||||
*/
|
||||
private long driveMotorId;
|
||||
/**
|
||||
* 车辆总里程
|
||||
*/
|
||||
private String carMileage;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开始时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "结束时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 区域
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 电池厂商
|
||||
*/
|
||||
@Excel(name = "电池厂商")
|
||||
private String batteryManufacturer;
|
||||
/**
|
||||
* 电机厂商
|
||||
*/
|
||||
@Excel(name = "电机厂商")
|
||||
private String motorManufacturer;
|
||||
/**
|
||||
* 电机编号
|
||||
*/
|
||||
@Excel(name = "电机编号")
|
||||
private String motorNumber;
|
||||
/**
|
||||
* 电池编号
|
||||
*/
|
||||
@Excel(name = "电池编号")
|
||||
private String batteryNumber;
|
||||
/**
|
||||
* 逻辑删除
|
||||
*/
|
||||
private int isDelete;
|
||||
/**
|
||||
* 车辆状态
|
||||
*/
|
||||
@Excel(name = "车辆状态")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 电子围栏名称
|
||||
*/
|
||||
private String fenceName;
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
private String carTypeName;
|
||||
|
||||
/**
|
||||
* 车辆绑定的主题
|
||||
*/
|
||||
private String topic;
|
||||
|
||||
public static Car carBuildAdd(CarRequest carRequest){
|
||||
return Car.builder()
|
||||
.carVinId(carRequest.getCarVinId())
|
||||
.carTypeId(carRequest.getCarTypeId())
|
||||
.fenceId(carRequest.getFenceId())
|
||||
.status(carRequest.getStatus())
|
||||
.batteryManufacturer(carRequest.getBatteryManufacturer())
|
||||
.motorManufacturer(carRequest.getMotorManufacturer())
|
||||
.motorNumber(carRequest.getMotorNumber())
|
||||
.batteryNumber(carRequest.getBatteryNumber())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,51 +1,51 @@
|
|||
//package com.god.base.server.mapper;
|
||||
//
|
||||
//import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//import com.god.base.domain.Car;
|
||||
//import com.god.base.domain.CarType;
|
||||
//import com.god.base.domain.Fence;
|
||||
//import com.god.base.domain.request.CarRequest;
|
||||
//import org.apache.ibatis.annotations.Mapper;
|
||||
//import org.apache.ibatis.annotations.Param;
|
||||
//import org.apache.ibatis.annotations.Select;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * 车辆mapper
|
||||
// */
|
||||
//@Mapper
|
||||
//public interface CarMapper extends BaseMapper<Car> {
|
||||
//
|
||||
//
|
||||
// List<Car> getList(@Param("userId") String userId);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 根据vin进行查询管理信息
|
||||
// * @param vinId
|
||||
// * @return
|
||||
// */
|
||||
//
|
||||
// Car HuiCarSelect(@Param("vinId") String vinId);
|
||||
//
|
||||
// /**
|
||||
// * 车辆管理信息查询
|
||||
// * @param carRequest
|
||||
// * @return
|
||||
// */
|
||||
// List<Car> selectVehicleInfoList(CarRequest carRequest);
|
||||
//
|
||||
// List<String> getOnlineCarIds();
|
||||
//
|
||||
// Integer getOnlineCarCount();
|
||||
//
|
||||
// Integer getUnOnlineCount();
|
||||
//
|
||||
//
|
||||
// List<Fence> fenceId();
|
||||
//
|
||||
// List<CarType> carTypeId();
|
||||
//}
|
||||
package com.god.base.server.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.god.base.domain.Car;
|
||||
import com.god.base.domain.CarType;
|
||||
import com.god.base.domain.Fence;
|
||||
import com.god.base.domain.request.CarRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 车辆mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarMapper extends BaseMapper<Car> {
|
||||
|
||||
|
||||
List<Car> getList(@Param("userId") String userId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据vin进行查询管理信息
|
||||
* @param vinId
|
||||
* @return
|
||||
*/
|
||||
|
||||
Car HuiCarSelect(@Param("vinId") String vinId);
|
||||
|
||||
/**
|
||||
* 车辆管理信息查询
|
||||
* @param carRequest
|
||||
* @return
|
||||
*/
|
||||
List<Car> selectVehicleInfoList(CarRequest carRequest);
|
||||
|
||||
List<String> getOnlineCarIds();
|
||||
|
||||
Integer getOnlineCarCount();
|
||||
|
||||
Integer getUnOnlineCount();
|
||||
|
||||
|
||||
List<Fence> fenceId();
|
||||
|
||||
List<CarType> carTypeId();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.god.base.server.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.god.base.domain.FirmCar;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -12,6 +13,7 @@ import java.util.List;
|
|||
* @author LouZhiSHuo
|
||||
* @Date 2023/12/6 19:29
|
||||
**/
|
||||
@Mapper
|
||||
public interface FirmCarMapper extends BaseMapper<FirmCar> {
|
||||
|
||||
}
|
||||
|
|
|
@ -45,12 +45,16 @@ public class CarFenceMonitor {
|
|||
log.info("开始获取车辆围栏信息");
|
||||
|
||||
//获取车辆信息
|
||||
List<FirmCar> dataCar = firmCarService.findFirmCarByUserId(new FirmCarRequest());
|
||||
String userId = String.valueOf(SecurityUtils.getUserId());
|
||||
FirmCarRequest firmCarRequest = new FirmCarRequest();
|
||||
firmCarRequest.setUserId(userId);
|
||||
List<FirmCar> dataCar = firmCarService.findFirmCarByUserId(firmCarRequest);
|
||||
|
||||
|
||||
if (dataCar.size() <= 0) {
|
||||
throw new RuntimeException("查无管理车辆");
|
||||
throw new RuntimeException("该用户未绑定车辆");
|
||||
}
|
||||
|
||||
//新建map集合存储车辆围栏
|
||||
Map<String, Set<Fence>> map = new HashMap<>();
|
||||
for (FirmCar car : dataCar) {
|
||||
|
|
|
@ -1,90 +1,90 @@
|
|||
<!--<?xml version="1.0" encoding="UTF-8"?>-->
|
||||
<!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">-->
|
||||
<!--<mapper namespace="com.god.base.server.mapper.CarMapper">-->
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.god.base.server.mapper.CarMapper">
|
||||
|
||||
<!--<!– 车辆列表–>-->
|
||||
<!--<!– <select id="getList" resultType="com.god.base.server.common.domain.Car">–>-->
|
||||
<!--<!– SELECT–>-->
|
||||
<!--<!– t_car.car_vin_id as vin ,–>-->
|
||||
<!--<!– t_car.car_type_id as 车辆类型 ,–>-->
|
||||
<!--<!– t_car.fence_id as 电子围栏ID ,–>-->
|
||||
<!--<!– t_car.battery_manufacturer as 电池厂商 ,–>-->
|
||||
<!--<!– t_car.motor_manufacturer as 电机厂商 ,–>-->
|
||||
<!--<!– t_car.motor_number as 电机编号 ,–>-->
|
||||
<!--<!– t_car.battery_number as 电池编号 ,–>-->
|
||||
<!--<!– t_car.status as 车辆状态–>-->
|
||||
<!-- 车辆列表-->
|
||||
<!-- <select id="getList" resultType="com.god.base.server.common.domain.Car">-->
|
||||
<!-- SELECT-->
|
||||
<!-- t_car.car_vin_id as vin ,-->
|
||||
<!-- t_car.car_type_id as 车辆类型 ,-->
|
||||
<!-- t_car.fence_id as 电子围栏ID ,-->
|
||||
<!-- t_car.battery_manufacturer as 电池厂商 ,-->
|
||||
<!-- t_car.motor_manufacturer as 电机厂商 ,-->
|
||||
<!-- t_car.motor_number as 电机编号 ,-->
|
||||
<!-- t_car.battery_number as 电池编号 ,-->
|
||||
<!-- t_car.status as 车辆状态-->
|
||||
|
||||
<!--<!– FROM–>-->
|
||||
<!--<!– t_car–>-->
|
||||
<!--<!– JOIN t_fence ON t_car.fence_id = t_fence.fence_id–>-->
|
||||
<!--<!– JOIN t_car_type ON t_car.car_type_id = t_car_type.id–>-->
|
||||
<!--<!– where t_car.user_id = #{userId1}–>-->
|
||||
<!--<!– </select>–>-->
|
||||
|
||||
|
||||
<!-- <sql id="selectVehicleInfoVo">-->
|
||||
<!-- select car_vin_id, car_type_id, fence_id, battery_manufacturer, motor_manufacturer, motor_numberr, battery_number,status from t_car-->
|
||||
<!-- </sql>-->
|
||||
<!--<!–车辆列表查询–>-->
|
||||
<!-- <select id="selectVehicleInfoList" resultType="com.god.base.domain.Car">-->
|
||||
<!-- <include refid="selectVehicleInfoVo"/>-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="carVinId != null and carVinId != ''"> and car_vin_id = #{carVinId}</if>-->
|
||||
<!-- <if test="carTypeId != null"> and car_type_id = #{carTypeId}</if>-->
|
||||
<!-- <if test="fenceId != null and fenceId != ''"> and fence_id = #{fenceId}</if>-->
|
||||
<!-- <if test="status != null"> and status = #{status}</if>-->
|
||||
<!-- <if test="motorManufacturer != null and motorManufacturer != ''"> and motor_manufacturer = #{motorManufacturer}</if>-->
|
||||
<!-- <if test="batteryManufacturer != null and batteryManufacturer != ''"> and battery_manufacturer = #{batteryManufacturer}</if>-->
|
||||
<!-- <if test="motorNumber != null and motorNumber != ''"> and motor_number = #{motorNumber}</if>-->
|
||||
<!-- <if test="batteryNumber != null and batteryNumber != ''"> and battery_number = #{batteryNumber}</if>-->
|
||||
<!-- </where>-->
|
||||
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="getOnlineCarIds" resultType="java.lang.String">-->
|
||||
<!-- select vin-->
|
||||
<!-- from car where vehicle_status = 1-->
|
||||
<!-- </select>-->
|
||||
|
||||
|
||||
<!-- <select id="getOnlineCarCount" resultType="java.lang.Integer">-->
|
||||
<!-- select count(*)-->
|
||||
<!-- from t_car where status = 1-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="getUnOnlineCount" resultType="java.lang.Integer">-->
|
||||
<!-- select count(*)-->
|
||||
<!-- from t_car-->
|
||||
<!-- </select>-->
|
||||
<!--<!– 根据vin查询当前对象的所有信息–>-->
|
||||
<!-- <select id="HuiCarSelect" resultType="com.god.base.domain.Car">-->
|
||||
<!-- <include refid="selectVehicleInfoVo"/>-->
|
||||
<!-- where car_vin_id = #{vinId}-->
|
||||
<!-- </select>-->
|
||||
<!--<!– 根据电子围栏 获取电子围栏信息–>-->
|
||||
<!-- <select id="fenceId" resultType="com.god.base.domain.Fence">-->
|
||||
<!-- SELECT * from t_fence-->
|
||||
<!-- </select>-->
|
||||
<!--<!– 根据车辆类型 获取车辆类型下拉框–>-->
|
||||
<!-- <select id="carTypeId" resultType="com.god.base.domain.CarType">-->
|
||||
<!-- select * from t_car_type-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="getList" resultType="com.god.base.domain.Car">-->
|
||||
<!-- SELECt-->
|
||||
<!-- t_car.car_vin_id ,-->
|
||||
<!-- t_car_type.car_type_name ,-->
|
||||
<!-- t_car.battery_manufacturer ,-->
|
||||
<!-- t_car.motor_manufacturer ,-->
|
||||
<!-- t_car.motor_number ,-->
|
||||
<!-- t_car.battery_number ,-->
|
||||
<!-- t_car.status-->
|
||||
<!-- FROM-->
|
||||
<!-- t_car-->
|
||||
<!-- JOIN t_fence ON t_car.fence_id = t_fence.fence_id-->
|
||||
<!-- JOIN t_car_type ON t_car.car_type_id = t_car_type.id-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="userId != null">-->
|
||||
<!-- and t_car.user_id = #{userId}-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
|
||||
<!-- where t_car.user_id = #{userId1}-->
|
||||
<!-- </select>-->
|
||||
<!--</mapper>-->
|
||||
|
||||
|
||||
<sql id="selectVehicleInfoVo">
|
||||
select car_vin_id, car_type_id, fence_id, battery_manufacturer, motor_manufacturer, motor_numberr, battery_number,status from t_car
|
||||
</sql>
|
||||
<!--车辆列表查询-->
|
||||
<select id="selectVehicleInfoList" resultType="com.god.base.domain.Car">
|
||||
<include refid="selectVehicleInfoVo"/>
|
||||
<where>
|
||||
<if test="carVinId != null and carVinId != ''"> and car_vin_id = #{carVinId}</if>
|
||||
<if test="carTypeId != null"> and car_type_id = #{carTypeId}</if>
|
||||
<if test="fenceId != null and fenceId != ''"> and fence_id = #{fenceId}</if>
|
||||
<if test="status != null"> and status = #{status}</if>
|
||||
<if test="motorManufacturer != null and motorManufacturer != ''"> and motor_manufacturer = #{motorManufacturer}</if>
|
||||
<if test="batteryManufacturer != null and batteryManufacturer != ''"> and battery_manufacturer = #{batteryManufacturer}</if>
|
||||
<if test="motorNumber != null and motorNumber != ''"> and motor_number = #{motorNumber}</if>
|
||||
<if test="batteryNumber != null and batteryNumber != ''"> and battery_number = #{batteryNumber}</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getOnlineCarIds" resultType="java.lang.String">
|
||||
select vin
|
||||
from car where vehicle_status = 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getOnlineCarCount" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from t_car where status = 1
|
||||
</select>
|
||||
<select id="getUnOnlineCount" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from t_car
|
||||
</select>
|
||||
<!-- 根据vin查询当前对象的所有信息-->
|
||||
<select id="HuiCarSelect" resultType="com.god.base.domain.Car">
|
||||
<include refid="selectVehicleInfoVo"/>
|
||||
where car_vin_id = #{vinId}
|
||||
</select>
|
||||
<!-- 根据电子围栏 获取电子围栏信息-->
|
||||
<select id="fenceId" resultType="com.god.base.domain.Fence">
|
||||
SELECT * from t_fence
|
||||
</select>
|
||||
<!-- 根据车辆类型 获取车辆类型下拉框-->
|
||||
<select id="carTypeId" resultType="com.god.base.domain.CarType">
|
||||
select * from t_car_type
|
||||
</select>
|
||||
<select id="getList" resultType="com.god.base.domain.Car">
|
||||
SELECt
|
||||
t_car.car_vin_id ,
|
||||
t_car_type.car_type_name ,
|
||||
t_car.battery_manufacturer ,
|
||||
t_car.motor_manufacturer ,
|
||||
t_car.motor_number ,
|
||||
t_car.battery_number ,
|
||||
t_car.status
|
||||
FROM
|
||||
t_car
|
||||
JOIN t_car_type ON t_car.car_type_id = t_car_type.id
|
||||
<where>
|
||||
<if test="userId != null">
|
||||
and t_car.user_id = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue