查询电子围栏列表
parent
e1de510a3e
commit
00db7bbc1c
|
@ -35,37 +35,33 @@ public class Fence {
|
||||||
*/
|
*/
|
||||||
private String fenceData;
|
private String fenceData;
|
||||||
/**
|
/**
|
||||||
* 围栏状态
|
* 围栏状态 0--未开启 1--已开启
|
||||||
*/
|
*/
|
||||||
private Integer status;
|
private Integer status;
|
||||||
/**
|
/**
|
||||||
* 告警类型
|
* 告警类型 0--驶入警告 1--驶出警告
|
||||||
*/
|
*/
|
||||||
private String alarmType;
|
private String alarmType;
|
||||||
/**
|
/**
|
||||||
* 租户号
|
* 围栏标签id
|
||||||
*/
|
*/
|
||||||
private String tenantId;
|
private Integer fenceTagId;
|
||||||
/**
|
|
||||||
* 乐观锁
|
|
||||||
*/
|
|
||||||
private Integer revision;
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
private String createBy;
|
private String createdBy;
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private Date createdTime;
|
||||||
/**
|
/**
|
||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
private String updateBy;
|
private String updatedBy;
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updatedTime;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,10 @@ public class ReqCar {
|
||||||
* 电子围栏
|
* 电子围栏
|
||||||
*/
|
*/
|
||||||
private String fenceName;
|
private String fenceName;
|
||||||
|
/**
|
||||||
|
* 电子围栏ID
|
||||||
|
*/
|
||||||
|
private Integer fenceId;
|
||||||
/**
|
/**
|
||||||
* 车辆状态 1-在线 0-离线
|
* 车辆状态 1-在线 0-离线
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -95,10 +95,6 @@
|
||||||
<artifactId>mybatis-plus-join</artifactId>
|
<artifactId>mybatis-plus-join</artifactId>
|
||||||
<version>1.2.4</version>
|
<version>1.2.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.dragon</groupId>
|
|
||||||
<artifactId>dragon-common-security</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.dragon.vehicle.history.server.controller;
|
||||||
import com.dragon.common.core.domain.Result;
|
import com.dragon.common.core.domain.Result;
|
||||||
import com.dragon.vehicle.history.common.domain.Car;
|
import com.dragon.vehicle.history.common.domain.Car;
|
||||||
import com.dragon.vehicle.history.common.domain.CarType;
|
import com.dragon.vehicle.history.common.domain.CarType;
|
||||||
|
import com.dragon.vehicle.history.common.domain.Fence;
|
||||||
import com.dragon.vehicle.history.common.domain.req.ReqCar;
|
import com.dragon.vehicle.history.common.domain.req.ReqCar;
|
||||||
import com.dragon.vehicle.history.common.domain.res.ResCar;
|
import com.dragon.vehicle.history.common.domain.res.ResCar;
|
||||||
import com.dragon.vehicle.history.server.service.CarService;
|
import com.dragon.vehicle.history.server.service.CarService;
|
||||||
|
@ -69,4 +70,13 @@ public class CarController {
|
||||||
public Result insertCar(@RequestBody Car car){
|
public Result insertCar(@RequestBody Car car){
|
||||||
return carService.insertCar(car);
|
return carService.insertCar(car);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电子围栏列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/listFence")
|
||||||
|
public Result<List<Fence>> listFence(){
|
||||||
|
return carService.listFence();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ package com.dragon.vehicle.history.server.service;
|
||||||
import com.dragon.common.core.domain.Result;
|
import com.dragon.common.core.domain.Result;
|
||||||
import com.dragon.vehicle.history.common.domain.Car;
|
import com.dragon.vehicle.history.common.domain.Car;
|
||||||
import com.dragon.vehicle.history.common.domain.CarType;
|
import com.dragon.vehicle.history.common.domain.CarType;
|
||||||
|
import com.dragon.vehicle.history.common.domain.Fence;
|
||||||
import com.dragon.vehicle.history.common.domain.req.ReqCar;
|
import com.dragon.vehicle.history.common.domain.req.ReqCar;
|
||||||
import com.dragon.vehicle.history.common.domain.res.ResCar;
|
import com.dragon.vehicle.history.common.domain.res.ResCar;
|
||||||
|
|
||||||
|
@ -46,4 +47,10 @@ public interface CarService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Result insertCar(Car car);
|
Result insertCar(Car car);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电子围栏列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Result<List<Fence>> listFence();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import com.dragon.vehicle.history.common.domain.req.ReqCar;
|
||||||
import com.dragon.vehicle.history.common.domain.res.ResCar;
|
import com.dragon.vehicle.history.common.domain.res.ResCar;
|
||||||
import com.dragon.vehicle.history.server.mapper.CarMapper;
|
import com.dragon.vehicle.history.server.mapper.CarMapper;
|
||||||
import com.dragon.vehicle.history.server.mapper.CarTypeMapper;
|
import com.dragon.vehicle.history.server.mapper.CarTypeMapper;
|
||||||
|
import com.dragon.vehicle.history.server.mapper.FenceMapper;
|
||||||
import com.dragon.vehicle.history.server.service.CarService;
|
import com.dragon.vehicle.history.server.service.CarService;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
@ -31,6 +32,8 @@ public class CarServiceImpl implements CarService {
|
||||||
private CarMapper carMapper;
|
private CarMapper carMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CarTypeMapper carTypeMapper;
|
private CarTypeMapper carTypeMapper;
|
||||||
|
@Autowired
|
||||||
|
private FenceMapper fenceMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆信息列表
|
* 车辆信息列表
|
||||||
|
@ -112,4 +115,14 @@ public class CarServiceImpl implements CarService {
|
||||||
carMapper.insert(inserCar);
|
carMapper.insert(inserCar);
|
||||||
return Result.success("添加成功!");
|
return Result.success("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电子围栏列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Result<List<Fence>> listFence() {
|
||||||
|
List<Fence> fences = fenceMapper.selectList(new MPJLambdaWrapper<Fence>().select(Fence::getFenceId,Fence::getFenceName));
|
||||||
|
return Result.success(fences);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue