|
|
@ -38,6 +38,7 @@ import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partyOrg.form.YearSearchFormDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchDetailResultDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO; |
|
|
|
import com.epmet.send.SendMqMsgUtil; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
@ -351,7 +352,7 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
|
* @date 2022/8/22 09:33 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<YearSearchResultDTO> yearSearch(YearSearchFormDTO formDTO) { |
|
|
|
public List<YearSearchResultDTO> yearSearch01(YearSearchFormDTO formDTO) { |
|
|
|
ActAndScheduleListFormDTO secondForm = ConvertUtils.sourceToTarget(formDTO, ActAndScheduleListFormDTO.class); |
|
|
|
secondForm.setSearchType("yearSearch"); |
|
|
|
disposeActAndScheduleListFormDTO(secondForm); |
|
|
@ -376,6 +377,37 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<YearSearchDetailResultDTO> yearSearch(YearSearchFormDTO formDTO) { |
|
|
|
ActAndScheduleListFormDTO secondForm = ConvertUtils.sourceToTarget(formDTO, ActAndScheduleListFormDTO.class); |
|
|
|
secondForm.setSearchType("yearSearch"); |
|
|
|
disposeActAndScheduleListFormDTO(secondForm); |
|
|
|
List<ActAndScheduleListResultDTO.ActivityListDTO> activityList = baseDao.getActivityList(secondForm); |
|
|
|
List<IcPartyActDetailResDTO> activityDetailList = new ArrayList<>(); |
|
|
|
if (CollectionUtils.isEmpty(activityList)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
activityList.forEach(al -> { |
|
|
|
IcPartyActDetailResDTO icPartyActDetailResDTO = queryActDetail(formDTO.getCustomerId(), formDTO.getStaffId(), al.getActivityId()); |
|
|
|
activityDetailList.add(icPartyActDetailResDTO); |
|
|
|
}); |
|
|
|
List<YearSearchDetailResultDTO> result = new ArrayList<>(); |
|
|
|
List<IcPartActTypeDTO> activityTypeList = actTypeList(formDTO.getCustomerId()); |
|
|
|
Map<String, List<IcPartyActDetailResDTO>> groupByType = activityDetailList.stream().collect(Collectors.groupingBy(IcPartyActDetailResDTO::getActType)); |
|
|
|
groupByType.forEach((type,list) -> { |
|
|
|
YearSearchDetailResultDTO dto = new YearSearchDetailResultDTO(); |
|
|
|
activityTypeList.forEach(at -> { |
|
|
|
if (at.getValue().equals(type)){ |
|
|
|
dto.setType(at.getLabel()); |
|
|
|
dto.setFrequency(at.getFrequencyDesc()); |
|
|
|
} |
|
|
|
}); |
|
|
|
dto.setActivityList(list); |
|
|
|
result.add(dto); |
|
|
|
}); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Desc: |
|
|
|
* @param formDTO |
|
|
|