master
parent
514f307f64
commit
7eadec0bd7
|
@ -1,36 +0,0 @@
|
||||||
package com.dragon.vehicle.history.common.domain;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Wenkang Tang
|
|
||||||
* @date 2023/11/25 13:04
|
|
||||||
* @description
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class RecordCar {
|
|
||||||
/**
|
|
||||||
* 历史轨迹记录表ID
|
|
||||||
*/
|
|
||||||
private Integer carRecordId;
|
|
||||||
/**
|
|
||||||
* 开始时间
|
|
||||||
*/
|
|
||||||
private Date startTime;
|
|
||||||
/**
|
|
||||||
* 结束时间
|
|
||||||
*/
|
|
||||||
private Date endTime;
|
|
||||||
/**
|
|
||||||
* 历史轨迹经纬度数据
|
|
||||||
*/
|
|
||||||
private Long drivingRecord;
|
|
||||||
}
|
|
|
@ -227,18 +227,4 @@ public class VehicleOperation {
|
||||||
* 电池报文
|
* 电池报文
|
||||||
*/
|
*/
|
||||||
private String batteryMsg;
|
private String batteryMsg;
|
||||||
/**
|
|
||||||
* 开始日期
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date startTime;
|
|
||||||
/**
|
|
||||||
* 结束日期
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date endTime;
|
|
||||||
/**
|
|
||||||
* 是否删除 1-是 0-否
|
|
||||||
*/
|
|
||||||
private Integer isDelete;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
package com.dragon.vehicle.history.common.domain.req;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Wenkang Tang
|
|
||||||
* @date 2023/11/20 18:38
|
|
||||||
* @description 查询车辆历史轨迹参数
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ReqVehicleOperation {
|
|
||||||
/**
|
|
||||||
* 车辆VIN
|
|
||||||
*/
|
|
||||||
private String vin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前页数
|
|
||||||
*/
|
|
||||||
private Integer pageNum;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 每页条数
|
|
||||||
*/
|
|
||||||
private Integer pageSize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开始日期
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date startTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结束日期
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date endTime;
|
|
||||||
}
|
|
|
@ -1,11 +1,7 @@
|
||||||
package com.dragon.vehicle.history.server.controller;
|
package com.dragon.vehicle.history.server.controller;
|
||||||
|
|
||||||
import com.dragon.common.core.domain.Result;
|
|
||||||
import com.dragon.vehicle.history.common.domain.RecordCar;
|
|
||||||
import com.dragon.vehicle.history.server.service.HistoricalTrackService;
|
import com.dragon.vehicle.history.server.service.HistoricalTrackService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@ -21,12 +17,5 @@ public class HistoricalTrackController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private HistoricalTrackService historicalTrackService;
|
private HistoricalTrackService historicalTrackService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 历史轨迹列表
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/listRecordCar")
|
|
||||||
public Result<List<RecordCar>> listRecordCar(){
|
|
||||||
return Result.success(historicalTrackService.listRecordCar());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.dragon.vehicle.history.server.mapper;
|
|
||||||
|
|
||||||
import com.dragon.vehicle.history.common.domain.RecordCar;
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Wenkang Tang
|
|
||||||
* @date 2023/11/25 13:17
|
|
||||||
* @description
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface RecordCarMapper extends MPJBaseMapper<RecordCar> {
|
|
||||||
}
|
|
|
@ -1,13 +1,8 @@
|
||||||
package com.dragon.vehicle.history.server.service;
|
package com.dragon.vehicle.history.server.service;
|
||||||
|
|
||||||
import com.dragon.vehicle.history.common.domain.RecordCar;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Wenkang Tang
|
* @author Wenkang Tang
|
||||||
* @date 2023/11/19 19:55
|
* @date 2023/11/19 19:55
|
||||||
*/
|
*/
|
||||||
public interface HistoricalTrackService {
|
public interface HistoricalTrackService {
|
||||||
List<RecordCar> listRecordCar();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@ public class CarServiceImpl implements CarService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<List<ResCar>> listCar(ReqCar reqCar) {
|
public Result<List<ResCar>> listCar(ReqCar reqCar) {
|
||||||
log.info(reqCar);
|
|
||||||
Page<ResCar> resCarPage = new Page<>(reqCar.getPageNum(), reqCar.getPageSize());
|
Page<ResCar> resCarPage = new Page<>(reqCar.getPageNum(), reqCar.getPageSize());
|
||||||
List<ResCar> resCars = carMapper.selectJoinPage(resCarPage, ResCar.class, new MPJLambdaWrapper<Car>()
|
List<ResCar> resCars = carMapper.selectJoinPage(resCarPage, ResCar.class, new MPJLambdaWrapper<Car>()
|
||||||
.selectAll(Car.class)
|
.selectAll(Car.class)
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
package com.dragon.vehicle.history.server.service.impl;
|
package com.dragon.vehicle.history.server.service.impl;
|
||||||
|
|
||||||
import com.dragon.vehicle.history.common.domain.RecordCar;
|
|
||||||
import com.dragon.vehicle.history.server.mapper.HistoricalTrackMapper;
|
import com.dragon.vehicle.history.server.mapper.HistoricalTrackMapper;
|
||||||
import com.dragon.vehicle.history.server.mapper.RecordCarMapper;
|
|
||||||
import com.dragon.vehicle.history.server.service.HistoricalTrackService;
|
import com.dragon.vehicle.history.server.service.HistoricalTrackService;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Wenkang Tang
|
* @author Wenkang Tang
|
||||||
* @date 2023/11/19 19:55
|
* @date 2023/11/19 19:55
|
||||||
|
@ -18,15 +13,5 @@ import java.util.List;
|
||||||
public class HistoricalTrackServiceImpl implements HistoricalTrackService {
|
public class HistoricalTrackServiceImpl implements HistoricalTrackService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private HistoricalTrackMapper historicalTrackMapper;
|
private HistoricalTrackMapper historicalTrackMapper;
|
||||||
@Autowired
|
|
||||||
private RecordCarMapper recordCarMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 历史轨迹列表
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<RecordCar> listRecordCar() {
|
|
||||||
return recordCarMapper.selectList(new MPJLambdaWrapper<RecordCar>().selectAll(RecordCar.class));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?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.dragon.vehicle.history.server.mapper.CarMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?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.dragon.vehicle.history.server.mapper.CarTypeMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?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.dragon.vehicle.history.server.mapper.FenceMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?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.dragon.vehicle.history.server.mapper.HistoricalTrackMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
Loading…
Reference in New Issue