From b9d39ade7d516d714cd8df7956bf34cf3a3fb8b9 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 17 Aug 2021 17:31:26 +0800
Subject: [PATCH] fix
---
zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java | 28 ++++++++++++++++++++++++++--
zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html | 2 +-
zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html | 2 +-
3 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
index 9fa37e7..5fe5d27 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
@@ -98,7 +98,7 @@
ShoppingGoods shoppingGoods = new ShoppingGoods();
QueryUtil.setQueryLimit(shoppingGoods);
shoppingGoods.setName(keyword);
-// shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP);// 只查询上架的商品
+ shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP);// 只查询上架的商品
shoppingGoods.setSalePlatform(Dictionary.SHOPPING_GOODS_SALE_PLATFORM_XX);//只查询线下的商品
shoppingGoods.setGoodType(type);
shoppingGoods.setIsDel(ShoppingGoods.NORMAL);
@@ -190,13 +190,37 @@
}
}
shoppingGoods.setIsDel(ShoppingGoods.NORMAL);
-// shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP);
+ shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP);
List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo);
AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shoppingGoodsService.findTotal(shoppingGoods));
return result;
}
+ @RequestMapping(value = "/showAllList")
+ @ResponseBody
+ public AjaxResult showAllList(ShoppingGoods shoppingGoods, PaginationVO pageVo) {
+ QueryUtil.setQueryLimit(shoppingGoods);
+ if(StringUtils.isBlank(pageVo.getSort())){
+ pageVo.setOrder("desc");
+ pageVo.setSort("createTime");
+ }
+
+ //2表示查询总部产品
+ if (shoppingGoods.getHeadquarters()!=null && 2==shoppingGoods.getHeadquarters()) {
+ //仅查询本店产品
+ SysShopInfo zbShop = shopInfoDao.selectZbShop(getMe().getCompanyId());
+ //如果是总部自己查询自己的库存则不需加入这个调价
+ if (getMe().getShopId().equals(zbShop.getId())){
+ shoppingGoods.setHeadquarters(1);
+ }
+ }
+ shoppingGoods.setIsDel(ShoppingGoods.NORMAL);
+ List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo);
+ AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shoppingGoodsService.findTotal(shoppingGoods));
+ return result;
+ }
+
@RequestMapping(value = "/showListShopId")
@ResponseBody
public AjaxResult showListShopId(ShoppingGoods shoppingGoods, PaginationVO pageVo) {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html
index 77b6bba..9efa91b 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html
@@ -151,7 +151,7 @@
delUrl = basePath + "/admin/shoppinggoods/del";
myGrid = MGrid.initGrid({
- url: basePath + "/admin/shoppinggoods/showList",
+ url: basePath + "/admin/shoppinggoods/showAllList",
delUrl: delUrl
});
});
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html
index a9e5af4..b15b2d8 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html
@@ -147,7 +147,7 @@
delUrl = basePath + "/admin/shoppinggoods/del";
myGrid = MGrid.initGrid({
- url: basePath + "/admin/shoppinggoods/showList",
+ url: basePath + "/admin/shoppinggoods/showAllList",
delUrl: delUrl
});
});
--
Gitblit v1.9.1