待上架查询修复
This commit is contained in:
parent
305dbedc8a
commit
1a806cd574
|
|
@ -74,6 +74,18 @@ public class PmReceiptNoticeOpPlugin extends AbstractOperationServicePlugIn {
|
||||||
|
|
||||||
JSONObject items = responseJson.getJSONObject("items");
|
JSONObject items = responseJson.getJSONObject("items");
|
||||||
if (null != items) {
|
if (null != items) {
|
||||||
|
Object item1 = items.get("item");
|
||||||
|
if (item1 instanceof JSONObject){
|
||||||
|
JSONObject item = items.getJSONObject("item");
|
||||||
|
String erpOrderLineNum = item.getString("erpOrderLineNum").replace("\"", "");//行号
|
||||||
|
int quantity = item.getIntValue("quantity");
|
||||||
|
if (result.containsKey(erpOrderLineNum)) {
|
||||||
|
int currentSum = result.get(erpOrderLineNum);
|
||||||
|
result.put(erpOrderLineNum, currentSum + quantity);
|
||||||
|
} else {
|
||||||
|
result.put(erpOrderLineNum, quantity);
|
||||||
|
}
|
||||||
|
} else if (item1 instanceof JSONArray) {
|
||||||
JSONArray jsonArray = items.getJSONArray("item");
|
JSONArray jsonArray = items.getJSONArray("item");
|
||||||
if (null != jsonArray && jsonArray.size() > 0) {
|
if (null != jsonArray && jsonArray.size() > 0) {
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
|
@ -88,6 +100,8 @@ public class PmReceiptNoticeOpPlugin extends AbstractOperationServicePlugIn {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue