|
|
@@ -21,10 +21,10 @@ import org.apache.poi.ss.usermodel.DataFormat;
|
|
|
import org.apache.poi.xssf.usermodel.*;
|
|
|
import restcontroller.R;
|
|
|
import restcontroller.webmanage.sale.itemgroup.itemgroup;
|
|
|
+import sun.plugin2.main.client.MessagePassingOneWayJSObject;
|
|
|
import utility.ERPDocking;
|
|
|
import utility.tools.WebRequest;
|
|
|
|
|
|
-
|
|
|
import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
@@ -321,11 +321,14 @@ public class Item extends Controller {
|
|
|
content.put("fitemnos", rows.toJsonArray("itemno"));
|
|
|
object.put("content", content);
|
|
|
|
|
|
- WebRequest request = new WebRequest();
|
|
|
+ WebRequest request = new WebRequest();
|
|
|
String result = request.doPost(object.toString(),
|
|
|
"http://60.190.151.198:8092/BYESB/jaxrs/webclientrest");
|
|
|
for (Row row : rows) {
|
|
|
- JSONArray jsonArrayResult = JSONArray.parseArray(result);
|
|
|
+ JSONArray jsonArrayResult = new JSONArray();
|
|
|
+ if(isJSONArray(result)){
|
|
|
+ jsonArrayResult = JSONArray.parseArray(result);
|
|
|
+ }
|
|
|
if(!jsonArrayResult.isEmpty()){
|
|
|
row.put("invbal_qty",((JSONObject)jsonArrayResult.get(0)).getBigDecimal("FQty"));
|
|
|
}else{
|