Commit 252f053c by wancheng

生产下料计算总重,四舍五入bug修复

parent a73f08cd
...@@ -126,7 +126,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -126,7 +126,7 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = HPSC006.getNum(); BigDecimal num = HPSC006.getNum();
BigDecimal unitWt = HPSC006.getUnitWt(); BigDecimal unitWt = HPSC006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()));
HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick())); HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick()));
HPSC006.setProjCode(projCode); HPSC006.setProjCode(projCode);
HPSC006.setProjName(projName); HPSC006.setProjName(projName);
...@@ -183,7 +183,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -183,7 +183,7 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = HPSC006.getNum(); BigDecimal num = HPSC006.getNum();
BigDecimal unitWt = HPSC006.getUnitWt(); BigDecimal unitWt = HPSC006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()));
HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick())); HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick()));
HPSC006.setProjCode(projCode); HPSC006.setProjCode(projCode);
HPSC006.setProjName(projName); HPSC006.setProjName(projName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment