|
@ -5,6 +5,7 @@ import com.yihu.wlyy.entity.statistics.WlyyQuotaResult;
|
|
import com.yihu.wlyy.job.Constant;
|
|
import com.yihu.wlyy.job.Constant;
|
|
import com.yihu.wlyy.service.app.statistics.StatisticsAllService;
|
|
import com.yihu.wlyy.service.app.statistics.StatisticsAllService;
|
|
import com.yihu.wlyy.service.app.statistics.StatisticsService;
|
|
import com.yihu.wlyy.service.app.statistics.StatisticsService;
|
|
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
import com.yihu.wlyy.util.ValueComparator;
|
|
import com.yihu.wlyy.util.ValueComparator;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@ -506,6 +507,10 @@ public class StatisticsController extends BaseController {
|
|
} else {
|
|
} else {
|
|
// 未指定level下特定查询级别
|
|
// 未指定level下特定查询级别
|
|
for (String idx : indexes) {
|
|
for (String idx : indexes) {
|
|
|
|
if((idx.equals("21"))||(idx.equals("20"))){
|
|
|
|
//如果是21或者20的指标 默认找最新的日期
|
|
|
|
date= DateUtil.getStringDate("yyyy-MM-dd");
|
|
|
|
}
|
|
if (idx.equals("18") || index.equals("19")) {
|
|
if (idx.equals("18") || index.equals("19")) {
|
|
result.put("index_" + idx, statisticsAllService.getLowLevelTotalSpecial(date, area, level, idx, sort, lowLevel));
|
|
result.put("index_" + idx, statisticsAllService.getLowLevelTotalSpecial(date, area, level, idx, sort, lowLevel));
|
|
} else if (idx.equals("1") || index.equals("21")) {
|
|
} else if (idx.equals("1") || index.equals("21")) {
|
|
@ -576,10 +581,14 @@ public class StatisticsController extends BaseController {
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
|
for (String idx : indexes) {
|
|
for (String idx : indexes) {
|
|
|
|
if((idx.equals("21"))||(idx.equals("20"))){
|
|
|
|
//如果是21或者20的指标 默认找最新的日期
|
|
|
|
endDate= DateUtil.getStringDate("yyyy-MM-dd");
|
|
|
|
}
|
|
Long total = statisticsAllService.getIndexTotal(endDate, area, level, idx);
|
|
Long total = statisticsAllService.getIndexTotal(endDate, area, level, idx);
|
|
super.infoMessage("原来的总数:" + total);
|
|
super.infoMessage("原来的总数:" + total);
|
|
//如果year不为空 那么因为是到达量 所以要加上一年的数据
|
|
|
|
if (!org.springframework.util.StringUtils.isEmpty(year) && !"2016".equals(year)) {
|
|
|
|
|
|
//如果year不为空 那么因为是到达量 所以要加上一年的数据 21和20的指标不安年度统计 所以不用累加
|
|
|
|
if (!org.springframework.util.StringUtils.isEmpty(year) && !"2016".equals(year)&&!(idx.equals("21")||(idx.equals("20")))) {
|
|
//得到上一个年份的的最后一天的统计数据
|
|
//得到上一个年份的的最后一天的统计数据
|
|
String date = year + "-06-30";//固定是 6月三十号 为一个年份的最后一天,如果是2017年份 那么就是2017-7-1 到 2018-6-30
|
|
String date = year + "-06-30";//固定是 6月三十号 为一个年份的最后一天,如果是2017年份 那么就是2017-7-1 到 2018-6-30
|
|
WlyyQuotaResult wlyyQuotaResult = statisticsService.findOneQuotaResult(date, level, idx, area);
|
|
WlyyQuotaResult wlyyQuotaResult = statisticsService.findOneQuotaResult(date, level, idx, area);
|