diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/PartyMeetingMessageMQMsg.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/PartyMeetingMessageMQMsg.java index 4e21d2179d..9ca6c76c5d 100644 --- a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/PartyMeetingMessageMQMsg.java +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/PartyMeetingMessageMQMsg.java @@ -15,7 +15,7 @@ public class PartyMeetingMessageMQMsg implements Serializable { private String customerId; //活动Id private String icPartyActId; - //动作类型 发布活动:publish 提前提醒:remind 提前通知:notify + //动作类型 发布活动:publish 提前提醒:remind 日程通知:notify private String type; //党组织Id private String publishOrgId; diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/HomeMonthTotalFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/HomeMonthTotalFormDTO.java index 74f392a890..396ba3611a 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/HomeMonthTotalFormDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/HomeMonthTotalFormDTO.java @@ -38,4 +38,11 @@ public class HomeMonthTotalFormDTO implements Serializable { private String staffId; private String customerId; + + /** + * 工作人员所属组织ID + */ + private String agencyId; + + private String path; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcScheduleDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcScheduleDao.java index b8b407a170..48aa6fd599 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcScheduleDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcScheduleDao.java @@ -3,8 +3,12 @@ package com.epmet.modules.partyOrg.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.partyOrg.entity.IcScheduleEntity; import com.epmet.resi.partymember.dto.partyOrg.form.AddOrEditScheduleFormDTO; +import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO; +import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 日程表 * @@ -16,4 +20,6 @@ public interface IcScheduleDao extends BaseDao { void editSchedule(AddOrEditScheduleFormDTO formDTO); + List getScheduleAndActCount(HomeMonthTotalFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java index c5cda02162..86e6fbe505 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java @@ -4,21 +4,27 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.Constant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetException; +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.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.modules.partyOrg.dao.IcPartyActDao; +import com.epmet.modules.partyOrg.dao.IcScheduleDao; import com.epmet.modules.partyOrg.dao.IcPartyActOrgDao; import com.epmet.modules.partyOrg.entity.IcPartyActEntity; import com.epmet.modules.partyOrg.service.IcPartyActService; +import com.epmet.modules.partyOrg.service.IcPartyOrgService; import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActAddOrUpdateFormDTO; import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActPageFormDTO; import com.epmet.resi.partymember.dto.icpartyact.result.IcPartActTypeDTO; import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO; import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO; +import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO; import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO; import org.apache.commons.collections4.CollectionUtils; @@ -41,6 +47,11 @@ import java.util.Map; */ @Service public class IcPartyActServiceImpl extends BaseServiceImpl implements IcPartyActService { + + @Autowired + private IcScheduleDao scheduleDao; + @Autowired + private IcPartyOrgService partyOrgService; @Autowired private IcPartyActOrgDao icPartyActOrgDao; @@ -71,8 +82,21 @@ public class IcPartyActServiceImpl extends BaseServiceImpl getHomeMonthTotal(HomeMonthTotalFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo){ + throw new EpmetException("查询工作人员失败:"+formDTO.getStaffId()); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); + IcPartyOrgDTO icPartyOrgDTO = partyOrgService.get(formDTO.getOrgId()); + if (null == icPartyOrgDTO){ + throw new EpmetException("未查询到党组织信息:"+formDTO.getOrgId()); + } + formDTO.setPath(icPartyOrgDTO.getOrgPids().equals("") || icPartyOrgDTO.getOrgPids().equals(NumConstant.ZERO_STR) ? icPartyOrgDTO.getId() : icPartyOrgDTO.getOrgPids().concat(":").concat(icPartyOrgDTO.getId())); List result = constructMonthData(formDTO.getYearId()); - + List countList = scheduleDao.getScheduleAndActCount(formDTO); + if (CollectionUtils.isNotEmpty(countList)){ + countList.forEach(c -> result.stream().filter(r -> c.getMonthId().equals(r.getMonthId())).forEach(r -> r.setCount(c.getCount()))); + } return result; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/logback-spring.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/logback-spring.xml index f4fc5a99ea..b8b3161188 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/logback-spring.xml @@ -160,11 +160,12 @@ - + + diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcScheduleDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcScheduleDao.xml index 878c3f9fec..39bae20e11 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcScheduleDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcScheduleDao.xml @@ -14,4 +14,34 @@ is_public = #{isPublic} WHERE ID = #{scheduleId} + + \ No newline at end of file