|
@ -5710,8 +5710,8 @@ public class StatisticsEsService {
|
|
|
Integer publishLinkTotal = saveModel1!=null?saveModel1.getResult1().intValue():0;
|
|
|
Integer publishSameTotal = saveModel2!=null?saveModel2.getResult1().intValue():0;
|
|
|
object.put("publishTotal",publishTotal);//发布量
|
|
|
object.put("publishLink",getTwoRange(publishTotal,publishLinkTotal,0));//环比
|
|
|
object.put("publishSame",getTwoRange(publishTotal,publishSameTotal,0));//同比
|
|
|
object.put("publishLink",getTwoRange(publishTotal-publishLinkTotal,publishLinkTotal,0));//环比
|
|
|
object.put("publishSame",getTwoRange(publishTotal-publishSameTotal,publishSameTotal,0));//同比
|
|
|
|
|
|
|
|
|
//收藏量统计
|
|
@ -5724,8 +5724,8 @@ public class StatisticsEsService {
|
|
|
Integer collectLinkTotal = saveModel4!=null?saveModel4.getResult1().intValue():0;
|
|
|
Integer collectSameTotal = saveModel5!=null?saveModel5.getResult1().intValue():0;
|
|
|
object.put("collectTotal",collectTotal);//发布量
|
|
|
object.put("collectLink",getTwoRange(collectTotal,collectLinkTotal,0));//环比
|
|
|
object.put("collectSame",getTwoRange(collectTotal,collectSameTotal,0));//同比
|
|
|
object.put("collectLink",getTwoRange(collectTotal-collectLinkTotal,collectLinkTotal,0));//环比
|
|
|
object.put("collectSame",getTwoRange(collectTotal-collectSameTotal,collectSameTotal,0));//同比
|
|
|
return object;
|
|
|
}
|
|
|
|
|
@ -5789,6 +5789,18 @@ public class StatisticsEsService {
|
|
|
return object;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 全院统计
|
|
|
* @param flag 0自定义 1本月2近半年3本年
|
|
|
* @param startDate 开始时间
|
|
|
* @param endDate 结束时间
|
|
|
* @param level 等级 1 省 2 市 3 区县 4 机构 5团队
|
|
|
* @param area code 厦门市 350200 code 和level是对应的
|
|
|
* @param lowLevel
|
|
|
* @param lowCode
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<Map<String,Object>> getArticleExcel(Integer flag,String startDate,String endDate,int level, String area, String lowLevel,String lowCode) throws Exception {
|
|
|
if (flag==1){
|
|
|
startDate = DateUtil.getFirstMonthDay() +" 00:00:00";
|
|
@ -5803,7 +5815,7 @@ public class StatisticsEsService {
|
|
|
//文章发布数
|
|
|
List<SaveModel> total = elasticsearchUtil.findListDateQuotaLevel1Empty(startDate, endDate,area,level, "75", SaveModel.timeLevel_ZL, lowLevel,lowCode);//总数
|
|
|
//发布类型
|
|
|
List<SaveModel> publishTypeTotal = elasticsearchUtil.findListDateQuotaLevel1Empty(startDate, endDate, area, level, "76", SaveModel.timeLevel_ZL, lowLevel,lowCode);//发布类型
|
|
|
List<SaveModel> publishTypeTotal = elasticsearchUtil.findListDateQuotaLevel1(startDate, endDate, area, level, "75", SaveModel.timeLevel_ZL, lowLevel,lowCode);//发布类型
|
|
|
//文章评论数
|
|
|
List<SaveModel> pinlunTotal = elasticsearchUtil.findListDateQuotaLevel2Empty(startDate, endDate, area, level, "76", SaveModel.timeLevel_ZL, lowLevel,lowCode,"1");//评论
|
|
|
//文章点赞数
|
|
@ -5812,4 +5824,53 @@ public class StatisticsEsService {
|
|
|
List<SaveModel> collectTotal = elasticsearchUtil.findListDateQuotaLevel2Empty(startDate, endDate, area, level, "76", SaveModel.timeLevel_ZL, lowLevel,lowCode,"3");//收藏
|
|
|
return getArticleCoutList(level,lowLevel,publishTypeTotal,total,pinlunTotal,dianzangTotal,collectTotal);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 文章类型统计
|
|
|
*
|
|
|
* @param flag 0自定义 1本月2近半年3本年
|
|
|
* @param startDate 开始时间
|
|
|
* @param endDate 结束时间
|
|
|
* @param level 等级 1 省 2 市 3 区县 4 机构 5团队
|
|
|
* @param area code 厦门市 350200 code 和level是对应的
|
|
|
* @param lowLevel
|
|
|
* @param lowCode
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONObject getArticleTypeCircle(Integer flag,String startDate,String endDate,int level, String area, String lowLevel,String lowCode) throws Exception {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
if (flag==1){
|
|
|
startDate = DateUtil.getFirstMonthDay() +" 00:00:00";
|
|
|
endDate = DateUtil.getLastMonthDay()+" 23:59:59";
|
|
|
} else if (flag==2) {
|
|
|
startDate = DateUtil.getMonthDate(new Date(),-6)+" 00:00:00";
|
|
|
endDate = DateUtil.getStringDateShort()+" 23:59:59";
|
|
|
}else if (flag==3){
|
|
|
startDate = DateUtil.getCurrentYearStartTime()+" 00:00:00";
|
|
|
endDate = DateUtil.getCurrentYearEndTime() +" 23:59:59";
|
|
|
}
|
|
|
//文章发布数
|
|
|
SaveModel totalMap = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "75", SaveModel.timeLevel_ZL);//总数
|
|
|
int total = 0;
|
|
|
if (totalMap!=null){
|
|
|
|
|
|
}
|
|
|
//发布类型
|
|
|
List<SaveModel> publishTypeTotal = elasticsearchUtil.findListDateQuotaLevel1(startDate, endDate, area, level, "75", SaveModel.timeLevel_ZL, lowLevel,lowCode);//发布类型
|
|
|
JSONArray array = new JSONArray();
|
|
|
for (SaveModel saveModel:publishTypeTotal){
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("code",saveModel.getSlaveKey1());
|
|
|
object.put("name",saveModel.getSlaveKey1Name());
|
|
|
object.put("total",saveModel.getResult1());
|
|
|
object.put("rate",getTwoRange(saveModel.getResult1().intValue(),total, 0));
|
|
|
array.add(object);
|
|
|
}
|
|
|
jsonObject.put("total",total);
|
|
|
jsonObject.put("list",array);
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
}
|