| | |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.OrganizationChartEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.service.ITransactionEventService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired(required = true) |
| | | IOrganizationChartService iOrganizationChartService; |
| | | |
| | | @Autowired(required = true) |
| | | ITransactionEventService iTransactionEventService; |
| | | |
| | | /** |
| | | * 查询机构列表 |
| | |
| | | public ResultData updateConfig(@RequestBody OrganizationChartEntity entity,@CurrentUser SysUser sysUser) |
| | | { |
| | | entity.setUpdateTime(LocalDateTime.now()); |
| | | entity.setUpdateUserId(Integer.parseInt(String.valueOf(sysUser.getUserId()))); |
| | | entity.setUpdateUserId(sysUser.getUserId()); |
| | | return toAjax(iOrganizationChartService.updateConfig(entity)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("删除机构") |
| | | @DeleteMapping("/delete") |
| | | // @Authorization |
| | | @Authorization |
| | | public ResultData deleteConfigById(@RequestParam(value = "Id",required = false) String Id) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | |
| | | if(list!=null && list.size()>0) |
| | | { |
| | | return ResultData.error("该机构下存在其他部门!请先删除子部门"); |
| | | } |
| | | |
| | | List<String> ids=new ArrayList<>(); |
| | | ids.add(Id); |
| | | List<TransactionEvent> transactionEvents=iTransactionEventService.selectConfigList(null,null,ids); |
| | | |
| | | if(transactionEvents!=null && transactionEvents.size()>0) |
| | | { |
| | | return ResultData.error("该机构下已绑定办事指南!请解绑办事指南"); |
| | | } |
| | | return toAjax(iOrganizationChartService.deleteConfigById(Id)); |
| | | } |
| | |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | for (OrganizationChartEntity sysStreet:lists) |
| | | { |
| | | ids.add(sysStreet); |
| | | if(sysStreet.getChild()!=null && sysStreet.getChild().size()>0) |
| | | { |
| | | ids.addAll(disposestreet(sysStreet.getChild())); |