|
|
@ -3,6 +3,7 @@ package com.elink.esua.epdc.modules.screen.service.impl; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.EpmetConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.dto.screen.result.*; |
|
|
@ -169,13 +170,25 @@ public class ScreenPublicDataServiceImpl extends BaseServiceImpl<ScreenPublicDat |
|
|
|
@Override |
|
|
|
public Result getPartyuserrankdata() { |
|
|
|
List<PartyuserrankdataResultDTO> list = baseDao.getPartyuserrankdata(); |
|
|
|
// 将list转换为json格式
|
|
|
|
if(list != null && list.size()>0){ |
|
|
|
PartyuserrankdataDTO result = new PartyuserrankdataDTO(); |
|
|
|
result.setDataList(list); |
|
|
|
String json = JSONObject.toJSONString(result); |
|
|
|
String body = epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_PARTY_USER_RANK, json); |
|
|
|
log.info(body); |
|
|
|
if(list.size()!=0) { |
|
|
|
if (list.size() > 300) { |
|
|
|
List<List<PartyuserrankdataResultDTO>> formList = ScreenIndexDataServiceImpl.fixedGrouping(list, NumConstant.THTEE_HUNDRED); |
|
|
|
if (formList != null && formList.size() > NumConstant.ZERO) { |
|
|
|
for (int i = NumConstant.ZERO; i < formList.size(); i++) { |
|
|
|
PartyuserrankdataDTO result = new PartyuserrankdataDTO(); |
|
|
|
result.setDataList(list); |
|
|
|
String json = JSONObject.toJSONString(result); |
|
|
|
String body = epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_PARTY_USER_RANK, json); |
|
|
|
log.info(body); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
PartyuserrankdataDTO result = new PartyuserrankdataDTO(); |
|
|
|
result.setDataList(list); |
|
|
|
String json = JSONObject.toJSONString(result); |
|
|
|
String body = epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_PARTY_USER_RANK, json); |
|
|
|
log.info(body); |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|