feat(wms): 添加材料卷厚度差计算功能
- 在WmsMaterialCoilAllExportVo中新增厚度差字段 - 在导出列配置中添加厚度差映射 - 实现厚度差计算逻辑:理论厚度减去实际厚度 - 添加数字格式异常处理避免程序崩溃 - 支持厚度差数据的Excel导出功能
This commit is contained in:
@@ -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) {
|
||||
// 解析失败则留空
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user