|
@@ -328,8 +328,9 @@ public class Item extends Controller {
|
|
|
object.put("content", content);
|
|
object.put("content", content);
|
|
|
|
|
|
|
|
WebRequest request = new WebRequest();
|
|
WebRequest request = new WebRequest();
|
|
|
- String result = request.doPost(object.toString(),
|
|
|
|
|
- "http://60.190.151.198:8089/BYESB/jaxrs/webclientrest");
|
|
|
|
|
|
|
+ String result ="";
|
|
|
|
|
+// String result = request.doPost(object.toString(),
|
|
|
|
|
+// "http://60.190.151.198:8089/BYESB/jaxrs/webclientrest");
|
|
|
for (Row row : rows) {
|
|
for (Row row : rows) {
|
|
|
JSONArray jsonArrayResult = new JSONArray();
|
|
JSONArray jsonArrayResult = new JSONArray();
|
|
|
if(isJSONArray(result)){
|
|
if(isJSONArray(result)){
|
|
@@ -353,6 +354,37 @@ public class Item extends Controller {
|
|
|
return getSucReturnObject().setData(rows.isNotEmpty() ? rows.get(0) : new Row()).toString();
|
|
return getSucReturnObject().setData(rows.isNotEmpty() ? rows.get(0) : new Row()).toString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @API(title = "货品档案库存查询", apiversion = R.ID20230913154803.v1.class)
|
|
|
|
|
+ public String queryInvbalQty() throws YosException {
|
|
|
|
|
+
|
|
|
|
|
+ Long itemid = content.getLong("itemid");
|
|
|
|
|
+ Rows rows = dbConnect.runSqlQuery("select itemno from plm_item where siteid='"+siteid+"' and itemid="+itemid);
|
|
|
|
|
+
|
|
|
|
|
+ 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");
|
|
|
|
|
+ for (Row row : rows) {
|
|
|
|
|
+ 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{
|
|
|
|
|
+ row.put("invbal_qty",0);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return getSucReturnObject().setData(rows.isNotEmpty() ? rows.get(0) : new Row()).toString();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@API(title = "货品档案列表", apiversion = R.ID20220923140602.v1.class)
|
|
@API(title = "货品档案列表", apiversion = R.ID20220923140602.v1.class)
|
|
|
@CACHEING
|
|
@CACHEING
|
|
|
public String queryList() throws YosException, IOException {
|
|
public String queryList() throws YosException, IOException {
|