Browse Source

ERP主动报价单提交后状态同步到平台

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@10791 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 years ago
parent
commit
0c8454afe0

+ 24 - 10
src/main/java/com/uas/platform/b2b/erp/controller/InquiryDownController.java

@@ -1,12 +1,9 @@
 package com.uas.platform.b2b.erp.controller;
 
-import com.uas.platform.b2b.erp.model.Inquiry;
-import com.uas.platform.b2b.erp.model.InquiryDecide;
-import com.uas.platform.b2b.erp.service.InquiryService;
-import com.uas.platform.b2b.erp.support.ErpBufferedLogger;
-import com.uas.platform.b2b.service.SaleQuotationService;
-import com.uas.platform.core.logging.BufferedLoggerManager;
-import com.uas.platform.core.util.serializer.FlexJsonUtils;
+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;
@@ -14,9 +11,14 @@ 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;
+import com.uas.platform.b2b.erp.model.Inquiry;
+import com.uas.platform.b2b.erp.model.InquiryDecide;
+import com.uas.platform.b2b.erp.service.InquiryService;
+import com.uas.platform.b2b.erp.support.ErpBufferedLogger;
+import com.uas.platform.b2b.service.SaleQuotationService;
+import com.uas.platform.core.logging.BufferedLoggerManager;
+import com.uas.platform.core.util.ArrayUtils;
+import com.uas.platform.core.util.serializer.FlexJsonUtils;
 
 /**
  * 对买家ERP的数据接口<br>
@@ -93,4 +95,16 @@ public class InquiryDownController {
 		logger.log("主动报价单", "修改主动报价单的状态", decides.size());
 	}
 
+	/**
+	 * 买家在收到报价信息后,点击提交按钮后,状态传至平台
+	 * 
+	 * @param data
+	 * @throws UnsupportedEncodingException
+	 */
+	@RequestMapping(value = "/checking", method = RequestMethod.POST)
+	@ResponseBody
+	public void checkInquiry(@RequestParam("data") String data) throws UnsupportedEncodingException {
+		saleQuotationService
+				.check(ArrayUtils.convertStringToNumberArray(URLDecoder.decode(data, "UTF-8"), Long.class));
+	}
 }