| | |
| | | @ApiOperation(value = "新增", notes = "传入information") |
| | | public R save(@Valid @RequestBody Information information) { |
| | | Dept dept= new Dept(); |
| | | String departmentid = information.getDepartmentid(); |
| | | Long l=Long.parseLong(departmentid); |
| | | //自招保安公司 |
| | | if(information.getStats().equals("0")){ |
| | | Long i = 1420222768149966850L; |
| | |
| | | dept.setDeptName(information.getEnterprisename()); |
| | | dept.setAncestors("0,1418458374477549569"); |
| | | dept.setDeptCategory(1); |
| | | |
| | | } |
| | | //保安服务公司 |
| | | if(information.getStats().equals("2")){ |
| | |
| | | dept.setAncestors("0,1420222961377357825"); |
| | | dept.setDeptCategory(1); |
| | | } |
| | | dept.setId(l); |
| | | if (iDeptService.submit(dept)) { |
| | | CacheUtil.clear(SYS_CACHE); |
| | | // 返回懒加载树更新节点所需字段 |
| | |
| | | return R.data(maps); |
| | | } |
| | | |
| | | /** |
| | | * 单位删除 |
| | | */ |
| | | @PostMapping("/deleteDept") |
| | | public R deleteDept(String ids) { |
| | | informationService.deleteDept(ids); |
| | | return R.success("删除成功"); |
| | | } |
| | | |
| | | } |