|
|
@@ -2,7 +2,9 @@ package com.uas.platform.b2b.erp.controller;
|
|
|
|
|
|
import com.uas.platform.b2b.erp.model.Inquiry;
|
|
|
import com.uas.platform.b2b.erp.model.Purchase;
|
|
|
+import com.uas.platform.b2b.erp.model.PurchaseNotify;
|
|
|
import com.uas.platform.b2b.erp.service.InquiryService;
|
|
|
+import com.uas.platform.b2b.erp.service.PurchaseNotifyService;
|
|
|
import com.uas.platform.b2b.erp.service.PurchaseService;
|
|
|
import com.uas.platform.b2b.erp.support.ErpBufferedLogger;
|
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
@@ -32,6 +34,9 @@ public class CheckTransController {
|
|
|
@Autowired
|
|
|
private PurchaseService purchaseService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PurchaseNotifyService purchaseNotifyService;
|
|
|
+
|
|
|
private final static ErpBufferedLogger logger = BufferedLoggerManager.getLogger(ErpBufferedLogger.class);
|
|
|
|
|
|
/**
|
|
|
@@ -63,4 +68,19 @@ public class CheckTransController {
|
|
|
logger.log("单据传输检测", "采购订单", purchaseList.size());
|
|
|
return purchaseService.getB2bId(purchaseList);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过上传id查询平台送货提醒对应的id
|
|
|
+ *
|
|
|
+ * @param data 封装的id信息
|
|
|
+ * @return
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/notify", method = RequestMethod.POST)
|
|
|
+ public List<PurchaseNotify> getPurchaseNotifyB2bId(@RequestParam("data") String data) throws UnsupportedEncodingException {
|
|
|
+ String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
+ List<PurchaseNotify> notifyList = FlexJsonUtils.fromJsonArray(jsonStr, PurchaseNotify.class);
|
|
|
+ logger.log("单据传输检测", "送货提醒", notifyList.size());
|
|
|
+ return purchaseNotifyService.getB2bId(notifyList);
|
|
|
+ }
|
|
|
}
|