| | |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody Map<String,Object> para) |
| | | { |
| | | ArdEplan result = ardEplanService.selectArdEplanById((String) para.get("id")); |
| | | if(!result.getDeptId().equals(String.valueOf((Integer) para.get("deptId")))){ |
| | | return toAjax(0);//非本部门预案无法更改 |
| | | } |
| | | ArdEplan ardEplan = new ArdEplan(); |
| | | ardEplan.setId((String) para.get("id")); |
| | | ardEplan.setName((String) para.get("name")); |
| | |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) |
| | | { |
| | | ArdEplan result = ardEplanService.selectArdEplanById(ids[0]); |
| | | String userId = SecurityUtils.getUserId(); |
| | | SysUser sysUser = userService.selectUserById(userId); |
| | | if(!result.getDeptId().equals(String.valueOf(sysUser.getDeptId()))){ |
| | | return toAjax(0);//非本部门预案无法删除 |
| | | } |
| | | return toAjax(ardEplanService.deleteArdEplanByIds(ids)); |
| | | } |
| | | } |