lidongdong
2023-11-14 ce4a770744d7a0b4e4ea3b5101556b94e72bdf1c
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberWestServiceImpl.java
@@ -9,6 +9,7 @@
import javax.annotation.Resource;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdcardUtil;
import com.google.common.collect.Lists;
import com.panzhihua.common.enums.ComPbMemberRoleTypeEnum;
@@ -72,6 +73,8 @@
    private CommunityWestService communityWestService;
    @Resource
    private UserService userService;
    @Resource
    private ComPbMemberDAO comPbMemberDAO;
    /**
     * 新增党员
@@ -93,6 +96,7 @@
        Date date = new Date();
        comPbMemberWestDO1.setCreateAt(date);
        comPbMemberWestDO1.setUpdateAt(date);
        comPbMemberWestDO1.setId(null);
        int insert = comPbMemberWestDAO.insert(comPbMemberWestDO1);
        if (insert > 0) {
            // 删除已驳回的记录
@@ -266,6 +270,15 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = pagePartyOrganizationVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            pagePartyOrganizationVO.setCommunityIds(communityIds);
        }
        IPage<PartyBuildingMemberVO> iPage = comPbMemberWestDAO.queryAllByLimit(page, pagePartyOrganizationVO);
        iPage.getRecords().forEach(record -> {
            record.setIdCard(SensitiveUtil.desensitizedIdNumber(record.getIdCard()));
@@ -553,6 +566,21 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = partyBuildingComPbDynVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            partyBuildingComPbDynVO.setCommunityIds(communityIds);
        }else {
            //西区大屏
            if (CollUtil.isEmpty(partyBuildingComPbDynVO.getCommunityIds()) || "wx0cef797390444b75".equals(partyBuildingComPbDynVO.getAppId())){
                List<Long> selectDistinctCommunityId = comPbMemberDAO.selectDistinctCommunityId("西区");
                partyBuildingComPbDynVO.setCommunityIds(selectDistinctCommunityId);
            }
        }
        IPage<PartyBuildingComPbDynVO> iPage = comPbDynDAO.pageYnamic(page, partyBuildingComPbDynVO);
        List<PartyBuildingComPbDynVO> records = iPage.getRecords();
        if (!(ObjectUtils.isEmpty(records))) {
@@ -575,7 +603,7 @@
     * @return 删除结果
     */
    @Override
    public R deleteYnamic(Integer id) {
    public R deleteYnamic(Long id) {
        int delete = comPbDynDAO.deleteById(id);
        if (delete > 0) {
            return R.ok();