新增文件
parent
d41a3e9d84
commit
b3671a6d77
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.basetyre.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.basetyre.domain.BaseCarGpsRecord;
|
||||
import com.ruoyi.basetyre.service.IBaseCarGpsRecordService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 车辆GPS记录Controller
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basetyre/BaseCarGpsRecord")
|
||||
public class BaseCarGpsRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseCarGpsRecordService baseCarGpsRecordService;
|
||||
|
||||
/**
|
||||
* 查询车辆GPS记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:BaseCarGpsRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseCarGpsRecord baseCarGpsRecord)
|
||||
{
|
||||
startPage();
|
||||
List<BaseCarGpsRecord> list = baseCarGpsRecordService.selectBaseCarGpsRecordList(baseCarGpsRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车辆GPS记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:BaseCarGpsRecord:export')")
|
||||
@Log(title = "车辆GPS记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseCarGpsRecord baseCarGpsRecord)
|
||||
{
|
||||
List<BaseCarGpsRecord> list = baseCarGpsRecordService.selectBaseCarGpsRecordList(baseCarGpsRecord);
|
||||
ExcelUtil<BaseCarGpsRecord> util = new ExcelUtil<BaseCarGpsRecord>(BaseCarGpsRecord.class);
|
||||
util.exportExcel(response, list, "车辆GPS记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆GPS记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:BaseCarGpsRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(baseCarGpsRecordService.selectBaseCarGpsRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆GPS记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:BaseCarGpsRecord:add')")
|
||||
@Log(title = "车辆GPS记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseCarGpsRecord baseCarGpsRecord)
|
||||
{
|
||||
return toAjax(baseCarGpsRecordService.insertBaseCarGpsRecord(baseCarGpsRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆GPS记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:BaseCarGpsRecord:edit')")
|
||||
@Log(title = "车辆GPS记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseCarGpsRecord baseCarGpsRecord)
|
||||
{
|
||||
return toAjax(baseCarGpsRecordService.updateBaseCarGpsRecord(baseCarGpsRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆GPS记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:BaseCarGpsRecord:remove')")
|
||||
@Log(title = "车辆GPS记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(baseCarGpsRecordService.deleteBaseCarGpsRecordByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.basetyre.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.basetyre.domain.BaseTyreHistoricalRecords;
|
||||
import com.ruoyi.basetyre.service.IBaseTyreHistoricalRecordsService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 轮胎历史Controller
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basetyre/tyre_historical_records")
|
||||
public class BaseTyreHistoricalRecordsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseTyreHistoricalRecordsService baseTyreHistoricalRecordsService;
|
||||
|
||||
/**
|
||||
* 查询轮胎历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:tyre_historical_records:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseTyreHistoricalRecords baseTyreHistoricalRecords)
|
||||
{
|
||||
startPage();
|
||||
List<BaseTyreHistoricalRecords> list = baseTyreHistoricalRecordsService.selectBaseTyreHistoricalRecordsList(baseTyreHistoricalRecords);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出轮胎历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:tyre_historical_records:export')")
|
||||
@Log(title = "轮胎历史", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseTyreHistoricalRecords baseTyreHistoricalRecords)
|
||||
{
|
||||
List<BaseTyreHistoricalRecords> list = baseTyreHistoricalRecordsService.selectBaseTyreHistoricalRecordsList(baseTyreHistoricalRecords);
|
||||
ExcelUtil<BaseTyreHistoricalRecords> util = new ExcelUtil<BaseTyreHistoricalRecords>(BaseTyreHistoricalRecords.class);
|
||||
util.exportExcel(response, list, "轮胎历史数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取轮胎历史详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:tyre_historical_records:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(baseTyreHistoricalRecordsService.selectBaseTyreHistoricalRecordsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增轮胎历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:tyre_historical_records:add')")
|
||||
@Log(title = "轮胎历史", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseTyreHistoricalRecords baseTyreHistoricalRecords)
|
||||
{
|
||||
return toAjax(baseTyreHistoricalRecordsService.insertBaseTyreHistoricalRecords(baseTyreHistoricalRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改轮胎历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:tyre_historical_records:edit')")
|
||||
@Log(title = "轮胎历史", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseTyreHistoricalRecords baseTyreHistoricalRecords)
|
||||
{
|
||||
return toAjax(baseTyreHistoricalRecordsService.updateBaseTyreHistoricalRecords(baseTyreHistoricalRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除轮胎历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('basetyre:tyre_historical_records:remove')")
|
||||
@Log(title = "轮胎历史", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(baseTyreHistoricalRecordsService.deleteBaseTyreHistoricalRecordsByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,184 @@
|
||||
package com.ruoyi.basetyre.domain;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 车辆GPS记录对象 base_car_gps_record
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
public class BaseCarGpsRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private String id;
|
||||
|
||||
/** 轮胎厂编号 */
|
||||
@Excel(name = "轮胎厂编号")
|
||||
private String tyreFacCode;
|
||||
|
||||
/** 企业编号 */
|
||||
@Excel(name = "企业编号")
|
||||
private String companyCode;
|
||||
|
||||
/** 车辆ID */
|
||||
@Excel(name = "车辆ID")
|
||||
private String carId;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private String deviceId;
|
||||
|
||||
/** 报警状态 */
|
||||
@Excel(name = "报警状态")
|
||||
private Long fireState;
|
||||
|
||||
/** 经度 */
|
||||
@Excel(name = "经度")
|
||||
private double longitude;
|
||||
|
||||
/** 纬度 */
|
||||
@Excel(name = "纬度")
|
||||
private double latitude;
|
||||
|
||||
/** gps日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "gps日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalDate gpsDate;
|
||||
|
||||
/** gps时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "gps时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalTime gpsTime;
|
||||
|
||||
/** 车上里程表读数 */
|
||||
@Excel(name = "车上里程表读数")
|
||||
private Long carOnlineMileage;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTyreFacCode(String tyreFacCode)
|
||||
{
|
||||
this.tyreFacCode = tyreFacCode;
|
||||
}
|
||||
|
||||
public String getTyreFacCode()
|
||||
{
|
||||
return tyreFacCode;
|
||||
}
|
||||
public void setCompanyCode(String companyCode)
|
||||
{
|
||||
this.companyCode = companyCode;
|
||||
}
|
||||
|
||||
public String getCompanyCode()
|
||||
{
|
||||
return companyCode;
|
||||
}
|
||||
public void setCarId(String carId)
|
||||
{
|
||||
this.carId = carId;
|
||||
}
|
||||
|
||||
public String getCarId()
|
||||
{
|
||||
return carId;
|
||||
}
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
public void setFireState(Long fireState)
|
||||
{
|
||||
this.fireState = fireState;
|
||||
}
|
||||
|
||||
public Long getFireState()
|
||||
{
|
||||
return fireState;
|
||||
}
|
||||
public void setLongitude(double longitude)
|
||||
{
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public double getLongitude()
|
||||
{
|
||||
return longitude;
|
||||
}
|
||||
public void setLatitude(double latitude)
|
||||
{
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public double getLatitude()
|
||||
{
|
||||
return latitude;
|
||||
}
|
||||
public void setGpsDate(LocalDate gpsDate)
|
||||
{
|
||||
this.gpsDate = gpsDate;
|
||||
}
|
||||
|
||||
public LocalDate getGpsDate()
|
||||
{
|
||||
return gpsDate;
|
||||
}
|
||||
public void setGpsTime(LocalTime gpsTime)
|
||||
{
|
||||
this.gpsTime = gpsTime;
|
||||
}
|
||||
|
||||
public LocalTime getGpsTime()
|
||||
{
|
||||
return gpsTime;
|
||||
}
|
||||
public void setCarOnlineMileage(Long carOnlineMileage)
|
||||
{
|
||||
this.carOnlineMileage = carOnlineMileage;
|
||||
}
|
||||
|
||||
public Long getCarOnlineMileage()
|
||||
{
|
||||
return carOnlineMileage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tyreFacCode", getTyreFacCode())
|
||||
.append("companyCode", getCompanyCode())
|
||||
.append("carId", getCarId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("fireState", getFireState())
|
||||
.append("longitude", getLongitude())
|
||||
.append("latitude", getLatitude())
|
||||
.append("gpsDate", getGpsDate())
|
||||
.append("gpsTime", getGpsTime())
|
||||
.append("carOnlineMileage", getCarOnlineMileage())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
package com.ruoyi.basetyre.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 轮胎历史对象 base_tyre_historical_records
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-13
|
||||
*/
|
||||
public class BaseTyreHistoricalRecords extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private String id;
|
||||
|
||||
/** 轮胎ID */
|
||||
@Excel(name = "轮胎ID")
|
||||
private String tyreId;
|
||||
|
||||
/** 轮胎位置 */
|
||||
@Excel(name = "轮胎位置")
|
||||
private String tyrePosition;
|
||||
|
||||
/** 轮胎位置(数字型) */
|
||||
@Excel(name = "轮胎位置(数字型)")
|
||||
private Long tyrePositionNum;
|
||||
|
||||
/** 车辆ID */
|
||||
@Excel(name = "车辆ID")
|
||||
private String carId;
|
||||
|
||||
/** 车牌号 */
|
||||
@Excel(name = "车牌号")
|
||||
private String carLicense;
|
||||
|
||||
/** 操作类型 1,上胎 2,换胎 3,卸胎 4,花纹变更 */
|
||||
@Excel(name = "操作类型 1,上胎 2,换胎 3,卸胎 4,花纹变更")
|
||||
private Long type;
|
||||
|
||||
/** 花纹深度 */
|
||||
@Excel(name = "花纹深度")
|
||||
private BigDecimal textureDepth;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTyreId(String tyreId)
|
||||
{
|
||||
this.tyreId = tyreId;
|
||||
}
|
||||
|
||||
public String getTyreId()
|
||||
{
|
||||
return tyreId;
|
||||
}
|
||||
public void setTyrePosition(String tyrePosition)
|
||||
{
|
||||
this.tyrePosition = tyrePosition;
|
||||
}
|
||||
|
||||
public String getTyrePosition()
|
||||
{
|
||||
return tyrePosition;
|
||||
}
|
||||
public void setTyrePositionNum(Long tyrePositionNum)
|
||||
{
|
||||
this.tyrePositionNum = tyrePositionNum;
|
||||
}
|
||||
|
||||
public Long getTyrePositionNum()
|
||||
{
|
||||
return tyrePositionNum;
|
||||
}
|
||||
public void setCarId(String carId)
|
||||
{
|
||||
this.carId = carId;
|
||||
}
|
||||
|
||||
public String getCarId()
|
||||
{
|
||||
return carId;
|
||||
}
|
||||
public void setCarLicense(String carLicense)
|
||||
{
|
||||
this.carLicense = carLicense;
|
||||
}
|
||||
|
||||
public String getCarLicense()
|
||||
{
|
||||
return carLicense;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setTextureDepth(BigDecimal textureDepth)
|
||||
{
|
||||
this.textureDepth = textureDepth;
|
||||
}
|
||||
|
||||
public BigDecimal getTextureDepth()
|
||||
{
|
||||
return textureDepth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tyreId", getTyreId())
|
||||
.append("tyrePosition", getTyrePosition())
|
||||
.append("tyrePositionNum", getTyrePositionNum())
|
||||
.append("carId", getCarId())
|
||||
.append("carLicense", getCarLicense())
|
||||
.append("type", getType())
|
||||
.append("textureDepth", getTextureDepth())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.ruoyi.basetyre.domain.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class CarTyres {
|
||||
|
||||
//车辆id
|
||||
private String carId;
|
||||
//车牌号
|
||||
private String carLicense;
|
||||
//轮胎id
|
||||
private String tyreId;
|
||||
//轮胎
|
||||
private String outerTireNumber;
|
||||
//所安装轮位
|
||||
private String tyrePosition;
|
||||
//品牌
|
||||
private String brand;
|
||||
//规格
|
||||
private String size;
|
||||
//当前传感器
|
||||
private String sensorId;
|
||||
//当前花纹深度
|
||||
private BigDecimal currentTextureDepth;
|
||||
//操作类型 1,上胎 2,换胎 3,卸胎 4,花纹变更
|
||||
private String type;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ruoyi.basetyre.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TyresLife {
|
||||
private Date datetime;
|
||||
private String description;
|
||||
private String carLicence;
|
||||
private String carPosition;
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.basetyre.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.basetyre.domain.BaseCarGpsRecord;
|
||||
|
||||
/**
|
||||
* 车辆GPS记录Mapper接口
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
public interface BaseCarGpsRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询车辆GPS记录
|
||||
*
|
||||
* @param id 车辆GPS记录主键
|
||||
* @return 车辆GPS记录
|
||||
*/
|
||||
public BaseCarGpsRecord selectBaseCarGpsRecordById(String id);
|
||||
|
||||
/**
|
||||
* 查询车辆GPS记录列表
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 车辆GPS记录集合
|
||||
*/
|
||||
public List<BaseCarGpsRecord> selectBaseCarGpsRecordList(BaseCarGpsRecord baseCarGpsRecord);
|
||||
|
||||
/**
|
||||
* 新增车辆GPS记录
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCarGpsRecord(BaseCarGpsRecord baseCarGpsRecord);
|
||||
|
||||
/**
|
||||
* 修改车辆GPS记录
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCarGpsRecord(BaseCarGpsRecord baseCarGpsRecord);
|
||||
|
||||
/**
|
||||
* 删除车辆GPS记录
|
||||
*
|
||||
* @param id 车辆GPS记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCarGpsRecordById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除车辆GPS记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCarGpsRecordByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.basetyre.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.basetyre.domain.BaseTyreHistoricalRecords;
|
||||
|
||||
/**
|
||||
* 轮胎历史Mapper接口
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-13
|
||||
*/
|
||||
public interface BaseTyreHistoricalRecordsMapper
|
||||
{
|
||||
/**
|
||||
* 查询轮胎历史
|
||||
*
|
||||
* @param id 轮胎历史主键
|
||||
* @return 轮胎历史
|
||||
*/
|
||||
public BaseTyreHistoricalRecords selectBaseTyreHistoricalRecordsById(String id);
|
||||
|
||||
/**
|
||||
* 查询轮胎历史列表
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 轮胎历史集合
|
||||
*/
|
||||
public List<BaseTyreHistoricalRecords> selectBaseTyreHistoricalRecordsList(BaseTyreHistoricalRecords baseTyreHistoricalRecords);
|
||||
|
||||
/**
|
||||
* 新增轮胎历史
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseTyreHistoricalRecords(BaseTyreHistoricalRecords baseTyreHistoricalRecords);
|
||||
|
||||
/**
|
||||
* 修改轮胎历史
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseTyreHistoricalRecords(BaseTyreHistoricalRecords baseTyreHistoricalRecords);
|
||||
|
||||
/**
|
||||
* 删除轮胎历史
|
||||
*
|
||||
* @param id 轮胎历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseTyreHistoricalRecordsById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除轮胎历史
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseTyreHistoricalRecordsByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.basetyre.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.basetyre.domain.BaseCarGpsRecord;
|
||||
|
||||
/**
|
||||
* 车辆GPS记录Service接口
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
public interface IBaseCarGpsRecordService
|
||||
{
|
||||
/**
|
||||
* 查询车辆GPS记录
|
||||
*
|
||||
* @param id 车辆GPS记录主键
|
||||
* @return 车辆GPS记录
|
||||
*/
|
||||
public BaseCarGpsRecord selectBaseCarGpsRecordById(String id);
|
||||
|
||||
/**
|
||||
* 查询车辆GPS记录列表
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 车辆GPS记录集合
|
||||
*/
|
||||
public List<BaseCarGpsRecord> selectBaseCarGpsRecordList(BaseCarGpsRecord baseCarGpsRecord);
|
||||
|
||||
/**
|
||||
* 新增车辆GPS记录
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCarGpsRecord(BaseCarGpsRecord baseCarGpsRecord);
|
||||
|
||||
/**
|
||||
* 修改车辆GPS记录
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCarGpsRecord(BaseCarGpsRecord baseCarGpsRecord);
|
||||
|
||||
/**
|
||||
* 批量删除车辆GPS记录
|
||||
*
|
||||
* @param ids 需要删除的车辆GPS记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCarGpsRecordByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除车辆GPS记录信息
|
||||
*
|
||||
* @param id 车辆GPS记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCarGpsRecordById(String id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.basetyre.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.basetyre.domain.BaseTyreHistoricalRecords;
|
||||
|
||||
/**
|
||||
* 轮胎历史Service接口
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-13
|
||||
*/
|
||||
public interface IBaseTyreHistoricalRecordsService
|
||||
{
|
||||
/**
|
||||
* 查询轮胎历史
|
||||
*
|
||||
* @param id 轮胎历史主键
|
||||
* @return 轮胎历史
|
||||
*/
|
||||
public BaseTyreHistoricalRecords selectBaseTyreHistoricalRecordsById(String id);
|
||||
|
||||
/**
|
||||
* 查询轮胎历史列表
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 轮胎历史集合
|
||||
*/
|
||||
public List<BaseTyreHistoricalRecords> selectBaseTyreHistoricalRecordsList(BaseTyreHistoricalRecords baseTyreHistoricalRecords);
|
||||
|
||||
/**
|
||||
* 新增轮胎历史
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseTyreHistoricalRecords(BaseTyreHistoricalRecords baseTyreHistoricalRecords);
|
||||
|
||||
/**
|
||||
* 修改轮胎历史
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseTyreHistoricalRecords(BaseTyreHistoricalRecords baseTyreHistoricalRecords);
|
||||
|
||||
/**
|
||||
* 批量删除轮胎历史
|
||||
*
|
||||
* @param ids 需要删除的轮胎历史主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseTyreHistoricalRecordsByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除轮胎历史信息
|
||||
*
|
||||
* @param id 轮胎历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseTyreHistoricalRecordsById(String id);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.ruoyi.basetyre.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.basetyre.mapper.BaseCarGpsRecordMapper;
|
||||
import com.ruoyi.basetyre.domain.BaseCarGpsRecord;
|
||||
import com.ruoyi.basetyre.service.IBaseCarGpsRecordService;
|
||||
|
||||
/**
|
||||
* 车辆GPS记录Service业务层处理
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
@Service
|
||||
public class BaseCarGpsRecordServiceImpl implements IBaseCarGpsRecordService
|
||||
{
|
||||
@Autowired
|
||||
private BaseCarGpsRecordMapper baseCarGpsRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询车辆GPS记录
|
||||
*
|
||||
* @param id 车辆GPS记录主键
|
||||
* @return 车辆GPS记录
|
||||
*/
|
||||
@Override
|
||||
public BaseCarGpsRecord selectBaseCarGpsRecordById(String id)
|
||||
{
|
||||
return baseCarGpsRecordMapper.selectBaseCarGpsRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车辆GPS记录列表
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 车辆GPS记录
|
||||
*/
|
||||
@Override
|
||||
public List<BaseCarGpsRecord> selectBaseCarGpsRecordList(BaseCarGpsRecord baseCarGpsRecord)
|
||||
{
|
||||
return baseCarGpsRecordMapper.selectBaseCarGpsRecordList(baseCarGpsRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆GPS记录
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseCarGpsRecord(BaseCarGpsRecord baseCarGpsRecord)
|
||||
{
|
||||
baseCarGpsRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return baseCarGpsRecordMapper.insertBaseCarGpsRecord(baseCarGpsRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆GPS记录
|
||||
*
|
||||
* @param baseCarGpsRecord 车辆GPS记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseCarGpsRecord(BaseCarGpsRecord baseCarGpsRecord)
|
||||
{
|
||||
return baseCarGpsRecordMapper.updateBaseCarGpsRecord(baseCarGpsRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车辆GPS记录
|
||||
*
|
||||
* @param ids 需要删除的车辆GPS记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCarGpsRecordByIds(String[] ids)
|
||||
{
|
||||
return baseCarGpsRecordMapper.deleteBaseCarGpsRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆GPS记录信息
|
||||
*
|
||||
* @param id 车辆GPS记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCarGpsRecordById(String id)
|
||||
{
|
||||
return baseCarGpsRecordMapper.deleteBaseCarGpsRecordById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.basetyre.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.basetyre.mapper.BaseTyreHistoricalRecordsMapper;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.basetyre.domain.BaseTyreHistoricalRecords;
|
||||
import com.ruoyi.basetyre.service.IBaseTyreHistoricalRecordsService;
|
||||
|
||||
/**
|
||||
* 轮胎历史Service业务层处理
|
||||
*
|
||||
* @author Yangwl
|
||||
* @date 2023-03-13
|
||||
*/
|
||||
@Service
|
||||
public class BaseTyreHistoricalRecordsServiceImpl implements IBaseTyreHistoricalRecordsService
|
||||
{
|
||||
@Autowired
|
||||
private BaseTyreHistoricalRecordsMapper baseTyreHistoricalRecordsMapper;
|
||||
|
||||
/**
|
||||
* 查询轮胎历史
|
||||
*
|
||||
* @param id 轮胎历史主键
|
||||
* @return 轮胎历史
|
||||
*/
|
||||
@Override
|
||||
public BaseTyreHistoricalRecords selectBaseTyreHistoricalRecordsById(String id)
|
||||
{
|
||||
return baseTyreHistoricalRecordsMapper.selectBaseTyreHistoricalRecordsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询轮胎历史列表
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 轮胎历史
|
||||
*/
|
||||
@Override
|
||||
public List<BaseTyreHistoricalRecords> selectBaseTyreHistoricalRecordsList(BaseTyreHistoricalRecords baseTyreHistoricalRecords)
|
||||
{
|
||||
return baseTyreHistoricalRecordsMapper.selectBaseTyreHistoricalRecordsList(baseTyreHistoricalRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增轮胎历史
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseTyreHistoricalRecords(BaseTyreHistoricalRecords baseTyreHistoricalRecords)
|
||||
{
|
||||
baseTyreHistoricalRecords.setCreateTime(DateUtils.getNowDate());
|
||||
return baseTyreHistoricalRecordsMapper.insertBaseTyreHistoricalRecords(baseTyreHistoricalRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改轮胎历史
|
||||
*
|
||||
* @param baseTyreHistoricalRecords 轮胎历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseTyreHistoricalRecords(BaseTyreHistoricalRecords baseTyreHistoricalRecords)
|
||||
{
|
||||
return baseTyreHistoricalRecordsMapper.updateBaseTyreHistoricalRecords(baseTyreHistoricalRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除轮胎历史
|
||||
*
|
||||
* @param ids 需要删除的轮胎历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseTyreHistoricalRecordsByIds(String[] ids)
|
||||
{
|
||||
return baseTyreHistoricalRecordsMapper.deleteBaseTyreHistoricalRecordsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除轮胎历史信息
|
||||
*
|
||||
* @param id 轮胎历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseTyreHistoricalRecordsById(String id)
|
||||
{
|
||||
return baseTyreHistoricalRecordsMapper.deleteBaseTyreHistoricalRecordsById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
<?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.ruoyi.basetyre.mapper.BaseCarGpsRecordMapper">
|
||||
|
||||
<resultMap type="BaseCarGpsRecord" id="BaseCarGpsRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tyreFacCode" column="tyre_fac_code" />
|
||||
<result property="companyCode" column="company_code" />
|
||||
<result property="carId" column="car_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="fireState" column="fire_state" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="latitude" column="latitude" />
|
||||
<result property="gpsDate" column="gps_date" />
|
||||
<result property="gpsTime" column="gps_time" />
|
||||
<result property="carOnlineMileage" column="car_online_mileage" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCarGpsRecordVo">
|
||||
select id, tyre_fac_code, company_code, car_id, device_id, fire_state, longitude, latitude, gps_date, gps_time, car_online_mileage, create_time from base_car_gps_record
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseCarGpsRecordList" parameterType="BaseCarGpsRecord" resultMap="BaseCarGpsRecordResult">
|
||||
<include refid="selectBaseCarGpsRecordVo"/>
|
||||
<where>
|
||||
<if test="tyreFacCode != null and tyreFacCode != ''"> and tyre_fac_code = #{tyreFacCode}</if>
|
||||
<if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if>
|
||||
<if test="carId != null and carId != ''"> and car_id = #{carId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="fireState != null "> and fire_state = #{fireState}</if>
|
||||
<if test="longitude != null "> and longitude = #{longitude}</if>
|
||||
<if test="latitude != null "> and latitude = #{latitude}</if>
|
||||
<if test="gpsDate != null "> and gps_date = #{gpsDate}</if>
|
||||
<if test="gpsTime != null "> and gps_time = #{gpsTime}</if>
|
||||
<if test="carOnlineMileage != null "> and car_online_mileage = #{carOnlineMileage}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseCarGpsRecordById" parameterType="String" resultMap="BaseCarGpsRecordResult">
|
||||
<include refid="selectBaseCarGpsRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseCarGpsRecord" parameterType="BaseCarGpsRecord">
|
||||
insert into base_car_gps_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="tyreFacCode != null">tyre_fac_code,</if>
|
||||
<if test="companyCode != null">company_code,</if>
|
||||
<if test="carId != null">car_id,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="fireState != null">fire_state,</if>
|
||||
<if test="longitude != null">longitude,</if>
|
||||
<if test="latitude != null">latitude,</if>
|
||||
<if test="gpsDate != null">gps_date,</if>
|
||||
<if test="gpsTime != null">gps_time,</if>
|
||||
<if test="carOnlineMileage != null">car_online_mileage,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="tyreFacCode != null">#{tyreFacCode},</if>
|
||||
<if test="companyCode != null">#{companyCode},</if>
|
||||
<if test="carId != null">#{carId},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="fireState != null">#{fireState},</if>
|
||||
<if test="longitude != null">#{longitude},</if>
|
||||
<if test="latitude != null">#{latitude},</if>
|
||||
<if test="gpsDate != null">#{gpsDate},</if>
|
||||
<if test="gpsTime != null">#{gpsTime},</if>
|
||||
<if test="carOnlineMileage != null">#{carOnlineMileage},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseCarGpsRecord" parameterType="BaseCarGpsRecord">
|
||||
update base_car_gps_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tyreFacCode != null">tyre_fac_code = #{tyreFacCode},</if>
|
||||
<if test="companyCode != null">company_code = #{companyCode},</if>
|
||||
<if test="carId != null">car_id = #{carId},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="fireState != null">fire_state = #{fireState},</if>
|
||||
<if test="longitude != null">longitude = #{longitude},</if>
|
||||
<if test="latitude != null">latitude = #{latitude},</if>
|
||||
<if test="gpsDate != null">gps_date = #{gpsDate},</if>
|
||||
<if test="gpsTime != null">gps_time = #{gpsTime},</if>
|
||||
<if test="carOnlineMileage != null">car_online_mileage = #{carOnlineMileage},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseCarGpsRecordById" parameterType="String">
|
||||
delete from base_car_gps_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseCarGpsRecordByIds" parameterType="String">
|
||||
delete from base_car_gps_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,92 @@
|
||||
<?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.ruoyi.basetyre.mapper.BaseTyreHistoricalRecordsMapper">
|
||||
|
||||
<resultMap type="BaseTyreHistoricalRecords" id="BaseTyreHistoricalRecordsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tyreId" column="tyre_id" />
|
||||
<result property="tyrePosition" column="tyre_position" />
|
||||
<result property="tyrePositionNum" column="tyre_position_num" />
|
||||
<result property="carId" column="car_id" />
|
||||
<result property="carLicense" column="car_license" />
|
||||
<result property="type" column="type" />
|
||||
<result property="textureDepth" column="texture_depth" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseTyreHistoricalRecordsVo">
|
||||
select id, tyre_id, tyre_position, tyre_position_num, car_id, car_license, type, texture_depth, create_time from base_tyre_historical_records
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseTyreHistoricalRecordsList" parameterType="BaseTyreHistoricalRecords" resultMap="BaseTyreHistoricalRecordsResult">
|
||||
<include refid="selectBaseTyreHistoricalRecordsVo"/>
|
||||
<where>
|
||||
<if test="tyreId != null and tyreId != ''"> and tyre_id = #{tyreId}</if>
|
||||
<if test="tyrePosition != null and tyrePosition != ''"> and tyre_position = #{tyrePosition}</if>
|
||||
<if test="tyrePositionNum != null "> and tyre_position_num = #{tyrePositionNum}</if>
|
||||
<if test="carId != null and carId != ''"> and car_id = #{carId}</if>
|
||||
<if test="carLicense != null and carLicense != ''"> and car_license = #{carLicense}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="textureDepth != null "> and texture_depth = #{textureDepth}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseTyreHistoricalRecordsById" parameterType="String" resultMap="BaseTyreHistoricalRecordsResult">
|
||||
<include refid="selectBaseTyreHistoricalRecordsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseTyreHistoricalRecords" parameterType="BaseTyreHistoricalRecords">
|
||||
insert into base_tyre_historical_records
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="tyreId != null">tyre_id,</if>
|
||||
<if test="tyrePosition != null">tyre_position,</if>
|
||||
<if test="tyrePositionNum != null">tyre_position_num,</if>
|
||||
<if test="carId != null">car_id,</if>
|
||||
<if test="carLicense != null">car_license,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="textureDepth != null">texture_depth,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="tyreId != null">#{tyreId},</if>
|
||||
<if test="tyrePosition != null">#{tyrePosition},</if>
|
||||
<if test="tyrePositionNum != null">#{tyrePositionNum},</if>
|
||||
<if test="carId != null">#{carId},</if>
|
||||
<if test="carLicense != null">#{carLicense},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="textureDepth != null">#{textureDepth},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseTyreHistoricalRecords" parameterType="BaseTyreHistoricalRecords">
|
||||
update base_tyre_historical_records
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tyreId != null">tyre_id = #{tyreId},</if>
|
||||
<if test="tyrePosition != null">tyre_position = #{tyrePosition},</if>
|
||||
<if test="tyrePositionNum != null">tyre_position_num = #{tyrePositionNum},</if>
|
||||
<if test="carId != null">car_id = #{carId},</if>
|
||||
<if test="carLicense != null">car_license = #{carLicense},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="textureDepth != null">texture_depth = #{textureDepth},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseTyreHistoricalRecordsById" parameterType="String">
|
||||
delete from base_tyre_historical_records where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseTyreHistoricalRecordsByIds" parameterType="String">
|
||||
delete from base_tyre_historical_records where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索栏-->
|
||||
<el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '90px':'140px'"
|
||||
:model="queryParams">
|
||||
<el-form-item :label="t('test.test.internationalization1')" prop="internationalization1">
|
||||
<el-input
|
||||
v-model="queryParams.internationalization1"
|
||||
:placeholder=" t('common.pleaseEnter') + t('test.test.internationalization1')"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<!-- 顶部操作按钮-->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['test:test:add']"
|
||||
icon="Plus"
|
||||
plain
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>{{ t('option.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['test:test:edit']"
|
||||
:disabled="single"
|
||||
icon="Edit"
|
||||
plain
|
||||
type="success"
|
||||
@click="handleUpdate"
|
||||
>{{ t('option.edit') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['test:test:remove']"
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
plain
|
||||
type="danger"
|
||||
@click="handleDelete"
|
||||
>{{ t('option.remove') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['test:test:export']"
|
||||
icon="Download"
|
||||
plain
|
||||
type="warning"
|
||||
@click="handleExport"
|
||||
>{{ t('option.export') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script name="Test" setup>
|
||||
import {addTest, delTest, getTest, listTest, updateTest} from "@/api/test/test";
|
||||
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
|
||||
const {proxy} = getCurrentInstance();
|
||||
|
||||
|
||||
// 表格数据
|
||||
const postList = ref([]);
|
||||
// 模态框开关标识
|
||||
const open = ref(false);
|
||||
// 表格加载状态开关标识
|
||||
const loading = ref(true);
|
||||
// 搜索区域开关标识
|
||||
const showSearch = ref(true);
|
||||
// 选择行id
|
||||
const ids = ref([]);
|
||||
// 修改按钮是否可用标识
|
||||
const single = ref(true);
|
||||
// 删除按钮是否可用标识
|
||||
const multiple = ref(true);
|
||||
// 总条数
|
||||
const total = ref(0);
|
||||
// 模态框标题
|
||||
const title = ref("");
|
||||
|
||||
// 搜索参数
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
internationalization1: undefined,
|
||||
internationalization2: undefined,
|
||||
internationalization3: undefined,
|
||||
internationalization4: undefined,
|
||||
internationalization5: undefined,
|
||||
internationalization6: undefined,
|
||||
internationalization7: undefined,
|
||||
internationalization8: undefined,
|
||||
internationalization9: undefined,
|
||||
internationalization10: undefined,
|
||||
internationalization11: undefined,
|
||||
internationalization12: undefined,
|
||||
internationalization13: undefined,
|
||||
internationalization14: undefined,
|
||||
internationalization15: undefined,
|
||||
internationalization16: undefined,
|
||||
internationalization17: undefined,
|
||||
internationalization18: undefined,
|
||||
internationalization19: undefined,
|
||||
internationalization20: undefined,
|
||||
isDelete: undefined,
|
||||
createTime: undefined,
|
||||
createId: undefined,
|
||||
createBy: undefined,
|
||||
createName: undefined,
|
||||
modifyTime: undefined,
|
||||
modifyId: undefined,
|
||||
modifyBy: undefined,
|
||||
modifyName: undefined,
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const rules = {
|
||||
brand: [{required: true, message: "轮胎品牌不能为空", trigger: "blur"}],
|
||||
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}],
|
||||
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
|
||||
depth: [{required: true, message: "花纹深度不能为空", trigger: "blur"}],
|
||||
}
|
||||
|
||||
// 表单数据
|
||||
const form = ref({
|
||||
id: null,
|
||||
internationalization1: null,
|
||||
internationalization2: null,
|
||||
internationalization3: null,
|
||||
internationalization4: null,
|
||||
internationalization5: null,
|
||||
internationalization6: null,
|
||||
internationalization7: null,
|
||||
internationalization8: null,
|
||||
internationalization9: null,
|
||||
internationalization10: null,
|
||||
internationalization11: null,
|
||||
internationalization12: null,
|
||||
internationalization13: null,
|
||||
internationalization14: null,
|
||||
internationalization15: null,
|
||||
internationalization16: null,
|
||||
internationalization17: null,
|
||||
internationalization18: null,
|
||||
internationalization19: null,
|
||||
internationalization20: null,
|
||||
isDelete: null,
|
||||
createTime: null,
|
||||
createId: null,
|
||||
createBy: null,
|
||||
createName: null,
|
||||
modifyTime: null,
|
||||
modifyId: null,
|
||||
modifyBy: null,
|
||||
modifyName: null,
|
||||
});
|
||||
|
||||
/** 查询岗位列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listTest(queryParams.value).then(response => {
|
||||
postList.value = response.rows;
|
||||
total.value = response.total;
|
||||
}).finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
internationalization1: null,
|
||||
internationalization2: null,
|
||||
internationalization3: null,
|
||||
internationalization4: null,
|
||||
internationalization5: null,
|
||||
internationalization6: null,
|
||||
internationalization7: null,
|
||||
internationalization8: null,
|
||||
internationalization9: null,
|
||||
internationalization10: null,
|
||||
internationalization11: null,
|
||||
internationalization12: null,
|
||||
internationalization13: null,
|
||||
internationalization14: null,
|
||||
internationalization15: null,
|
||||
internationalization16: null,
|
||||
internationalization17: null,
|
||||
internationalization18: null,
|
||||
internationalization19: null,
|
||||
internationalization20: null,
|
||||
isDelete: null,
|
||||
createTime: null,
|
||||
createId: null,
|
||||
createBy: null,
|
||||
createName: null,
|
||||
modifyTime: null,
|
||||
modifyId: null,
|
||||
modifyBy: null,
|
||||
modifyName: null,
|
||||
};
|
||||
proxy.resetForm("postRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = t('test.test.addTitle');
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const postId = row.id || ids.value;
|
||||
getTest(postId).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = t('test.test.editTitle');
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["postRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
updateTest(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addTest(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const postIds = row.postId || ids.value;
|
||||
proxy.$modal.confirm(t('option.confirmDeletion', {
|
||||
key: t('test.test.internationalization1'),
|
||||
value: postIds
|
||||
})).then(function () {
|
||||
return delTest(postIds);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess(t('option.successfullyDeleted'));
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download("system/post/export", {
|
||||
...queryParams.value
|
||||
}, `post_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
Loading…
Reference in New Issue