|
|
@ -104,16 +104,21 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { |
|
|
|
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) |
|
|
|
@Override |
|
|
|
public List<DifficultProjectResultDTO> difficultProject(AgencyNumTypeParamFormDTO param) { |
|
|
|
List<String> nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId()); |
|
|
|
if (CollectionUtils.isEmpty(nextAgencyIds)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
List<String> nextAgencyIds = new ArrayList<>(); |
|
|
|
List<DifficultProjectResultDTO> result = new ArrayList<>(); |
|
|
|
if(null == param.getTopNum()){ |
|
|
|
param.setTopNum(NumConstant.TWO); |
|
|
|
} |
|
|
|
PageHelper.startPage(NumConstant.ONE,param.getTopNum()); |
|
|
|
// List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType());
|
|
|
|
List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficultyNew(nextAgencyIds,param.getType()); |
|
|
|
if (StringUtils.isNotEmpty(param.getAreaCode())){ |
|
|
|
nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId()); |
|
|
|
if (CollectionUtils.isEmpty(nextAgencyIds)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
result = screenDifficultyDataDao.selectDifficultyNew(nextAgencyIds,param.getType()); |
|
|
|
}else { |
|
|
|
result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); |
|
|
|
} |
|
|
|
for(DifficultProjectResultDTO resultDTO:result){ |
|
|
|
if (StringUtils.isNotBlank(resultDTO.getImgUrl()) && !resultDTO.getImgUrl().contains("http")) { |
|
|
|
resultDTO.setImgUrl(StrConstant.EPMETY_STR); |
|
|
@ -211,19 +216,33 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { |
|
|
|
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) |
|
|
|
@Override |
|
|
|
public List<GovernCapacityRankResultDTO> governCapacityRank(AgencyAndNumFormDTO param) { |
|
|
|
List<GovernCapacityResultDTO> orderList = new ArrayList<>(); |
|
|
|
if(null == param.getTopNum()) param.setTopNum(NumConstant.FIVE); |
|
|
|
if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX); |
|
|
|
PageHelper.startPage(NumConstant.ONE,param.getTopNum()); |
|
|
|
String monthId = dateUtils.getCurrentMonthId(); |
|
|
|
List<GovernCapacityResultDTO> orderList = |
|
|
|
screenGovernRankDataDao.selectGovernCapacityRatio(monthId,param.getAgencyId()); |
|
|
|
if (StringUtils.isNotEmpty(param.getAreaCode())){ |
|
|
|
List<String> nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId()); |
|
|
|
if (CollectionUtils.isEmpty(nextAgencyIds)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(monthId,nextAgencyIds); |
|
|
|
int time = NumConstant.TWELVE; |
|
|
|
while(CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE){ |
|
|
|
time--; |
|
|
|
monthId = dateUtils.getPreviousMonthIdByDest(null ,monthId); |
|
|
|
PageHelper.startPage(NumConstant.ONE,param.getTopNum()); |
|
|
|
orderList = |
|
|
|
screenGovernRankDataDao.selectGovernCapacityRatio(monthId,param.getAgencyId()); |
|
|
|
orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(monthId,nextAgencyIds); |
|
|
|
} |
|
|
|
}else { |
|
|
|
orderList = screenGovernRankDataDao.selectGovernCapacityRatio(monthId, param.getAgencyId()); |
|
|
|
int time = NumConstant.TWELVE; |
|
|
|
while (CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE) { |
|
|
|
time--; |
|
|
|
monthId = dateUtils.getPreviousMonthIdByDest(null, monthId); |
|
|
|
PageHelper.startPage(NumConstant.ONE, param.getTopNum()); |
|
|
|
orderList = screenGovernRankDataDao.selectGovernCapacityRatio(monthId, param.getAgencyId()); |
|
|
|
} |
|
|
|
} |
|
|
|
if(null == orderList || orderList.isEmpty()) return new ArrayList<>(); |
|
|
|
List<GovernCapacityRankResultDTO> result = new LinkedList<>(); |
|
|
|