|
|
@ -2,6 +2,7 @@ package com.epmet.modules.partymember.service.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
@ -26,7 +27,11 @@ import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; |
|
|
|
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
|
|
|
import com.epmet.modules.partyOrg.service.IcPartyOrgService; |
|
|
|
import com.epmet.modules.partymember.dao.IcPartyMemberDao; |
|
|
|
import com.epmet.modules.partymember.dao.IcPartyMemberPayRecordDao; |
|
|
|
import com.epmet.modules.partymember.dao.IcPartyMemberPointDao; |
|
|
|
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
|
|
|
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordEntity; |
|
|
|
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; |
|
|
|
import com.epmet.modules.partymember.service.IcPartyMemberService; |
|
|
|
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; |
|
|
@ -61,6 +66,10 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao, |
|
|
|
private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; |
|
|
|
@Resource |
|
|
|
private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient; |
|
|
|
@Resource |
|
|
|
private IcPartyMemberPayRecordDao icPartyMemberPayRecordDao; |
|
|
|
@Resource |
|
|
|
private IcPartyMemberPointDao icPartyMemberPointDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<IcPartyMemberResultDTO> page(TokenDto tokenDto, IcPartyMemberFromDTO formDTO) { |
|
|
@ -71,7 +80,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao, |
|
|
|
if (StringUtils.isBlank(formDTO.getPartyOrgId())) { |
|
|
|
//获取工作人员所属组织同级的党组织
|
|
|
|
LambdaQueryWrapper<IcPartyOrgEntity> orgWrapper = new LambdaQueryWrapper<>(); |
|
|
|
orgWrapper.eq(IcPartyOrgEntity::getCustomerId, formDTO.getCustomerId()); |
|
|
|
orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId()); |
|
|
|
orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId()); |
|
|
|
IcPartyOrgEntity org = icPartyOrgDao.selectOne(orgWrapper); |
|
|
|
if (null == org) { |
|
|
@ -104,9 +113,11 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao, |
|
|
|
item.setPartyZw(PartyPostEnum.getName(item.getPartyZw())); |
|
|
|
item.setCulture(education.getData().get(item.getCulture())); |
|
|
|
item.setPoint(("0.00").equals(item.getPoint()) ? StrConstant.HYPHEN : item.getPoint()); |
|
|
|
if (StringUtils.isNotBlank(item.getVolunteerCategory())) { |
|
|
|
List<String> category = Arrays.asList(item.getVolunteerCategory().split(StrConstant.COMMA)); |
|
|
|
List<String> categoryNames = category.stream().map(volunteerMap.getData()::get).collect(Collectors.toList()); |
|
|
|
item.setVolunteerCategory(String.join(String.valueOf((char) 10), categoryNames)); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
return new PageData<>(list, pageInfo.getTotal()); |
|
|
@ -238,7 +249,16 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao, |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void delete(String[] ids) { |
|
|
|
// 逻辑删除(@TableLogic 注解)
|
|
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
|
List<String> idList = Arrays.asList(ids); |
|
|
|
baseDao.deleteBatchIds(idList); |
|
|
|
|
|
|
|
LambdaUpdateWrapper<IcPartyMemberPayRecordEntity> payWrapper = new LambdaUpdateWrapper<>(); |
|
|
|
payWrapper.in(IcPartyMemberPayRecordEntity::getPartyMemberId, idList); |
|
|
|
icPartyMemberPayRecordDao.delete(payWrapper); |
|
|
|
|
|
|
|
LambdaUpdateWrapper<IcPartyMemberPointEntity> pointWrapper = new LambdaUpdateWrapper<>(); |
|
|
|
pointWrapper.in(IcPartyMemberPointEntity::getPartyMemberId, idList); |
|
|
|
icPartyMemberPointDao.delete(pointWrapper); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|