档案自定义分类管理
This commit is contained in:
parent
7f02158886
commit
4885ae89a8
|
|
@ -3,6 +3,8 @@ package com.bonus.web.controller.system;
|
|||
import java.util.List;
|
||||
|
||||
import com.bonus.common.annotation.RequiresPermissions;
|
||||
import com.bonus.common.annotation.SysLog;
|
||||
import com.bonus.common.enums.OperaType;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
|
@ -51,6 +53,7 @@ public class SysDeptController extends BaseController
|
|||
* 查询部门列表(排除节点)
|
||||
*/
|
||||
@RequiresPermissions("system:dept:list")
|
||||
@SysLog(title = "部门管理", businessType = OperaType.QUERY,module = "部门管理->查询部门列表", details = "查询部门列表")
|
||||
@GetMapping("/list/exclude/{deptId}")
|
||||
public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
|
||||
{
|
||||
|
|
@ -64,6 +67,7 @@ public class SysDeptController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:dept:query")
|
||||
@GetMapping(value = "/{deptId}")
|
||||
@SysLog(title = "部门管理", businessType = OperaType.QUERY,module = "部门管理->根据部门编号获取详细信息", details = "根据部门编号获取详细信息")
|
||||
public AjaxResult getInfo(@PathVariable Long deptId)
|
||||
{
|
||||
deptService.checkDeptDataScope(deptId);
|
||||
|
|
@ -74,7 +78,7 @@ public class SysDeptController extends BaseController
|
|||
* 新增部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:add")
|
||||
@Log(title = "部门管理", businessType = BusinessType.INSERT)
|
||||
@SysLog(title = "部门管理", businessType = OperaType.INSERT,module = "部门管理->新增部门", details = "新增部门")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDept dept)
|
||||
{
|
||||
|
|
@ -90,7 +94,7 @@ public class SysDeptController extends BaseController
|
|||
* 修改部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:edit")
|
||||
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
|
||||
@SysLog(title = "部门管理", businessType = OperaType.UPDATE,module = "部门管理->修改部门", details = "修改部门")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDept dept)
|
||||
{
|
||||
|
|
@ -116,7 +120,7 @@ public class SysDeptController extends BaseController
|
|||
* 删除部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:remove")
|
||||
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
||||
@SysLog(title = "部门管理", businessType = OperaType.DELETE,module = "部门管理->删除部门", details = "删除部门")
|
||||
@DeleteMapping("/{deptId}")
|
||||
public AjaxResult remove(@PathVariable Long deptId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import java.util.List;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.common.annotation.RequiresPermissions;
|
||||
import com.bonus.common.annotation.SysLog;
|
||||
import com.bonus.common.enums.OperaType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
|
@ -58,13 +60,14 @@ public class SysRoleController extends BaseController {
|
|||
|
||||
@RequiresPermissions("system:role:list")
|
||||
@GetMapping("/list")
|
||||
@SysLog(title = "角色管理", businessType = OperaType.QUERY, logType = 1, module = "系统管理->角色管理", details = "查询列表")
|
||||
public TableDataInfo list(SysRole role) {
|
||||
startPage();
|
||||
List<SysRole> list = roleService.selectRoleList(role);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.EXPORT, logType = 1, module = "系统管理->角色管理", details = "导出")
|
||||
@RequiresPermissions("system:role:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysRole role) {
|
||||
|
|
@ -78,6 +81,7 @@ public class SysRoleController extends BaseController {
|
|||
*/
|
||||
@RequiresPermissions("system:role:query")
|
||||
@GetMapping(value = "/{roleId}")
|
||||
@SysLog(title = "角色管理", businessType = OperaType.QUERY, logType = 1, module = "系统管理->角色管理", details = "根据角色编号获取详细信息")
|
||||
public AjaxResult getInfo(@PathVariable Long roleId) {
|
||||
roleService.checkRoleDataScope(roleId);
|
||||
return success(roleService.selectRoleById(roleId));
|
||||
|
|
@ -87,7 +91,7 @@ public class SysRoleController extends BaseController {
|
|||
* 新增角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:add")
|
||||
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.INSERT, logType = 1, module = "系统管理->角色管理", details = "新增角色")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysRole role) {
|
||||
if (!roleService.checkRoleNameUnique(role)) {
|
||||
|
|
@ -104,7 +108,7 @@ public class SysRoleController extends BaseController {
|
|||
* 修改保存角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.UPDATE, logType = 1, module = "系统管理->角色管理", details = "修改保存角色")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysRole role) {
|
||||
roleService.checkRoleAllowed(role);
|
||||
|
|
@ -133,7 +137,7 @@ public class SysRoleController extends BaseController {
|
|||
* 修改保存数据权限
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.UPDATE, logType = 1, module = "系统管理->角色管理", details = "修改保存数据权限")
|
||||
@PutMapping("/dataScope")
|
||||
public AjaxResult dataScope(@RequestBody SysRole role) {
|
||||
roleService.checkRoleAllowed(role);
|
||||
|
|
@ -145,7 +149,7 @@ public class SysRoleController extends BaseController {
|
|||
* 状态修改
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.UPDATE, logType = 1, module = "系统管理->角色管理", details = "状态修改")
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysRole role) {
|
||||
roleService.checkRoleAllowed(role);
|
||||
|
|
@ -158,7 +162,7 @@ public class SysRoleController extends BaseController {
|
|||
* 删除角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:remove")
|
||||
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.DELETE, logType = 1, module = "系统管理->角色管理", details = "删除角色")
|
||||
@DeleteMapping("/{roleIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] roleIds) {
|
||||
return toAjax(roleService.deleteRoleByIds(roleIds));
|
||||
|
|
@ -199,7 +203,7 @@ public class SysRoleController extends BaseController {
|
|||
* 取消授权用户
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.GRANT, logType = 1, module = "系统管理->角色管理", details = "取消授权用户")
|
||||
@PutMapping("/authUser/cancel")
|
||||
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole) {
|
||||
return toAjax(roleService.deleteAuthUser(userRole));
|
||||
|
|
@ -209,7 +213,7 @@ public class SysRoleController extends BaseController {
|
|||
* 批量取消授权用户
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.GRANT, logType = 1, module = "系统管理->角色管理", details = "批量取消授权用户")
|
||||
@PutMapping("/authUser/cancelAll")
|
||||
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds) {
|
||||
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
|
||||
|
|
@ -219,7 +223,7 @@ public class SysRoleController extends BaseController {
|
|||
* 批量选择用户授权
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@SysLog(title = "角色管理", businessType = OperaType.GRANT, logType = 1, module = "系统管理->角色管理", details = "批量选择用户授权")
|
||||
@PutMapping("/authUser/selectAll")
|
||||
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds) {
|
||||
roleService.checkRoleDataScope(roleId);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class SysUserController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
||||
@SysLog(title = "用户管理", businessType = OperaType.EXPORT, logType = 1, module = "系统管理->用户管理", details = "导入")
|
||||
@RequiresPermissions("system:user:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysUser user)
|
||||
|
|
@ -81,7 +81,7 @@ public class SysUserController extends BaseController
|
|||
util.exportExcel(response, list, "用户数据");
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
||||
@SysLog(title = "用户管理", businessType = OperaType.IMPORT, logType = 1, module = "系统管理->用户管理", details = "导出")
|
||||
@RequiresPermissions("system:user:import")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
|
|
@ -105,6 +105,7 @@ public class SysUserController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:user:query")
|
||||
@GetMapping(value = { "/", "/{userId}" })
|
||||
@SysLog(title = "用户管理", businessType = OperaType.QUERY, logType = 1, module = "系统管理->用户管理", details = "根据用户编号获取详细信息")
|
||||
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
|
|
@ -126,7 +127,7 @@ public class SysUserController extends BaseController
|
|||
* 新增用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:add")
|
||||
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
||||
@SysLog(title = "用户管理", businessType = OperaType.INSERT, logType = 1, module = "系统管理->用户管理", details = "新增用户")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysUser user)
|
||||
{
|
||||
|
|
@ -154,7 +155,7 @@ public class SysUserController extends BaseController
|
|||
* 修改用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@SysLog(title = "用户管理", businessType = OperaType.UPDATE, logType = 1, module = "系统管理->用户管理", details = "修改用户")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysUser user)
|
||||
{
|
||||
|
|
@ -182,7 +183,7 @@ public class SysUserController extends BaseController
|
|||
* 删除用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:remove")
|
||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||
@SysLog(title = "用户管理", businessType = OperaType.DELETE, logType = 1, module = "系统管理->用户管理", details = "删除用户")
|
||||
@DeleteMapping("/{userIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] userIds)
|
||||
{
|
||||
|
|
@ -197,7 +198,7 @@ public class SysUserController extends BaseController
|
|||
* 重置密码
|
||||
*/
|
||||
@RequiresPermissions("system:user:resetPwd")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@SysLog(title = "用户管理", businessType = OperaType.UPDATE, logType = 1, module = "系统管理->用户管理", details = "重置密码")
|
||||
@PutMapping("/resetPwd")
|
||||
public AjaxResult resetPwd(@RequestBody SysUser user)
|
||||
{
|
||||
|
|
@ -212,7 +213,7 @@ public class SysUserController extends BaseController
|
|||
* 状态修改
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@SysLog(title = "用户管理", businessType = OperaType.UPDATE, logType = 1, module = "系统管理->用户管理", details = "状态修改")
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysUser user)
|
||||
{
|
||||
|
|
@ -241,7 +242,7 @@ public class SysUserController extends BaseController
|
|||
* 用户授权角色
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||
@SysLog(title = "用户管理", businessType = OperaType.GRANT, logType = 1, module = "系统管理->用户管理", details = "用户授权角色")
|
||||
@PutMapping("/authRole")
|
||||
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class FilesCustomizeClassifyController extends BaseController {
|
|||
* @param kyFilesCustomizeClassify
|
||||
* @return
|
||||
*/
|
||||
@SysLog(title = "档案自定义分类管理", businessType = OperaType.QUERY, module = "档案自定义分类管理->新增档案自定义分类管理", details = "新增档案自定义分类管理")
|
||||
@SysLog(title = "档案自定义分类管理", businessType = OperaType.INSERT, module = "档案自定义分类管理->新增档案自定义分类管理", details = "新增档案自定义分类管理")
|
||||
@RequiresPermissions("files:customize:add")
|
||||
@PostMapping("/addKyFilesCustomizeClassify")
|
||||
public AjaxResult addKyFilesCustomizeClassify(@Validated @RequestBody KyFilesCustomizeClassify kyFilesCustomizeClassify)
|
||||
|
|
@ -75,7 +75,7 @@ public class FilesCustomizeClassifyController extends BaseController {
|
|||
* @param kyFilesCustomizeClassify
|
||||
* @return
|
||||
*/
|
||||
@SysLog(title = "档案自定义分类管理", businessType = OperaType.QUERY, module = "档案自定义分类管理->修改档案自定义分类管理", details = "修改档案自定义分类管理")
|
||||
@SysLog(title = "档案自定义分类管理", businessType = OperaType.UPDATE, module = "档案自定义分类管理->修改档案自定义分类管理", details = "修改档案自定义分类管理")
|
||||
@RequiresPermissions("files:customize:update")
|
||||
@PostMapping("/updateKyFilesCustomizeClassify")
|
||||
public AjaxResult updateKyFilesCustomizeClassify(@Validated @RequestBody KyFilesCustomizeClassify kyFilesCustomizeClassify)
|
||||
|
|
@ -97,7 +97,7 @@ public class FilesCustomizeClassifyController extends BaseController {
|
|||
* @param kyFilesCustomizeClassify
|
||||
* @return
|
||||
*/
|
||||
@SysLog(title = "档案自定义分类管理", businessType = OperaType.QUERY, module = "档案自定义分类管理->删除档案自定义分类管理", details = "删除档案自定义分类管理")
|
||||
@SysLog(title = "档案自定义分类管理", businessType = OperaType.UPDATE, module = "档案自定义分类管理->删除档案自定义分类管理", details = "删除档案自定义分类管理")
|
||||
@RequiresPermissions("files:customize:del")
|
||||
@PostMapping("/delKyFilesCustomizeClassify")
|
||||
public AjaxResult delKyFilesCustomizeClassify(@Validated @RequestBody KyFilesCustomizeClassify kyFilesCustomizeClassify)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class FilesMultiClassifyController extends BaseController {
|
|||
* @param kyFilesMultiClassify
|
||||
* @return
|
||||
*/
|
||||
@SysLog(title = "档案多维度分类管理", businessType = OperaType.QUERY, module = "档案多维度分类管理->新增档案多维度分类管理", details = "新增档案多维度分类管理")
|
||||
@SysLog(title = "档案多维度分类管理", businessType = OperaType.INSERT, module = "档案多维度分类管理->新增档案多维度分类管理", details = "新增档案多维度分类管理")
|
||||
@RequiresPermissions("files:multi:add")
|
||||
@PostMapping("/addKyFilesMultiClassify")
|
||||
public AjaxResult addKyFilesMultiClassify(@Validated @RequestBody KyFilesMultiClassify kyFilesMultiClassify)
|
||||
|
|
@ -75,7 +75,7 @@ public class FilesMultiClassifyController extends BaseController {
|
|||
* @param kyFilesMultiClassify
|
||||
* @return
|
||||
*/
|
||||
@SysLog(title = "档案多维度分类管理", businessType = OperaType.QUERY, module = "档案多维度分类管理->新增档案多维度分类管理", details = "新增档案多维度分类管理")
|
||||
@SysLog(title = "档案多维度分类管理", businessType = OperaType.UPDATE, module = "档案多维度分类管理->新增档案多维度分类管理", details = "新增档案多维度分类管理")
|
||||
@RequiresPermissions("files:multi:update")
|
||||
@PostMapping("/updateKyFilesMultiClassify")
|
||||
public AjaxResult updateKyFilesMultiClassify(@Validated @RequestBody KyFilesMultiClassify kyFilesMultiClassify)
|
||||
|
|
@ -96,7 +96,7 @@ public class FilesMultiClassifyController extends BaseController {
|
|||
* @param kyFilesMultiClassify
|
||||
* @return
|
||||
*/
|
||||
@SysLog(title = "档案多维度分类管理", businessType = OperaType.QUERY, module = "档案多维度分类管理->删除档案多维度分类管理", details = "删除档案多维度分类管理")
|
||||
@SysLog(title = "档案多维度分类管理", businessType = OperaType.DELETE, module = "档案多维度分类管理->删除档案多维度分类管理", details = "删除档案多维度分类管理")
|
||||
@RequiresPermissions("files:multi:del")
|
||||
@PostMapping("/delKyFilesMultiClassify")
|
||||
public AjaxResult delKyFilesMultiClassify(@Validated @RequestBody KyFilesMultiClassify kyFilesMultiClassify)
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class KyDataClassifyController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequiresPermissions("data:classify:add")
|
||||
@SysLog(title = "数据集成", businessType = OperaType.QUERY,module = "数据集成->数据分类管理", details = "新增数据分类")
|
||||
@SysLog(title = "数据集成", businessType = OperaType.INSERT,module = "数据集成->数据分类管理", details = "新增数据分类")
|
||||
@PostMapping("/addKyDataClassify")
|
||||
public AjaxResult addKyDataClassify(@Validated @RequestBody KyDataClassify kyDataClassify)
|
||||
{
|
||||
|
|
@ -85,7 +85,7 @@ public class KyDataClassifyController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequiresPermissions("data:classify:update")
|
||||
@SysLog(title = "数据集成", businessType = OperaType.QUERY, module = "数据集成->数据分类管理", details = "修改数据分类")
|
||||
@SysLog(title = "数据集成", businessType = OperaType.UPDATE, module = "数据集成->数据分类管理", details = "修改数据分类")
|
||||
@PostMapping("/updateKyDataClassify")
|
||||
public AjaxResult updateKyDataClassify(@Validated @RequestBody KyDataClassify kyDataClassify)
|
||||
{
|
||||
|
|
@ -102,7 +102,7 @@ public class KyDataClassifyController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequiresPermissions("data:classify:del")
|
||||
@SysLog(title = "数据集成", businessType = OperaType.QUERY, module = "数据集成->数据分类管理", details = "删除数据分类")
|
||||
@SysLog(title = "数据集成", businessType = OperaType.DELETE, module = "数据集成->数据分类管理", details = "删除数据分类")
|
||||
@PostMapping("/delKyDataClassify")
|
||||
public AjaxResult delKyDataClassify(@Validated @RequestBody KyDataClassify kyDataClassify)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue