feat(wms): 优化卷材数据类型显示
- 移除 ExcelDictFormat 注解,改用文本字段显示数据类型 - 添加 dataTypeText 字段用于存储历史/现存文本描述 - 添加 isRelatedToOrderText 字段用于存储是/否文本描述 - 在服务层实现数据类型转换逻辑,将数字值转为对应文本 - 在服务层实现订单关联状态转换逻辑,将数字值转为对应文本 - 保持原有的 Excel 导出功能完整性
This commit is contained in:
@@ -174,10 +174,11 @@ public class WmsMaterialCoilAllExportVo {
|
||||
private Date updateTime;
|
||||
|
||||
// 数据类型
|
||||
@ExcelProperty(value = "数据类型")
|
||||
@ExcelDictFormat(readConverterExp = "0=历史,1=现存")
|
||||
private Integer dataType;
|
||||
|
||||
@ExcelProperty(value = "数据类型")
|
||||
private String dataTypeText;
|
||||
|
||||
// 调制度
|
||||
@ExcelProperty(value = "调制度")
|
||||
private String temperGrade;
|
||||
@@ -190,7 +191,8 @@ public class WmsMaterialCoilAllExportVo {
|
||||
private String businessPurpose;
|
||||
|
||||
// 是否与订单相关 readConverterExp
|
||||
@ExcelProperty(value = "是否与订单相关")
|
||||
@ExcelDictFormat(readConverterExp = "0=否,1=是")
|
||||
private Integer isRelatedToOrder;
|
||||
|
||||
@ExcelProperty(value = "是否与订单相关")
|
||||
private String isRelatedToOrderText;
|
||||
}
|
||||
|
||||
@@ -2498,6 +2498,17 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
if (Objects.equals(vo.getDataType(), 0)) {
|
||||
vo.setActualWarehouseName(null);
|
||||
}
|
||||
// 转换数据类型:0=历史,1=现存
|
||||
if (vo.getDataType() != null) {
|
||||
String dataTypeText = vo.getDataType() == 0 ? "历史" : "现存";
|
||||
vo.setDataTypeText(dataTypeText);
|
||||
}
|
||||
|
||||
// 转换是否与订单相关:0=否,1=是
|
||||
if (vo.getIsRelatedToOrder() != null) {
|
||||
String isRelatedText = vo.getIsRelatedToOrder() == 0 ? "否" : "是";
|
||||
vo.setIsRelatedToOrderText(isRelatedText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user