|
|
@ -7,8 +7,10 @@ import com.spring.ifs.data.BomItem; |
|
|
import com.spring.ifs.utils.IfsConverterToMap; |
|
|
import com.spring.ifs.utils.IfsConverterToMap; |
|
|
import com.spring.ifs.utils.IfsPlsqlUtils; |
|
|
import com.spring.ifs.utils.IfsPlsqlUtils; |
|
|
import com.spring.modules.base.utils.DateUtils; |
|
|
import com.spring.modules.base.utils.DateUtils; |
|
|
|
|
|
import com.spring.modules.part.entity.APIEntity.BomIfsItem; |
|
|
import ifs.fnd.ap.*; |
|
|
import ifs.fnd.ap.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -510,14 +512,38 @@ public class BomApiTest { |
|
|
tempItem.setEngChgLevel(tempMap.get("ENG_CHG_LEVEL")); |
|
|
tempItem.setEngChgLevel(tempMap.get("ENG_CHG_LEVEL")); |
|
|
tempItem.setBomType(tempMap.get("BOM_TYPE")); |
|
|
tempItem.setBomType(tempMap.get("BOM_TYPE")); |
|
|
tempItem.setAlternativeNo(tempMap.get("ALTERNATIVE_NO")); |
|
|
tempItem.setAlternativeNo(tempMap.get("ALTERNATIVE_NO")); |
|
|
tempItem.setLineItemNo(tempMap.get("LINE_ITEM_NO")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BigDecimal itemValue = new BigDecimal(tempMap.get("LINE_ITEM_NO")); |
|
|
|
|
|
itemValue = itemValue.setScale(0, BigDecimal.ROUND_HALF_UP); |
|
|
|
|
|
itemValue = itemValue.stripTrailingZeros(); |
|
|
|
|
|
String formatterValue = itemValue.toPlainString(); |
|
|
|
|
|
tempItem.setLineItemNo(formatterValue); |
|
|
|
|
|
tempItem.setNoteText(tempMap.get("NOTE_TEXT")); |
|
|
|
|
|
tempItem.setConsumptionItem(tempMap.get("CONSUMPTION_ITEM")); |
|
|
|
|
|
//tempItem.se(tempMap.get("UNITMEAS")); |
|
|
tempItem.setLineSequence(tempMap.get("LINE_SEQUENCE")); |
|
|
tempItem.setLineSequence(tempMap.get("LINE_SEQUENCE")); |
|
|
tempItem.setComponentPart(tempMap.get("COMPONENT_PART")); |
|
|
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.setIssueType(tempMap.get("ISSUE_TYPE")); |
|
|
tempItem.setOperationNo(tempMap.get("OPERATION_NO")); |
|
|
tempItem.setOperationNo(tempMap.get("OPERATION_NO")); |
|
|
tempItem.setComponentScrap(tempMap.get("COMPONENT_SCRAP")); |
|
|
|
|
|
tempItem.setShrinkageFactor(tempMap.get("SHRINKAGE_FACTOR")); |
|
|
|
|
|
//添加对象 |
|
|
//添加对象 |
|
|
resultItems.add(tempItem); |
|
|
resultItems.add(tempItem); |
|
|
} |
|
|
} |
|
|
|