提交 f9d5be0c authored 作者: inroi's avatar inroi

微调

上级 31e6999a
......@@ -118,9 +118,9 @@ public class BillOfMaterialKingDeeApi {
List<Map<String, Object>> tempList = this.tree(list, code);
if (!CollectionUtils.isEmpty(tempList)) {
tempList.add(list.stream().filter(m -> code.equals(String.valueOf(m.get("mtrl_code")))).findFirst().orElse(new HashMap<>()));
int tnQty = Integer.parseInt(String.valueOf(map.get("tn_qty")));
double tnQty = Double.parseDouble(String.valueOf(map.get("tn_qty")));
int tnQtyTotal = tempList.stream().mapToInt(m -> Integer.parseInt(String.valueOf(m.get("tn_qty")))).sum();
String ratio = Double.toString(((double) tnQty / tnQtyTotal));
String ratio = Double.toString((tnQty / tnQtyTotal));
BigDecimal value = new BigDecimal(ratio).setScale(6, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
fEntityMap.put("FUseRate", value);
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论