feat(wms): 添加材料卷厚度差计算功能

- 在WmsMaterialCoilAllExportVo中新增厚度差字段
- 在导出列配置中添加厚度差映射
- 实现厚度差计算逻辑:理论厚度减去实际厚度
- 添加数字格式异常处理避免程序崩溃
- 支持厚度差数据的Excel导出功能
This commit is contained in:
2026-06-26 11:00:14 +08:00
parent 238e0d2963
commit 230b18eee6
3 changed files with 15 additions and 0 deletions

View File

@@ -3807,6 +3807,17 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
String isRelatedText = vo.getIsRelatedToOrder() == 0 ? "" : "";
vo.setIsRelatedToOrderText(isRelatedText);
}
// 计算厚度差:理论厚度 - 实际厚度
if (vo.getTheoreticalThickness() != null && vo.getActualThickness() != null) {
try {
BigDecimal theory = new BigDecimal(vo.getTheoreticalThickness());
BigDecimal actual = new BigDecimal(vo.getActualThickness());
vo.setThicknessDifference(theory.subtract(actual).toString());
} catch (NumberFormatException ignored) {
// 解析失败则留空
}
}
}
}