| | |
| | | //设置分表id |
| | | IdTableNameHandler.setCurrentId(currentUser.getCompanyId()); |
| | | HzHazmatFlow hazmatFlow = baseMapper.selectById(hazmatFlowId); |
| | | IdTableNameHandler.removeCurrentId(); |
| | | if (!hazmatFlow.getCompanyId().equals(currentUser.getCompanyId())) { |
| | | throw new ApiException("无权限查看其它企业数据"); |
| | | } |
| | |
| | | //设置分表id |
| | | IdTableNameHandler.setCurrentId(currentUser.getCompanyId()); |
| | | int row = baseMapper.insert(hazmatFlow); |
| | | IdTableNameHandler.removeCurrentId(); |
| | | if (row < 1) { |
| | | throw new ApiException("新增危化品流向失败"); |
| | | } |
| | |
| | | //设置分表id |
| | | IdTableNameHandler.setCurrentId(currentUser.getCompanyId()); |
| | | HzHazmatFlow hazmatFlow=baseMapper.selectById(hazmatFlowId); |
| | | IdTableNameHandler.removeCurrentId(); |
| | | if(hazmatFlow==null){ |
| | | throw new ApiException("流向信息不存在"); |
| | | } |