|
|
@@ -3,9 +3,11 @@ package com.uas.platform.b2b.controller;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.platform.b2b.model.FileUpload;
|
|
|
+import com.uas.platform.b2b.model.PurchaseInquiryDetail;
|
|
|
import com.uas.platform.b2b.model.PurchaseInquiryItem;
|
|
|
import com.uas.platform.b2b.model.SearchFilter;
|
|
|
import com.uas.platform.b2b.search.SearchService;
|
|
|
+import com.uas.platform.b2b.service.PurchaseInquiryDetailService;
|
|
|
import com.uas.platform.b2b.service.PurchaseInquiryService;
|
|
|
import com.uas.platform.b2b.service.UserService;
|
|
|
import com.uas.platform.b2b.support.JxlsExcelView;
|
|
|
@@ -55,6 +57,9 @@ public class SaleInquiryController {
|
|
|
@Autowired
|
|
|
private PurchaseInquiryService purchaseInquiryService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PurchaseInquiryDetailService detailService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
|
|
|
@@ -79,7 +84,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getReceivedPurchaseInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getReceivedPurchaseInquiries(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "搜索查看收到的客户询价单列表(全部)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -100,7 +105,7 @@ public class SaleInquiryController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
- return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
|
|
|
+ return searchService.searchPurchaseInquiryDetailIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -111,7 +116,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.TODO, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getTodoInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getTodoInquiries(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "搜索查看收到的客户询价单(待报价)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -134,7 +139,7 @@ public class SaleInquiryController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
- return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
|
|
|
+ return searchService.searchPurchaseInquiryDetailIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -144,7 +149,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.END, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getEndInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getEndInquiries(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "搜索查看收到的客户询价单(已过期)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -170,7 +175,7 @@ public class SaleInquiryController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
- return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
|
|
|
+ return searchService.searchPurchaseInquiryDetailIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -181,7 +186,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getDoneInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getDoneInquiries(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "搜索查看收到的客户询价单(已报价)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -205,7 +210,7 @@ public class SaleInquiryController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
- return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
|
|
|
+ return searchService.searchPurchaseInquiryDetailIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -215,7 +220,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.INVALID, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getInvalidInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getInvalidInquiries(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "搜索查看收到的客户询价单(已失效)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -235,7 +240,7 @@ public class SaleInquiryController {
|
|
|
sortList.add(new Sort("id_id", false, Type.LONG, 1L));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
pageParams.getFilters().put("id_overdue", Constant.YES); // 已失效
|
|
|
- return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
|
|
|
+ return searchService.searchPurchaseInquiryDetailIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -246,7 +251,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.AGREED, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getAgreedInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getAgreedInquiries(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "搜索查看收到的客户询价单(已采纳)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -272,7 +277,7 @@ public class SaleInquiryController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
- return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
|
|
|
+ return searchService.searchPurchaseInquiryDetailIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -283,7 +288,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.REFUSED, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getRefusedInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getRefusedInquiries(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "搜索查看收到的客户询价单(未采纳)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -306,7 +311,7 @@ public class SaleInquiryController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
- return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
|
|
|
+ return searchService.searchPurchaseInquiryDetailIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -317,7 +322,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.TEAMS, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPublicInquiry(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPublicInquiry(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "搜索已转报价的公共询价单");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -339,7 +344,7 @@ public class SaleInquiryController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.LONG, new Long(1)));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
- return searchService.searchPurchaseInquiryItemIds(keyword, pageParams);
|
|
|
+ return searchService.searchPurchaseInquiryDetailIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -350,7 +355,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/nosearch", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPurchaseInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPurchaseInquiries(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(全部)");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
@@ -362,7 +367,7 @@ public class SaleInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -373,7 +378,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/nosearch", params = RequestState.TODO, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPurchaseInquiriesTodo(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPurchaseInquiriesTodo(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(待报价)");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("status", Status.NOT_REPLY.value());
|
|
|
@@ -386,7 +391,7 @@ public class SaleInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findTodoByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findTodoByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -397,7 +402,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/nosearch", params = RequestState.END, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPurchaseInquiriesEnd(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPurchaseInquiriesEnd(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(已过期)");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("overdue", Constant.YES);
|
|
|
@@ -411,7 +416,7 @@ public class SaleInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -422,10 +427,9 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/nosearch", params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPurchaseInquiriesDone(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPurchaseInquiriesDone(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(已报价)");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
-// pageInfo.filter("overdue", Constant.NO);
|
|
|
pageInfo.filter("status", Status.REPLIED.value());
|
|
|
pageInfo.filter("invalid", Constant.NO);
|
|
|
pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
@@ -438,7 +442,7 @@ public class SaleInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -449,7 +453,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/nosearch", params = RequestState.INVALID, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPurchaseInquiriesInvalid(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPurchaseInquiriesInvalid(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(已失效)");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
@@ -461,7 +465,7 @@ public class SaleInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findInvalidByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findInvalidByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -472,7 +476,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/nosearch", params = RequestState.REFUSED, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPurchaseInquiriesRefused(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPurchaseInquiriesRefused(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(未采纳)");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("agreed", Constant.NO);
|
|
|
@@ -487,7 +491,7 @@ public class SaleInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -498,7 +502,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/nosearch", params = RequestState.AGREED, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPurchaseInquiriesAgreed(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPurchaseInquiriesAgreed(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(已采纳)");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
@@ -513,7 +517,7 @@ public class SaleInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -524,7 +528,7 @@ public class SaleInquiryController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/nosearch", params = RequestState.TEAMS, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public SPage<PurchaseInquiryItem> getPublicInquiryInfo(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getPublicInquiryInfo(PageParams params, String searchFilter) {
|
|
|
logger.log("客户询价单", "查看收到已报价的公共询价单");
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
@@ -539,7 +543,7 @@ public class SaleInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
|
|
|
|
/**
|