|
@ -1,6 +1,7 @@ |
|
|
package com.epmet.modules.partyOrg.service.impl; |
|
|
package com.epmet.modules.partyOrg.service.impl; |
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.rocketmq.messages.PartyMeetingMessageMQMsg; |
|
|
import com.epmet.commons.rocketmq.messages.PartyMeetingMessageMQMsg; |
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
@ -21,10 +22,7 @@ import com.epmet.constant.SystemMessageType; |
|
|
import com.epmet.dto.form.UserMessageFormDTO; |
|
|
import com.epmet.dto.form.UserMessageFormDTO; |
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
import com.epmet.modules.partyOrg.dao.*; |
|
|
import com.epmet.modules.partyOrg.dao.*; |
|
|
import com.epmet.modules.partyOrg.entity.IcPartyActEntity; |
|
|
import com.epmet.modules.partyOrg.entity.*; |
|
|
import com.epmet.modules.partyOrg.entity.IcPartyActOrgEntity; |
|
|
|
|
|
import com.epmet.modules.partyOrg.entity.IcScheduleEntity; |
|
|
|
|
|
import com.epmet.modules.partyOrg.entity.ResiPartymemberAttachmentEntity; |
|
|
|
|
|
import com.epmet.modules.partyOrg.service.*; |
|
|
import com.epmet.modules.partyOrg.service.*; |
|
|
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; |
|
|
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; |
|
|
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
|
|
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
|
@ -33,6 +31,7 @@ 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.IcPartActTypeDTO; |
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO; |
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO; |
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO; |
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO; |
|
|
|
|
|
import com.epmet.resi.partymember.dto.partyOrg.IcPartyActTypeDictDTO; |
|
|
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; |
|
|
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; |
|
|
import com.epmet.resi.partymember.dto.partyOrg.form.ActAndScheduleListFormDTO; |
|
|
import com.epmet.resi.partymember.dto.partyOrg.form.ActAndScheduleListFormDTO; |
|
|
import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO; |
|
|
import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO; |
|
@ -77,6 +76,8 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
private ResiPartymemberAttachmentDao resiPartymemberAttachmentDao; |
|
|
private ResiPartymemberAttachmentDao resiPartymemberAttachmentDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
|
|
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private IcPartyActTypeDictService partyActTypeDictService; |
|
|
/** |
|
|
/** |
|
|
* 活动类型列表 |
|
|
* 活动类型列表 |
|
|
* |
|
|
* |
|
@ -84,12 +85,20 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public List<IcPartActTypeDTO> actTypeList(String customerId) { |
|
|
public List<IcPartActTypeDTO> actTypeList(String customerId) { |
|
|
List<IcPartActTypeDTO> list= baseDao.actTypeList(customerId); |
|
|
List<IcPartyActTypeDictDTO> list= baseDao.actTypeList(customerId); |
|
|
if(CollectionUtils.isEmpty(list)){ |
|
|
if(CollectionUtils.isEmpty(list)){ |
|
|
return baseDao.actTypeList(Constant.DEFAULT_CUSTOMER); |
|
|
List<IcPartyActTypeDictDTO> icPartActTypeDTOS = baseDao.actTypeList(Constant.DEFAULT_CUSTOMER); |
|
|
|
|
|
List<IcPartyActTypeDictEntity> entities = ConvertUtils.sourceToTarget(icPartActTypeDTOS, IcPartyActTypeDictEntity.class); |
|
|
|
|
|
entities.forEach(e -> { |
|
|
|
|
|
e.setId(IdWorker.getIdStr()); |
|
|
|
|
|
e.setCustomerId(customerId); |
|
|
|
|
|
}); |
|
|
|
|
|
partyActTypeDictService.insertBatch(entities); |
|
|
|
|
|
list = icPartActTypeDTOS; |
|
|
} |
|
|
} |
|
|
return list; |
|
|
return ConvertUtils.sourceToTarget(list,IcPartActTypeDTO.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -347,13 +356,19 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
secondForm.setSearchType("yearSearch"); |
|
|
secondForm.setSearchType("yearSearch"); |
|
|
disposeActAndScheduleListFormDTO(secondForm); |
|
|
disposeActAndScheduleListFormDTO(secondForm); |
|
|
List<ActAndScheduleListResultDTO.ActivityListDTO> activityList = baseDao.getActivityList(secondForm); |
|
|
List<ActAndScheduleListResultDTO.ActivityListDTO> activityList = baseDao.getActivityList(secondForm); |
|
|
|
|
|
List<IcPartActTypeDTO> activityTypeList = actTypeList(formDTO.getCustomerId()); |
|
|
List<YearSearchResultDTO> result = new ArrayList<>(); |
|
|
List<YearSearchResultDTO> result = new ArrayList<>(); |
|
|
if (CollectionUtils.isNotEmpty(activityList)) { |
|
|
if (CollectionUtils.isNotEmpty(activityList)) { |
|
|
disposeActivityList(secondForm, activityList); |
|
|
disposeActivityList(secondForm, activityList); |
|
|
Map<String, List<ActAndScheduleListResultDTO.ActivityListDTO>> groupByType = activityList.stream().collect(Collectors.groupingBy(ActAndScheduleListResultDTO.ActivityListDTO::getType)); |
|
|
Map<String, List<ActAndScheduleListResultDTO.ActivityListDTO>> groupByType = activityList.stream().collect(Collectors.groupingBy(ActAndScheduleListResultDTO.ActivityListDTO::getType)); |
|
|
groupByType.forEach((type,list) -> { |
|
|
groupByType.forEach((type,list) -> { |
|
|
YearSearchResultDTO dto = new YearSearchResultDTO(); |
|
|
YearSearchResultDTO dto = new YearSearchResultDTO(); |
|
|
dto.setType(type); |
|
|
activityTypeList.forEach(at -> { |
|
|
|
|
|
if (at.getValue().equals(type)){ |
|
|
|
|
|
dto.setType(at.getLabel()); |
|
|
|
|
|
dto.setFrequency(at.getFrequencyDesc()); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
dto.setActivityList(ConvertUtils.sourceToTarget(list, YearSearchResultDTO.YearSearchActivityListDTO.class)); |
|
|
dto.setActivityList(ConvertUtils.sourceToTarget(list, YearSearchResultDTO.YearSearchActivityListDTO.class)); |
|
|
result.add(dto); |
|
|
result.add(dto); |
|
|
}); |
|
|
}); |
|
|