From 6ecf106a2058c49982896eb4a72737775b6c6608 Mon Sep 17 00:00:00 2001 From: zch Date: Fri, 8 May 2026 11:17:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=BD=AE=E8=83=8E=E5=AE=89=E8=A3=85):=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BD=A6=E5=9E=8B=E5=92=8C=E7=BA=BF=E8=B7=AF?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=B9=B6=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在安装记录页面和实体类中添加车型和线路字段 - 优化SQL查询关联车辆表获取车型和线路信息 - 完善导出功能,添加操作人和操作时间字段 - 调整类型字段导出使用字典值避免显示0/1编码 --- .../templates/tyre/install/install.html | 10 +++- .../system/domain/RecordTyreInstall.java | 60 +++++++++++++++++-- .../mapper/tyre/RecordTyreInstallMapper.xml | 9 ++- 3 files changed, 72 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/tyre/install/install.html b/ruoyi-admin/src/main/resources/templates/tyre/install/install.html index 48766884..4cc3230e 100644 --- a/ruoyi-admin/src/main/resources/templates/tyre/install/install.html +++ b/ruoyi-admin/src/main/resources/templates/tyre/install/install.html @@ -131,6 +131,14 @@ field : 'carNo', title : '车辆' }, + { + field : 'carType', + title : '车型' + }, + { + field : 'line', + title : '线路' + }, { field : 'wheelPostion', title : '轮位' @@ -178,4 +186,4 @@ }); - \ No newline at end of file + diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordTyreInstall.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordTyreInstall.java index 1654afa5..cacc42c4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordTyreInstall.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordTyreInstall.java @@ -5,6 +5,8 @@ import com.ruoyi.common.core.domain.BaseEntity; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import java.util.Date; + /** * 轮胎安装记录对象 record_tyre_install * @@ -23,6 +25,19 @@ public class RecordTyreInstall extends BaseEntity private String tyreRfid; @Excel(name = "胎号") private String tyreNo; + + /** 自编号:列表已展示该字段,导出也要显式标注,否则 ExcelUtil 不会生成该列。 */ + @Excel(name = "自编号") + private String selfNo; + /** 操作人:复用列表查询出的用户姓名,避免给 BaseEntity 加导出注解影响其它业务 Excel。 */ + @Excel(name = "操作人") + private String operator; + /** 操作时间:作为安装记录导出快照字段,确保 Excel 与页面列表展示口径一致。 */ + @Excel(name = "操作时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 20) + private Date operateTime; + @Excel(name = "品牌") + private String tyreBrand; + @Excel(name = "规格型号") private String tyreModel; @Excel(name = "分公司") @@ -32,9 +47,8 @@ public class RecordTyreInstall extends BaseEntity @Excel(name = "车队") private String carTeam; - private String tyreBrand; - /** 类型 0安装 1卸下 */ - @Excel(name = "类型 0安装 1卸下") + /** 类型:导出与页面同用 install_type 字典,避免 Excel 出现 0/1 这类前端无法直读的编码。 */ + @Excel(name = "类型", dictType = "install_type") private String type; /** 里程 */ @@ -44,6 +58,10 @@ public class RecordTyreInstall extends BaseEntity private String patternDepth; @Excel(name = "安装车辆") private String carNo; + @Excel(name = "车型") + private String carType; + @Excel(name = "线路") + private String line; @Excel(name = "所在轮位") private String wheelPostion; @@ -67,7 +85,23 @@ public class RecordTyreInstall extends BaseEntity this.recordId = recordId; } - private String selfNo; + + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Date getOperateTime() { + return operateTime; + } + + public void setOperateTime(Date operateTime) { + this.operateTime = operateTime; + } public String getCompany() { return company; @@ -141,6 +175,22 @@ public class RecordTyreInstall extends BaseEntity this.carNo = carNo; } + public String getCarType() { + return carType; + } + + public void setCarType(String carType) { + this.carType = carType; + } + + public String getLine() { + return line; + } + + public void setLine(String line) { + this.line = line; + } + public String getWheelPostion() { return wheelPostion; } @@ -197,6 +247,8 @@ public class RecordTyreInstall extends BaseEntity .append("type", getType()) .append("mileage", getMileage()) + .append("carType", getCarType()) + .append("line", getLine()) .append("createBy", getCreateBy()) diff --git a/ruoyi-system/src/main/resources/mapper/tyre/RecordTyreInstallMapper.xml b/ruoyi-system/src/main/resources/mapper/tyre/RecordTyreInstallMapper.xml index d56e1c81..473690ce 100644 --- a/ruoyi-system/src/main/resources/mapper/tyre/RecordTyreInstallMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/tyre/RecordTyreInstallMapper.xml @@ -24,8 +24,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + @@ -35,11 +40,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"