|
|
@@ -1,16 +1,5 @@
|
|
|
package com.uas.platform.b2b.erp.controller;
|
|
|
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
-import java.net.URLDecoder;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-
|
|
|
import com.uas.platform.b2b.erp.model.PurchaseAPBill;
|
|
|
import com.uas.platform.b2b.erp.service.PurchaseAPBillService;
|
|
|
import com.uas.platform.b2b.erp.support.ErpBufferedLogger;
|
|
|
@@ -19,6 +8,16 @@ import com.uas.platform.b2b.service.ApbillAdjustmentService;
|
|
|
import com.uas.platform.b2b.service.PurchaseApBillService;
|
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
+import java.net.URLDecoder;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 对买家ERP的数据接口<br>
|
|
|
@@ -51,11 +50,12 @@ public class PurchaseAPBillController {
|
|
|
*/
|
|
|
@RequestMapping(method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public void saveApBills(@RequestParam("data") String data) throws UnsupportedEncodingException {
|
|
|
+ public List<PurchaseAPBill> saveApBills(@RequestParam("data") String data) throws UnsupportedEncodingException {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
List<PurchaseAPBill> purchaseAPBills = FlexJsonUtils.fromJsonArray(jsonStr, PurchaseAPBill.class);
|
|
|
purchaseApBillService.save(purchaseAPBillService.convertApBills(purchaseAPBills));
|
|
|
logger.log("采购变更单", "上传采购变更单", purchaseAPBills.size());
|
|
|
+ return purchaseAPBillService.getB2bId(purchaseAPBills);
|
|
|
}
|
|
|
|
|
|
/**
|