Compare commits
2 Commits
76497eece7
...
fdb13b7261
| Author | SHA1 | Date | |
|---|---|---|---|
| fdb13b7261 | |||
| 74a3803290 |
@@ -1119,17 +1119,15 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
|
|
||||||
bo.setSpecThickness(thickness);
|
bo.setSpecThickness(thickness);
|
||||||
// 计算理论厚度(需要实测长度)
|
// 计算理论厚度(需要实测长度)
|
||||||
if (bo.getTheoreticalThickness() == null && bo.getActualLength() != null) {
|
if (bo.getActualLength() != null) {
|
||||||
BigDecimal length = new BigDecimal(bo.getActualLength());
|
BigDecimal length = new BigDecimal(bo.getActualLength());
|
||||||
BigDecimal theoreticalThickness = volume.divide(length, 10, RoundingMode.HALF_UP).divide(width, 10, RoundingMode.HALF_UP).multiply(new BigDecimal("1000"));
|
BigDecimal theoreticalThickness = volume.divide(length, 10, RoundingMode.HALF_UP).divide(width, 10, RoundingMode.HALF_UP).multiply(new BigDecimal("1000"));
|
||||||
bo.setTheoreticalThickness(theoreticalThickness);
|
bo.setTheoreticalThickness(theoreticalThickness);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 计算理论长度
|
// 计算理论长度
|
||||||
if (bo.getTheoreticalLength() == null) {
|
BigDecimal theoreticalLength = volume.divide(thickness, 10, RoundingMode.HALF_UP).divide(width, 10, RoundingMode.HALF_UP).multiply(new BigDecimal("1000"));
|
||||||
BigDecimal theoreticalLength = volume.divide(thickness, 10, RoundingMode.HALF_UP).divide(width, 10, RoundingMode.HALF_UP).multiply(new BigDecimal("1000"));
|
bo.setTheoreticalLength(theoreticalLength);
|
||||||
bo.setTheoreticalLength(theoreticalLength);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("计算理论厚度/长度失败", e);
|
log.warn("计算理论厚度/长度失败", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user