xiaoyong931011
2022-03-29 68defbe491894e01c4402922de33c39633fca091
zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
@@ -129,7 +129,6 @@
                shoppingGoods.setAssembleProj(shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(shoppingGoods.getId(), ShoppingGoods.SHOPPING_GOODS_TYPE_XM));
            } else if (
                    Dictionary.SHOPPING_GOODS_TYPE_XM.equals(shoppingGoods.getGoodType())
                            || Dictionary.SHOPPING_GOODS_TYPE_ZHK.equals(shoppingGoods.getGoodType())
            ) {
                shoppingGoods.setAssembleGoods(shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(shoppingGoods.getId(), null));
            } else if (Dictionary.SHOPPING_GOODS_TYPE_CZK.equals(shoppingGoods.getGoodType())) {
@@ -194,6 +193,30 @@
        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")
@@ -291,9 +314,6 @@
                shoppingGoods.setAssembleGoods(assembleListGoods);
                List<ShoppingGoodsAssemble> assembleListProj = shoppingGoodsAssembleDao.selectProjByShoppingGoodsId(shoppingGoods.getId());
                shoppingGoods.setAssembleProj(assembleListProj);
            } else if (Dictionary.SHOPPING_GOODS_TYPE_ZHK.equals(shoppingGoods.getGoodType())) {
                List<ShoppingGoodsAssemble> assembleList = shoppingGoodsAssembleDao.selectAssembleShoppingGoodsByShoppingGoodsId(shoppingGoods.getId());
                shoppingGoods.setZongheCarGoods(assembleList);
            }
@@ -322,9 +342,6 @@
                // 返回充值卡编辑界面
                WebUtil.getRequest().setAttribute("obj", shoppingGoods);
                return "admin/hive/products/money-card-form";
            } else if (shoppingGoods.getGoodType().equals(Dictionary.SHOPPING_GOODS_TYPE_ZHK)) {
                WebUtil.getRequest().setAttribute("obj", shoppingGoods);
                return "admin/hive/products/zonghe-card-form";
            }