|
|
@@ -123,7 +123,7 @@ public class SaleQuotationController {
|
|
|
pageParams.getFilters().put("qu_custuu", new MultiValue(list, true));
|
|
|
}
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
- map.put("qu_overdue", Constant.YES); // 未过报价截至有效期
|
|
|
+ map.put("qu_overdue", Constant.NO); // 未过报价截至有效期
|
|
|
pageParams.setNotEqualFilters(map);
|
|
|
pageParams.getFilters().put("qu_status", Status.SUBMITTED.value());
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
@@ -132,6 +132,80 @@ public class SaleQuotationController {
|
|
|
return searchService.searchSaleQuotationIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 作为卖家,查看自己的主动报价(已同意)
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(params = RequestState.AGREED, method = RequestMethod.GET)
|
|
|
+ @ResponseBody
|
|
|
+ public SPage<SaleQuotationAll> getAgreedQuotationItems(PageParams params, String searchFilter) {
|
|
|
+ logger.log("主动报价单", "查看主动报价单-已同意");
|
|
|
+ JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
+ String keyword = jsonObject.getString("keyword");
|
|
|
+ com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
+ // 当前登录企业作为供应商
|
|
|
+ pageParams.getFilters().put("qu_enuu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ SearchFilter filter = userService.distribute();
|
|
|
+ if (filter != null && filter.getDistribute() == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
+ List<Object> list = new ArrayList<>();
|
|
|
+ for (Object object : filter.getDistribute()) {
|
|
|
+ list.add(object);
|
|
|
+ }
|
|
|
+ pageParams.getFilters().put("qu_custuu", new MultiValue(list, true));
|
|
|
+ }
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
+ map.put("qu_overdue", Constant.NO); // 未过报价截至有效期
|
|
|
+ pageParams.setNotEqualFilters(map);
|
|
|
+ pageParams.getFilters().put("qu_status", Status.SUBMITTED.value());
|
|
|
+ pageParams.getFilters().put("qu_agreed", Constant.YES);
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("qu_id", false, Type.LONG, new Long(1)));
|
|
|
+ pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
+ return searchService.searchSaleQuotationIds(keyword, pageParams);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 作为卖家,查看自己的主动报价(不同意)
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(params = RequestState.REFUSED, method = RequestMethod.GET)
|
|
|
+ @ResponseBody
|
|
|
+ public SPage<SaleQuotationAll> getRefusedQuotationItems(PageParams params, String searchFilter) {
|
|
|
+ logger.log("主动报价单", "查看主动报价单-不同意");
|
|
|
+ JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
+ String keyword = jsonObject.getString("keyword");
|
|
|
+ com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
+ // 当前登录企业作为供应商
|
|
|
+ pageParams.getFilters().put("qu_enuu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ SearchFilter filter = userService.distribute();
|
|
|
+ if (filter != null && filter.getDistribute() == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
+ List<Object> list = new ArrayList<>();
|
|
|
+ for (Object object : filter.getDistribute()) {
|
|
|
+ list.add(object);
|
|
|
+ }
|
|
|
+ pageParams.getFilters().put("qu_custuu", new MultiValue(list, true));
|
|
|
+ }
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
+ map.put("qu_overdue", Constant.NO); // 未过报价截至有效期
|
|
|
+ pageParams.setNotEqualFilters(map);
|
|
|
+ pageParams.getFilters().put("qu_status", Status.SUBMITTED.value());
|
|
|
+ pageParams.getFilters().put("qu_agreed", Constant.NO);
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("qu_id", false, Type.LONG, new Long(1)));
|
|
|
+ pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
+ return searchService.searchSaleQuotationIds(keyword, pageParams);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 作为卖家,查看自己的主动报价(未提交)
|
|
|
*
|
|
|
@@ -254,6 +328,69 @@ public class SaleQuotationController {
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
pageInfo.filter("status", Status.SUBMITTED.value());
|
|
|
+ pageInfo.filter("overdue", Constant.NO);
|
|
|
+ return saleQuotationService.findAllDetailByPageInfo(pageInfo, null, filter);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 作为卖家,查看自己的主动报价单(已同意)
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/info", params = RequestState.AGREED, method = RequestMethod.GET)
|
|
|
+ @ResponseBody
|
|
|
+ public SPage<SaleQuotationAll> getSalQuotationInfoAgreed(PageParams params, String searchFilter) {
|
|
|
+ logger.log("主动报价单", "查看主动报价单-已同意");
|
|
|
+ // 当前登录企业作为供应商
|
|
|
+ SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
+ SearchFilter disfilter = userService.distribute();
|
|
|
+ if (disfilter != null && disfilter.getDistribute() == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ if (disfilter != null && !CollectionUtils.isEmpty(disfilter.getDistribute())) {
|
|
|
+ List<Object> list = new ArrayList<>();
|
|
|
+ for (Object object : disfilter.getDistribute()) {
|
|
|
+ list.add(object);
|
|
|
+ }
|
|
|
+ filter.setDistribute(list);
|
|
|
+ }
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
+ pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ pageInfo.filter("status", Status.SUBMITTED.value());
|
|
|
+ pageInfo.filter("agreed", Constant.YES);
|
|
|
+ pageInfo.filter("overdue", Constant.NO);
|
|
|
+ return saleQuotationService.findAllDetailByPageInfo(pageInfo, null, filter);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 作为卖家,查看自己的主动报价单(不同意)
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/info", params = RequestState.REFUSED, method = RequestMethod.GET)
|
|
|
+ @ResponseBody
|
|
|
+ public SPage<SaleQuotationAll> getSalQuotationInfoRefused(PageParams params, String searchFilter) {
|
|
|
+ logger.log("主动报价单", "查看主动报价单-已同意");
|
|
|
+ // 当前登录企业作为供应商
|
|
|
+ SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
+ SearchFilter disfilter = userService.distribute();
|
|
|
+ if (disfilter != null && disfilter.getDistribute() == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ if (disfilter != null && !CollectionUtils.isEmpty(disfilter.getDistribute())) {
|
|
|
+ List<Object> list = new ArrayList<>();
|
|
|
+ for (Object object : disfilter.getDistribute()) {
|
|
|
+ list.add(object);
|
|
|
+ }
|
|
|
+ filter.setDistribute(list);
|
|
|
+ }
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
+ pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ pageInfo.filter("status", Status.SUBMITTED.value());
|
|
|
+ pageInfo.filter("agreed", Constant.NO);
|
|
|
+ pageInfo.filter("overdue", Constant.NO);
|
|
|
return saleQuotationService.findAllDetailByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
@@ -287,6 +424,7 @@ public class SaleQuotationController {
|
|
|
return saleQuotationService.findAllDetailByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 作为卖家,查看自己的主动报价单(全部)
|
|
|
*
|