Merge branch '0.8.X' of http://49.232.154.205:10100/DeXun/klp-oa into 0.8.X
This commit is contained in:
@@ -1089,15 +1089,15 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
BigDecimal volume = weight.multiply(new BigDecimal("1000")).divide(new BigDecimal("7.85"), 10, RoundingMode.HALF_UP);
|
BigDecimal volume = weight.multiply(new BigDecimal("1000")).divide(new BigDecimal("7.85"), 10, RoundingMode.HALF_UP);
|
||||||
|
|
||||||
// 计算理论厚度(需要实测长度)
|
// 计算理论厚度(需要实测长度)
|
||||||
if (bo.getTheoreticalThickness() == null && bo.getActualLength() != null) {
|
if (bo.getTheoreticalThickness() == null && bo.getActualLength() != null && bo.getActualWidth().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
BigDecimal length = new BigDecimal(bo.getActualLength());
|
BigDecimal length = new BigDecimal(bo.getActualLength());
|
||||||
BigDecimal theoreticalThickness = volume.divide(length, 10, RoundingMode.HALF_UP).divide(width, 3, RoundingMode.HALF_UP).divide(new BigDecimal("1000"), 3, RoundingMode.HALF_UP);
|
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) {
|
if (bo.getTheoreticalLength() == null) {
|
||||||
BigDecimal theoreticalLength = volume.divide(thickness, 10, RoundingMode.HALF_UP).divide(width, 10, RoundingMode.HALF_UP).divide(new BigDecimal("1000"), 3, RoundingMode.HALF_UP);
|
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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user