Browse Source

Merge remote-tracking branch 'origin_elink/yantai_zhengwu_master'

master
yinzuomei 2 years ago
parent
commit
4bc6e5d7dd
  1. 41
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/PartymemberPortraitResultDTO.java
  2. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java
  3. 24
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java
  4. 172
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java
  5. 5
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberDao.java
  6. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java
  7. 92
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java
  8. 48
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml
  9. 11
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcPartyMemberListFormDTO.java
  10. 10
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PartyMemberAgeResultDTO.java
  11. 7
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PartyMemberEducationResultDTO.java
  12. 32
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  13. 12
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

41
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/PartymemberPortraitResultDTO.java

@ -0,0 +1,41 @@
package com.epmet.resi.partymember.dto.partymember.result;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
/**
* @Description 烟台管理平台党员画像
* @Author yzm
* @Date 2023/4/20 13:32
*/
@Data
public class PartymemberPortraitResultDTO {
@ExcelIgnore
private String userId;
@ColumnWidth(15)
@ExcelProperty(value = "姓名",order = 1)
private String name;
@ColumnWidth(20)
@ExcelProperty(value = "手机号",order = 2)
private String mobile;
@ColumnWidth(20)
@ExcelProperty(value = "证件号",order = 3)
private String idCard;
@ColumnWidth(15)
@ExcelProperty(value = "年龄",order = 4)
private String age;
@ColumnWidth(15)
@ExcelProperty(value = "学历",order = 5)
private String education;
@ExcelIgnore
private String icResiUser;
}

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java

@ -158,4 +158,12 @@ public interface IcPartyOrgService extends BaseService<IcPartyOrgEntity> {
*/ */
void editPrincipal(EditPrincipalFormDTO formDTO); void editPrincipal(EditPrincipalFormDTO formDTO);
/**
* 获取工作人员所属组织下的党组织
* @param customerId
* @param staffId
* @return
*/
IcPartyOrgEntity getIcPartyOrg(String customerId,String staffId);
} }

24
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java

@ -503,4 +503,28 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart
baseDao.editPrincipal(formDTO); baseDao.editPrincipal(formDTO);
} }
/**
* 获取工作人员所属组织下的党组织
*
* @param customerId
* @param staffId
* @return
*/
@Override
public IcPartyOrgEntity getIcPartyOrg(String customerId, String staffId) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staffId);
if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取工作人员信息失败", "获取工作人员信息失败");
}
// 获取工作人员所属组织同级的党组织
LambdaQueryWrapper<IcPartyOrgEntity> orgWrapper = new LambdaQueryWrapper<>();
orgWrapper.eq(IcPartyOrgEntity::getCustomerId, customerId);
orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId());
orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR);
IcPartyOrgEntity icPartyOrgEntity = baseDao.selectOne(orgWrapper);
if (null == icPartyOrgEntity) {
log.warn("当前工作人员所属组织下,暂无党组织,当前");
}
return icPartyOrgEntity;
}
} }

172
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java

@ -4,21 +4,18 @@ import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.annotation.MaskResponse;
import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.*; import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
@ -33,14 +30,15 @@ import com.epmet.dto.form.IcPartyMemberListFormDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.PartyMemberAgeResultDTO; import com.epmet.dto.result.PartyMemberAgeResultDTO;
import com.epmet.dto.result.PartyMemberEducationResultDTO; import com.epmet.dto.result.PartyMemberEducationResultDTO;
import com.epmet.modules.partyOrg.dao.IcPartyOrgDao;
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.modules.partyOrg.service.IcPartyOrgService;
import com.epmet.modules.partymember.excel.IcPartyMemberExcel; import com.epmet.modules.partymember.excel.IcPartyMemberExcel;
import com.epmet.modules.partymember.service.IcPartyMemberService; import com.epmet.modules.partymember.service.IcPartyMemberService;
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO;
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO;
import com.epmet.resi.partymember.dto.partymember.result.IcPartyInfoResultDTO; import com.epmet.resi.partymember.dto.partymember.result.IcPartyInfoResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.PartymemberPortraitResultDTO;
import com.epmet.utils.ImportTaskUtils; import com.epmet.utils.ImportTaskUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
@ -59,10 +57,7 @@ import java.io.InputStream;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.ArrayList; import java.util.*;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
@ -79,8 +74,10 @@ public class IcPartyMemberController implements ResultDataResolver {
@Autowired @Autowired
private IcPartyMemberService icPartyMemberService; private IcPartyMemberService icPartyMemberService;
// @Autowired
// private IcPartyOrgDao icPartyOrgDao;
@Autowired @Autowired
private IcPartyOrgDao icPartyOrgDao; private IcPartyOrgService icPartyOrgService;
@RequestMapping("page") @RequestMapping("page")
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD })
@ -230,6 +227,26 @@ public class IcPartyMemberController implements ResultDataResolver {
return new Result(); return new Result();
} }
/**
* @describe: 统计分析-党员年龄范围统计
* @author wangtong
* @date 2022/5/23 10:19
* @params [formDTO]
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>>
*/
@PostMapping("partymemberagestatistics")
public Result<List<OptionDataResultDTO>> partyMemberAgeStatistics(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getOrgId())){
IcPartyOrgEntity org =icPartyOrgService.getIcPartyOrg(tokenDto.getCustomerId(),tokenDto.getUserId());
if (null == org) {
return new Result<List<OptionDataResultDTO>>().ok(new ArrayList<>());
}
formDTO.setOrgId(org.getId());
}
return new Result<List<OptionDataResultDTO>>().ok(icPartyMemberService.partyMemberAgeStatistics(formDTO));
}
/** /**
* @describe: 统计分析-党员学历统计 * @describe: 统计分析-党员学历统计
* @author wangtong * @author wangtong
@ -240,7 +257,7 @@ public class IcPartyMemberController implements ResultDataResolver {
@PostMapping("partymembereducationstatistics") @PostMapping("partymembereducationstatistics")
public Result<List<OptionDataResultDTO>> partyMemberEducationStatistics(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFormDTO formDTO) { public Result<List<OptionDataResultDTO>> partyMemberEducationStatistics(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getOrgId())){ if(StringUtils.isBlank(formDTO.getOrgId())){
IcPartyOrgEntity org = setOrgId(tokenDto); IcPartyOrgEntity org= icPartyOrgService.getIcPartyOrg(tokenDto.getCustomerId(),tokenDto.getUserId());
if (null == org) { if (null == org) {
return new Result<List<OptionDataResultDTO>>().ok(new ArrayList<>()); return new Result<List<OptionDataResultDTO>>().ok(new ArrayList<>());
} }
@ -260,7 +277,7 @@ public class IcPartyMemberController implements ResultDataResolver {
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE})
public Result<PageData<PartyMemberAgeResultDTO>> partyMemberAgelist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) { public Result<PageData<PartyMemberAgeResultDTO>> partyMemberAgelist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getOrgId())){ if(StringUtils.isBlank(formDTO.getOrgId())){
IcPartyOrgEntity org = setOrgId(tokenDto); IcPartyOrgEntity org= icPartyOrgService.getIcPartyOrg(tokenDto.getCustomerId(),tokenDto.getUserId());
if (null == org) { if (null == org) {
return new Result<PageData<PartyMemberAgeResultDTO>>().ok(new PageData<>(Collections.emptyList(), 0)); return new Result<PageData<PartyMemberAgeResultDTO>>().ok(new PageData<>(Collections.emptyList(), 0));
} }
@ -280,7 +297,7 @@ public class IcPartyMemberController implements ResultDataResolver {
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE})
public Result<PageData<PartyMemberEducationResultDTO>> partyMemberEducationlist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) { public Result<PageData<PartyMemberEducationResultDTO>> partyMemberEducationlist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getOrgId())){ if(StringUtils.isBlank(formDTO.getOrgId())){
IcPartyOrgEntity org = setOrgId(tokenDto); IcPartyOrgEntity org= icPartyOrgService.getIcPartyOrg(tokenDto.getCustomerId(),tokenDto.getUserId());
if (null == org) { if (null == org) {
return new Result<PageData<PartyMemberEducationResultDTO>>().ok(new PageData<>(Collections.emptyList(), 0)); return new Result<PageData<PartyMemberEducationResultDTO>>().ok(new PageData<>(Collections.emptyList(), 0));
} }
@ -289,43 +306,116 @@ public class IcPartyMemberController implements ResultDataResolver {
return new Result<PageData<PartyMemberEducationResultDTO>>().ok(icPartyMemberService.getPartyMemberEducationList(formDTO)); return new Result<PageData<PartyMemberEducationResultDTO>>().ok(icPartyMemberService.getPartyMemberEducationList(formDTO));
} }
/** /**
* @describe: 统计分析-党员年龄范围统计 * 烟台党员画像列表接口将上方两个接口合为一个
* @author wangtong * @param formDTO
* @date 2022/5/23 10:19 * @return
* @params [formDTO]
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>>
*/ */
@PostMapping("partymemberagestatistics") @PostMapping("partymember-portrait-list")
public Result<List<OptionDataResultDTO>> partyMemberAgeStatistics(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberFormDTO formDTO) { @MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE,MaskResponse.MASK_TYPE_ID_CARD})
if(StringUtils.isBlank(formDTO.getOrgId())){ public Result<PageData<PartymemberPortraitResultDTO>> queryPartyMemberPortraitList(@RequestBody IcPartyMemberListFormDTO formDTO) {
IcPartyOrgEntity org = setOrgId(tokenDto); return new Result<PageData<PartymemberPortraitResultDTO>>().ok(icPartyMemberService.queryPartyMemberPortraitList(formDTO));
if (null == org) { }
return new Result<List<OptionDataResultDTO>>().ok(new ArrayList<>());
/**
* 烟台党员画像列表-导出
* @param formDTO
* @return
*/
@NoRepeatSubmit
@PostMapping("partymember-portrait-export")
public void partymemberPortraitExport(@RequestBody IcPartyMemberListFormDTO formDTO, HttpServletResponse response) throws Exception {
ExcelWriter excelWriter = null;
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
formDTO.setIsPage(true);
String fileName=getPartymemberPortraitFileName(formDTO.getCodeType(),formDTO.getCode());
try {
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), PartymemberPortraitResultDTO.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
PageData<PartymemberPortraitResultDTO> data = null;
List<PartymemberPortraitResultDTO> list = null;
do {
data = icPartyMemberService.queryPartyMemberPortraitList(formDTO);
list = data.getList();
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
excelWriter.write(list, writeSheet);
} while (org.apache.commons.collections4.CollectionUtils.isNotEmpty(list) && list.size() == formDTO.getPageSize());
} catch (EpmetException e) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setHeader("content-type", "application/json; charset=UTF-8");
PrintWriter printWriter = response.getWriter();
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getMsg());
printWriter.write(JSON.toJSONString(result));
printWriter.close();
} catch (Exception e) {
log.error("党员画像列表导出exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
} }
formDTO.setOrgId(org.getId());
} }
return new Result<List<OptionDataResultDTO>>().ok(icPartyMemberService.partyMemberAgeStatistics(formDTO));
} }
/** /**
* @describe: 组装党组织信息 * 烟台党员画像列表-导出
* @author wangtong * @return 返回导出excel的文件名
* @date 2022/7/8 16:46
* @params [tokenDto, formDTO]
* @return com.epmet.modules.partyOrg.entity.IcPartyOrgEntity
*/ */
public IcPartyOrgEntity setOrgId(TokenDto tokenDto){ private String getPartymemberPortraitFileName(String codeType, String code) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); String name = "党员画像";
if (null == staffInfo) { if ("age".equals(codeType)) {
throw new EpmetException("获取工作人员信息失败"); switch (code) {
} case NumConstant.ZERO_STR:
//获取工作人员所属组织同级的党组织 name = "50岁以下党员信息";
LambdaQueryWrapper<IcPartyOrgEntity> orgWrapper = new LambdaQueryWrapper<>(); break;
orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId()); case NumConstant.ONE_STR:
orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId()); name = "50-59岁党员信息";
orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR); break;
return icPartyOrgDao.selectOne(orgWrapper); case NumConstant.TWO_STR:
name = "60-69岁党员信息";
break;
case NumConstant.THREE_STR:
name = "70-79岁党员信息";
break;
case NumConstant.FOUR_STR:
name = "80岁以上党员信息";
break;
default:
name = "";
break;
}
}else if ("education".equals(codeType)) {
switch (code) {
case NumConstant.ZERO_STR:
name = "小学及文盲党员信息";
break;
case NumConstant.ONE_STR:
name = "初中学历党员信息";
break;
case NumConstant.TWO_STR:
name = "高中学历党员信息";
break;
case NumConstant.THREE_STR:
name = "大专学历党员信息";
break;
case NumConstant.FOUR_STR:
name = "本科学历党员信息";
break;
case NumConstant.FIVE_STR:
name = "硕士学历党员信息";
break;
case NumConstant.SIX_STR:
name = "博士学历党员信息";
break;
default:
name = "党员画像";
break;
}
}
String fileName=name+DateUtils.format(new Date()) + ".xlsx";
return fileName;
} }

5
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberDao.java

@ -65,7 +65,10 @@ public interface IcPartyMemberDao extends BaseDao<IcPartyMemberEntity> {
* @params [orgId, code] * @params [orgId, code]
* @return java.util.List<com.epmet.dto.result.PartyMemberEducationResultDTO> * @return java.util.List<com.epmet.dto.result.PartyMemberEducationResultDTO>
*/ */
List<PartyMemberEducationResultDTO> getPartyMemberEducationList(@Param("agencyId") String agencyId,@Param("orgId") String orgId,@Param("code") String code); List<PartyMemberEducationResultDTO> getPartyMemberEducationList(@Param("agencyId") String agencyId,
@Param("orgId") String orgId,
@Param("code") String code,
@Param("codeType") String codeType);
/** /**
* @describe: 党员年龄范围统计 * @describe: 党员年龄范围统计

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java

@ -8,6 +8,7 @@ import com.epmet.dto.form.IcPartyMemberFormDTO;
import com.epmet.dto.form.IcPartyMemberListFormDTO; import com.epmet.dto.form.IcPartyMemberListFormDTO;
import com.epmet.dto.result.PartyMemberAgeResultDTO; import com.epmet.dto.result.PartyMemberAgeResultDTO;
import com.epmet.dto.result.PartyMemberEducationResultDTO; import com.epmet.dto.result.PartyMemberEducationResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.PartymemberPortraitResultDTO;
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; import com.epmet.modules.partymember.entity.IcPartyMemberEntity;
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO;
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO;
@ -150,4 +151,11 @@ public interface IcPartyMemberService extends BaseService<IcPartyMemberEntity> {
void execAsyncExcelImport(Path filePath, String importTaskId); void execAsyncExcelImport(Path filePath, String importTaskId);
IcPartyInfoResultDTO partyInfo(TokenDto tokenDto); IcPartyInfoResultDTO partyInfo(TokenDto tokenDto);
/**
* 烟台管理平台党员画像列表查询
* @param formDTO
* @return
*/
PageData<PartymemberPortraitResultDTO> queryPartyMemberPortraitList(IcPartyMemberListFormDTO formDTO);
} }

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

@ -10,7 +10,6 @@ import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO; import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.enums.DictTypeEnum;
@ -22,7 +21,6 @@ import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.*; import com.epmet.commons.tools.utils.*;
import com.epmet.constants.ImportTaskConstants; import com.epmet.constants.ImportTaskConstants;
@ -49,6 +47,7 @@ import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO;
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO;
import com.epmet.resi.partymember.dto.partymember.result.IcPartyInfoResultDTO; import com.epmet.resi.partymember.dto.partymember.result.IcPartyInfoResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.PartymemberPortraitResultDTO;
import com.epmet.utils.ImportTaskUtils; import com.epmet.utils.ImportTaskUtils;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@ -106,17 +105,9 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
@Override @Override
public PageData<IcPartyMemberResultDTO> page(TokenDto tokenDto, IcPartyMemberFromDTO formDTO) { public PageData<IcPartyMemberResultDTO> page(TokenDto tokenDto, IcPartyMemberFromDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo) {
throw new EpmetException("获取工作人员信息失败");
}
if (StringUtils.isBlank(formDTO.getPartyOrgId())) { if (StringUtils.isBlank(formDTO.getPartyOrgId())) {
//获取工作人员所属组织同级的党组织 //获取工作人员所属组织同级的党组织
LambdaQueryWrapper<IcPartyOrgEntity> orgWrapper = new LambdaQueryWrapper<>(); IcPartyOrgEntity org = icPartyOrgService.getIcPartyOrg(tokenDto.getCustomerId(),tokenDto.getUserId());
orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId());
orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId());
orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR);
IcPartyOrgEntity org = icPartyOrgDao.selectOne(orgWrapper);
if (null == org) { if (null == org) {
return new PageData<>(Collections.emptyList(), 0); return new PageData<>(Collections.emptyList(), 0);
} }
@ -177,17 +168,8 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
@Override @Override
public IcPartyMemberDTO get(TokenDto tokenDto, String id) { public IcPartyMemberDTO get(TokenDto tokenDto, String id) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo) {
throw new EpmetException("获取工作人员信息失败");
}
//获取工作人员所属组织同级的党组织 //获取工作人员所属组织同级的党组织
LambdaQueryWrapper<IcPartyOrgEntity> orgWrapper = new LambdaQueryWrapper<>(); IcPartyOrgEntity orgInfo=icPartyOrgService.getIcPartyOrg(tokenDto.getCustomerId(),tokenDto.getUserId());
orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId());
orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId());
orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR);
IcPartyOrgEntity orgInfo = icPartyOrgDao.selectOne(orgWrapper);
if (null == orgInfo) { if (null == orgInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "党组织不存在", "党组织不存在"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "党组织不存在", "党组织不存在");
} }
@ -450,7 +432,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<PartyMemberAgeResultDTO> list = baseDao.getPartyMemberAgeList(formDTO.getAgencyId(),formDTO.getOrgId(), formDTO.getCode()); List<PartyMemberAgeResultDTO> list = baseDao.getPartyMemberAgeList(formDTO.getAgencyId(),formDTO.getOrgId(), formDTO.getCode());
PageInfo<PartyMemberAgeResultDTO> pageInfo = new PageInfo<>(list); PageInfo<PartyMemberAgeResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal()); return new PageData<>(list, pageInfo.getTotal(),formDTO.getPageSize());
} }
List<PartyMemberAgeResultDTO> list = baseDao.getPartyMemberAgeList(formDTO.getAgencyId(),formDTO.getOrgId(), formDTO.getCode()); List<PartyMemberAgeResultDTO> list = baseDao.getPartyMemberAgeList(formDTO.getAgencyId(),formDTO.getOrgId(), formDTO.getCode());
return new PageData<>(list, null == list?NumConstant.ZERO:list.size()); return new PageData<>(list, null == list?NumConstant.ZERO:list.size());
@ -460,23 +442,23 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
public PageData<PartyMemberEducationResultDTO> getPartyMemberEducationList(IcPartyMemberListFormDTO formDTO) { public PageData<PartyMemberEducationResultDTO> getPartyMemberEducationList(IcPartyMemberListFormDTO formDTO) {
if (formDTO.getIsPage()) { if (formDTO.getIsPage()) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<PartyMemberEducationResultDTO> list = baseDao.getPartyMemberEducationList(formDTO.getAgencyId(),formDTO.getOrgId(), formDTO.getCode()); List<PartyMemberEducationResultDTO> list = baseDao.getPartyMemberEducationList(formDTO.getAgencyId(),formDTO.getOrgId(), formDTO.getCode(),"education");
Result<Map<String, String>> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode());
PageInfo<PartyMemberEducationResultDTO> pageInfo = new PageInfo<>(list); PageInfo<PartyMemberEducationResultDTO> pageInfo = new PageInfo<>(list);
if (CollectionUtils.isNotEmpty(list)) { // Result<Map<String, String>> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode());
list.forEach(item -> { // if (CollectionUtils.isNotEmpty(list)) {
item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation())); // list.forEach(item -> {
}); // item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation()));
} // });
return new PageData<>(list, pageInfo.getTotal()); // }
} return new PageData<>(list, pageInfo.getTotal(),formDTO.getPageSize());
List<PartyMemberEducationResultDTO> list = baseDao.getPartyMemberEducationList(formDTO.getAgencyId(),formDTO.getOrgId(), formDTO.getCode()); }
Result<Map<String, String>> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode()); List<PartyMemberEducationResultDTO> list = baseDao.getPartyMemberEducationList(formDTO.getAgencyId(),formDTO.getOrgId(), formDTO.getCode(),"education");
if (CollectionUtils.isNotEmpty(list)) { // Result<Map<String, String>> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode());
list.forEach(item -> { // if (CollectionUtils.isNotEmpty(list)) {
item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation())); // list.forEach(item -> {
}); // item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation()));
} // });
// }
return new PageData<>(list, null == list?NumConstant.ZERO:list.size()); return new PageData<>(list, null == list?NumConstant.ZERO:list.size());
} }
@ -734,5 +716,39 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
return resultDTO; return resultDTO;
} }
/**
* 烟台管理平台党员画像列表查询
*
* @param formDTO
* @return
*/
@Override
public PageData<PartymemberPortraitResultDTO> queryPartyMemberPortraitList(IcPartyMemberListFormDTO formDTO) {
if (StringUtils.isBlank(formDTO.getOrgId())) {
// 当前工作人员所属组织下的,党组织
IcPartyOrgEntity org= icPartyOrgService.getIcPartyOrg(EpmetRequestHolder.getLoginUserCustomerId(),EpmetRequestHolder.getLoginUserId());
if (null == org) {
return new PageData<>(Collections.emptyList(), 0, formDTO.getPageSize());
}
formDTO.setOrgId(org.getId());
}
if ("age".equals(formDTO.getCodeType())) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<PartyMemberAgeResultDTO> list = baseDao.getPartyMemberAgeList(formDTO.getAgencyId(), formDTO.getOrgId(), formDTO.getCode());
PageInfo<PartyMemberAgeResultDTO> pageInfo = new PageInfo<>(list);
List<PartymemberPortraitResultDTO> resultDTOList = ConvertUtils.sourceToTarget(list, PartymemberPortraitResultDTO.class);
return new PageData<>(resultDTOList, pageInfo.getTotal(), formDTO.getPageSize());
}
// else if ("education".equals(formDTO.getCodeType())) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<PartyMemberEducationResultDTO> list = baseDao.getPartyMemberEducationList(formDTO.getAgencyId(), formDTO.getOrgId(), formDTO.getCode(),formDTO.getCodeType());
PageInfo<PartyMemberEducationResultDTO> pageInfo = new PageInfo<>(list);
List<PartymemberPortraitResultDTO> resultDTOList = ConvertUtils.sourceToTarget(list, PartymemberPortraitResultDTO.class);
return new PageData<>(resultDTOList, pageInfo.getTotal(), formDTO.getPageSize());
}
} }

48
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml

@ -164,7 +164,9 @@
NAME, NAME,
MOBILE, MOBILE,
age, age,
IC_RESI_USER IC_RESI_USER,
ID_CARD,
education
FROM FROM
( (
SELECT SELECT
@ -172,14 +174,16 @@
NAME, NAME,
MOBILE, MOBILE,
age, age,
CASE (CASE
WHEN age &lt; 50 THEN '0' WHEN age &lt; 50 THEN '0'
WHEN age &gt;= 50 AND age &lt;= 59 THEN '1' WHEN age &gt;= 50 AND age &lt;= 59 THEN '1'
WHEN age &gt;= 60 AND age &lt;= 69 THEN '2' WHEN age &gt;= 60 AND age &lt;= 69 THEN '2'
WHEN age &gt;= 70 AND age &lt;= 79 THEN '3' WHEN age &gt;= 70 AND age &lt;= 79 THEN '3'
ELSE '4' ELSE '4'
END AS ageGroup, END )AS ageGroup,
IC_RESI_USER IC_RESI_USER,
ID_CARD,
education
FROM FROM
( (
SELECT SELECT
@ -187,7 +191,20 @@
NAME, NAME,
MOBILE, MOBILE,
YEAR (FROM_DAYS(DATEDIFF(NOW(),SUBSTRING( ID_CARD, 7, 8 )))) AS age, YEAR (FROM_DAYS(DATEDIFF(NOW(),SUBSTRING( ID_CARD, 7, 8 )))) AS age,
IC_RESI_USER IC_RESI_USER,
ID_CARD,
(
case when CULTURE='0' then '小学及文盲'
when CULTURE='1' then '初中'
when CULTURE='2' then '高中'
when CULTURE='3' then '大专'
when CULTURE='4' then '本科'
when CULTURE='5' then '硕士'
when CULTURE='6' then '博士'
when CULTURE='7' then '中专'
else ''
end
)as education
FROM FROM
ic_party_member ic_party_member
WHERE WHERE
@ -205,23 +222,38 @@
<if test="null != code and '' != code"> <if test="null != code and '' != code">
WHERE ageGroup = #{code} WHERE ageGroup = #{code}
</if> </if>
ORDER BY CONVERT(NAME USING GBK) ASC ORDER BY ID ASC
</select> </select>
<select id="getPartyMemberEducationList" resultType="com.epmet.dto.result.PartyMemberEducationResultDTO"> <select id="getPartyMemberEducationList" resultType="com.epmet.dto.result.PartyMemberEducationResultDTO">
SELECT SELECT
ID AS "userId", ID AS "userId",
NAME, NAME,
MOBILE, MOBILE,
CULTURE AS education, ID_CARD,
(
case when CULTURE='0' then '小学及文盲'
when CULTURE='1' then '初中'
when CULTURE='2' then '高中'
when CULTURE='3' then '大专'
when CULTURE='4' then '本科'
when CULTURE='5' then '硕士'
when CULTURE='6' then '博士'
when CULTURE='7' then '中专'
else ''
end
)as education,
YEAR (FROM_DAYS(DATEDIFF(NOW(),SUBSTRING( ID_CARD, 7, 8 )))) AS age,
IC_RESI_USER IC_RESI_USER
FROM FROM
ic_party_member ic_party_member
WHERE WHERE
DEL_FLAG = '0' DEL_FLAG = '0'
<if test="null != codeType and 'education' == codeType">
AND CULTURE IS NOT NULL AND CULTURE IS NOT NULL
<if test="null != code and '' != code"> <if test="null != code and '' != code">
AND CULTURE = #{code} AND CULTURE = #{code}
</if> </if>
</if>
<choose> <choose>
<when test='orgId != "" and orgId != null'> <when test='orgId != "" and orgId != null'>
AND (SSZB = #{orgId} OR ORG_PIDS LIKE CONCAT('%',#{orgId},'%')) AND (SSZB = #{orgId} OR ORG_PIDS LIKE CONCAT('%',#{orgId},'%'))
@ -230,7 +262,7 @@
AND (AGENCY_ID = #{agencyId} OR AGENCY_PIDS LIKE CONCAT('%',#{agencyId},'%')) AND (AGENCY_ID = #{agencyId} OR AGENCY_PIDS LIKE CONCAT('%',#{agencyId},'%'))
</otherwise> </otherwise>
</choose> </choose>
ORDER BY CONVERT(NAME USING GBK) ASC ORDER BY ID ASC
</select> </select>
<select id="getPartyMemberAgeStatistics" <select id="getPartyMemberAgeStatistics"
resultType="com.epmet.commons.tools.dto.result.OptionDataResultDTO"> resultType="com.epmet.commons.tools.dto.result.OptionDataResultDTO">

11
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcPartyMemberListFormDTO.java

@ -15,9 +15,20 @@ public class IcPartyMemberListFormDTO extends PageFormDTO implements Serializabl
private static final long serialVersionUID = -6085134769034337175L; private static final long serialVersionUID = -6085134769034337175L;
/**
* 党组织id
*/
private String orgId; private String orgId;
private String code; private String code;
private String agencyId; private String agencyId;
/**
* 烟台党员画像列表接口将上方两个接口合为一个
* 年龄age
* 学历education
* 如果不传默认查询所有党员
*/
private String codeType;
} }

10
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PartyMemberAgeResultDTO.java

@ -14,7 +14,17 @@ public class PartyMemberAgeResultDTO implements Serializable {
private static final long serialVersionUID = 3421162784157903637L; private static final long serialVersionUID = 3421162784157903637L;
private String userId; private String userId;
private String name; private String name;
private String idCard;
private String age; private String age;
/**
* 烟台党员画像列表接口将上方两个接口合为一个
* 在这个dto里增加了education
*/
private String education;
private String mobile; private String mobile;
private String icResiUser; private String icResiUser;
} }

7
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PartyMemberEducationResultDTO.java

@ -14,6 +14,13 @@ public class PartyMemberEducationResultDTO implements Serializable {
private static final long serialVersionUID = -5042362121277863249L; private static final long serialVersionUID = -5042362121277863249L;
private String userId; private String userId;
private String name; private String name;
private String idCard;
/**
* 烟台党员画像列表接口将上方两个接口合为一个
* 在这个dto里增加了age
*/
private String age;
private String education; private String education;
private String mobile; private String mobile;
private String icResiUser; private String icResiUser;

32
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -4046,13 +4046,13 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
String codeType, String codeType,
String code) { String code) {
// 获取文化程度字典 // 获取文化程度字典
DictListFormDTO dictFormDTO = new DictListFormDTO(); // DictListFormDTO dictFormDTO = new DictListFormDTO();
dictFormDTO.setDictType(DictTypeEnum.EDUCATION.getCode()); // dictFormDTO.setDictType(DictTypeEnum.EDUCATION.getCode());
Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFormDTO); // Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFormDTO);
if (!dictResult.success() || CollectionUtils.isEmpty(dictResult.getData())) { // if (!dictResult.success() || CollectionUtils.isEmpty(dictResult.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "学历字典获取失败", "学历字典获取失败"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "学历字典获取失败", "学历字典获取失败");
} // }
Map<String, String> educationMap = dictResult.getData().stream().collect(Collectors.toMap(DictListResultDTO::getValue, DictListResultDTO::getLabel)); // Map<String, String> educationMap = dictResult.getData().stream().collect(Collectors.toMap(DictListResultDTO::getValue, DictListResultDTO::getLabel));
if (StringUtils.isBlank(orgId)) { if (StringUtils.isBlank(orgId)) {
orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId(); orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId();
@ -4073,7 +4073,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
list.forEach(resi -> { list.forEach(resi -> {
// 学历名称 // 学历名称
resi.setEducationName(educationMap.get(resi.getEducationCode())); // resi.setEducationName(educationMap.get(resi.getEducationCode()));
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(resi.getGridId()); GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(resi.getGridId());
if (null != gridInfoCache) { if (null != gridInfoCache) {
resi.setGridName(gridInfoCache.getGridNamePath()); resi.setGridName(gridInfoCache.getGridNamePath());
@ -4106,13 +4106,13 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
String codeType, String codeType,
String code) { String code) {
// 获取文化程度字典 // 获取文化程度字典
DictListFormDTO dictFormDTO = new DictListFormDTO(); /* DictListFormDTO dictFormDTO = new DictListFormDTO();
dictFormDTO.setDictType(DictTypeEnum.EDUCATION.getCode()); dictFormDTO.setDictType(DictTypeEnum.EDUCATION.getCode());
Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFormDTO); Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFormDTO);
if (!dictResult.success() || CollectionUtils.isEmpty(dictResult.getData())) { if (!dictResult.success() || CollectionUtils.isEmpty(dictResult.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "学历字典获取失败", "学历字典获取失败"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "学历字典获取失败", "学历字典获取失败");
} }
Map<String, String> educationMap = dictResult.getData().stream().collect(Collectors.toMap(DictListResultDTO::getValue, DictListResultDTO::getLabel)); Map<String, String> educationMap = dictResult.getData().stream().collect(Collectors.toMap(DictListResultDTO::getValue, DictListResultDTO::getLabel));*/
if (StringUtils.isBlank(orgId)) { if (StringUtils.isBlank(orgId)) {
orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId(); orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId();
@ -4124,12 +4124,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
} }
PageHelper.startPage(pageNo, pageSize); PageHelper.startPage(pageNo, pageSize);
List<ResiPortrayalDetailDTO> list = baseDao.selectPortrayalResiList(customerId, orgId, orgType,orgIdPath,codeType, code); List<ResiPortrayalDetailDTO> list = baseDao.selectPortrayalResiList(customerId, orgId, orgType,orgIdPath,codeType, code);
if(CollectionUtils.isNotEmpty(list)){ // if(CollectionUtils.isNotEmpty(list)){
list.forEach(resi -> { // list.forEach(resi -> {
// 学历名称 // // 学历名称
resi.setEducationName(educationMap.get(resi.getEducationCode())); // resi.setEducationName(educationMap.get(resi.getEducationCode()));
}); // });
} // }
PageInfo<ResiPortrayalDetailDTO> pageInfo = new PageInfo<>(list); PageInfo<ResiPortrayalDetailDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal(), pageSize); return new PageData<>(list, pageInfo.getTotal(), pageSize);
} }

12
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -1673,6 +1673,18 @@
( CASE WHEN u.GENDER = '1' THEN '男' WHEN u.GENDER = '2' THEN '女' ELSE '未知' END ) AS genderName, ( CASE WHEN u.GENDER = '1' THEN '男' WHEN u.GENDER = '2' THEN '女' ELSE '未知' END ) AS genderName,
YEAR (NOW())- SUBSTR( u.BIRTHDAY, 1, 4 ) AS age, YEAR (NOW())- SUBSTR( u.BIRTHDAY, 1, 4 ) AS age,
u.CULTURE AS educationCode, u.CULTURE AS educationCode,
(
case when u.CULTURE='0' then '小学及文盲'
when u.CULTURE='1' then '初中'
when u.CULTURE='2' then '高中'
when u.CULTURE='3' then '大专'
when u.CULTURE='4' then '本科'
when u.CULTURE='5' then '硕士'
when u.CULTURE='6' then '博士'
when u.CULTURE='7' then '中专'
else ''
end
)as educationName,
'' AS educationName, '' AS educationName,
IFNULL(u.CULTURE,'')AS educationCode, IFNULL(u.CULTURE,'')AS educationCode,
u.BIRTHDAY AS birthday u.BIRTHDAY AS birthday

Loading…
Cancel
Save