|
|
@ -1,32 +1,40 @@ |
|
|
|
package com.epmet.modules.partymember.service.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.ServiceConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.enums.GenderEnum; |
|
|
|
import com.epmet.commons.tools.enums.PartyOrgTypeEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
|
import com.epmet.commons.tools.feign.ResultDataResolver; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerResiUserRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.IcResiUserInfoCache; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|
|
|
import com.epmet.commons.tools.utils.PidUtils; |
|
|
|
import com.epmet.commons.tools.utils.*; |
|
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
import com.epmet.modules.partyOrg.dao.IcPartyActDao; |
|
|
|
import com.epmet.modules.partyOrg.dao.IcPartyActTypeDictDao; |
|
|
|
import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; |
|
|
|
import com.epmet.modules.partyOrg.entity.IcPartyActEntity; |
|
|
|
import com.epmet.modules.partyOrg.entity.IcPartyActTypeDictEntity; |
|
|
|
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
|
|
|
import com.epmet.modules.partyOrg.service.IcPartyActSignInRecordService; |
|
|
|
import com.epmet.modules.partymember.dao.IcPartyMemberDao; |
|
|
|
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
|
|
|
import com.epmet.modules.partymember.service.LingShanScreenService; |
|
|
|
import com.epmet.modules.partymember.service.YiFengScreenService; |
|
|
|
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActPageFormDTO; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partymember.result.*; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -83,18 +91,17 @@ public class YiFengScreenServiceImpl implements YiFengScreenService, ResultDataR |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
/* // 2.查询党小组
|
|
|
|
Integer groupQty = getResultDataOrReturnNull(groupOpenFeignClient.getPartyGroupQuantityByAgencyId(agencyId), ServiceConstant.RESI_GROUP_SERVER); |
|
|
|
if (groupQty == null) { |
|
|
|
logger.error("【移风大屏】党建引领-查询党小组信息失败,agencyId:" + agencyId); |
|
|
|
groupQty = 0; |
|
|
|
} |
|
|
|
// 党员
|
|
|
|
LambdaQueryWrapper<IcPartyMemberEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
query.likeRight(IcPartyMemberEntity::getAgencyPids, PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids())) |
|
|
|
.or() |
|
|
|
.eq(IcPartyMemberEntity::getAgencyId, agencyId); |
|
|
|
|
|
|
|
|
|
|
|
YiFengScreenPartyOrgCategoryResultDTO gq = new YiFengScreenPartyOrgCategoryResultDTO(); |
|
|
|
gq.setName("党小组"); |
|
|
|
gq.setPartyOrgType(null); |
|
|
|
gq.setValue(groupQty); |
|
|
|
l.add(gq);*/ |
|
|
|
YiFengScreenPartyOrgCategoryResultDTO dangyuan = new YiFengScreenPartyOrgCategoryResultDTO(); |
|
|
|
dangyuan.setName("党员"); |
|
|
|
dangyuan.setPartyOrgType("7"); |
|
|
|
dangyuan.setValue(icPartyMemberDao.selectCount(query)); |
|
|
|
|
|
|
|
return l; |
|
|
|
} |
|
|
@ -378,4 +385,42 @@ public class YiFengScreenServiceImpl implements YiFengScreenService, ResultDataR |
|
|
|
.eq(IcPartyMemberEntity::getAgencyId, agencyId); |
|
|
|
return icPartyMemberDao.selectCount(query); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<IcPartyActPageResultDTO> actPageList(IcPartyActPageFormDTO formDTO) { |
|
|
|
|
|
|
|
PageInfo<IcPartyActPageResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), |
|
|
|
formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> partyActDao.selectPageList(formDTO)); |
|
|
|
/* if(!formDTO.getIsPage()){ |
|
|
|
// 不分页
|
|
|
|
pageInfo.getList().forEach(l->{ |
|
|
|
l.setJoinOrgList(icPartyActOrgDao.selectJoinOrgList(l.getIcPartyActId())); |
|
|
|
}); |
|
|
|
}*/ |
|
|
|
|
|
|
|
/* pageInfo.getList().forEach(l->{ |
|
|
|
l.setAttachments(resiPartymemberAttachmentDao.selectListByBusinessId(l.getIcPartyActId())); |
|
|
|
});*/ |
|
|
|
|
|
|
|
return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public IcPartyActDetailResDTO queryActDetail(String customerId, String icPartyActId) { |
|
|
|
IcPartyActEntity icPartyActEntity = partyActDao.selectById(icPartyActId); |
|
|
|
if (null == icPartyActEntity) { |
|
|
|
String msg = "活动已删除"; |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); |
|
|
|
} |
|
|
|
IcPartyActDetailResDTO resDTO= ConvertUtils.sourceToTarget(icPartyActEntity,IcPartyActDetailResDTO.class); |
|
|
|
resDTO.setAutoPublicTypeDesc(icPartyActEntity.getAutoPublicType().compareTo(NumConstant.ZERO) != NumConstant.ZERO ? "活动开始前"+icPartyActEntity.getAutoPublicType()+"天" : "立即发布"); |
|
|
|
resDTO.setIcPartyActId(icPartyActEntity.getId()); |
|
|
|
resDTO.setActTypeName(partyActDao.selectActTypeName(customerId,icPartyActEntity.getActType())); |
|
|
|
//参加人员类型,0:全体党员;1:支部委员
|
|
|
|
resDTO.setJoinUserTypeName(NumConstant.ZERO_STR.equals(resDTO.getJoinUserType()) ? "全体党员" : "支部委员"); |
|
|
|
// resDTO.setAttachmentList(resiPartymemberAttachmentDao.selectListByBusinessId(icPartyActId));
|
|
|
|
// resDTO.setIsSignIn(SpringContextUtils.getBean(IcPartyActSignInRecordService.class).checkSignIn(icPartyActId,userId));
|
|
|
|
// resDTO.setJoinOrgList(icPartyActOrgDao.selectJoinOrgList(icPartyActId));
|
|
|
|
return resDTO; |
|
|
|
} |
|
|
|
} |
|
|
|