feat(轮胎安装): 增加车型和线路字段并优化导出功能

- 在安装记录页面和实体类中添加车型和线路字段
- 优化SQL查询关联车辆表获取车型和线路信息
- 完善导出功能,添加操作人和操作时间字段
- 调整类型字段导出使用字典值避免显示0/1编码
master
zch 1 month ago
parent b6b1ed5d60
commit 6ecf106a20

@ -131,6 +131,14 @@
field : 'carNo',
title : '车辆'
},
{
field : 'carType',
title : '车型'
},
{
field : 'line',
title : '线路'
},
{
field : 'wheelPostion',
title : '轮位'
@ -178,4 +186,4 @@
});
</script>
</body>
</html>
</html>

@ -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())

@ -24,8 +24,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="patternDepth" column="pattern_depth" />
<result property="company" column="company" />
<result property="carTeam" column="carTeam" />
<result property="carType" column="car_type" />
<result property="line" column="line" />
<result property="stageMileage" column="stage_mileage" />
<result property="recordId" column="record_id" />
<!-- 导出专用字段复用已有查询列,避免修改 BaseEntity 导致其它 Excel 被动增加操作列。 -->
<result property="operator" column="create_by" />
<result property="operateTime" column="create_time" />
</resultMap>
<sql id="selectRecordTyreInstallVo">
@ -35,11 +40,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRecordTyreInstallList" parameterType="RecordTyreInstall" resultMap="RecordTyreInstallResult">
select rti.id, rti.tyre_rfid, rti.type, rti.mileage, su.user_name as create_by, rti.create_time,rti.update_by,rti.car_no,
rti.wheel_postion,rti.update_time, rti.remark,rti.pattern_depth,bt.tyre_brand,bt.tyre_no,bt.self_no,bt.tyre_model,
sdss.dept_name as company,bt.team,sd.dept_name as carTeam,rtm.mileage as stage_mileage
sdss.dept_name as company,bt.team,sd.dept_name as carTeam,bc.type as car_type,bc.line,rtm.mileage as stage_mileage
from record_tyre_install rti
LEFT JOIN base_tyre bt ON rti.tyre_rfid = bt.tyre_epc
left join sys_user su ON su.login_name = rti.create_by
LEFT JOIN base_car bc ON bc.car_no = bt.car_no
LEFT JOIN base_car bc ON bc.car_no = rti.car_no
LEFT JOIN sys_dept sd ON bc.dept_id = sd.dept_id
LEFT JOIN sys_dept sds ON sd.parent_id = sds.dept_id
LEFT JOIN sys_dept sdss ON sds.parent_id = sdss.dept_id

Loading…
Cancel
Save