|
@ -1041,7 +1041,7 @@ public class StatisticsESService {
|
|
|
//因为统计时间是统计到当前时间的前一天,所以这里的时间是提前一天
|
|
|
Calendar temp = Calendar.getInstance();
|
|
|
temp.setTime(DateUtil.strToDate(endDate, DateUtil.YYYY_MM_DD));
|
|
|
temp.add(Calendar.DAY_OF_MONTH, -1);
|
|
|
// temp.add(Calendar.DAY_OF_MONTH, -1);
|
|
|
end.setTime(temp.getTime());
|
|
|
// 起始日期为周几
|
|
|
int week = start.get(Calendar.DAY_OF_WEEK);
|
|
@ -1090,6 +1090,8 @@ public class StatisticsESService {
|
|
|
// 结果集
|
|
|
Map<String, JSONObject> countResult = new HashMap<>();
|
|
|
|
|
|
// Date dd = df.parse();
|
|
|
|
|
|
// 算出每个查询周期
|
|
|
for (int j = 0; j < days.size() - 1; j++) {
|
|
|
String startStr = "";
|
|
@ -1109,6 +1111,14 @@ public class StatisticsESService {
|
|
|
range.put("range", endStr);
|
|
|
range.put("amount", 0);
|
|
|
countResult.put(endStr, range);
|
|
|
|
|
|
|
|
|
// if(!DateUtil.getSundayOfThisDate(new Date()).equals(df.format(new Date()))){
|
|
|
// JSONObject range2 = new JSONObject();
|
|
|
// range2.put("range", endDate);
|
|
|
// range2.put("amount", 0);
|
|
|
// countResult.put(df.format(new Date()), range2);
|
|
|
// };
|
|
|
}
|
|
|
|
|
|
if (startDate.equals(df.format(new Date()))) {
|
|
@ -1135,10 +1145,10 @@ public class StatisticsESService {
|
|
|
range = df.format(saveModel.getQuotaDate());
|
|
|
}
|
|
|
JSONObject json = countResult.get(range);
|
|
|
//因为上述时间集提前一天 但是前端是显示当前时间,所以这里给调整回去
|
|
|
if (range.equals(df.format(temp.getTime()))) {
|
|
|
json.put("range", endDate);
|
|
|
}
|
|
|
// //因为上述时间集提前一天 但是前端是显示当前时间,所以这里给调整回去
|
|
|
// if (range.equals(df.format(temp.getTime()))) {
|
|
|
// json.put("range", endDate);
|
|
|
// }
|
|
|
if (json != null) {
|
|
|
long amount = saveModel.getResult2().longValue();
|
|
|
json.put("amount", amount);
|
|
@ -5429,7 +5439,7 @@ public class StatisticsESService {
|
|
|
areaCondition = " and d.area like '" + area.substring(0, 4) + "%' ";
|
|
|
// areaCondition2 = " and t.org_code like '" + area.substring(0, 2) + "%' ";
|
|
|
}
|
|
|
String activitySql = "select count(1) from wlyy_health_bank.wlyy_health_bank_activity d where d.status=1 " + areaCondition;
|
|
|
String activitySql = "select count(1) from wlyy_health_bank.wlyy_health_bank_activity d where 1=1 " + areaCondition;
|
|
|
Integer activityCount = jdbcTemplate.queryForObject(activitySql, Integer.class);//发布活动数
|
|
|
|
|
|
|
|
@ -5500,7 +5510,7 @@ public class StatisticsESService {
|
|
|
if (StringUtils.isNotEmpty(id)) {
|
|
|
condition += " and a.id='" + id+"'";
|
|
|
}
|
|
|
String sql = " select * from wlyy_health_bank.wlyy_health_bank_activity a where a.status=1 " + condition;
|
|
|
String sql = " select * from wlyy_health_bank.wlyy_health_bank_activity a where 1=1 " + condition;
|
|
|
return jdbcTemplate.queryForList(sql);
|
|
|
}
|
|
|
|
|
@ -5515,11 +5525,11 @@ public class StatisticsESService {
|
|
|
// Map<String, Object> resultMap = new HashedMap();//返回的结果
|
|
|
List<SaveModel> allAmountList = null;//签约已缴费人数列表
|
|
|
List<SaveModel> applyAmountList = null;//报名人数列表
|
|
|
allAmountList = elasticsearchUtil.findDateQuotaLevel0(timeKey, timeKey, area, level, index_all, SaveModel.timeLevel_DDL, "", low_level);
|
|
|
if (StringUtils.isNotEmpty(slaveKey1)) {
|
|
|
allAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_all, SaveModel.timeLevel_DDL, slaveKey1, "", low_level);
|
|
|
// allAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_all, SaveModel.timeLevel_DDL, null, "", low_level);
|
|
|
applyAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_part, SaveModel.timeLevel_DDL, slaveKey1, "", low_level);
|
|
|
} else {
|
|
|
allAmountList = elasticsearchUtil.findDateQuotaLevel0(timeKey, timeKey, area, level, index_all, SaveModel.timeLevel_DDL, "", low_level);
|
|
|
applyAmountList = elasticsearchUtil.findDateQuotaLevel0(timeKey, timeKey, area, level, index_part, SaveModel.timeLevel_DDL, "", low_level);
|
|
|
}
|
|
|
Map<String, Integer> allMap = new HashMap<>(); //签约人数的的列表转map
|