first commit
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
package com.dcsoft.system.car.controller;
|
||||
|
||||
import com.dcsoft.common.core.exception.ServiceException;
|
||||
import com.dcsoft.common.core.utils.CollUtil;
|
||||
import com.dcsoft.common.core.utils.StringUtils;
|
||||
import com.dcsoft.common.core.utils.poi.ExcelUtil;
|
||||
import com.dcsoft.common.core.web.controller.BaseController;
|
||||
import com.dcsoft.common.core.web.domain.AjaxResult;
|
||||
import com.dcsoft.common.core.web.page.TableDataInfo;
|
||||
import com.dcsoft.common.log.annotation.Log;
|
||||
import com.dcsoft.common.log.enums.BusinessType;
|
||||
import com.dcsoft.common.security.annotation.RequiresPermissions;
|
||||
import com.dcsoft.system.car.domain.TbCar;
|
||||
import com.dcsoft.system.car.service.ITbCarService;
|
||||
import com.dcsoft.system.service.ISysDictDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 车辆信息Controller
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/car")
|
||||
public class TbCarController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITbCarService tbCarService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService dictDataService;
|
||||
|
||||
/**
|
||||
* 查询车辆信息列表
|
||||
*/
|
||||
// @RequiresPermissions("system:car:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TbCar tbCar)
|
||||
{
|
||||
startPage();
|
||||
List<TbCar> list = tbCarService.selectTbCarList(tbCar);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序查询车辆信息列表
|
||||
*/
|
||||
// @RequiresPermissions("system:car:list")
|
||||
@GetMapping("/app/list")
|
||||
public TableDataInfo appList(TbCar tbCar)
|
||||
{
|
||||
startPage();
|
||||
List<TbCar> list = tbCarService.selectAppTbCarList(tbCar);
|
||||
Map<String, String> map = dictDataService.queryDictData("sys_car_colour");
|
||||
try {
|
||||
for (TbCar car : list) {
|
||||
if (StringUtils.isNotBlank(car.getPlateColor())) {
|
||||
car.setPlateColorName(map.get(car.getPlateColor()));
|
||||
}
|
||||
}
|
||||
} catch (ServiceException e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车辆信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:car:export")
|
||||
@Log(title = "车辆信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TbCar tbCar)
|
||||
{
|
||||
List<TbCar> list = tbCarService.selectTbCarList(tbCar);
|
||||
ExcelUtil<TbCar> util = new ExcelUtil<TbCar>(TbCar.class);
|
||||
util.exportExcel(response, list, "车辆信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆信息详细信息
|
||||
*/
|
||||
// @RequiresPermissions("system:car:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
TbCar tbCar = tbCarService.selectTbCarById(id);
|
||||
Map<String, String> map = dictDataService.queryDictData("sys_car_colour");
|
||||
if (StringUtils.isNotBlank(tbCar.getPlateColor())) {
|
||||
tbCar.setPlateColorName(map.get(tbCar.getPlateColor()));
|
||||
}
|
||||
return success(tbCar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆信息
|
||||
*/
|
||||
// @RequiresPermissions("system:car:add")
|
||||
@Log(title = "车辆信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TbCar tbCar)
|
||||
{
|
||||
TbCar query = new TbCar();
|
||||
query.setCarNo(tbCar.getCarNo());
|
||||
List<TbCar> tbCars = tbCarService.selectTbCarList(query);
|
||||
if (CollUtil.isNotEmpty(tbCars)) {
|
||||
throw new ServiceException("该车牌已被绑定,请重新添加车辆信息");
|
||||
}
|
||||
if (null != tbCar && null != tbCar.getId()) {
|
||||
return toAjax(tbCarService.updateTbCar(tbCar));
|
||||
}
|
||||
return toAjax(tbCarService.insertTbCar(tbCar));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆信息
|
||||
*/
|
||||
// @RequiresPermissions("system:car:edit")
|
||||
@Log(title = "车辆信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TbCar tbCar)
|
||||
{
|
||||
return toAjax(tbCarService.updateTbCar(tbCar));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆信息
|
||||
*/
|
||||
// @RequiresPermissions("system:car:remove")
|
||||
@Log(title = "车辆信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(tbCarService.deleteTbCarByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.dcsoft.system.car.controller;
|
||||
|
||||
import com.dcsoft.common.core.utils.poi.ExcelUtil;
|
||||
import com.dcsoft.common.core.web.controller.BaseController;
|
||||
import com.dcsoft.common.core.web.domain.AjaxResult;
|
||||
import com.dcsoft.common.core.web.page.TableDataInfo;
|
||||
import com.dcsoft.common.log.annotation.Log;
|
||||
import com.dcsoft.common.log.enums.BusinessType;
|
||||
import com.dcsoft.common.security.annotation.RequiresPermissions;
|
||||
import com.dcsoft.system.car.domain.TbCarRecord;
|
||||
import com.dcsoft.system.car.service.ITbCarRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆通行记录Controller
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/carRecord")
|
||||
public class TbCarRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITbCarRecordService tbCarRecordService;
|
||||
|
||||
/**
|
||||
* 查询车辆通行记录列表
|
||||
*/
|
||||
@RequiresPermissions("car:carRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TbCarRecord tbCarRecord)
|
||||
{
|
||||
startPage();
|
||||
List<TbCarRecord> list = tbCarRecordService.selectTbCarRecordList(tbCarRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车辆通行记录列表
|
||||
*/
|
||||
@RequiresPermissions("car:carRecord:export")
|
||||
@Log(title = "车辆通行记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TbCarRecord tbCarRecord)
|
||||
{
|
||||
List<TbCarRecord> list = tbCarRecordService.selectTbCarRecordList(tbCarRecord);
|
||||
ExcelUtil<TbCarRecord> util = new ExcelUtil<TbCarRecord>(TbCarRecord.class);
|
||||
util.exportExcel(response, list, "车辆通行记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆通行记录详细信息
|
||||
*/
|
||||
@RequiresPermissions("car:carRecord:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(tbCarRecordService.selectTbCarRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆通行记录
|
||||
*/
|
||||
@RequiresPermissions("car:carRecord:add")
|
||||
@Log(title = "车辆通行记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TbCarRecord tbCarRecord)
|
||||
{
|
||||
return toAjax(tbCarRecordService.insertTbCarRecord(tbCarRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆通行记录
|
||||
*/
|
||||
@RequiresPermissions("car:carRecord:edit")
|
||||
@Log(title = "车辆通行记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TbCarRecord tbCarRecord)
|
||||
{
|
||||
return toAjax(tbCarRecordService.updateTbCarRecord(tbCarRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆通行记录
|
||||
*/
|
||||
@RequiresPermissions("car:carRecord:remove")
|
||||
@Log(title = "车辆通行记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(tbCarRecordService.deleteTbCarRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
package com.dcsoft.system.car.domain;
|
||||
|
||||
import com.dcsoft.common.core.annotation.Excel;
|
||||
import com.dcsoft.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆信息对象 tb_car
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-24
|
||||
*/
|
||||
public class TbCar extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
|
||||
/** 车辆类型 0:访客车辆 1:物流车辆 */
|
||||
private Integer carType;
|
||||
|
||||
/** 驾照图片地址 */
|
||||
private String drivingUrl;
|
||||
|
||||
/** 车牌号码 */
|
||||
@Excel(name = "车牌号码")
|
||||
private String carNo;
|
||||
|
||||
/** 车牌类型 4-民用车双行尾牌 8- 新能源车牌 0- 标准民用车与军车车牌 */
|
||||
@Excel(name = "车牌类型 4-民用车双行尾牌 8- 新能源车牌 0- 标准民用车与军车车牌")
|
||||
private String plateType;
|
||||
|
||||
/** 车牌颜色 0- 蓝色车牌 1- 黄色车牌 2- 白色车牌 4- 绿色车牌 */
|
||||
@Excel(name = "车牌颜色 0- 蓝色车牌 1- 黄色车牌 2- 白色车牌 4- 绿色车牌")
|
||||
private String plateColor;
|
||||
|
||||
/** 车牌颜色名称 0- 蓝色车牌 1- 黄色车牌 2- 白色车牌 4- 绿色车牌 */
|
||||
private String plateColorName;
|
||||
|
||||
/** 卡号(同步用) */
|
||||
private String cardNo;
|
||||
|
||||
/** 有效开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "有效开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date struStartTime;
|
||||
|
||||
/** 有效结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "有效结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date struStopTime;
|
||||
|
||||
/** 所属人员 */
|
||||
@Excel(name = "所属人员")
|
||||
private String personNo;
|
||||
|
||||
/** 是否删除 1 是删除 2是未删除 */
|
||||
private String isDel;
|
||||
|
||||
/** 同步标识 sync 0是未同步 1是已同步 */
|
||||
@Excel(name = "同步标识 sync 0是未同步 1是已同步")
|
||||
private String sync;
|
||||
|
||||
private String ownerName;
|
||||
|
||||
private String ownerPhone;
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getPlateColorName() {
|
||||
return plateColorName;
|
||||
}
|
||||
|
||||
public void setPlateColorName(String plateColorName) {
|
||||
this.plateColorName = plateColorName;
|
||||
}
|
||||
|
||||
public Integer getCarType() {
|
||||
return carType;
|
||||
}
|
||||
|
||||
public void setCarType(Integer carType) {
|
||||
this.carType = carType;
|
||||
}
|
||||
|
||||
public String getDrivingUrl() {
|
||||
return drivingUrl;
|
||||
}
|
||||
|
||||
public void setDrivingUrl(String drivingUrl) {
|
||||
this.drivingUrl = drivingUrl;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCarNo(String carNo)
|
||||
{
|
||||
this.carNo = carNo;
|
||||
}
|
||||
|
||||
public String getCarNo()
|
||||
{
|
||||
return carNo;
|
||||
}
|
||||
public void setPlateType(String plateType)
|
||||
{
|
||||
this.plateType = plateType;
|
||||
}
|
||||
|
||||
public String getPlateType()
|
||||
{
|
||||
return plateType;
|
||||
}
|
||||
public void setPlateColor(String plateColor)
|
||||
{
|
||||
this.plateColor = plateColor;
|
||||
}
|
||||
|
||||
public String getPlateColor()
|
||||
{
|
||||
return plateColor;
|
||||
}
|
||||
public void setCardNo(String cardNo)
|
||||
{
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getCardNo()
|
||||
{
|
||||
return cardNo;
|
||||
}
|
||||
public void setStruStartTime(Date struStartTime)
|
||||
{
|
||||
this.struStartTime = struStartTime;
|
||||
}
|
||||
|
||||
public Date getStruStartTime()
|
||||
{
|
||||
return struStartTime;
|
||||
}
|
||||
public void setStruStopTime(Date struStopTime)
|
||||
{
|
||||
this.struStopTime = struStopTime;
|
||||
}
|
||||
|
||||
public Date getStruStopTime()
|
||||
{
|
||||
return struStopTime;
|
||||
}
|
||||
public void setPersonNo(String personNo)
|
||||
{
|
||||
this.personNo = personNo;
|
||||
}
|
||||
|
||||
public String getPersonNo()
|
||||
{
|
||||
return personNo;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
public void setSync(String sync)
|
||||
{
|
||||
this.sync = sync;
|
||||
}
|
||||
|
||||
public String getSync()
|
||||
{
|
||||
return sync;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getOwnerPhone() {
|
||||
return ownerPhone;
|
||||
}
|
||||
|
||||
public void setOwnerPhone(String ownerPhone) {
|
||||
this.ownerPhone = ownerPhone;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("carNo", getCarNo())
|
||||
.append("plateType", getPlateType())
|
||||
.append("plateColor", getPlateColor())
|
||||
.append("cardNo", getCardNo())
|
||||
.append("struStartTime", getStruStartTime())
|
||||
.append("struStopTime", getStruStopTime())
|
||||
.append("personNo", getPersonNo())
|
||||
.append("isDel", getIsDel())
|
||||
.append("sync", getSync())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
package com.dcsoft.system.car.domain;
|
||||
|
||||
import com.dcsoft.common.core.annotation.Excel;
|
||||
import com.dcsoft.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆通行记录对象 tb_car_record
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-26
|
||||
*/
|
||||
public class TbCarRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 停车场编号 */
|
||||
private String parkCode;
|
||||
|
||||
/** 过车信息唯一标识 */
|
||||
private String uniqueNo;
|
||||
|
||||
/** 过车行驶方向 0 入场过车 1出场过车 */
|
||||
@Excel(name = "过车行驶方向 0 入场过车 1出场过车")
|
||||
private String direction;
|
||||
|
||||
/** 车牌号码 */
|
||||
@Excel(name = "车牌号码")
|
||||
private String plateNo;
|
||||
|
||||
/** 卡号 */
|
||||
@Excel(name = "卡号")
|
||||
private String cardNo;
|
||||
|
||||
/** 通行时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "通行时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date passTime;
|
||||
|
||||
/** 车辆类型 */
|
||||
@Excel(name = "车辆类型")
|
||||
private String vehType;
|
||||
|
||||
/** 车辆颜色 */
|
||||
@Excel(name = "车辆颜色")
|
||||
private String vehColor;
|
||||
|
||||
/** 操作员账号 */
|
||||
@Excel(name = "操作员账号")
|
||||
private String operatorName;
|
||||
|
||||
/** 放行的终端编号 */
|
||||
private String terminalNo;
|
||||
|
||||
/** 出入口名称 */
|
||||
@Excel(name = "出入口名称")
|
||||
private String gateName;
|
||||
|
||||
/** 放行车道名称 */
|
||||
@Excel(name = "放行车道名称")
|
||||
private String laneName;
|
||||
|
||||
/** 出场对应的入场时间(可选) */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "出场对应的入场时间(可选)", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date inPassTime;
|
||||
|
||||
/** 出场对应的入场车辆唯一编号(可选) */
|
||||
@Excel(name = "出场对应的入场车辆唯一编号(可选)")
|
||||
private String inUniqueNo;
|
||||
|
||||
/** 出场应付金额 */
|
||||
private String shouldPay;
|
||||
|
||||
/** (可选)出场实付金额 单位:分 */
|
||||
private String actualPay;
|
||||
|
||||
/** 过车图片相对路径 */
|
||||
private String picFilePath;
|
||||
|
||||
/** 车牌图片相对路径 */
|
||||
private String picPlateFilePath;
|
||||
|
||||
/** 过车图片数据 (可选)base64 */
|
||||
@Excel(name = "过车图片数据 (可选)base64")
|
||||
private String picVehicleFileData;
|
||||
|
||||
/** 车牌图片数据 (可选)base64 */
|
||||
private String picPlateFileData;
|
||||
|
||||
/** 数据类型 0 实时数据 1历史数据 */
|
||||
private String dataType;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setParkCode(String parkCode)
|
||||
{
|
||||
this.parkCode = parkCode;
|
||||
}
|
||||
|
||||
public String getParkCode()
|
||||
{
|
||||
return parkCode;
|
||||
}
|
||||
public void setUniqueNo(String uniqueNo)
|
||||
{
|
||||
this.uniqueNo = uniqueNo;
|
||||
}
|
||||
|
||||
public String getUniqueNo()
|
||||
{
|
||||
return uniqueNo;
|
||||
}
|
||||
public void setDirection(String direction)
|
||||
{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public String getDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
public void setPlateNo(String plateNo)
|
||||
{
|
||||
this.plateNo = plateNo;
|
||||
}
|
||||
|
||||
public String getPlateNo()
|
||||
{
|
||||
return plateNo;
|
||||
}
|
||||
public void setCardNo(String cardNo)
|
||||
{
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getCardNo()
|
||||
{
|
||||
return cardNo;
|
||||
}
|
||||
public void setPassTime(Date passTime)
|
||||
{
|
||||
this.passTime = passTime;
|
||||
}
|
||||
|
||||
public Date getPassTime()
|
||||
{
|
||||
return passTime;
|
||||
}
|
||||
public void setVehType(String vehType)
|
||||
{
|
||||
this.vehType = vehType;
|
||||
}
|
||||
|
||||
public String getVehType()
|
||||
{
|
||||
return vehType;
|
||||
}
|
||||
public void setVehColor(String vehColor)
|
||||
{
|
||||
this.vehColor = vehColor;
|
||||
}
|
||||
|
||||
public String getVehColor()
|
||||
{
|
||||
return vehColor;
|
||||
}
|
||||
public void setOperatorName(String operatorName)
|
||||
{
|
||||
this.operatorName = operatorName;
|
||||
}
|
||||
|
||||
public String getOperatorName()
|
||||
{
|
||||
return operatorName;
|
||||
}
|
||||
public void setTerminalNo(String terminalNo)
|
||||
{
|
||||
this.terminalNo = terminalNo;
|
||||
}
|
||||
|
||||
public String getTerminalNo()
|
||||
{
|
||||
return terminalNo;
|
||||
}
|
||||
public void setGateName(String gateName)
|
||||
{
|
||||
this.gateName = gateName;
|
||||
}
|
||||
|
||||
public String getGateName()
|
||||
{
|
||||
return gateName;
|
||||
}
|
||||
public void setLaneName(String laneName)
|
||||
{
|
||||
this.laneName = laneName;
|
||||
}
|
||||
|
||||
public String getLaneName()
|
||||
{
|
||||
return laneName;
|
||||
}
|
||||
public void setInPassTime(Date inPassTime)
|
||||
{
|
||||
this.inPassTime = inPassTime;
|
||||
}
|
||||
|
||||
public Date getInPassTime()
|
||||
{
|
||||
return inPassTime;
|
||||
}
|
||||
public void setInUniqueNo(String inUniqueNo)
|
||||
{
|
||||
this.inUniqueNo = inUniqueNo;
|
||||
}
|
||||
|
||||
public String getInUniqueNo()
|
||||
{
|
||||
return inUniqueNo;
|
||||
}
|
||||
public void setShouldPay(String shouldPay)
|
||||
{
|
||||
this.shouldPay = shouldPay;
|
||||
}
|
||||
|
||||
public String getShouldPay()
|
||||
{
|
||||
return shouldPay;
|
||||
}
|
||||
public void setActualPay(String actualPay)
|
||||
{
|
||||
this.actualPay = actualPay;
|
||||
}
|
||||
|
||||
public String getActualPay()
|
||||
{
|
||||
return actualPay;
|
||||
}
|
||||
public void setPicFilePath(String picFilePath)
|
||||
{
|
||||
this.picFilePath = picFilePath;
|
||||
}
|
||||
|
||||
public String getPicFilePath()
|
||||
{
|
||||
return picFilePath;
|
||||
}
|
||||
public void setPicPlateFilePath(String picPlateFilePath)
|
||||
{
|
||||
this.picPlateFilePath = picPlateFilePath;
|
||||
}
|
||||
|
||||
public String getPicPlateFilePath()
|
||||
{
|
||||
return picPlateFilePath;
|
||||
}
|
||||
public void setPicVehicleFileData(String picVehicleFileData)
|
||||
{
|
||||
this.picVehicleFileData = picVehicleFileData;
|
||||
}
|
||||
|
||||
public String getPicVehicleFileData()
|
||||
{
|
||||
return picVehicleFileData;
|
||||
}
|
||||
public void setPicPlateFileData(String picPlateFileData)
|
||||
{
|
||||
this.picPlateFileData = picPlateFileData;
|
||||
}
|
||||
|
||||
public String getPicPlateFileData()
|
||||
{
|
||||
return picPlateFileData;
|
||||
}
|
||||
public void setDataType(String dataType)
|
||||
{
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getDataType()
|
||||
{
|
||||
return dataType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("parkCode", getParkCode())
|
||||
.append("uniqueNo", getUniqueNo())
|
||||
.append("direction", getDirection())
|
||||
.append("plateNo", getPlateNo())
|
||||
.append("cardNo", getCardNo())
|
||||
.append("passTime", getPassTime())
|
||||
.append("vehType", getVehType())
|
||||
.append("vehColor", getVehColor())
|
||||
.append("operatorName", getOperatorName())
|
||||
.append("terminalNo", getTerminalNo())
|
||||
.append("gateName", getGateName())
|
||||
.append("laneName", getLaneName())
|
||||
.append("inPassTime", getInPassTime())
|
||||
.append("inUniqueNo", getInUniqueNo())
|
||||
.append("shouldPay", getShouldPay())
|
||||
.append("actualPay", getActualPay())
|
||||
.append("picFilePath", getPicFilePath())
|
||||
.append("picPlateFilePath", getPicPlateFilePath())
|
||||
.append("picVehicleFileData", getPicVehicleFileData())
|
||||
.append("picPlateFileData", getPicPlateFileData())
|
||||
.append("dataType", getDataType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.dcsoft.system.car.mapper;
|
||||
|
||||
import com.dcsoft.system.car.domain.TbCar;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆信息Mapper接口
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-24
|
||||
*/
|
||||
public interface TbCarMapper
|
||||
{
|
||||
/**
|
||||
* 查询车辆信息
|
||||
*
|
||||
* @param id 车辆信息主键
|
||||
* @return 车辆信息
|
||||
*/
|
||||
public TbCar selectTbCarById(Long id);
|
||||
|
||||
/**
|
||||
* 查询车辆信息列表
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 车辆信息集合
|
||||
*/
|
||||
public List<TbCar> selectTbCarList(TbCar tbCar);
|
||||
|
||||
/**
|
||||
* 新增车辆信息
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbCar(TbCar tbCar);
|
||||
|
||||
/**
|
||||
* 修改车辆信息
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbCar(TbCar tbCar);
|
||||
|
||||
/**
|
||||
* 删除车辆信息
|
||||
*
|
||||
* @param id 车辆信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCarById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除车辆信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCarByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.dcsoft.system.car.mapper;
|
||||
|
||||
import com.dcsoft.system.car.domain.TbCarRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆通行记录Mapper接口
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-26
|
||||
*/
|
||||
public interface TbCarRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询车辆通行记录
|
||||
*
|
||||
* @param id 车辆通行记录主键
|
||||
* @return 车辆通行记录
|
||||
*/
|
||||
public TbCarRecord selectTbCarRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询车辆通行记录列表
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 车辆通行记录集合
|
||||
*/
|
||||
public List<TbCarRecord> selectTbCarRecordList(TbCarRecord tbCarRecord);
|
||||
|
||||
/**
|
||||
* 新增车辆通行记录
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbCarRecord(TbCarRecord tbCarRecord);
|
||||
|
||||
/**
|
||||
* 修改车辆通行记录
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbCarRecord(TbCarRecord tbCarRecord);
|
||||
|
||||
/**
|
||||
* 删除车辆通行记录
|
||||
*
|
||||
* @param id 车辆通行记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCarRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除车辆通行记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCarRecordByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.dcsoft.system.car.service;
|
||||
|
||||
|
||||
import com.dcsoft.system.car.domain.TbCar;
|
||||
|
||||
/**
|
||||
* Uface 服务层
|
||||
*
|
||||
* @author nichun
|
||||
*/
|
||||
public interface ISysPmsService {
|
||||
|
||||
String addInnerVehicle(TbCar tbCar);
|
||||
|
||||
String delInnerVehicle(TbCar tbCar);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.dcsoft.system.car.service;
|
||||
|
||||
import com.dcsoft.system.car.domain.TbCarRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆通行记录Service接口
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-26
|
||||
*/
|
||||
public interface ITbCarRecordService
|
||||
{
|
||||
/**
|
||||
* 查询车辆通行记录
|
||||
*
|
||||
* @param id 车辆通行记录主键
|
||||
* @return 车辆通行记录
|
||||
*/
|
||||
public TbCarRecord selectTbCarRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询车辆通行记录列表
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 车辆通行记录集合
|
||||
*/
|
||||
public List<TbCarRecord> selectTbCarRecordList(TbCarRecord tbCarRecord);
|
||||
|
||||
/**
|
||||
* 新增车辆通行记录
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbCarRecord(TbCarRecord tbCarRecord);
|
||||
|
||||
/**
|
||||
* 修改车辆通行记录
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbCarRecord(TbCarRecord tbCarRecord);
|
||||
|
||||
/**
|
||||
* 批量删除车辆通行记录
|
||||
*
|
||||
* @param ids 需要删除的车辆通行记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCarRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除车辆通行记录信息
|
||||
*
|
||||
* @param id 车辆通行记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCarRecordById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.dcsoft.system.car.service;
|
||||
|
||||
import com.dcsoft.system.car.domain.TbCar;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆信息Service接口
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-24
|
||||
*/
|
||||
public interface ITbCarService
|
||||
{
|
||||
/**
|
||||
* 查询车辆信息
|
||||
*
|
||||
* @param id 车辆信息主键
|
||||
* @return 车辆信息
|
||||
*/
|
||||
public TbCar selectTbCarById(Long id);
|
||||
|
||||
/**
|
||||
* 查询车辆信息列表
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 车辆信息集合
|
||||
*/
|
||||
public List<TbCar> selectTbCarList(TbCar tbCar);
|
||||
|
||||
/**
|
||||
* 查询我的车辆信息列表
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 车辆信息集合
|
||||
*/
|
||||
public List<TbCar> selectAppTbCarList(TbCar tbCar);
|
||||
|
||||
/**
|
||||
* 新增车辆信息
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbCar(TbCar tbCar);
|
||||
|
||||
/**
|
||||
* 修改车辆信息
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbCar(TbCar tbCar);
|
||||
|
||||
/**
|
||||
* 批量删除车辆信息
|
||||
*
|
||||
* @param ids 需要删除的车辆信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCarByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除车辆信息信息
|
||||
*
|
||||
* @param id 车辆信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCarById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.dcsoft.system.car.service.impl;
|
||||
|
||||
import com.dcsoft.system.car.domain.TbCar;
|
||||
import com.dcsoft.system.car.service.ISysPmsService;
|
||||
import com.dcsoft.system.utils.HttpUtil;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 用户管理 服务层处理
|
||||
*
|
||||
* @author xueyi
|
||||
*/
|
||||
@Service
|
||||
public class SysPmsServiceImpl implements ISysPmsService {
|
||||
|
||||
|
||||
@Value("${pms.url}")
|
||||
private String pmsUrl;
|
||||
|
||||
@Value("${pms.password}")
|
||||
private String pmsPassword;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String addInnerVehicle(TbCar tbCar) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String strMD5Pwd= DigestUtils.md5Hex(pmsPassword).toUpperCase();
|
||||
String strSign= DigestUtils.md5Hex((tbCar.getCarNo()+strMD5Pwd)).toUpperCase();
|
||||
String url=pmsUrl+"/addInnerVehicle";
|
||||
Map<String, Object> paramMap=new HashMap<String, Object>();
|
||||
paramMap.put("plateNo", tbCar.getCarNo());
|
||||
paramMap.put("startTime", sdf.format(tbCar.getStruStartTime()));
|
||||
paramMap.put("endTime", sdf.format(tbCar.getStruStopTime()));
|
||||
paramMap.put("ownerName", tbCar.getOwnerName());
|
||||
paramMap.put("ownerPhone", tbCar.getOwnerPhone());
|
||||
paramMap.put("createTime", sdf.format(new Date()));
|
||||
paramMap.put("sign", strSign);
|
||||
String response= HttpUtil.postData(url,paramMap);
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String delInnerVehicle(TbCar tbCar) {
|
||||
String strMD5Pwd= DigestUtils.md5Hex(pmsPassword).toUpperCase();
|
||||
String strSign= DigestUtils.md5Hex((tbCar.getCarNo()+strMD5Pwd)).toUpperCase();
|
||||
String url=pmsUrl+"/delInnerVehicle";
|
||||
Map<String, Object> paramMap=new HashMap<String, Object>();
|
||||
paramMap.put("plateNo", tbCar.getCarNo());
|
||||
paramMap.put("sign", strSign);
|
||||
String response= HttpUtil.postData(url,paramMap);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.dcsoft.system.car.service.impl;
|
||||
|
||||
import com.dcsoft.system.car.domain.TbCarRecord;
|
||||
import com.dcsoft.system.car.mapper.TbCarRecordMapper;
|
||||
import com.dcsoft.system.car.service.ITbCarRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆通行记录Service业务层处理
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-26
|
||||
*/
|
||||
@Service
|
||||
public class TbCarRecordServiceImpl implements ITbCarRecordService
|
||||
{
|
||||
@Autowired
|
||||
private TbCarRecordMapper tbCarRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询车辆通行记录
|
||||
*
|
||||
* @param id 车辆通行记录主键
|
||||
* @return 车辆通行记录
|
||||
*/
|
||||
@Override
|
||||
public TbCarRecord selectTbCarRecordById(Long id)
|
||||
{
|
||||
return tbCarRecordMapper.selectTbCarRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车辆通行记录列表
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 车辆通行记录
|
||||
*/
|
||||
@Override
|
||||
public List<TbCarRecord> selectTbCarRecordList(TbCarRecord tbCarRecord)
|
||||
{
|
||||
return tbCarRecordMapper.selectTbCarRecordList(tbCarRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆通行记录
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTbCarRecord(TbCarRecord tbCarRecord)
|
||||
{
|
||||
return tbCarRecordMapper.insertTbCarRecord(tbCarRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆通行记录
|
||||
*
|
||||
* @param tbCarRecord 车辆通行记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTbCarRecord(TbCarRecord tbCarRecord)
|
||||
{
|
||||
return tbCarRecordMapper.updateTbCarRecord(tbCarRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车辆通行记录
|
||||
*
|
||||
* @param ids 需要删除的车辆通行记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbCarRecordByIds(Long[] ids)
|
||||
{
|
||||
return tbCarRecordMapper.deleteTbCarRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆通行记录信息
|
||||
*
|
||||
* @param id 车辆通行记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbCarRecordById(Long id)
|
||||
{
|
||||
return tbCarRecordMapper.deleteTbCarRecordById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.dcsoft.system.car.service.impl;
|
||||
|
||||
import com.dcsoft.common.security.utils.SecurityUtils;
|
||||
import com.dcsoft.system.api.model.LoginUser;
|
||||
import com.dcsoft.system.car.domain.TbCar;
|
||||
import com.dcsoft.system.car.mapper.TbCarMapper;
|
||||
import com.dcsoft.system.car.service.ISysPmsService;
|
||||
import com.dcsoft.system.car.service.ITbCarService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆信息Service业务层处理
|
||||
*
|
||||
* @author nichun
|
||||
* @date 2023-07-24
|
||||
*/
|
||||
@Service
|
||||
public class TbCarServiceImpl implements ITbCarService
|
||||
{
|
||||
@Autowired
|
||||
private TbCarMapper tbCarMapper;
|
||||
|
||||
@Autowired
|
||||
private ISysPmsService pmsService;
|
||||
|
||||
/**
|
||||
* 查询车辆信息
|
||||
*
|
||||
* @param id 车辆信息主键
|
||||
* @return 车辆信息
|
||||
*/
|
||||
@Override
|
||||
public TbCar selectTbCarById(Long id)
|
||||
{
|
||||
return tbCarMapper.selectTbCarById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车辆信息列表
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 车辆信息
|
||||
*/
|
||||
@Override
|
||||
public List<TbCar> selectTbCarList(TbCar tbCar)
|
||||
{
|
||||
return tbCarMapper.selectTbCarList(tbCar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我的车辆信息列表
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 车辆信息
|
||||
*/
|
||||
@Override
|
||||
public List<TbCar> selectAppTbCarList(TbCar tbCar)
|
||||
{
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
tbCar.setUserId(loginUser.getUserid());
|
||||
return tbCarMapper.selectTbCarList(tbCar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆信息
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTbCar(TbCar tbCar)
|
||||
{
|
||||
//白名单车辆新增或修改
|
||||
// String reponse = pmsService.addInnerVehicle(tbCar);
|
||||
// JSONObject json= JSONObject.parseObject(reponse);
|
||||
// if("1".equals(json.get("result")+"")) {
|
||||
// tbCar.setSync("1");
|
||||
// }
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
tbCar.setUserId(loginUser.getUserid());
|
||||
return tbCarMapper.insertTbCar(tbCar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆信息
|
||||
*
|
||||
* @param tbCar 车辆信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTbCar(TbCar tbCar)
|
||||
{
|
||||
//白名单车辆新增或修改
|
||||
// String reponse=pmsService.addInnerVehicle(tbCar);
|
||||
// JSONObject json= JSONObject.parseObject(reponse);
|
||||
// if("1".equals(json.get("result")+"")) {
|
||||
// tbCar.setSync("1");
|
||||
// }
|
||||
return tbCarMapper.updateTbCar(tbCar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车辆信息
|
||||
*
|
||||
* @param ids 需要删除的车辆信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbCarByIds(Long[] ids)
|
||||
{
|
||||
// for(Long id:ids){
|
||||
// TbCar car=tbCarMapper.selectTbCarById(id);
|
||||
// String reponse=pmsService.delInnerVehicle(car);
|
||||
// }
|
||||
return tbCarMapper.deleteTbCarByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆信息信息
|
||||
*
|
||||
* @param id 车辆信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbCarById(Long id)
|
||||
{
|
||||
//根据车牌删除白名单车辆
|
||||
TbCar car=tbCarMapper.selectTbCarById(id);
|
||||
String reponse=pmsService.delInnerVehicle(car);
|
||||
return tbCarMapper.deleteTbCarById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user