新增公司
This commit is contained in:
parent
6004d6ab3b
commit
093093e650
|
|
@ -61,24 +61,6 @@ public class SysDeptController extends BaseController
|
||||||
return error("系统异常");
|
return error("系统异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/deptList")
|
|
||||||
@SysLog(title = "运营人员获取公司列表", businessType = OperaType.QUERY,logType = 0,module = "系统管理->部门管理")
|
|
||||||
public TableDataInfo deptList(SysDept dept) {
|
|
||||||
if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
|
|
||||||
throw new ServiceException("抱歉,您无权查看公司列表!");
|
|
||||||
}
|
|
||||||
List<SysDept> deptList = new ArrayList<>();
|
|
||||||
try{
|
|
||||||
startPage();
|
|
||||||
dept.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
|
||||||
deptList = deptService.getDeptList(dept);
|
|
||||||
return getDataTable(deptList);
|
|
||||||
}catch (Exception e){
|
|
||||||
log.error(e.toString(),e);
|
|
||||||
}
|
|
||||||
return getDataTableError(deptList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门列表(排除节点)
|
* 查询部门列表(排除节点)
|
||||||
*/
|
*/
|
||||||
|
|
@ -176,4 +158,37 @@ public class SysDeptController extends BaseController
|
||||||
}
|
}
|
||||||
return error("系统异常");
|
return error("系统异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据登录用户获取公司详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("system:dept:query"))
|
||||||
|
@GetMapping(value = "/company_info")
|
||||||
|
public AjaxResult getCompanyInfo() {
|
||||||
|
try{
|
||||||
|
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||||
|
return success(deptService.selectDeptById(companyId));
|
||||||
|
} catch (Exception e){
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
}
|
||||||
|
return error("系统异常");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/deptList")
|
||||||
|
@SysLog(title = "获取公司列表", businessType = OperaType.QUERY,logType = 0,module = "系统管理->部门管理")
|
||||||
|
public TableDataInfo deptList(SysDept dept) {
|
||||||
|
if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
|
||||||
|
throw new ServiceException("抱歉,您无权查看公司列表!");
|
||||||
|
}
|
||||||
|
List<SysDept> deptList = new ArrayList<>();
|
||||||
|
try{
|
||||||
|
startPage();
|
||||||
|
dept.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||||
|
deptList = deptService.getDeptList(dept);
|
||||||
|
return getDataTable(deptList);
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
}
|
||||||
|
return getDataTableError(deptList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue