|
|
@@ -3,6 +3,7 @@ package com.uas.platform.b2b.erp.controller;
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
@@ -15,6 +16,9 @@ import com.uas.platform.b2b.erp.model.SaleSampleApproval;
|
|
|
import com.uas.platform.b2b.erp.model.SaleSampleDown;
|
|
|
import com.uas.platform.b2b.erp.model.SaleSampleSend;
|
|
|
import com.uas.platform.b2b.erp.service.SaleSampleDownService;
|
|
|
+import com.uas.platform.b2b.model.Attach;
|
|
|
+import com.uas.platform.b2b.model.FileUpload;
|
|
|
+import com.uas.platform.b2b.service.AttachService;
|
|
|
import com.uas.platform.b2b.service.PurchaseProofingService;
|
|
|
import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
|
|
|
@@ -35,6 +39,9 @@ public class SaleSampleDownController {
|
|
|
@Autowired
|
|
|
private PurchaseProofingService purchaseProofingService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private AttachService attachService;
|
|
|
+
|
|
|
/**
|
|
|
* 卖家ERP从平台获取客户送货提醒
|
|
|
*
|
|
|
@@ -96,6 +103,20 @@ public class SaleSampleDownController {
|
|
|
purchaseProofingService.backSampleSendSuccess(URLDecoder.decode(data, "UTF-8").split(","));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 卖家ERP的送样单附件
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/sampleSend/attach", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public void uploadApprovalPpdAttach(String data, FileUpload uploadItem) throws UnsupportedEncodingException {
|
|
|
+ String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
+ Map<String, Map<String, Object>> fileList = FlexJsonUtils.fromJson(jsonStr);
|
|
|
+ List<Attach> attachs = attachService.uploadZipAndSave(uploadItem, "purchaseProofing", "送样单附件", fileList);
|
|
|
+ purchaseProofingService.saveSendAttach(attachs);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 卖家ERP从平台获取在平台的送样认定单
|
|
|
*
|