|
|
@ -37,6 +37,7 @@ import com.epmet.service.partymember.PartyMemberService; |
|
|
|
import com.epmet.service.stats.DimCustomerPartymemberService; |
|
|
|
import com.epmet.service.stats.DimCustomerService; |
|
|
|
import com.epmet.service.stats.DimGridService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -56,6 +57,7 @@ import java.util.stream.Collectors; |
|
|
|
* @since v1.0.0 2020-09-17 |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
@Slf4j |
|
|
|
public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl<DimCustomerPartymemberDao, DimCustomerPartymemberEntity> implements DimCustomerPartymemberService { |
|
|
|
|
|
|
|
@Autowired |
|
|
@ -136,7 +138,8 @@ public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl<DimCustom |
|
|
|
String dateId = customerIdAndDateIdFormDTO.getDateId(); |
|
|
|
List<DimCustomerPartyMemberFormDTO> partyMemberList = partyMemberService.selectPartyMemberInfo(customerId, dateId); |
|
|
|
if (CollectionUtils.isEmpty(partyMemberList)){ |
|
|
|
throw new RenException(String.format(StatsConstant.PARTY_INFO_LIST,customerId)); |
|
|
|
log.error(String.format(StatsConstant.PARTY_INFO_LIST,customerId)); |
|
|
|
return; |
|
|
|
} |
|
|
|
List<String> gridIds = partyMemberList.stream().map(party -> party.getGridId()).distinct().collect(Collectors.toList()); |
|
|
|
List<GridBelongAgencyResultDTO> agencyInfos = dimGridService.selectGridBelongAgencyInfo(gridIds); |
|
|
|