|
|
@@ -34,10 +34,7 @@ import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -63,7 +60,7 @@ public class PublicInquiryController {
|
|
|
/**
|
|
|
* 将买家ERP的公共询价写到公共询价服务中心
|
|
|
*
|
|
|
- * @param data 封装的data
|
|
|
+ * @param inquiries 公共询价信息
|
|
|
* @param enuu 询价企业UU
|
|
|
* @param address 询价企业地址信息
|
|
|
* @return
|
|
|
@@ -71,10 +68,8 @@ public class PublicInquiryController {
|
|
|
*/
|
|
|
@HttpLog
|
|
|
@RequestMapping(method = RequestMethod.POST)
|
|
|
- public void saveInquiries(@RequestParam("data") String data, Long enuu, String address) throws NotFoundException, UnsupportedEncodingException {
|
|
|
- String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
+ public void saveInquiries(@RequestBody List<BatchInquiry> inquiries, Long enuu, String address) throws NotFoundException, UnsupportedEncodingException {
|
|
|
address = URLDecoder.decode(address, "UTF-8");
|
|
|
- List<BatchInquiry> inquiries = JSONObject.parseArray(jsonStr, BatchInquiry.class);
|
|
|
publicInquiryService.save(inquiries, enuu, address);
|
|
|
logger.log("公共询价", "ERP上传公共询价", "size: " + inquiries.size(), Constant.UU, enuu, InquirySource.ERP.name());
|
|
|
}
|
|
|
@@ -88,9 +83,7 @@ public class PublicInquiryController {
|
|
|
*/
|
|
|
@HttpLog
|
|
|
@RequestMapping(value = "/check", method = RequestMethod.POST)
|
|
|
- public void updateInquiryStatus(@RequestParam("data") String data, @RequestParam("enuu") Long enuu) throws UnsupportedEncodingException {
|
|
|
- String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
- List<BatchInquiry> inquiries = JSONObject.parseArray(jsonStr, BatchInquiry.class);
|
|
|
+ public void updateInquiryStatus(@RequestBody List<BatchInquiry> inquiries, Long enuu) throws UnsupportedEncodingException {
|
|
|
publicInquiryService.updateStatus(inquiries, enuu);
|
|
|
logger.log("公共询价", "ERP设置公共询价不能报价", "size: " + inquiries.size(), Constant.UU, enuu, InquirySource.ERP.name());
|
|
|
}
|
|
|
@@ -119,7 +112,7 @@ public class PublicInquiryController {
|
|
|
*/
|
|
|
@HttpLog
|
|
|
@RequestMapping(value = "/reply/back", method = RequestMethod.POST)
|
|
|
- public void onReplySuccess(@RequestParam("data") String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
+ public void onReplySuccess(@RequestBody String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
String[] idArray = URLDecoder.decode(data, "UTF-8").split(",");
|
|
|
logger.log("公共询价", "ERP获取报价信息返回id", "id: " + idArray, Constant.UU, enuu, InquirySource.ERP.name());
|
|
|
publicInquiryService.onReplyUploadSuccess(idArray);
|
|
|
@@ -133,9 +126,7 @@ public class PublicInquiryController {
|
|
|
*/
|
|
|
@HttpLog
|
|
|
@RequestMapping(value = "/checking", method = RequestMethod.POST)
|
|
|
- public void checkInquiry(@RequestParam("data") String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
- String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
- List<InquiryDetail> details = JSONObject.parseArray(jsonStr, InquiryDetail.class);
|
|
|
+ public void checkInquiry(@RequestBody List<InquiryDetail> details , Long enuu) throws UnsupportedEncodingException {
|
|
|
logger.log("公共询价", "ERP提交报价信息应用禁止报价", "size: " + details.size(), Constant.UU, enuu, InquirySource.ERP.name());
|
|
|
publicInquiryService.updateInquiryStatus(details, enuu);
|
|
|
}
|
|
|
@@ -148,9 +139,7 @@ public class PublicInquiryController {
|
|
|
*/
|
|
|
@HttpLog
|
|
|
@RequestMapping(value = "/reply/decide", method = RequestMethod.POST)
|
|
|
- public void onReplyDecide(@RequestParam("data") String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
- String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
- List<InquiryDecide> decides = JSONObject.parseArray(jsonStr, InquiryDecide.class);
|
|
|
+ public void onReplyDecide(@RequestBody List<InquiryDecide> decides, Long enuu) throws UnsupportedEncodingException {
|
|
|
logger.log("公共询价", "ERP针对供应报价信息进行(不)采纳操作", "size: " + decides.size(), Constant.UU, enuu, InquirySource.ERP.name());
|
|
|
publicInquiryService.onReplyDecide(decides, enuu);
|
|
|
}
|
|
|
@@ -164,9 +153,7 @@ public class PublicInquiryController {
|
|
|
*/
|
|
|
@HttpLog
|
|
|
@RequestMapping(value = "/invalid", method = RequestMethod.POST)
|
|
|
- public void onReplyInvalid(@RequestParam("data") String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
- String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
- List<Inquiry> inquiries = JSONObject.parseArray(jsonStr, Inquiry.class);
|
|
|
+ public void onReplyInvalid(@RequestBody List<Inquiry> inquiries, Long enuu) throws UnsupportedEncodingException {
|
|
|
logger.log("公共询价", "ERP作废公共询价单返回数据到公共服务", "size: " + inquiries.size(), Constant.UU, enuu, InquirySource.ERP.name());
|
|
|
publicInquiryService.onReplyInvalid(inquiries, enuu);
|
|
|
}
|