|
|
@@ -18,11 +18,13 @@ import com.uas.platform.b2b.erp.model.SaleSampleSend;
|
|
|
import com.uas.platform.b2b.erp.service.InquiryService;
|
|
|
import com.uas.platform.b2b.erp.service.PurchaseSampleService;
|
|
|
import com.uas.platform.b2b.erp.service.SaleSampleDownService;
|
|
|
+import com.uas.platform.b2b.erp.support.ErpBufferedLogger;
|
|
|
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.PurchaseInquiryService;
|
|
|
import com.uas.platform.b2b.service.PurchaseProofingService;
|
|
|
+import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
|
|
|
/**
|
|
|
@@ -54,6 +56,8 @@ public class ProductSampleController {
|
|
|
@Autowired
|
|
|
private SaleSampleDownService saleSampleDownService;
|
|
|
|
|
|
+ private final static ErpBufferedLogger logger = BufferedLoggerManager.getLogger(ErpBufferedLogger.class);
|
|
|
+
|
|
|
/**
|
|
|
* 将买家ERP的打样申请写到平台
|
|
|
*
|
|
|
@@ -67,6 +71,7 @@ public class ProductSampleController {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
List<ProductSample> productSamples = FlexJsonUtils.fromJsonArray(jsonStr, ProductSample.class);
|
|
|
purchaseProofingService.save(purchaseSampleService.convertProofing(productSamples));
|
|
|
+ logger.log("打样申请", "买家上传打样申请", productSamples.size());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -81,6 +86,7 @@ public class ProductSampleController {
|
|
|
Map<String, Map<String, Object>> fileList = FlexJsonUtils.fromJson(jsonStr);
|
|
|
List<Attach> attachs = attachService.uploadZipAndSave(uploadItem, "purchaseProofing", "客户打样申请单附件", fileList);
|
|
|
purchaseProofingService.saveAttach(attachs);
|
|
|
+ logger.log("打样申请", "买家上传打样申请附件", attachs.size());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -95,6 +101,7 @@ public class ProductSampleController {
|
|
|
Map<String, Map<String, Object>> fileList = FlexJsonUtils.fromJson(jsonStr);
|
|
|
List<Attach> attachs = attachService.uploadZipAndSave(uploadItem, "purchaseApproval", "客户送样认定单附件", fileList);
|
|
|
purchaseProofingService.saveApprovalAttach(attachs);
|
|
|
+ logger.log("认定单", "买家上传认定单附件", attachs.size());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -109,6 +116,7 @@ public class ProductSampleController {
|
|
|
Map<String, Map<String, Object>> fileList = FlexJsonUtils.fromJson(jsonStr);
|
|
|
List<Attach> attachs = attachService.uploadZipAndSave(uploadItem, "purchaseApproval", "客户送样认定单附件", fileList);
|
|
|
purchaseProofingService.saveApprovalPrdattach(attachs);
|
|
|
+ logger.log("认定单", "买家上传认定单prd附件", attachs.size());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -123,6 +131,7 @@ public class ProductSampleController {
|
|
|
Map<String, Map<String, Object>> fileList = FlexJsonUtils.fromJson(jsonStr);
|
|
|
List<Attach> attachs = attachService.uploadZipAndSave(uploadItem, "purchaseApproval", "客户送样认定单附件", fileList);
|
|
|
purchaseProofingService.saveApprovalPadattach(attachs);
|
|
|
+ logger.log("认定单", "买家上传认定单pad附件", attachs.size());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -137,6 +146,7 @@ public class ProductSampleController {
|
|
|
Map<String, Map<String, Object>> fileList = FlexJsonUtils.fromJson(jsonStr);
|
|
|
List<Attach> attachs = attachService.uploadZipAndSave(uploadItem, "purchaseApproval", "客户送样认定单附件", fileList);
|
|
|
purchaseProofingService.saveApprovalPpdattach(attachs);
|
|
|
+ logger.log("认定单", "买家上传认定单ppd附件", attachs.size());
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -176,6 +186,7 @@ public class ProductSampleController {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
List<ProductSampleApproval> sampleApprovals = FlexJsonUtils.fromJsonArray(jsonStr, ProductSampleApproval.class);
|
|
|
purchaseProofingService.saveSampleApproval(purchaseSampleService.convertApproval(sampleApprovals));
|
|
|
+ logger.log("认定单", "买家上传认定单", sampleApprovals.size());
|
|
|
}
|
|
|
|
|
|
}
|