|
@ -158,6 +158,8 @@ public class StatisticsService {
|
|
|
|
|
|
// activity-1 活动浏览次数
|
|
// activity-1 活动浏览次数
|
|
// activity-2 公艺课程播放
|
|
// activity-2 公艺课程播放
|
|
|
|
res.put("activity_1", 0);
|
|
|
|
res.put("activity_2", 0);
|
|
String sql = " SELECT activity_type, COUNT(id) total FROM base_activity_click WHERE activity_type IN (1, 2) GROUP BY activity_type";
|
|
String sql = " SELECT activity_type, COUNT(id) total FROM base_activity_click WHERE activity_type IN (1, 2) GROUP BY activity_type";
|
|
List<Map<String, Object>> lists = jdbcTemplate.queryForList(sql);
|
|
List<Map<String, Object>> lists = jdbcTemplate.queryForList(sql);
|
|
for (Map<String, Object> tmp : lists) {
|
|
for (Map<String, Object> tmp : lists) {
|
|
@ -272,7 +274,6 @@ public class StatisticsService {
|
|
SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, defalutArea, defalutLevel, ind, SaveModel.timeLevel_DDL);
|
|
SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, defalutArea, defalutLevel, ind, SaveModel.timeLevel_DDL);
|
|
res.put("index_" + ind, saveModel.getResult2().longValue());
|
|
res.put("index_" + ind, saveModel.getResult2().longValue());
|
|
}
|
|
}
|
|
|
|
|
|
String sqltmp = "SELECT GROUP_CONCAT(dict_code) orgCodes from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_org' ";
|
|
String sqltmp = "SELECT GROUP_CONCAT(dict_code) orgCodes from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_org' ";
|
|
List<Map<String, Object>> listtmp = jdbcTemplate.queryForList(sqltmp);
|
|
List<Map<String, Object>> listtmp = jdbcTemplate.queryForList(sqltmp);
|
|
String filter = "";
|
|
String filter = "";
|
|
@ -302,6 +303,8 @@ public class StatisticsService {
|
|
// activity-1 活动浏览次数
|
|
// activity-1 活动浏览次数
|
|
// activity-2 公艺课程播放
|
|
// activity-2 公艺课程播放
|
|
String sql = " SELECT activity_type, COUNT(id) total FROM base_activity_click WHERE activity_type IN (1, 2) GROUP BY activity_type";
|
|
String sql = " SELECT activity_type, COUNT(id) total FROM base_activity_click WHERE activity_type IN (1, 2) GROUP BY activity_type";
|
|
|
|
res.put("activity_1",0);
|
|
|
|
res.put("activity_2",0);
|
|
List<Map<String, Object>> lists = jdbcTemplate.queryForList(sql);
|
|
List<Map<String, Object>> lists = jdbcTemplate.queryForList(sql);
|
|
for (Map<String, Object> tmp : lists) {
|
|
for (Map<String, Object> tmp : lists) {
|
|
Integer num = Integer.parseInt(tmp.get("total").toString());
|
|
Integer num = Integer.parseInt(tmp.get("total").toString());
|
|
@ -1827,26 +1830,26 @@ public class StatisticsService {
|
|
for (String ind : split) {
|
|
for (String ind : split) {
|
|
long total = 0l;
|
|
long total = 0l;
|
|
SaveModel saveModelAdd = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, "330100", 2, ind, SaveModel.timeLevel_DDL, "6");
|
|
SaveModel saveModelAdd = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, "330100", 2, ind, SaveModel.timeLevel_DDL, "6");
|
|
res.put("index_" + ind, saveModelAdd.getResult2().longValue());
|
|
|
|
|
|
res.put("index_"+ind, saveModelAdd.getResult2().longValue());
|
|
}
|
|
}
|
|
Long index_28 = (Long) res.get("index_28");
|
|
Long index_28 = (Long) res.get("index_28");
|
|
Long index_29 = (Long) res.get("index_29");
|
|
Long index_29 = (Long) res.get("index_29");
|
|
Long index_30 = (Long) res.get("index_30");
|
|
Long index_30 = (Long) res.get("index_30");
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
|
if (index_28 != 0) {
|
|
|
|
if (index_29 != 0) {
|
|
|
|
res.put("noReply", df.format((float) index_29 / index_28 * 100) + "%");
|
|
|
|
} else {
|
|
|
|
res.put("noReply", "0.00%");
|
|
|
|
|
|
DecimalFormat df=new DecimalFormat("0.00");
|
|
|
|
if (index_28!=0){
|
|
|
|
if (index_29!=0){
|
|
|
|
res.put("noReply",df.format((float) index_29/index_28*100)+"%");
|
|
|
|
}else {
|
|
|
|
res.put("noReply","0.00%");
|
|
}
|
|
}
|
|
if (index_30 != 0) {
|
|
|
|
res.put("reply", df.format((float) index_30 / index_28 * 100) + "%");
|
|
|
|
} else {
|
|
|
|
res.put("reply", "0.00%");
|
|
|
|
|
|
if (index_30!=0){
|
|
|
|
res.put("reply",df.format((float) index_30/index_28*100 )+"%");
|
|
|
|
}else {
|
|
|
|
res.put("reply","0.00%");
|
|
}
|
|
}
|
|
} else {
|
|
|
|
res.put("reply", "0.00%");
|
|
|
|
res.put("noReply", "0.00%");
|
|
|
|
|
|
}else{
|
|
|
|
res.put("reply","0.00%");
|
|
|
|
res.put("noReply","0.00%");
|
|
}
|
|
}
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|