代码更新
This commit is contained in:
@@ -366,6 +366,7 @@ public class ProductplanSumServiceImpl implements ProductplanSumService {
|
||||
// 汇总相同物料的所需重量
|
||||
String material_id = jsonYF.getString("material_id");
|
||||
|
||||
// 如果map中不存在此物料则put,存在则取出更新数量
|
||||
if (resultMap.containsKey(material_id)) {
|
||||
JSONObject jsonObject = resultMap.get(material_id);
|
||||
BigDecimal allNum = NumberUtil.add(jsonObject.getString("num"), div.toString());
|
||||
@@ -376,7 +377,7 @@ public class ProductplanSumServiceImpl implements ProductplanSumService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 遍历map,将数据转化为数组
|
||||
for (String k : resultMap.keySet()) {
|
||||
JSONObject resultJson = resultMap.get(k);
|
||||
resultArr.add(resultJson);
|
||||
|
||||
Reference in New Issue
Block a user