| | |
| | | } |
| | | SysUser currentUser = SecurityUtils.getLoginUser().getUser(); |
| | | checkUserAllowed(null,currentUser); |
| | | //设置分表id |
| | | IdTableNameHandler.setCurrentId(currentUser.getCompanyId()); |
| | | product.setCompanyId(currentUser.getCompanyId()); |
| | | if (currentUser.getUserType().equals(UserTypeEnum.CHECK_USER.getCode())){ |
| | | IdTableNameHandler.setCurrentId(product.getCompanyId()); |
| | | }else { |
| | | //设置分表id |
| | | IdTableNameHandler.setCurrentId(currentUser.getCompanyId()); |
| | | product.setCompanyId(currentUser.getCompanyId()); |
| | | } |
| | | PageUtils.startPage(); |
| | | List<HzProduct> productList = baseMapper.selectProductList(product); |
| | | IdTableNameHandler.removeCurrentId(); |
| | |
| | | public CommonPage selectProductGroupWarehouse(HzProduct product) { |
| | | SysUser currentUser = SecurityUtils.getLoginUser().getUser(); |
| | | checkUserAllowed(null,currentUser); |
| | | //设置分表id |
| | | IdTableNameHandler.setCurrentId(currentUser.getCompanyId()); |
| | | product.setCompanyId(currentUser.getCompanyId()); |
| | | if (currentUser.getUserType().equals(UserTypeEnum.CHECK_USER.getCode())){ |
| | | IdTableNameHandler.setCurrentId(product.getCompanyId()); |
| | | }else { |
| | | //设置分表id |
| | | //todo |
| | | IdTableNameHandler.setCurrentId(currentUser.getCompanyId()); |
| | | product.setCompanyId(currentUser.getCompanyId()); |
| | | } |
| | | PageUtils.startPage(); |
| | | List<HzProductWarehouseVO> productList = baseMapper.selectProductGroupWareHouse(product); |
| | | if(!productList.isEmpty()) { |