|
|
@@ -5,6 +5,7 @@ import beans.datacontrllog.DataContrlLog;
|
|
|
import beans.invbal.Invbal;
|
|
|
import beans.itemclass.ItemClass;
|
|
|
import beans.itemgroup.Itemgroup;
|
|
|
+import beans.parameter.Parameter;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import common.Controller;
|
|
|
@@ -19,6 +20,7 @@ import org.apache.poi.ss.usermodel.DataFormat;
|
|
|
import org.apache.poi.xssf.usermodel.*;
|
|
|
import restcontroller.R;
|
|
|
import restcontroller.webmanage.sale.itemgroup.itemgroup;
|
|
|
+import utility.ERPDocking;
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
@@ -280,6 +282,25 @@ public class Item extends Controller {
|
|
|
// 商品领域
|
|
|
RowsMap tradefieldRowsMap = beans.Item.Item.getTradefieldRowsMap(this, itemids);
|
|
|
|
|
|
+ ERPDocking erpDocking = new ERPDocking();
|
|
|
+ JSONArray jsonArray =new JSONArray();
|
|
|
+ if (Parameter.get("system.ccerp_dockswitch").equalsIgnoreCase("true")) {
|
|
|
+ if(!rows.toJsonArray("itemno").isEmpty()){
|
|
|
+ jsonArray=erpDocking.getErpIcinvbalRows(200000, 1,rows.toJsonArray("itemno"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!jsonArray.isEmpty()){
|
|
|
+ for (Object object:jsonArray) {
|
|
|
+ JSONObject jsonObject =(JSONObject)object;
|
|
|
+ if(!rows.isEmpty()){
|
|
|
+ if(rows.get(0).getString("itemno").equals(jsonObject.getString("fitemno"))){
|
|
|
+ rows.get(0).put("invbal_qty", jsonObject.getBigDecimalValue("fqty"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
for (Row row : rows) {
|
|
|
if (attRowsMap.getOrDefault(row.getString("itemid"), new Rows()).isEmpty()) {
|
|
|
row.put("attinfos", defaultImageRows);
|