| | |
| | | import com.consum.base.service.LWhGoodsService; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhGoods; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | |
| | |
| | | if (baseWarehouse.getId() == null) { |
| | | return ResponseValue.error("仓库id为空"); |
| | | } |
| | | Long id = baseWarehouse.getId(); |
| | | LWhGoods lWhGoods = new LWhGoods(); |
| | | lWhGoods.setWarehouseId(id); |
| | | List<LWhGoods> select = lWhGoodsService.select(lWhGoods); |
| | | if (!CollectionUtils.isEmpty(select)) { |
| | | return ResponseValue.error("该仓库正在使用,不能删除"); |
| | | } |
| | | int num = baseWarehouseService.updateById(baseWarehouse); |
| | | |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("删除失败!"); |