|
@ -609,13 +609,13 @@ public class StatisticsService extends BaseService {
|
|
* @param index 指标
|
|
* @param index 指标
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public JSONArray getDateIncrementDetail(String startDate, String endDate, int interval, String area, int level, String index) throws Exception {
|
|
|
|
|
|
public JSONArray getDateIncrementDetail(String startDate, String endDate, int interval, String area, int level, String index,String level2_type) throws Exception {
|
|
if (interval == 1) {
|
|
if (interval == 1) {
|
|
return dateStatistics(startDate, endDate, area, level, index);
|
|
|
|
|
|
return dateStatistics(startDate, endDate, area, level, index,level2_type);
|
|
} else if (interval == 2) {
|
|
} else if (interval == 2) {
|
|
return weekStatistics(startDate, endDate, area, level, index);
|
|
|
|
|
|
return weekStatistics(startDate, endDate, area, level, index,level2_type);
|
|
} else if (interval == 3) {
|
|
} else if (interval == 3) {
|
|
return monthStatistics(startDate, endDate, area, level, index);
|
|
|
|
|
|
return monthStatistics(startDate, endDate, area, level, index,level2_type);
|
|
}
|
|
}
|
|
|
|
|
|
return new JSONArray();
|
|
return new JSONArray();
|
|
@ -631,7 +631,7 @@ public class StatisticsService extends BaseService {
|
|
* @param index
|
|
* @param index
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
private JSONArray dateStatistics(String startDate, String endDate, String area, int level, String index) {
|
|
|
|
|
|
private JSONArray dateStatistics(String startDate, String endDate, String area, int level, String index,String level2_type) {
|
|
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
String areaField = "";
|
|
String areaField = "";
|
|
String sql = "";
|
|
String sql = "";
|
|
@ -721,8 +721,12 @@ public class StatisticsService extends BaseService {
|
|
" and level1_type = '" + level + "' and del = '1' " +
|
|
" and level1_type = '" + level + "' and del = '1' " +
|
|
" and quota_date >= '" + startDate + "' " +
|
|
" and quota_date >= '" + startDate + "' " +
|
|
" and quota_date <= '" + endDate + "' " +
|
|
" and quota_date <= '" + endDate + "' " +
|
|
" and " + areaField + " = '" + area + "' " +
|
|
|
|
" group by quota_date ";
|
|
|
|
|
|
" and " + areaField + " = '" + area + "' " ;
|
|
|
|
if(StringUtils.isNotBlank(level2_type)){
|
|
|
|
sql=sql + " and level2_type ='"+level2_type+"' ";
|
|
|
|
}
|
|
|
|
sql=sql + " group by quota_date ";
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
@ -767,7 +771,7 @@ public class StatisticsService extends BaseService {
|
|
* @param index
|
|
* @param index
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
private JSONArray weekStatistics(String startDate, String endDate, String area, int level, String index) throws Exception {
|
|
|
|
|
|
private JSONArray weekStatistics(String startDate, String endDate, String area, int level, String index,String level2_type) throws Exception {
|
|
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
String areaField = "";
|
|
String areaField = "";
|
|
String sql = "";
|
|
String sql = "";
|
|
@ -894,8 +898,12 @@ public class StatisticsService extends BaseService {
|
|
" and level1_type = '" + level + "' and del = '1' " +
|
|
" and level1_type = '" + level + "' and del = '1' " +
|
|
" and quota_date >= '" + startDate + "' " +
|
|
" and quota_date >= '" + startDate + "' " +
|
|
" and quota_date <= '" + endDate + "' " +
|
|
" and quota_date <= '" + endDate + "' " +
|
|
" and " + areaField + " = '" + area + "' " +
|
|
|
|
" group by quota_date ";
|
|
|
|
|
|
" and " + areaField + " = '" + area + "' " ;
|
|
|
|
if(StringUtils.isNotBlank(level2_type)){
|
|
|
|
sql=sql + " and level2_type ='"+level2_type+"' ";
|
|
|
|
}
|
|
|
|
sql=sql + " group by quota_date ";
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
@ -972,7 +980,7 @@ public class StatisticsService extends BaseService {
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
private JSONArray monthStatistics(String startDate, String endDate, String area, int level, String index) throws Exception {
|
|
|
|
|
|
private JSONArray monthStatistics(String startDate, String endDate, String area, int level, String index,String level2_type) throws Exception {
|
|
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
String areaField = "";
|
|
String areaField = "";
|
|
String sql = "";
|
|
String sql = "";
|
|
@ -1096,8 +1104,11 @@ public class StatisticsService extends BaseService {
|
|
" and level1_type = '" + level + "' and del = '1' " +
|
|
" and level1_type = '" + level + "' and del = '1' " +
|
|
" and quota_date >= '" + startDate + "' " +
|
|
" and quota_date >= '" + startDate + "' " +
|
|
" and quota_date <= '" + endDate + "' " +
|
|
" and quota_date <= '" + endDate + "' " +
|
|
" and " + areaField + " = '" + area + "' " +
|
|
|
|
" group by quota_date ";
|
|
|
|
|
|
" and " + areaField + " = '" + area + "' ";
|
|
|
|
if(StringUtils.isNotBlank(level2_type)){
|
|
|
|
sql=sql + " and level2_type ='"+level2_type+"' ";
|
|
|
|
}
|
|
|
|
sql=sql + " group by quota_date ";
|
|
|
|
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
|