|
|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.platform.b2b.model.*;
|
|
|
import com.uas.platform.b2b.search.SearchService;
|
|
|
import com.uas.platform.b2b.service.PurcInquiryService;
|
|
|
+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;
|
|
|
@@ -70,6 +71,9 @@ public class PurcInquiryController {
|
|
|
@Autowired
|
|
|
private PurchaseInquiryService purchaseInquiryService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PurchaseInquiryDetailService detailService;
|
|
|
+
|
|
|
/**
|
|
|
* 保存(或修改)
|
|
|
*
|
|
|
@@ -182,7 +186,6 @@ public class PurcInquiryController {
|
|
|
private ModelMap clearOrder(@PathVariable Long id) throws Exception {
|
|
|
logger.log("采购(公共)询价", "删除询价信息", "关联id: " + id);
|
|
|
return purcInquiryService.clearOrder(id);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -191,7 +194,7 @@ public class PurcInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", method = RequestMethod.GET)
|
|
|
- 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");
|
|
|
@@ -206,7 +209,7 @@ public class PurcInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
} else {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
// 当前登录企业作为供应商
|
|
|
@@ -214,7 +217,7 @@ public class PurcInquiryController {
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -224,7 +227,7 @@ public class PurcInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.TODO, method = RequestMethod.GET)
|
|
|
- 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");
|
|
|
@@ -239,7 +242,7 @@ public class PurcInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findTodoByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findTodoByPageInfo(pageInfo, null, filter);
|
|
|
} else {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
// 当前登录企业作为供应商
|
|
|
@@ -249,7 +252,7 @@ public class PurcInquiryController {
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -259,7 +262,7 @@ public class PurcInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.END, method = RequestMethod.GET)
|
|
|
- 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");
|
|
|
@@ -274,7 +277,7 @@ public class PurcInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findInvalidByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findInvalidByPageInfo(pageInfo, null, filter);
|
|
|
} else {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
// 当前登录企业作为供应商
|
|
|
@@ -283,7 +286,7 @@ public class PurcInquiryController {
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -293,7 +296,7 @@ public class PurcInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
- 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");
|
|
|
@@ -311,7 +314,7 @@ public class PurcInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
} else {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
// 当前登录企业作为供应商
|
|
|
@@ -321,7 +324,7 @@ public class PurcInquiryController {
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -331,7 +334,7 @@ public class PurcInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.AGREED, method = RequestMethod.GET)
|
|
|
- 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");
|
|
|
@@ -349,7 +352,7 @@ public class PurcInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
} else {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
// 当前登录企业作为供应商
|
|
|
@@ -358,7 +361,7 @@ public class PurcInquiryController {
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -368,7 +371,7 @@ public class PurcInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.REFUSED, method = RequestMethod.GET)
|
|
|
- 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");
|
|
|
@@ -386,7 +389,7 @@ public class PurcInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return purchaseInquiryService.findByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findByPageInfo(pageInfo, null, filter);
|
|
|
} else {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
// 当前登录企业作为供应商
|
|
|
@@ -395,7 +398,7 @@ public class PurcInquiryController {
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
|