|
|
@ -22,10 +22,10 @@ import com.epmet.dataaggre.service.resigroup.ResiGroupService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Comparator; |
|
|
@ -120,9 +120,11 @@ public class ResiGroupServiceImpl implements ResiGroupService { |
|
|
|
if (CollectionUtils.isEmpty(categoryList)) { |
|
|
|
return new BranchConAnalysisResultDTO(); |
|
|
|
} |
|
|
|
String dateId = DateUtils.getBeforeNDay(NumConstant.ONE); |
|
|
|
if (StringUtils.isBlank(formDTO.getDateId())) { |
|
|
|
formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); |
|
|
|
} |
|
|
|
List<FactGroupActDailyDTO> factGroupActDailyDTOList = dataStatsService.branchConAnalysis(formDTO.getCustomerId(), formDTO.getOrgId(), formDTO.getOrgType(), |
|
|
|
dateId, formDTO.getFirstCategoryCode()); |
|
|
|
formDTO.getDateId(), formDTO.getFirstCategoryCode()); |
|
|
|
/** |
|
|
|
* List -> Map |
|
|
|
* 需要注意的是: |
|
|
@ -285,7 +287,9 @@ public class ResiGroupServiceImpl implements ResiGroupService { |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
List<GroupActRankResultDTO> resultDTOList=new ArrayList<>(); |
|
|
|
String dateId = DateUtils.getBeforeNDay(NumConstant.ONE); |
|
|
|
if (StringUtils.isBlank(formDTO.getDateId())) { |
|
|
|
formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); |
|
|
|
} |
|
|
|
// 1、根据以及编码查询出二级编码列表
|
|
|
|
List<ActCategoryDictDTO> actCategoryDictDTOList=queryActCategoryDictList(formDTO.getCustomerId(),formDTO.getFirstCategoryCode()); |
|
|
|
for(OrgInfoCommonDTO orgInfo:orgInfoDTOList){ |
|
|
@ -296,7 +300,7 @@ public class ResiGroupServiceImpl implements ResiGroupService { |
|
|
|
if(!CollectionUtils.isEmpty(actCategoryDictDTOList)){ |
|
|
|
|
|
|
|
List<GroupActRankDetailDTO> detailList=new ArrayList<>(); |
|
|
|
List<GroupActRankDetailDTO> detailRecords=dataStatsService.selectGroupActRankDetail(formDTO.getCustomerId(),dateId,orgInfo.getOrgId(),actCategoryDictDTOList); |
|
|
|
List<GroupActRankDetailDTO> detailRecords=dataStatsService.selectGroupActRankDetail(formDTO.getCustomerId(),formDTO.getDateId(),orgInfo.getOrgId(),actCategoryDictDTOList); |
|
|
|
Map<String, GroupActRankDetailDTO> map = detailRecords.stream().collect(Collectors.toMap(GroupActRankDetailDTO::getCategoryCode, a -> a, (k1, k2) -> k1)); |
|
|
|
|
|
|
|
for(ActCategoryDictDTO actCategoryDictDTO:actCategoryDictDTOList){ |
|
|
|