|
@ -4,30 +4,29 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
|
|
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.page.PageData; |
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; |
|
|
|
|
|
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
|
|
import com.epmet.modules.partymember.dao.IcPartyMemberPayRecordDetailDao; |
|
|
import com.epmet.modules.partymember.dao.IcPartyMemberPayRecordDetailDao; |
|
|
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordDetailEntity; |
|
|
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordDetailEntity; |
|
|
import com.epmet.modules.partymember.entity.IcPartymemberStyleCategoryDictEntity; |
|
|
|
|
|
import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; |
|
|
|
|
|
import com.epmet.modules.partymember.redis.IcPartyMemberPayRecordDetailRedis; |
|
|
import com.epmet.modules.partymember.redis.IcPartyMemberPayRecordDetailRedis; |
|
|
import com.epmet.modules.partymember.service.IcPartyMemberPayRecordDetailService; |
|
|
import com.epmet.modules.partymember.service.IcPartyMemberPayRecordDetailService; |
|
|
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; |
|
|
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; |
|
|
import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; |
|
|
|
|
|
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberPayRecordDetailFormDTO; |
|
|
|
|
|
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; |
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
import java.util.Arrays; |
|
|
import java.util.Arrays; |
|
|
|
|
|
import java.util.Collections; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@ -42,6 +41,8 @@ public class IcPartyMemberPayRecordDetailServiceImpl extends BaseServiceImpl<IcP |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private IcPartyMemberPayRecordDetailRedis icPartyMemberPayRecordDetailRedis; |
|
|
private IcPartyMemberPayRecordDetailRedis icPartyMemberPayRecordDetailRedis; |
|
|
|
|
|
@Resource |
|
|
|
|
|
private IcPartyOrgDao icPartyOrgDao; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<IcPartyMemberPayRecordDetailDTO> page(Map<String, Object> params) { |
|
|
public PageData<IcPartyMemberPayRecordDetailDTO> page(Map<String, Object> params) { |
|
@ -59,6 +60,25 @@ public class IcPartyMemberPayRecordDetailServiceImpl extends BaseServiceImpl<IcP |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public PageData<IcPartyMemberPayRecordDetailDTO> getPhrasePage(Map<String, Object> params) { |
|
|
public PageData<IcPartyMemberPayRecordDetailDTO> getPhrasePage(Map<String, Object> params) { |
|
|
|
|
|
String customerId = (String) params.get("customerId"); |
|
|
|
|
|
String userId = (String) params.get("userId"); |
|
|
|
|
|
String orgId = (String) params.get("orgId"); |
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); |
|
|
|
|
|
if (null == staffInfo) { |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取工作人员信息失败", "获取工作人员信息失败"); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isBlank(orgId)) { |
|
|
|
|
|
//获取工作人员所属组织同级的党组织
|
|
|
|
|
|
LambdaQueryWrapper<IcPartyOrgEntity> orgWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
orgWrapper.eq(IcPartyOrgEntity::getCustomerId, customerId); |
|
|
|
|
|
orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId()); |
|
|
|
|
|
orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR); |
|
|
|
|
|
IcPartyOrgEntity org = icPartyOrgDao.selectOne(orgWrapper); |
|
|
|
|
|
if (null == org) { |
|
|
|
|
|
return new PageData<>(Collections.emptyList(), 0); |
|
|
|
|
|
} |
|
|
|
|
|
params.put("orgId",org.getId()); |
|
|
|
|
|
} |
|
|
IPage<IcPartyMemberPayRecordDetailDTO> page = getPage(params); |
|
|
IPage<IcPartyMemberPayRecordDetailDTO> page = getPage(params); |
|
|
List<IcPartyMemberPayRecordDetailDTO> list = baseDao.selectListInfo(params); |
|
|
List<IcPartyMemberPayRecordDetailDTO> list = baseDao.selectListInfo(params); |
|
|
return new PageData<>(list, page.getTotal()); |
|
|
return new PageData<>(list, page.getTotal()); |
|
|