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