Commit ef57a2a6 by 崔彦峰

feat(car-condition): 新增车辆综合评级枚举并优化AI检测报告

- 添加OverallRatingEnum枚举类支持优、良、中、差四个等级
- 在CarConditionAiReportService中引入综合评级枚举依赖
- 优化constructAiInputJson方法中的综合评价字段处理逻辑
- 移除目标收车价和最高保留价的注释代码
- 为AI输入JSON添加当前日期字段用于报告时间戳
- 统一综合评级显示为中文描述格式便于前端展示
2 parents 4849f3e8 67fcc578
package com.gsc4cloud.gsc.vpc.api.enums;
public enum OverallRatingEnum implements BaseEnum<Integer, String>{
/** 1: 优 */
EXCELLENT(1, "优"),
/** 2: 良 */
GOOD(2, "良"),
/** 3: 中 */
AVERAGE(3, "中"),
/** 4: 差 */
POOR(4, "差");
private final int value;
private final String description;
OverallRatingEnum(int value, String description) {
this.value = value;
this.description = description;
}
/**
* 根据数值解析枚举
*/
public static OverallRatingEnum of(Integer value) {
if (value == null) return null;
for (OverallRatingEnum type : values()) {
if (type.value == value) {
return type;
}
}
return null;
}
/**
* 直接获取中文描述
*/
public static String getDescription(Integer value) {
OverallRatingEnum rating = of(value);
return rating != null ? rating.description : "未知评价";
}
// Getters
public int getValue() { return value; }
public String getDescription() { return description; }
@Override
public Integer getCode() {
return 0;
}
@Override
public String getDesc() {
return "";
}
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!