|
|
@@ -15,6 +15,7 @@ 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;
|
|
|
@@ -38,7 +39,7 @@ import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
|
/**
|
|
|
- * 卖家对模具询价单的操作
|
|
|
+ * 卖家对模具询价单的操作 -- 无关键词直接从数据库获取,已修改
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
@@ -230,37 +231,116 @@ public class SaleInquiryMouldController {
|
|
|
return searchService.searchPurcInquiryMouldIds(keyword, pageParams);
|
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
-// * 作为卖家,收到的模具询价(全部)数据库直接获取
|
|
|
-// *
|
|
|
-// * @param params
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// @RequestMapping(value = "/sql", method = RequestMethod.GET)
|
|
|
-// @ResponseBody
|
|
|
-// public SPage<PurchaseInquiryMould> getReceivedMouldInquiriesBySql(PageParams params, String searchFilter) {
|
|
|
-// logger.log("客户模具询价单", "查看收到的客户模具询价单列表(全部)");
|
|
|
-// JSONObject jsonObject = JSONObject.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())) {
|
|
|
+ /**
|
|
|
+ * 作为卖家,收到的模具询价(全部)数据库直接获取
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/sql", method = RequestMethod.GET)
|
|
|
+ @ResponseBody
|
|
|
+ public SPage<PurchaseInquiryMould> getReceivedMouldInquiriesBySql(PageParams params, String searchFilter) {
|
|
|
+ logger.log("客户模具询价单", "查看收到的客户模具询价单列表(全部)");
|
|
|
+ SearchFilter search = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
+ 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));
|
|
|
-// }
|
|
|
-// List<Sort> sortList = new ArrayList<>();
|
|
|
-// sortList.add(new Sort("im_id", false, Type.LONG, 1L));
|
|
|
-// pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
-// return searchService.searchPurcInquiryMouldIds(keyword, pageParams);
|
|
|
-// }
|
|
|
+// list.addAll(filter.getDistribute());
|
|
|
+ search.setDistribute(filter.getDistribute());
|
|
|
+ }
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
+ // 当前登录企业作为供应商
|
|
|
+ pageInfo.filter("venduu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ return purchaseInquiryMouldService.findAllByPageInfo(pageInfo, null, search);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 作为卖家,收到的模具询价(已报价)数据库直接获取
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/sql", params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
+ @ResponseBody
|
|
|
+ public SPage<PurchaseInquiryMould> getDoneMouldInquiriesBySql(PageParams params, String searchFilter) {
|
|
|
+ logger.log("客户模具询价单", "直接查看收到的客户模具询价单列表(已报价)");
|
|
|
+ SearchFilter search = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
+ SearchFilter filter = userService.distribute();
|
|
|
+ if (filter != null && filter.getDistribute() == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
+// List<Object> list = new ArrayList<>();
|
|
|
+// list.addAll(filter.getDistribute());
|
|
|
+ search.setDistribute(filter.getDistribute());
|
|
|
+ }
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
+ // 当前登录企业作为供应商 已报价过滤条件
|
|
|
+ pageInfo.filter("venduu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ pageInfo.filter("status", Status.REPLIED.value());
|
|
|
+ pageInfo.filter("valid", Constant.YES);
|
|
|
+ return purchaseInquiryMouldService.findAllByPageInfo(pageInfo, null, search);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 作为卖家,收到的模具询价(待报价)数据库直接获取
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/sql", params = RequestState.TODO, method = RequestMethod.GET)
|
|
|
+ @ResponseBody
|
|
|
+ public SPage<PurchaseInquiryMould> getTodoMouldInquiriesBySql(PageParams params, String searchFilter) {
|
|
|
+ logger.log("客户模具询价单", "直接查看收到的客户模具询价单列表(待报价)");
|
|
|
+ SearchFilter search = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
+ SearchFilter filter = userService.distribute();
|
|
|
+ if (filter != null && filter.getDistribute() == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
+// List<Object> list = new ArrayList<>();
|
|
|
+// list.addAll(filter.getDistribute());
|
|
|
+ search.setDistribute(filter.getDistribute());
|
|
|
+ }
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
+ // 当前登录企业作为供应商
|
|
|
+ pageInfo.filter("venduu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ pageInfo.filter("status", Status.NOT_REPLY.value());
|
|
|
+ pageInfo.filter("overdue", Constant.NO);
|
|
|
+ pageInfo.filter("valid", Constant.YES);
|
|
|
+ return purchaseInquiryMouldService.findAllByPageInfo(pageInfo, null, search);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 作为卖家,收到的模具询价(已失效)数据库直接获取
|
|
|
+ *
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/sql", params = RequestState.INVALID, method = RequestMethod.GET)
|
|
|
+ @ResponseBody
|
|
|
+ public SPage<PurchaseInquiryMould> getInvalidMouldInquiriesBySql(PageParams params, String searchFilter) {
|
|
|
+ logger.log("客户模具询价单", "直接查看收到的客户模具询价单列表(已失效)");
|
|
|
+ SearchFilter search = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
+ SearchFilter filter = userService.distribute();
|
|
|
+ if (filter != null && filter.getDistribute() == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
|
|
|
+// List<Object> list = new ArrayList<>();
|
|
|
+// list.addAll(filter.getDistribute());
|
|
|
+ search.setDistribute(filter.getDistribute());
|
|
|
+ }
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
+ // 当前登录企业作为供应商
|
|
|
+ pageInfo.filter("venduu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ pageInfo.filter("valid", Constant.NO);
|
|
|
+ return purchaseInquiryMouldService.findAllByPageInfo(pageInfo, null, search);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 作为卖家,收到的模具询价明细
|