|
|
@ -8,10 +8,12 @@ import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.annotation.MaskResponse; |
|
|
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
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.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.ExcelUtils; |
|
|
@ -33,6 +35,7 @@ import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
@ -147,8 +150,14 @@ public class IcPartyMemberController { |
|
|
|
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>> |
|
|
|
*/ |
|
|
|
@PostMapping("partymembereducationstatistics") |
|
|
|
public Result<List<OptionDataResultDTO>> partyMemberEducationStatistics(@RequestBody IcPartyMemberFormDTO formDTO) { |
|
|
|
ValidatorUtils.validateEntity(formDTO); |
|
|
|
public Result<List<OptionDataResultDTO>> partyMemberEducationStatistics(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFormDTO formDTO) { |
|
|
|
if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){ |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|
|
|
if (null == staffInfo) { |
|
|
|
throw new EpmetException("获取工作人员信息失败"); |
|
|
|
} |
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
} |
|
|
|
return new Result<List<OptionDataResultDTO>>().ok(icPartyMemberService.partyMemberEducationStatistics(formDTO)); |
|
|
|
} |
|
|
|
|
|
|
@ -161,8 +170,14 @@ public class IcPartyMemberController { |
|
|
|
*/ |
|
|
|
@PostMapping("partymemberagelist") |
|
|
|
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) |
|
|
|
public Result<PageData<PartyMemberAgeResultDTO>> partyMemberAgelist(@RequestBody IcPartyMemberListFormDTO formDTO) { |
|
|
|
ValidatorUtils.validateEntity(formDTO); |
|
|
|
public Result<PageData<PartyMemberAgeResultDTO>> partyMemberAgelist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) { |
|
|
|
if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){ |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|
|
|
if (null == staffInfo) { |
|
|
|
throw new EpmetException("获取工作人员信息失败"); |
|
|
|
} |
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
} |
|
|
|
return new Result<PageData<PartyMemberAgeResultDTO>>().ok(icPartyMemberService.getPartyMemberAgeList(formDTO)); |
|
|
|
} |
|
|
|
|
|
|
@ -175,8 +190,14 @@ public class IcPartyMemberController { |
|
|
|
*/ |
|
|
|
@PostMapping("partymembereducationlist") |
|
|
|
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) |
|
|
|
public Result<PageData<PartyMemberEducationResultDTO>> partyMemberEducationlist(@RequestBody IcPartyMemberListFormDTO formDTO) { |
|
|
|
ValidatorUtils.validateEntity(formDTO); |
|
|
|
public Result<PageData<PartyMemberEducationResultDTO>> partyMemberEducationlist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) { |
|
|
|
if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){ |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|
|
|
if (null == staffInfo) { |
|
|
|
throw new EpmetException("获取工作人员信息失败"); |
|
|
|
} |
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
} |
|
|
|
return new Result<PageData<PartyMemberEducationResultDTO>>().ok(icPartyMemberService.getPartyMemberEducationList(formDTO)); |
|
|
|
} |
|
|
|
|
|
|
@ -188,8 +209,14 @@ public class IcPartyMemberController { |
|
|
|
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>> |
|
|
|
*/ |
|
|
|
@PostMapping("partymemberagestatistics") |
|
|
|
public Result<List<OptionDataResultDTO>> partyMemberAgeStatistics(@RequestBody IcPartyMemberFormDTO formDTO) { |
|
|
|
ValidatorUtils.validateEntity(formDTO); |
|
|
|
public Result<List<OptionDataResultDTO>> partyMemberAgeStatistics(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberFormDTO formDTO) { |
|
|
|
if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){ |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|
|
|
if (null == staffInfo) { |
|
|
|
throw new EpmetException("获取工作人员信息失败"); |
|
|
|
} |
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
} |
|
|
|
return new Result<List<OptionDataResultDTO>>().ok(icPartyMemberService.partyMemberAgeStatistics(formDTO)); |
|
|
|
} |
|
|
|
} |
|
|
|