|
@@ -65,6 +65,11 @@ public class SaleInquiryController {
|
|
|
|
|
|
|
|
private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
|
|
private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 询价种类
|
|
|
|
|
+ */
|
|
|
|
|
+ private final String INQUIRYKIND = "publicInquiry";
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 作为卖家,收到的采购询价(全部)- 搜索
|
|
* 作为卖家,收到的采购询价(全部)- 搜索
|
|
|
*
|
|
*
|
|
@@ -74,7 +79,7 @@ public class SaleInquiryController {
|
|
|
@RequestMapping(value = "/info/search", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/info/search", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public SPage<PurchaseInquiryItem> getReceivedPurchaseInquiries(PageParams params, String searchFilter) {
|
|
public SPage<PurchaseInquiryItem> getReceivedPurchaseInquiries(PageParams params, String searchFilter) {
|
|
|
- logger.log("客户询价单", "查看收到的客户询价单列表(全部)- 搜索");
|
|
|
|
|
|
|
+ logger.log("客户询价单", "搜索查看收到的客户询价单列表(全部)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
@@ -106,7 +111,7 @@ public class SaleInquiryController {
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.TODO, method = RequestMethod.GET)
|
|
@RequestMapping(value = "/info/search", params = RequestState.TODO, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public SPage<PurchaseInquiryItem> getTodoInquiries(PageParams params, String searchFilter) {
|
|
public SPage<PurchaseInquiryItem> getTodoInquiries(PageParams params, String searchFilter) {
|
|
|
- logger.log("客户询价单", "查看收到的客户询价单列表(待报价)- 搜索");
|
|
|
|
|
|
|
+ logger.log("客户询价单", "搜索查看收到的客户询价单(待报价)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
@@ -139,7 +144,7 @@ public class SaleInquiryController {
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.END, method = RequestMethod.GET)
|
|
@RequestMapping(value = "/info/search", params = RequestState.END, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public SPage<PurchaseInquiryItem> getEndInquiries(PageParams params, String searchFilter) {
|
|
public SPage<PurchaseInquiryItem> getEndInquiries(PageParams params, String searchFilter) {
|
|
|
- logger.log("客户询价单", "查看收到的客户询价单列表(已过期)- 搜索");
|
|
|
|
|
|
|
+ logger.log("客户询价单", "搜索查看收到的客户询价单(已过期)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
@@ -176,7 +181,7 @@ public class SaleInquiryController {
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.DONE, method = RequestMethod.GET)
|
|
@RequestMapping(value = "/info/search", params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public SPage<PurchaseInquiryItem> getDoneInquiries(PageParams params, String searchFilter) {
|
|
public SPage<PurchaseInquiryItem> getDoneInquiries(PageParams params, String searchFilter) {
|
|
|
- logger.log("客户询价单", "查看收到的客户询价单列表(已报价)- 搜索");
|
|
|
|
|
|
|
+ logger.log("客户询价单", "搜索查看收到的客户询价单(已报价)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
@@ -211,7 +216,7 @@ public class SaleInquiryController {
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.INVALID, method = RequestMethod.GET)
|
|
@RequestMapping(value = "/info/search", params = RequestState.INVALID, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public SPage<PurchaseInquiryItem> getInvalidInquiries(PageParams params, String searchFilter) {
|
|
public SPage<PurchaseInquiryItem> getInvalidInquiries(PageParams params, String searchFilter) {
|
|
|
- logger.log("客户询价单", "查看收到的客户询价单列表(已失效)- 搜索");
|
|
|
|
|
|
|
+ logger.log("客户询价单", "搜索查看收到的客户询价单(已失效)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
@@ -242,7 +247,7 @@ public class SaleInquiryController {
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.AGREED, method = RequestMethod.GET)
|
|
@RequestMapping(value = "/info/search", params = RequestState.AGREED, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public SPage<PurchaseInquiryItem> getAgreedInquiries(PageParams params, String searchFilter) {
|
|
public SPage<PurchaseInquiryItem> getAgreedInquiries(PageParams params, String searchFilter) {
|
|
|
- logger.log("客户询价单", "查看收到的客户询价单列表(已采纳)- 搜索");
|
|
|
|
|
|
|
+ logger.log("客户询价单", "搜索查看收到的客户询价单(已采纳)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
@@ -279,12 +284,47 @@ public class SaleInquiryController {
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.REFUSED, method = RequestMethod.GET)
|
|
@RequestMapping(value = "/info/search", params = RequestState.REFUSED, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public SPage<PurchaseInquiryItem> getRefusedInquiries(PageParams params, String searchFilter) {
|
|
public SPage<PurchaseInquiryItem> getRefusedInquiries(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);
|
|
|
|
|
+ // 当前登录企业作为供应商
|
|
|
|
|
+ pageParams.getFilters().put("id_venduu", 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("id_inid", new MultiValue(list, true));
|
|
|
|
|
+ }
|
|
|
|
|
+ pageParams.getFilters().put("id_agreed", Constant.NO);
|
|
|
|
|
+ pageParams.getFilters().put("id_status", Status.REPLIED.value());
|
|
|
|
|
+ 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);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 已转报价的公共询价单--搜索
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param params
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value = "/info/search", params = RequestState.TEAMS, method = RequestMethod.GET)
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public SPage<PurchaseInquiryItem> getPublicInquiry(PageParams params, String searchFilter) {
|
|
|
|
|
+ logger.log("客户询价单", "搜索已转报价的公共询价单");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
// 当前登录企业作为供应商
|
|
// 当前登录企业作为供应商
|
|
|
pageParams.getFilters().put("id_venduu", SystemSession.getUser().getEnterprise().getUu());
|
|
pageParams.getFilters().put("id_venduu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
|
|
+ pageParams.getFilters().put("id_kind", INQUIRYKIND);
|
|
|
SearchFilter filter = userService.distribute();
|
|
SearchFilter filter = userService.distribute();
|
|
|
if (filter != null && filter.getDistribute() == null) {
|
|
if (filter != null && filter.getDistribute() == null) {
|
|
|
return null;
|
|
return null;
|
|
@@ -482,6 +522,32 @@ public class SaleInquiryController {
|
|
|
return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 针对公共询价已报价的记录
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param params
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value = "/info/nosearch", params = RequestState.TEAMS, method = RequestMethod.GET)
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public SPage<PurchaseInquiryItem> getPublicInquiryInfo(PageParams params, String searchFilter) {
|
|
|
|
|
+ logger.log("客户询价单", "查看收到已报价的公共询价单");
|
|
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
|
|
+ pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
|
|
+ pageInfo.filter("status", Status.REPLIED.value());
|
|
|
|
|
+ pageInfo.filter("invalid", Constant.NO);
|
|
|
|
|
+ pageInfo.filter("kind", INQUIRYKIND);
|
|
|
|
|
+ SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
|
|
+ SearchFilter distribute = userService.distribute();
|
|
|
|
|
+ if (distribute != null && distribute.getDistribute() == null) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
|
|
+ filter.setDistribute(distribute.getDistribute());
|
|
|
|
|
+ }
|
|
|
|
|
+ return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 作为卖家,收到的采购询价明细(手机端)
|
|
* 作为卖家,收到的采购询价明细(手机端)
|
|
|
*
|
|
*
|