|
|
@@ -1,5 +1,6 @@
|
|
|
package com.uas.platform.b2b.controller;
|
|
|
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -16,6 +17,7 @@ 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.core.util.SearchKeyUtils;
|
|
|
import com.uas.platform.b2b.model.PurchaseNotice;
|
|
|
import com.uas.platform.b2b.model.SaleSend;
|
|
|
import com.uas.platform.b2b.model.SaleSendAll;
|
|
|
@@ -52,15 +54,16 @@ public class SaleNoticeController {
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
@RequestMapping(method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public Page<PurchaseNotice> getReceivedPurchaseNotices(PageParams params, String keyword) {
|
|
|
+ public Page<PurchaseNotice> getReceivedPurchaseNotices(PageParams params, String keyword) throws UnsupportedEncodingException {
|
|
|
logger.log("客户送货提醒", "查看收到的客户送货提醒列表(全部)");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
// 我作为卖家,把我的企业ID作为供应商ID传入
|
|
|
info.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
- return purchaseNoticeService.findAllByPageInfo(info, keyword);
|
|
|
+ return purchaseNoticeService.findAllByPageInfo(info, SearchKeyUtils.decodeURL(keyword));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -94,10 +97,11 @@ public class SaleNoticeController {
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
@RequestMapping(params = RequestState.TODO, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public Page<PurchaseNotice> getTodoPurchaseNotices(PageParams params, String keyword) {
|
|
|
+ public Page<PurchaseNotice> getTodoPurchaseNotices(PageParams params, String keyword) throws UnsupportedEncodingException {
|
|
|
logger.log("客户送货提醒", "查看收到的客户送货提醒列表(待发货)");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
// 送货提醒状态为待发货
|
|
|
@@ -106,7 +110,7 @@ public class SaleNoticeController {
|
|
|
info.filter("waiting", Constant.NO);
|
|
|
// 我作为卖家,把我的企业ID作为供应商ID传入
|
|
|
info.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
- return purchaseNoticeService.findAllByPageInfo(info, keyword);
|
|
|
+ return purchaseNoticeService.findAllByPageInfo(info, SearchKeyUtils.decodeURL(keyword));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -114,17 +118,18 @@ public class SaleNoticeController {
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
@RequestMapping(params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public Page<PurchaseNotice> getDonePurchaseNotices(PageParams params, String keyword) {
|
|
|
+ public Page<PurchaseNotice> getDonePurchaseNotices(PageParams params, String keyword) throws UnsupportedEncodingException {
|
|
|
logger.log("客户送货提醒", "查看收到的客户送货提醒列表(已发货)");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
// 送货提醒状态为已发货
|
|
|
info.filter("status", Status.REPLIED.value());
|
|
|
// 我作为卖家,把我的企业ID作为供应商ID传入
|
|
|
info.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
- return purchaseNoticeService.findDoneByPageInfo(info, keyword);
|
|
|
+ return purchaseNoticeService.findDoneByPageInfo(info, SearchKeyUtils.decodeURL(keyword));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -132,17 +137,18 @@ public class SaleNoticeController {
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
@RequestMapping(params = "_state=waiting", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public Page<PurchaseNotice> getWaitingPurchaseNotices(PageParams params, String keyword) {
|
|
|
+ public Page<PurchaseNotice> getWaitingPurchaseNotices(PageParams params, String keyword) throws UnsupportedEncodingException {
|
|
|
logger.log("客户送货提醒", "查看收到的客户送货提醒列表(备料中)");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
// 需要等待发货
|
|
|
info.filter("waiting", Constant.YES);
|
|
|
// 我作为卖家,把我的企业ID作为供应商ID传入
|
|
|
info.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
- return purchaseNoticeService.findAllByPageInfo(info, keyword);
|
|
|
+ return purchaseNoticeService.findAllByPageInfo(info, SearchKeyUtils.decodeURL(keyword));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -150,17 +156,18 @@ public class SaleNoticeController {
|
|
|
*
|
|
|
* @param params
|
|
|
* @return
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
@RequestMapping(params = RequestState.END, method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public Page<PurchaseNotice> getEndPurchaseNotices(PageParams params, String keyword) {
|
|
|
+ public Page<PurchaseNotice> getEndPurchaseNotices(PageParams params, String keyword) throws UnsupportedEncodingException {
|
|
|
logger.log("客户送货提醒", "查看收到的客户送货提醒列表(已结案)");
|
|
|
PageInfo info = new PageInfo(params);
|
|
|
// 询价单状态为已结案
|
|
|
info.filter("end", (short) Constant.YES);
|
|
|
// 我作为卖家,把我的企业ID作为供应商ID传入
|
|
|
info.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
- return purchaseNoticeService.findAllByPageInfo(info, keyword);
|
|
|
+ return purchaseNoticeService.findAllByPageInfo(info, SearchKeyUtils.decodeURL(keyword));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -230,7 +237,6 @@ public class SaleNoticeController {
|
|
|
logger.log("客户送货提醒", "导出Excel列表", "导出全部Excel列表");
|
|
|
return modelAndView;
|
|
|
}
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 导出送货提醒(未发货)
|