|
@ -5,13 +5,12 @@ import com.epmet.constant.DataSourceConstant; |
|
|
import com.epmet.dao.heart.ActInfoDao; |
|
|
import com.epmet.dao.heart.ActInfoDao; |
|
|
import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; |
|
|
import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; |
|
|
import com.epmet.dto.extract.result.OrgStatisticsResultDTO; |
|
|
import com.epmet.dto.extract.result.OrgStatisticsResultDTO; |
|
|
|
|
|
import com.epmet.dto.indexcollect.result.GridIndexCommonDTO; |
|
|
import com.epmet.service.heart.ActInfoService; |
|
|
import com.epmet.service.heart.ActInfoService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
@ -53,12 +52,10 @@ public class ActInfoServiceImpl implements ActInfoService { |
|
|
@Override |
|
|
@Override |
|
|
@DataSource(DataSourceConstant.EPMET_HEART) |
|
|
@DataSource(DataSourceConstant.EPMET_HEART) |
|
|
public Map<String, Integer> calActivityCountMap(String customerId, String monthId) { |
|
|
public Map<String, Integer> calActivityCountMap(String customerId, String monthId) { |
|
|
List<Map<String, Integer>> mapList = baseDao.selectActGroupByGridId(customerId, monthId); |
|
|
List<GridIndexCommonDTO> list = baseDao.selectActGroupByGridId(customerId, monthId); |
|
|
Map<String, Integer> resultMap = new HashMap<>(); |
|
|
Map<String, Integer> resultMap = new HashMap<>(); |
|
|
for (Map<String, Integer> map : mapList) { |
|
|
for (GridIndexCommonDTO gridIndexCommonDTO : list) { |
|
|
for (Map.Entry<String, Integer> m : map.entrySet()) { |
|
|
resultMap.put(gridIndexCommonDTO.getGridId(), gridIndexCommonDTO.getIndexValue()); |
|
|
resultMap.put(m.getKey(), m.getValue()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
return resultMap; |
|
|
return resultMap; |
|
|
} |
|
|
} |
|
|