Browse Source

党员查询修改

dev
zhaoqifeng 3 years ago
parent
commit
922f14ba6b
  1. 12
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java
  2. 19
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java

12
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java

@ -97,7 +97,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
//获取文化程度字典
Result<Map<String, String>> education = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode());
if (!education.success()) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "获取文化程度信息失败", "获取文化程度信息失败");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取文化程度信息失败", "获取文化程度信息失败");
}
if (CollectionUtils.isNotEmpty(list)) {
//获取志愿者类别
@ -143,14 +143,14 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
public IcPartyMemberDTO get(String id) {
IcPartyMemberEntity entity = baseDao.selectById(id);
if (null == entity) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "党员不存在", "党员不存在");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "党员不存在", "党员不存在");
}
IcPartyMemberDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyMemberDTO.class);
//党组织名
if (StringUtils.isNotBlank(dto.getSszb())) {
IcPartyOrgEntity org = icPartyOrgService.selectById(dto.getSszb());
if (null == org) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "获取党组织信息失败", "获取党组织信息失败");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取党组织信息失败", "获取党组织信息失败");
}
dto.setOrgName(org.getPartyOrgName());
@ -168,7 +168,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
if (StringUtils.isNotBlank(dto.getCulture())) {
Result<Map<String, String>> education = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode());
if (!education.success()) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "获取文化程度信息失败", "获取文化程度信息失败");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取文化程度信息失败", "获取文化程度信息失败");
}
dto.setCultureName(education.getData().get(dto.getCulture()));
}
@ -201,7 +201,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
wrapper.eq(IcPartyMemberEntity::getIdCard, dto.getIdCard());
IcPartyMemberEntity partyMember = baseDao.selectOne(wrapper);
if (null != partyMember) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "党员已存在", "党员已存在");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "党员已存在", "党员已存在");
}
//同步ic_resi_user表对应的数据,并获取志愿者类型
@ -236,7 +236,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
wrapper.eq(IcPartyMemberEntity::getIdCard, dto.getIdCard());
IcPartyMemberEntity partyMember = baseDao.selectOne(wrapper);
if (null != partyMember && !partyMember.getId().equals(dto.getId())) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "党员已存在", "党员已存在");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "党员已存在", "党员已存在");
}
//同步ic_resi_user表对应的数据,并获取志愿者类型

19
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java

@ -8,17 +8,15 @@ import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseFormDTO;
import com.epmet.commons.tools.enums.IcFormCodeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.enums.IcFormCodeEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcResiUserDao;
import com.epmet.dao.IcVolunteerPolyCategoryDao;
@ -29,32 +27,33 @@ import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.IcFormOptionsQueryFormDTO;
import com.epmet.dto.form.VolunteerPolyListFormDTO;
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO;
import com.epmet.dto.form.VolunteerPolyPieFormDTO;
import com.epmet.dto.result.ResiUserBaseInfoResultDTO;
import com.epmet.dto.result.VolunteerPolyListResultDTO;
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO;
import com.epmet.dto.result.VolunteerPolyPieResultDTO;
import com.epmet.entity.IcResiUserEntity;
import com.epmet.dto.form.VolunteerPolyPieFormDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.IcVolunteerPolyCategoryEntity;
import com.epmet.entity.IcVolunteerPolyEntity;
import com.epmet.entity.UserBaseInfoEntity;
import com.epmet.feign.EpmetHeartOpenFeignClient;
import com.epmet.service.IcVolunteerPolyCategoryService;
import com.epmet.feign.OperCustomizeOpenFeignClient;
import com.epmet.service.IcVolunteerPolyCategoryService;
import com.epmet.service.IcVolunteerPolyService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.annotation.Resource;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -191,7 +190,7 @@ public class IcVolunteerPolyServiceImpl extends BaseServiceImpl<IcVolunteerPolyD
@Transactional(rollbackFor = Exception.class)
public void volunteerDataExtraction(String customerId) {
if (StringUtils.isEmpty(customerId)) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "客户ID不能为空", "客户ID不能为空");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "客户ID不能为空", "客户ID不能为空");
}
//获取居民信息表的志愿者
List<IcVolunteerPolyDTO> volunteerList = icResiUserDao.getVolunteerList(customerId, null);

Loading…
Cancel
Save