Commit 4c76719f by 王祖波

cms迁移

parent ef90e984
......@@ -91,12 +91,10 @@ public class MaterialDataAdaptor {
if (result.get("data") == null) {
return null;
}
List<JSONObject> jsonObjects = JSON.parseArray(JSON.toJSONString(result.get("data")), JSONObject.class);
if (CollectionUtils.isEmpty(jsonObjects)) {
JSONObject jsonObject = DataApiUtils.getPageOne(result);
if (jsonObject.isEmpty()) {
return null;
}
JSONObject jsonObject = jsonObjects.get(0);
int useMatlNum = jsonObject.getIntValue("useMatlNum");
BigDecimal convSalesAmt = Optional.ofNullable(jsonObject.getBigDecimal("convSalesAmt")).orElse(BigDecimal.ZERO);
String amountUnit = "";
......@@ -138,11 +136,10 @@ public class MaterialDataAdaptor {
if (result.get("data") == null) {
return null;
}
List<JSONObject> jsonObjects = JSON.parseArray(JSON.toJSONString(result.get("data")), JSONObject.class);
if (CollectionUtils.isEmpty(jsonObjects)) {
JSONObject jsonObject = DataApiUtils.getPageOne(result);
if (jsonObject.isEmpty()) {
return null;
}
JSONObject jsonObject = jsonObjects.get(0);
BigDecimal dayAvgUseMatlNum = jsonObject.getBigDecimal("dayAvgUseMatlNum");
BigDecimal convSalesAmt = Optional.ofNullable(jsonObject.getBigDecimal("convSalesAmt")).orElse(BigDecimal.ZERO);
String amountUnit = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment