代码更新

This commit is contained in:
2022-08-02 16:29:49 +08:00
parent 4a604e8661
commit ceddc0cdc5

View File

@@ -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);