|
|
@@ -690,44 +690,46 @@ public class OrderItems extends Controller {
|
|
|
RowsMap itempriceRowsMap = itempriceRows.toRowsMap("itemno");
|
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
- if (siteid.equalsIgnoreCase("lsa")) {
|
|
|
- JSONObject object = new JSONObject();
|
|
|
- object.put("classname", "getIcinvbal");
|
|
|
- object.put("method", "getMsg");
|
|
|
-
|
|
|
- JSONObject content = new JSONObject();
|
|
|
- content.put("fitemnos", rows.toJsonArray("itemno"));
|
|
|
- object.put("content", content);
|
|
|
-
|
|
|
- WebRequest request = new WebRequest();
|
|
|
- String result = request.doPost(object.toString(),
|
|
|
- "http://60.190.151.198:8089/BYESB/jaxrs/webclientrest");
|
|
|
- if (isJSONArray(result)) {
|
|
|
- jsonArray = JSONArray.parseArray(result);
|
|
|
- }
|
|
|
- for (Object obj : jsonArray) {
|
|
|
- JSONObject jsonObject = (JSONObject) obj;
|
|
|
- if (rowsMap.containsKey(jsonObject.getString("fitemno"))) {
|
|
|
- if (rowsMap.get(jsonObject.getString("fitemno")).isNotEmpty()) {
|
|
|
- rowsMap.get(jsonObject.getString("fitemno")).get(0).put("invbalqty", jsonObject.getBigDecimalValue("FQty"));
|
|
|
- }
|
|
|
+ if(content.getLongValue("onlyquery")==0){
|
|
|
+ if (siteid.equalsIgnoreCase("lsa")) {
|
|
|
+ JSONObject object = new JSONObject();
|
|
|
+ object.put("classname", "getIcinvbal");
|
|
|
+ object.put("method", "getMsg");
|
|
|
+
|
|
|
+ JSONObject content = new JSONObject();
|
|
|
+ content.put("fitemnos", rows.toJsonArray("itemno"));
|
|
|
+ object.put("content", content);
|
|
|
+
|
|
|
+ WebRequest request = new WebRequest();
|
|
|
+ String result = request.doPost(object.toString(),
|
|
|
+ "http://60.190.151.198:8089/BYESB/jaxrs/webclientrest");
|
|
|
+ if (isJSONArray(result)) {
|
|
|
+ jsonArray = JSONArray.parseArray(result);
|
|
|
}
|
|
|
- }
|
|
|
- } else {
|
|
|
- ERPDocking erpDocking = new ERPDocking(siteid);
|
|
|
- if (rows.toJsonArray("itemno").size() != 0) {
|
|
|
- if (Parameter.get("system.ccerp_dockswitch").equalsIgnoreCase("true")) {
|
|
|
- jsonArray = erpDocking.getErpIcinvbalRows(1000, 1, rows.toJsonArray("itemno"));
|
|
|
- }
|
|
|
- }
|
|
|
- if (!jsonArray.isEmpty()) {
|
|
|
- for (Object object : jsonArray) {
|
|
|
- JSONObject jsonObject = (JSONObject) object;
|
|
|
+ for (Object obj : jsonArray) {
|
|
|
+ JSONObject jsonObject = (JSONObject) obj;
|
|
|
if (rowsMap.containsKey(jsonObject.getString("fitemno"))) {
|
|
|
if (rowsMap.get(jsonObject.getString("fitemno")).isNotEmpty()) {
|
|
|
- for (Row row : rowsMap.get(jsonObject.getString("fitemno"))
|
|
|
- ) {
|
|
|
- row.put("invbalqty", jsonObject.getBigDecimalValue("fqty"));
|
|
|
+ rowsMap.get(jsonObject.getString("fitemno")).get(0).put("invbalqty", jsonObject.getBigDecimalValue("FQty"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ERPDocking erpDocking = new ERPDocking(siteid);
|
|
|
+ if (rows.toJsonArray("itemno").size() != 0) {
|
|
|
+ if (Parameter.get("system.ccerp_dockswitch").equalsIgnoreCase("true")) {
|
|
|
+ jsonArray = erpDocking.getErpIcinvbalRows(1000, 1, rows.toJsonArray("itemno"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!jsonArray.isEmpty()) {
|
|
|
+ for (Object object : jsonArray) {
|
|
|
+ JSONObject jsonObject = (JSONObject) object;
|
|
|
+ if (rowsMap.containsKey(jsonObject.getString("fitemno"))) {
|
|
|
+ if (rowsMap.get(jsonObject.getString("fitemno")).isNotEmpty()) {
|
|
|
+ for (Row row : rowsMap.get(jsonObject.getString("fitemno"))
|
|
|
+ ) {
|
|
|
+ row.put("invbalqty", jsonObject.getBigDecimalValue("fqty"));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -736,6 +738,7 @@ public class OrderItems extends Controller {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
//查询附件
|
|
|
RowsMap attinfoRowsMap = getAttachmentUrl("plm_item", ids);
|
|
|
for (Row row : rows) {
|