| | |
| | | private String url; |
| | | |
| | | |
| | | @ApiOperation(value = "社区所有党组织", response = PartyOrganizationVO.class) |
| | | @ApiOperation(value = "社区所有启用的党组织列表", response = PartyOrganizationVO.class) |
| | | @GetMapping("listpartyorganization") |
| | | public R listPartyOrganization() { |
| | | Long communityId = this.getCommunityId(); |
| | | log.info("社区所有党组织社区id【{}】", communityId); |
| | | return partyBuildingService.listPartyOrganization(communityId); |
| | | } |
| | | @ApiOperation(value = "社区所有党组织列表", response = PartyOrganizationVO.class) |
| | | @GetMapping("listpartyorganizationAll") |
| | | public R listPartyOrganizationAll() { |
| | | Long communityId = this.getCommunityId(); |
| | | log.info("社区所有党组织社区id【{}】", communityId); |
| | | return partyBuildingService.listPartyOrganizationAll(communityId); |
| | | } |
| | | |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 1) |
| | | @ApiOperation(value = "新增党支部") |
| | | @PostMapping("addpartyorganization") |
| | | public R addPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long communityId = this.getCommunityId(); |
| | | partyOrganizationVO.setCommunityId(communityId); |
| | | R r = partyBuildingService.addPartyOrganization(partyOrganizationVO); |
| | | return r; |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 2) |
| | | @ApiOperation(value = "编辑党支部") |
| | | @PostMapping("updatepartyorganization") |
| | | public R updatePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long id = partyOrganizationVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("党支部id不能为空"); |
| | | } |
| | | return partyBuildingService.updatePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 3) |
| | | @ApiOperation(value = "启用、禁用党支部") |
| | | @PutMapping("resetpartyorganization") |
| | | public R resetPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long id = partyOrganizationVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("党支部id不能为空"); |
| | | } |
| | | Integer status = partyOrganizationVO.getStatus(); |
| | | if(null==status||(status!=1&&status!=2)) { |
| | | return R.fail("输入有效的状态,1:启用,2:禁用"); |
| | | } |
| | | return partyBuildingService.resetPartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 4) |
| | | @ApiOperation(value = "删除党支部") |
| | | @PutMapping("deletepartyorganization") |
| | | public R deletePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long id = partyOrganizationVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("党支部id不能为空"); |
| | | } |
| | | return partyBuildingService.deletePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 1) |
| | | @ApiOperation(value = "新增党员") |