|
|
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import com.uas.platform.b2b.erp.model.QuotationDown;
|
|
|
import com.uas.platform.b2b.erp.service.QuotationDownService;
|
|
|
import com.uas.platform.b2b.service.PurchaseInquiryService;
|
|
|
+import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
|
|
|
/**
|
|
|
* 对卖家ERP的数据接口
|
|
|
@@ -22,7 +23,7 @@ import com.uas.platform.b2b.service.PurchaseInquiryService;
|
|
|
*
|
|
|
*/
|
|
|
@Controller
|
|
|
-@RequestMapping("/erp/sale/quotation")
|
|
|
+@RequestMapping("/erp/sale/inquiry")
|
|
|
public class QuotationDownController {
|
|
|
|
|
|
@Autowired
|
|
|
@@ -54,4 +55,19 @@ public class QuotationDownController {
|
|
|
purchaseInquiryService.onQuotationDownSuccess(URLDecoder.decode(data, "UTF-8").split(","));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 将卖家ERP的报价信息写到平台
|
|
|
+ *
|
|
|
+ * @param data
|
|
|
+ * @return
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/reply", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public void saveQuotationReplies(@RequestParam("data") String data) throws UnsupportedEncodingException {
|
|
|
+ String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
+ List<QuotationDown> downs = FlexJsonUtils.fromJsonArray(jsonStr, QuotationDown.class);
|
|
|
+ purchaseInquiryService.reply(downs);
|
|
|
+ }
|
|
|
+
|
|
|
}
|