diff --git a/src/main/java/com/spring/ifs/api/BomApi.java b/src/main/java/com/spring/ifs/api/BomApi.java index dc4d8afb..9739bb77 100644 --- a/src/main/java/com/spring/ifs/api/BomApi.java +++ b/src/main/java/com/spring/ifs/api/BomApi.java @@ -525,11 +525,29 @@ public class BomApi { tempItem.setPrintUnit(tempMap.get("UNITMEAS")); tempItem.setLineSequence(tempMap.get("LINE_SEQUENCE")); tempItem.setComponentPart(tempMap.get("COMPONENT_PART")); - tempItem.setQtyPerAssembly(tempMap.get("QTY_PER_ASSEMBLY")); + //处理字符串含有E 科学计数法 + String strQtyPerAssembly = tempMap.get("QTY_PER_ASSEMBLY"); + BigDecimal bigQtyPerAssembly = new BigDecimal(strQtyPerAssembly); + bigQtyPerAssembly = bigQtyPerAssembly.stripTrailingZeros(); + String formatterQtyPerAssembly = bigQtyPerAssembly.toPlainString(); + tempItem.setQtyPerAssembly(formatterQtyPerAssembly); + + String strComponentScrap= tempMap.get("COMPONENT_SCRAP"); + BigDecimal bigComponentScrap = new BigDecimal(strComponentScrap); + bigComponentScrap = bigComponentScrap.stripTrailingZeros(); + String formatterComponentScrap = bigComponentScrap.toPlainString(); + tempItem.setComponentScrap(formatterComponentScrap); + + String strShrinkageFactor= tempMap.get("SHRINKAGE_FACTOR"); + BigDecimal bigShrinkageFactor = new BigDecimal(strShrinkageFactor); + bigShrinkageFactor = bigShrinkageFactor.stripTrailingZeros(); + String formatterShrinkageFactor = bigShrinkageFactor.toPlainString(); + tempItem.setShrinkageFactor(formatterShrinkageFactor); + tempItem.setIssueType(tempMap.get("ISSUE_TYPE")); tempItem.setOperationNo(tempMap.get("OPERATION_NO")); - tempItem.setComponentScrap(tempMap.get("COMPONENT_SCRAP")); - tempItem.setShrinkageFactor(tempMap.get("SHRINKAGE_FACTOR")); + + //添加对象 resultItems.add(tempItem); }