|
|
@@ -1,25 +1,7 @@
|
|
|
package com.uas.platform.b2b.controller;
|
|
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Set;
|
|
|
-
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.data.domain.Sort.Direction;
|
|
|
-import org.springframework.http.HttpStatus;
|
|
|
-import org.springframework.http.ResponseEntity;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
-
|
|
|
import com.uas.platform.b2b.model.PurchaseInquiryMould;
|
|
|
import com.uas.platform.b2b.model.PurchaseInquiryMouldDetail;
|
|
|
import com.uas.platform.b2b.model.PurchaseInquiryMouldItem;
|
|
|
@@ -33,7 +15,6 @@ import com.uas.platform.b2b.support.SystemSession;
|
|
|
import com.uas.platform.b2b.support.UsageBufferedLogger;
|
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.uas.platform.core.model.Constant;
|
|
|
-import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.model.PageParams;
|
|
|
import com.uas.platform.core.model.Status;
|
|
|
import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
@@ -43,6 +24,18 @@ import com.uas.search.b2b.model.SPage;
|
|
|
import com.uas.search.b2b.model.Sort;
|
|
|
import com.uas.search.b2b.model.Sort.Type;
|
|
|
import com.uas.search.b2b.util.SearchConstants;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
+
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
/**
|
|
|
* 卖家对模具询价单的操作
|
|
|
@@ -135,40 +128,40 @@ public class SaleInquiryMouldController {
|
|
|
return searchService.searchPurcInquiryMouldIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 作为卖家,收到的模具询价(已过期)
|
|
|
- *
|
|
|
- * @param params
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(params = RequestState.END, method = RequestMethod.GET)
|
|
|
- @ResponseBody
|
|
|
- public SPage<PurchaseInquiryMould> getEndInquiryMould(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("im_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("im_enuu", new MultiValue(list, true));
|
|
|
- }
|
|
|
- pageParams.getFilters().put("im_status", Status.NOT_REPLY.value());
|
|
|
- pageParams.getFilters().put("im_overdue", Constant.YES);
|
|
|
- pageParams.getFilters().put("im_valid", Constant.YES);
|
|
|
- List<Sort> sortList = new ArrayList<>();
|
|
|
- sortList.add(new Sort("im_id", false, Type.LONG, new Long(1)));
|
|
|
- pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
- return searchService.searchPurcInquiryMouldIds(keyword, pageParams);
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 作为卖家,收到的模具询价(已过期)
|
|
|
+// *
|
|
|
+// * @param params
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @RequestMapping(params = RequestState.END, method = RequestMethod.GET)
|
|
|
+// @ResponseBody
|
|
|
+// public SPage<PurchaseInquiryMould> getEndInquiryMould(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("im_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("im_enuu", new MultiValue(list, true));
|
|
|
+// }
|
|
|
+// pageParams.getFilters().put("im_status", Status.NOT_REPLY.value());
|
|
|
+// pageParams.getFilters().put("im_overdue", Constant.YES);
|
|
|
+// pageParams.getFilters().put("im_valid", Constant.YES);
|
|
|
+// List<Sort> sortList = new ArrayList<>();
|
|
|
+// sortList.add(new Sort("im_id", false, Type.LONG, new Long(1)));
|
|
|
+// pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
+// return searchService.searchPurcInquiryMouldIds(keyword, pageParams);
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 作为卖家,收到的模具询价(已报价)
|
|
|
@@ -205,7 +198,7 @@ public class SaleInquiryMouldController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 作为卖家,收到的模具询价(已作废)
|
|
|
+ * 作为卖家,收到的模具询价(已作废)--和已过期合并为已失效
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|
|
|
@@ -298,7 +291,7 @@ public class SaleInquiryMouldController {
|
|
|
* 作为卖家,给询价单报价
|
|
|
*
|
|
|
* @param json
|
|
|
- * @param inquiryItemId
|
|
|
+ * @param inquiryMouldItemId
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/detail/{inquiryMouldId}/reply", method = RequestMethod.POST)
|
|
|
@@ -328,7 +321,7 @@ public class SaleInquiryMouldController {
|
|
|
* 作为卖家,保存更新询价单
|
|
|
*
|
|
|
* @param json
|
|
|
- * @param inquiryId
|
|
|
+ * @param inquiryMouldId
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/detail/{inquiryMouldId}", method = RequestMethod.POST)
|
|
|
@@ -446,28 +439,28 @@ public class SaleInquiryMouldController {
|
|
|
return modelAndView;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 导出 - 已过期
|
|
|
- *
|
|
|
- * @param params
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "/xls", params = RequestState.END, method = RequestMethod.GET)
|
|
|
- public ModelAndView exportEnd(PageParams params, String searchFilter) {
|
|
|
- params.setPage(1);
|
|
|
- params.setCount(SearchConstants.TOP_NUM);
|
|
|
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
|
- ModelAndView modelAndView = new ModelAndView();
|
|
|
- modelAndView.addObject("dateFormat", dateFormat);
|
|
|
- modelAndView.addObject("state", "已过期");
|
|
|
- modelAndView.addObject("data", getEndInquiryMould(params, searchFilter).getContent());
|
|
|
- modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/sale/saleInquiryMould", "客户模具询价单列表_已过期"));
|
|
|
- logger.log("客户模具询价单", "导出Excel列表", "导出已过期Excel列表");
|
|
|
- return modelAndView;
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 导出 - 已过期
|
|
|
+// *
|
|
|
+// * @param params
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @RequestMapping(value = "/xls", params = RequestState.END, method = RequestMethod.GET)
|
|
|
+// public ModelAndView exportEnd(PageParams params, String searchFilter) {
|
|
|
+// params.setPage(1);
|
|
|
+// params.setCount(SearchConstants.TOP_NUM);
|
|
|
+// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
|
+// ModelAndView modelAndView = new ModelAndView();
|
|
|
+// modelAndView.addObject("dateFormat", dateFormat);
|
|
|
+// modelAndView.addObject("state", "已过期");
|
|
|
+// modelAndView.addObject("data", getEndInquiryMould(params, searchFilter).getContent());
|
|
|
+// modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/sale/saleInquiryMould", "客户模具询价单列表_已过期"));
|
|
|
+// logger.log("客户模具询价单", "导出Excel列表", "导出已过期Excel列表");
|
|
|
+// return modelAndView;
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
- * 导出 - 已作废
|
|
|
+ * 导出 - 已失效
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|