|
|
@@ -223,7 +223,7 @@ public class PurcInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.TODO, method = RequestMethod.GET)
|
|
|
- public SPage<PurchaseInquiryDetail> getTodoInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getTodoInquiries(PageParams params, String searchFilter, String type) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(待回复)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -239,13 +239,15 @@ public class PurcInquiryController {
|
|
|
if (distribute != null && !CollectionUtils.isEmpty(distribute.getDistribute())) {
|
|
|
filter.setDistribute(distribute.getDistribute());
|
|
|
}
|
|
|
- return detailService.findTodoByPageInfo(pageInfo, null, filter);
|
|
|
+ return detailService.findTodoByPageInfo(pageInfo, null, filter, type);
|
|
|
} else {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
|
|
|
// 当前登录企业作为供应商
|
|
|
pageParams.getFilters().put("id_inid", SystemSession.getUser().getEnterprise().getUu());
|
|
|
pageParams.getFilters().put("id_status", Status.NOT_REPLY.value());
|
|
|
- pageParams.getFilters().put("id_overdue", Constant.NO);
|
|
|
+ if (!"APP".equals(type)) {
|
|
|
+ pageParams.getFilters().put("id_overdue", Constant.NO);
|
|
|
+ }
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.INT, new Long(1)));
|
|
|
pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
@@ -293,7 +295,7 @@ public class PurcInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/info/search", params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
- public SPage<PurchaseInquiryDetail> getDoneInquiries(PageParams params, String searchFilter) {
|
|
|
+ public SPage<PurchaseInquiryDetail> getDoneInquiries(PageParams params, String searchFilter, String type) {
|
|
|
logger.log("客户询价单", "查看收到的客户询价单列表(已回复)");
|
|
|
JSONObject jsonObject = JSON.parseObject(searchFilter);
|
|
|
String keyword = jsonObject.getString("keyword");
|
|
|
@@ -301,8 +303,10 @@ public class PurcInquiryController {
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
pageInfo.filter("inquiry.enUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
pageInfo.filter("status", Status.REPLIED.value());
|
|
|
- pageInfo.filter("invalid", Constant.NO);
|
|
|
- pageInfo.filter("overdue", Constant.NO);
|
|
|
+ if (!"APP".equals(type)) {
|
|
|
+ pageInfo.filter("invalid", Constant.NO);
|
|
|
+ pageInfo.filter("overdue", Constant.NO);
|
|
|
+ }
|
|
|
SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
return detailService.findByPageInfo(pageInfo, keyword, filter);
|
|
|
} else {
|
|
|
@@ -311,7 +315,9 @@ public class PurcInquiryController {
|
|
|
pageParams.getFilters().put("id_inid", SystemSession.getUser().getEnterprise().getUu());
|
|
|
pageParams.getFilters().put("id_status", Status.REPLIED.value());
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
- map.put("id_invalid", Constant.YES);
|
|
|
+ if (!"APP".equals(type)) {
|
|
|
+ map.put("id_invalid", Constant.YES);
|
|
|
+ }
|
|
|
pageParams.setNotEqualFilters(map);
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_id", false, Type.INT, new Long(1)));
|
|
|
@@ -609,7 +615,7 @@ public class PurcInquiryController {
|
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
|
modelAndView.addObject("dateFormat", dateFormat);
|
|
|
modelAndView.addObject("state", "待报价");
|
|
|
- modelAndView.addObject("data", getTodoInquiries(params, searchFilter).getContent());
|
|
|
+ modelAndView.addObject("data", getTodoInquiries(params, searchFilter, null).getContent());
|
|
|
modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/sale/purchaseInquiry", "采购询价单列表(待报价)"));
|
|
|
logger.log("采购询价单", "导出Excel列表", "导出待报价Excel列表");
|
|
|
return modelAndView;
|
|
|
@@ -629,7 +635,7 @@ public class PurcInquiryController {
|
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
|
modelAndView.addObject("dateFormat", dateFormat);
|
|
|
modelAndView.addObject("state", "已报价");
|
|
|
- modelAndView.addObject("data", getTodoInquiries(params, searchFilter).getContent());
|
|
|
+ modelAndView.addObject("data", getTodoInquiries(params, searchFilter, null).getContent());
|
|
|
modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/sale/purchaseInquiry", "采购询价单列表(已报价)"));
|
|
|
logger.log("采购询价单", "导出Excel列表", "导出已报价Excel列表");
|
|
|
return modelAndView;
|