|
@ -4,9 +4,11 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.dto.org.GridInfoDTO; |
|
|
import com.epmet.dto.org.GridInfoDTO; |
|
|
|
|
|
import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; |
|
|
import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; |
|
|
import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; |
|
|
import com.epmet.dto.screen.result.DifficultyIfExistedResultDTO; |
|
|
import com.epmet.dto.screen.result.DifficultyIfExistedResultDTO; |
|
|
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; |
|
|
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; |
|
|
|
|
|
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity; |
|
|
import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; |
|
|
import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; |
|
|
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; |
|
|
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; |
|
|
import com.epmet.service.evaluationindex.extract.toscreen.ScreenGrassrootsGovernDataAbsorptionService; |
|
|
import com.epmet.service.evaluationindex.extract.toscreen.ScreenGrassrootsGovernDataAbsorptionService; |
|
@ -15,6 +17,8 @@ import com.epmet.service.evaluationindex.screen.ScreenDifficultyDataService; |
|
|
import com.epmet.service.evaluationindex.screen.ScreenPartyUserRankDataService; |
|
|
import com.epmet.service.evaluationindex.screen.ScreenPartyUserRankDataService; |
|
|
import com.epmet.service.org.CustomerGridService; |
|
|
import com.epmet.service.org.CustomerGridService; |
|
|
import com.epmet.service.point.UserPointService; |
|
|
import com.epmet.service.point.UserPointService; |
|
|
|
|
|
import com.epmet.service.project.ProjectProcessService; |
|
|
|
|
|
import com.epmet.service.topic.TopicService; |
|
|
import com.epmet.service.user.UserService; |
|
|
import com.epmet.service.user.UserService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
@ -24,8 +28,10 @@ import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
|
|
|
|
import java.util.LinkedList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -53,6 +59,10 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr |
|
|
private ScreenDifficultyDataService screenDifficultyDataService; |
|
|
private ScreenDifficultyDataService screenDifficultyDataService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private FactOriginProjectMainDailyService factOriginProjectMainDailyService; |
|
|
private FactOriginProjectMainDailyService factOriginProjectMainDailyService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private ProjectProcessService projectProcessService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private TopicService topicService; |
|
|
/** |
|
|
/** |
|
|
* @Description 用户积分、党员分值数据中转站 |
|
|
* @Description 用户积分、党员分值数据中转站 |
|
|
* @param param |
|
|
* @param param |
|
@ -128,14 +138,36 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr |
|
|
DifficultyIfExistedResultDTO existedMap = screenDifficultyDataService.selectExistedInfo(param.getCustomerId()); |
|
|
DifficultyIfExistedResultDTO existedMap = screenDifficultyDataService.selectExistedInfo(param.getCustomerId()); |
|
|
//查询数据
|
|
|
//查询数据
|
|
|
List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),existedMap.getClosedIds()); |
|
|
List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),existedMap.getClosedIds()); |
|
|
|
|
|
if(CollectionUtils.isEmpty(difficulties)) return; |
|
|
|
|
|
List<String> projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList()); |
|
|
|
|
|
//最近一次操作
|
|
|
|
|
|
Map<String,String> latestOperationMap = projectProcessService.selectLatestOperation(projectIds,param.getCustomerId()); |
|
|
|
|
|
boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false; |
|
|
|
|
|
//图片
|
|
|
|
|
|
List<ProjectSourceMapFormDTO> projectSourceMap; |
|
|
|
|
|
|
|
|
|
|
|
projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); |
|
|
|
|
|
|
|
|
|
|
|
Map<String,List<ScreenDifficultyImgDataEntity>> imgMap = |
|
|
|
|
|
topicService.getTopicImgs(projectSourceMap); |
|
|
|
|
|
boolean isImgNull = CollectionUtils.isEmpty(imgMap) ? true : false; |
|
|
|
|
|
Map<String,String> contentMap = topicService.getTopicContent(projectSourceMap); |
|
|
|
|
|
boolean isContentNull = CollectionUtils.isEmpty(contentMap) ? true : false; |
|
|
|
|
|
difficulties.forEach( diff -> { |
|
|
|
|
|
if(!isImgNull) { |
|
|
|
|
|
List<ScreenDifficultyImgDataEntity> figureList = imgMap.get(diff.getEventId()); |
|
|
|
|
|
diff.setEventImgUrl(CollectionUtils.isEmpty(figureList) ? "" : figureList.get(NumConstant.ZERO).getEventImgUrl()); |
|
|
|
|
|
} |
|
|
|
|
|
if(!isContentNull) { |
|
|
|
|
|
diff.setEventContent(contentMap.get(diff.getEventId())); |
|
|
|
|
|
} |
|
|
|
|
|
if(!isOperationNull){ |
|
|
|
|
|
diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId())); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
List<ScreenDifficultyImgDataEntity> imgList = new LinkedList<>(); |
|
|
|
|
|
imgMap.values().forEach(list -> {imgList.addAll(list);}); |
|
|
|
|
|
|
|
|
if(existedMap.isIfExisted()){ |
|
|
screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList); |
|
|
//查询全部项目的图片
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
//查询增量项目的图片
|
|
|
|
|
|
List<String> newProjectIds = factOriginProjectMainDailyService.getNewProjectId(param.getCustomerId(),param.getDateId()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|