diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/CarMaintenanceLifecycleDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/CarMaintenanceLifecycleDTO.java index d446035b..978dd2f6 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/CarMaintenanceLifecycleDTO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/CarMaintenanceLifecycleDTO.java @@ -27,10 +27,10 @@ public class CarMaintenanceLifecycleDTO implements Serializable /** 车牌号,工单中直接记录的车牌号,用于与车辆主档确认关联。 */ private String plateNumber; - /** 维保类型编码,字典值,例如:一级保养、二级保养、小修、大修。 */ + /** 维保类型编码 */ private String typeCode; - /** 工单状态编码,字典值,例如:待派工、维修中、已完成、已结算。 */ + /** 工单状态编码 */ private String status; /** 录入里程,本次维保/保养时车辆的总行驶里程(数值型)。 */ diff --git a/ruoyi-system/src/main/resources/mapper/tyre/BaseCarLifecycleMapper.xml b/ruoyi-system/src/main/resources/mapper/tyre/BaseCarLifecycleMapper.xml index d8b34251..aec02c9d 100644 --- a/ruoyi-system/src/main/resources/mapper/tyre/BaseCarLifecycleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/tyre/BaseCarLifecycleMapper.xml @@ -39,8 +39,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bt.tyre_brand as tyreBrand, bt.tyre_model as tyreModel, bt.wheel_postion as wheelPostion, - bt.pattern_depth as patternDepth + maint.pattern_depth as patternDepth from base_tyre bt + left join ( + select tyre_rfid, pattern_depth + from ( + select tyre_rfid, pattern_depth, + row_number() over (partition by tyre_rfid order by create_time desc, id desc) as rn + from record_tyre_mileage + where record_type = '保养' + and pattern_depth is not null + and pattern_depth <> '' + ) ranked + where rn = 1 + ) maint on maint.tyre_rfid = bt.tyre_epc where bt.car_no = #{carNo} order by bt.wheel_postion, bt.tyre_id