|
|
@@ -1,23 +1,5 @@
|
|
|
package com.uas.platform.b2b.controller;
|
|
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.http.HttpStatus;
|
|
|
-import org.springframework.http.ResponseEntity;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.ui.ModelMap;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
-
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.platform.b2b.model.SaleQuotationAll;
|
|
|
@@ -42,6 +24,19 @@ import com.uas.search.b2b.model.SPage;
|
|
|
import com.uas.search.b2b.model.Sort;
|
|
|
import com.uas.search.b2b.model.Sort.Type;
|
|
|
import com.uas.search.b2b.util.SearchConstants;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.ui.ModelMap;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
+
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 卖家主动报价
|
|
|
@@ -98,7 +93,7 @@ public class SaleQuotationController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 作为卖家,查看自己的主动报价(已提交)
|
|
|
+ * 作为卖家,查看自己的主动报价(已报价)
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|
|
|
@@ -106,7 +101,7 @@ public class SaleQuotationController {
|
|
|
@RequestMapping(params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
public SPage<SaleQuotationDone> getSubmitedQuotationItems(PageParams params, String searchFilter) {
|
|
|
- logger.log("主动报价单", "查看主动报价单-已提交");
|
|
|
+ logger.log("主动报价单", "查看主动报价单-已报价");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
@@ -118,13 +113,11 @@ public class SaleQuotationController {
|
|
|
}
|
|
|
if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
List<Object> list = new ArrayList<>();
|
|
|
- for (Object object : filter.getDistribute()) {
|
|
|
- list.add(object);
|
|
|
- }
|
|
|
+ list.addAll(filter.getDistribute());
|
|
|
pageParams.getFilters().put("qu_custuu", new MultiValue(list, true));
|
|
|
}
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
- map.put("qu_overdue", Constant.NO); // 未过报价截至有效期
|
|
|
+ map.put("qu_overdue", Constant.YES); // 未过报价截至有效期
|
|
|
pageParams.setNotEqualFilters(map);
|
|
|
pageParams.getFilters().put("qu_status", Status.SUBMITTED.value());
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
@@ -154,13 +147,11 @@ public class SaleQuotationController {
|
|
|
}
|
|
|
if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
List<Object> list = new ArrayList<>();
|
|
|
- for (Object object : filter.getDistribute()) {
|
|
|
- list.add(object);
|
|
|
- }
|
|
|
+ list.addAll(filter.getDistribute());
|
|
|
pageParams.getFilters().put("qu_custuu", new MultiValue(list, true));
|
|
|
}
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
- map.put("qu_overdue", Constant.NO); // 未过报价截至有效期
|
|
|
+ map.put("qu_overdue", Constant.YES); // 未过报价截至有效期
|
|
|
pageParams.setNotEqualFilters(map);
|
|
|
pageParams.getFilters().put("qu_agreed", Constant.YES);
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
@@ -190,13 +181,11 @@ public class SaleQuotationController {
|
|
|
}
|
|
|
if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
List<Object> list = new ArrayList<>();
|
|
|
- for (Object object : filter.getDistribute()) {
|
|
|
- list.add(object);
|
|
|
- }
|
|
|
+ list.addAll(filter.getDistribute());
|
|
|
pageParams.getFilters().put("qu_custuu", new MultiValue(list, true));
|
|
|
}
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
- map.put("qu_overdue", Constant.NO); // 未过报价截至有效期
|
|
|
+ map.put("qu_overdue", Constant.YES); // 未过报价截至有效期
|
|
|
pageParams.setNotEqualFilters(map);
|
|
|
pageParams.getFilters().put("qu_agreed", Constant.NO);
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
@@ -226,9 +215,7 @@ public class SaleQuotationController {
|
|
|
}
|
|
|
if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
List<Object> list = new ArrayList<>();
|
|
|
- for (Object object : filter.getDistribute()) {
|
|
|
- list.add(object);
|
|
|
- }
|
|
|
+ list.addAll(filter.getDistribute());
|
|
|
pageParams.getFilters().put("qu_custuu", new MultiValue(list, true));
|
|
|
}
|
|
|
pageParams.getFilters().put("qu_status", Status.INPUTTING.value());
|
|
|
@@ -453,7 +440,6 @@ public class SaleQuotationController {
|
|
|
* 作为卖家,主动报价
|
|
|
*
|
|
|
* @param json
|
|
|
- * @param inquiryItemId
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(method = RequestMethod.POST)
|
|
|
@@ -470,8 +456,7 @@ public class SaleQuotationController {
|
|
|
/**
|
|
|
* 作为卖家,获取主动报价明细
|
|
|
*
|
|
|
- * @param json
|
|
|
- * @param inquiryItemId
|
|
|
+ * @param id
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/item/{id}", method = RequestMethod.GET)
|