From 68defbe491894e01c4402922de33c39633fca091 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 29 Mar 2022 14:25:54 +0800
Subject: [PATCH] 系统名称

---
 zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 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 53b2bf6..b8a33b6 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
@@ -195,6 +195,30 @@
 
     }
 
+    @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) {

--
Gitblit v1.9.1