diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/controller/BaseTyreController.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/controller/BaseTyreController.java index e2ef282..c91da72 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/controller/BaseTyreController.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/controller/BaseTyreController.java @@ -11,6 +11,7 @@ import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; +import org.checkerframework.checker.units.qual.A; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -179,6 +180,11 @@ public class BaseTyreController extends BaseController return baseTyreService.TyreUnInstall(carTyres); } + @PostMapping("/TyreMileage") + public AjaxResult TyreMileage(@RequestBody CarTyres carTyres){ + return baseTyreService.TyreMileage(carTyres); + } + } diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/domain/BaseCar.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/domain/BaseCar.java index 2a15c99..121d2eb 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/domain/BaseCar.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/domain/BaseCar.java @@ -24,6 +24,7 @@ public class BaseCar extends BaseEntity /** 主键 */ private String id; + private String tyreid; /** 企业编号 */ @Excel(name = "企业编号") @@ -136,6 +137,14 @@ public class BaseCar extends BaseEntity private List TyreList; + public String getTyreid() { + return tyreid; + } + + public void setTyreid(String tyreid) { + this.tyreid = tyreid; + } + public String getCartype() { return cartype; } diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/domain/BaseTyre.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/domain/BaseTyre.java index 86a2497..a7c713b 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/domain/BaseTyre.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/domain/BaseTyre.java @@ -21,6 +21,9 @@ public class BaseTyre extends BaseEntity /** $column.columnComment */ private String id; + private String tyreId; + + /** 轮胎厂名称 */ @Excel(name = "轮胎厂名称") private String tyreFactory; @@ -202,7 +205,15 @@ public class BaseTyre extends BaseEntity // @Excel(name = "编辑者姓名") private String modifyName; - public void setId(String id) + public String getTyreId() { + return tyreId; + } + + public void setTyreId(String tyreId) { + this.tyreId = tyreId; + } + + public void setId(String id) { this.id = id; } diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/IBaseTyreService.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/IBaseTyreService.java index 7cdf8e7..067457a 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/IBaseTyreService.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/IBaseTyreService.java @@ -78,4 +78,6 @@ public interface IBaseTyreService String checkBaseTyreUnique(BaseTyre baseTyre); String importTyre(List baseTyreList, boolean isUpdateSupport, String operName); + + AjaxResult TyreMileage(CarTyres carTyres); } diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/impl/BaseTyreServiceImpl.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/impl/BaseTyreServiceImpl.java index d0f5486..bf74d88 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/impl/BaseTyreServiceImpl.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/impl/BaseTyreServiceImpl.java @@ -412,6 +412,20 @@ public class BaseTyreServiceImpl implements IBaseTyreService return successMsg.toString(); } + @Override + public AjaxResult TyreMileage(CarTyres carTyres) { + try { + + + + return null; + }catch (Exception e){ + e.printStackTrace(); + return AjaxResult.error(e.getMessage()); + } + + } + @Override public BaseTyre getTyreInfoById(String outerTireNumber) { return baseTyreMapper.getTyreInfoById(outerTireNumber); diff --git a/ruoyi-basetyre/src/main/resources/mapper/basetyre/BaseCarMapper.xml b/ruoyi-basetyre/src/main/resources/mapper/basetyre/BaseCarMapper.xml index 4499370..d3fdba4 100644 --- a/ruoyi-basetyre/src/main/resources/mapper/basetyre/BaseCarMapper.xml +++ b/ruoyi-basetyre/src/main/resources/mapper/basetyre/BaseCarMapper.xml @@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -123,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bc.*, bd.state, bd.last_run_time, - bt.id, + bt.id tyreid, bt.outer_tire_number, bt.pattern, bt.current_texture_depth,