fix
Helius
2021-08-17 b9d39ade7d516d714cd8df7956bf34cf3a3fb8b9
zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
@@ -23,7 +23,6 @@
import com.matrix.system.hive.dao.SysShopInfoDao;
import com.matrix.system.hive.service.ShoppingGoodsService;
import com.matrix.system.hive.service.SysShopInfoService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
@@ -176,8 +175,37 @@
    public @ResponseBody
    AjaxResult showList(ShoppingGoods shoppingGoods, PaginationVO pageVo) {
        QueryUtil.setQueryLimit(shoppingGoods);
        pageVo.setOrder("desc");
        pageVo.setSort("createTime");
       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);
        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()) {
            //仅查询本店产品
@@ -191,7 +219,6 @@
        List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo);
        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shoppingGoodsService.findTotal(shoppingGoods));
        return result;
    }
    @RequestMapping(value = "/showListShopId")