| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.exceptions.PartyBuildingMemberException; |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.service_dangjian.dao.ComPbOrgDAO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbOrgDO; |
| | | import com.panzhihua.service_dangjian.service.ComBpActivityService; |
| | | import com.panzhihua.service_dangjian.service.ComPbMemberService; |
| | | import com.panzhihua.service_dangjian.service.ComPbServiceTeamService; |
| | | import com.panzhihua.service_dangjian.service.PartyOrganizationService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private ComBpActivityService comBpActivityService; |
| | | @Resource |
| | | private ComPbServiceTeamService comPbServiceTeamService; |
| | | @Resource |
| | | private ComPbOrgDAO comPbOrgDAO; |
| | | |
| | | /** |
| | | * 社区所有启用的党组织列表 |
| | |
| | | * @return 党组织集合 |
| | | */ |
| | | @PostMapping("listpartyorganizationAll") |
| | | public R listPartyOrganizationAll(@RequestParam("communityId") Long communityId){ |
| | | List<PartyOrganizationVO> partyOrganizationVOS=partyOrganizationService.listPartyOrganizationAll(communityId); |
| | | return R.ok(partyOrganizationVOS); |
| | | public R listPartyOrganizationAll(@RequestBody PartyOrganizationVO partyOrganizationVO){ |
| | | return partyOrganizationService.listPartyOrganizationAll(partyOrganizationVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("usercertification") |
| | | R userCertification(@RequestParam("id")Long id){ |
| | | ComPbMemberDO comPbMemberDO = comPbMemberService.getOne(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getUserId, id)); |
| | | return R.ok(comPbMemberDO); |
| | | List<ComPbMemberDO> comPbMemberDOList = comPbMemberService.list(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getUserId, id)); |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = new ArrayList<>(); |
| | | comPbMemberDOList.forEach(comPbMemberDO -> { |
| | | PartyBuildingMemberVO partyBuildingMemberVO = new PartyBuildingMemberVO(); |
| | | BeanUtils.copyProperties(comPbMemberDO, partyBuildingMemberVO); |
| | | ComPbOrgDO comPbOrgDO = comPbOrgDAO.selectById(partyBuildingMemberVO.getOrgId()); |
| | | partyBuildingMemberVO.setOrgName(comPbOrgDO.getName()); |
| | | partyBuildingMemberVOList.add(partyBuildingMemberVO); |
| | | }); |
| | | return R.ok(partyBuildingMemberVOList); |
| | | } |
| | | |
| | | |
| | |
| | | public R deleteprepartybuildingmember(@RequestParam("id")Long id){ |
| | | return R.ok(comPbMemberService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 导出党员信息 |
| | | * @param organizationVO 请求参数 |
| | | * @return 党员信息列表 |
| | | */ |
| | | @PostMapping("exportPbMember") |
| | | public R exportPbMember(@RequestBody PagePartyOrganizationVO organizationVO){ |
| | | return comPbMemberService.exportPbMember(organizationVO); |
| | | } |
| | | } |