浏览代码

统计修改

lyr 8 年之前
父节点
当前提交
c30b7e7f91

+ 125 - 0
src/main/java/com/yihu/wlyy/entity/statistics/PopulationBase.java

@ -0,0 +1,125 @@
package com.yihu.wlyy.entity.statistics;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 人口基数
 *
 * @author lyr
 */
@Entity
@Table(name = "wlyy_people_num")
public class PopulationBase extends IdEntity implements java.io.Serializable{
    // 行政区划代码
    private String code;
    // 行政区划名称
    private String name;
    // 人口数
    private Integer num;
    // 类别 1市 2区
    private String type;
    // 年份
    private Integer year;
    // 高血压发病数
    private Integer gxyNum;
    // 糖尿病发布数
    private Integer tnbNum;
    // 65岁以上老年人口数
    private Integer sixFiveNum;
    // 高血压任务数
    private Integer gxyTaskNum;
    // 糖尿病任务数
    private Integer tnbTaskNum;
    // 65岁以上老年人口任务数
    private Integer sixFiveTaskNum;
    // 户籍人口任务数
    private Integer taskNum;
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Integer getNum() {
        return num;
    }
    public void setNum(Integer num) {
        this.num = num;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public Integer getYear() {
        return year;
    }
    public void setYear(Integer year) {
        this.year = year;
    }
    public Integer getGxyNum() {
        return gxyNum;
    }
    public void setGxyNum(Integer gxyNum) {
        this.gxyNum = gxyNum;
    }
    public Integer getTnbNum() {
        return tnbNum;
    }
    public void setTnbNum(Integer tnbNum) {
        this.tnbNum = tnbNum;
    }
    public Integer getSixFiveNum() {
        return sixFiveNum;
    }
    public void setSixFiveNum(Integer sixFiveNum) {
        this.sixFiveNum = sixFiveNum;
    }
    public Integer getGxyTaskNum() {
        return gxyTaskNum;
    }
    public void setGxyTaskNum(Integer gxyTaskNum) {
        this.gxyTaskNum = gxyTaskNum;
    }
    public Integer getTnbTaskNum() {
        return tnbTaskNum;
    }
    public void setTnbTaskNum(Integer tnbTaskNum) {
        this.tnbTaskNum = tnbTaskNum;
    }
    public Integer getSixFiveTaskNum() {
        return sixFiveTaskNum;
    }
    public void setSixFiveTaskNum(Integer sixFiveTaskNum) {
        this.sixFiveTaskNum = sixFiveTaskNum;
    }
    public Integer getTaskNum() {
        return taskNum;
    }
    public void setTaskNum(Integer taskNum) {
        this.taskNum = taskNum;
    }
}

+ 8 - 0
src/main/java/com/yihu/wlyy/interceptors/DoctorInterceptor.java

@ -3,8 +3,16 @@ package com.yihu.wlyy.interceptors;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.yihu.wlyy.entity.security.Token;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.util.SystemData;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.web.servlet.ModelAndView;
import java.util.Date;
/**
 * 医生权限校验
 * @author George

+ 1 - 1
src/main/java/com/yihu/wlyy/repository/doctor/FamousDoctorTimesRemainDao.java

@ -1,6 +1,6 @@
package com.yihu.wlyy.repository.doctor;
import com.yihu.wlyy.entity.doctor.DoctorFamousConsultTimesRemain;
import com.yihu.wlyy.entity.doctor.schedule.DoctorFamousConsultTimesRemain;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

+ 2 - 0
src/main/java/com/yihu/wlyy/repository/statistics/PopulationBaseDao.java

@ -12,4 +12,6 @@ public interface PopulationBaseDao extends PagingAndSortingRepository<Population
    @Query("select a.num from PopulationBase a where a.code = ?1 and a.year = (select max(b.year) from PopulationBase b where b.code = ?1)")
    int findPeopleNumByCode(String code);
    PopulationBase findByCodeAndYear(String code,Integer year);
}

+ 1 - 1
src/main/java/com/yihu/wlyy/service/app/scheduling/DoctorWorkTimeService.java

@ -1,6 +1,6 @@
package com.yihu.wlyy.service.app.scheduling;
import com.yihu.wlyy.entity.doctor.DoctorFamousConsultTimesRemain;
import com.yihu.wlyy.entity.doctor.schedule.DoctorFamousConsultTimesRemain;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.schedule.WlyyDoctorWorkTime;
import com.yihu.wlyy.entity.doctor.schedule.WlyyDoctorWorkWeek;

+ 271 - 36
src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -1,14 +1,15 @@
package com.yihu.wlyy.service.app.statistics;
import com.google.common.collect.Collections2;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.yihu.wlyy.entity.WlyyPeopleNum;
import com.yihu.wlyy.entity.address.City;
import com.yihu.wlyy.entity.address.Hospital;
import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.entity.doctor.Doctor;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.statistics.PopulationBase;
import com.yihu.wlyy.repository.*;
import com.yihu.wlyy.repository.address.CityDao;
import com.yihu.wlyy.repository.address.TownDao;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.organization.HospitalDao;
import com.yihu.wlyy.repository.statistics.PopulationBaseDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.DateUtil;
import org.json.JSONArray;
@ -18,12 +19,8 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import redis.clients.jedis.JedisPoolConfig;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -63,7 +60,7 @@ public class StatisticsService extends BaseService {
    @Autowired
    JdbcTemplate jdbcTemplate;
    @Autowired
    PeopleNumDao peopleNumDao;
    PopulationBaseDao peopleNumDao;
    @Autowired
    private StringRedisTemplate redisTemplate;
@ -131,11 +128,11 @@ public class StatisticsService extends BaseService {
     */
    public String getSignRate(String endDate, String area, int level) throws Exception {
        long signAmount = getTotalAmount(endDate, area, level, SIGN);
        WlyyPeopleNum peopleNum = peopleNumDao.findByCodeAndYear(area,Calendar.getInstance().get(Calendar.YEAR));
        DecimalFormat df = new DecimalFormat("0.00");
        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(area, Calendar.getInstance().get(Calendar.YEAR));
        DecimalFormat df = new DecimalFormat("0.0000");
        if (peopleNum != null && peopleNum.getNum() > 0) {
            return df.format((signAmount * 1.00) / peopleNum.getNum() * 100);
            return df.format((signAmount * 1.0000) / peopleNum.getNum() * 100);
        } else {
            throw new Exception("户籍人口为0");
        }
@ -151,11 +148,11 @@ public class StatisticsService extends BaseService {
     */
    public String getSignTaskRate(String endDate, String area, int level) throws Exception {
        long signAmount = getTotalAmount(endDate, area, level, SIGN);
        WlyyPeopleNum peopleNum = peopleNumDao.findByCodeAndYear(area,Calendar.getInstance().get(Calendar.YEAR));
        DecimalFormat df = new DecimalFormat("0.00");
        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(area, Calendar.getInstance().get(Calendar.YEAR));
        DecimalFormat df = new DecimalFormat("0.0000");
        if (peopleNum != null && peopleNum.getTaskNum() > 0) {
            return df.format((signAmount * 1.00) / peopleNum.getTaskNum() * 100);
            return df.format((signAmount * 1.0000) / peopleNum.getTaskNum() * 100);
        } else {
            throw new Exception("户籍人口任务数为0");
        }
@ -366,7 +363,7 @@ public class StatisticsService extends BaseService {
     * @param level   级别
     * @return
     */
    public JSONArray getLowLevelTotalDetail(String endDate, String area, int level, String index, int sort) {
    public JSONArray getLowLevelTotalDetail(String endDate, String area, int level, String index, int sort, String lowLevel) throws Exception {
        String areaField = "";
        String lowLevelField = "";
        String lowLevelName = "";
@ -387,8 +384,24 @@ public class StatisticsService extends BaseService {
            lowLevelField = "qkdoctor_code";
            lowLevelName = "qkdoctor_name";
        } else if (level == 1) {
            throw new Exception("param level error");
        }
        if (!StringUtils.isEmpty(lowLevel)) {
            if (lowLevel.equals("3")) {
                lowLevelField = "town";
                lowLevelName = "town_name";
            } else if (lowLevel.equals("2")) {
                lowLevelField = "org_code";
                lowLevelName = "org_name";
            } else if (lowLevel.equals("1")) {
                lowLevelField = "qkdoctor_code";
                lowLevelName = "qkdoctor_name";
            } else {
                throw new Exception("param lowLevel error");
            }
        }
        // 查询语句
        String sql = " select " +
                "     ifnull(" + lowLevelField + ",'') code " +
@ -409,7 +422,7 @@ public class StatisticsService extends BaseService {
            sql += " order by amount asc ";
        }
        List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql, new Object[]{level - 1, endDate, area});
        List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql, new Object[]{(StringUtils.isEmpty(lowLevel)?(level - 1):lowLevel), endDate, area});
        // 结果为空时,自建结果集
        if (resultList == null || resultList.size() < 1) {
            resultList = new ArrayList<>();
@ -452,7 +465,7 @@ public class StatisticsService extends BaseService {
                // 截止日期包含当天,则从redis查询当天统计数据
                if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
                    String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + (level - 1) + ":" + code);
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + (StringUtils.isEmpty(lowLevel)?(level - 1):lowLevel) + ":" + code);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
@ -493,7 +506,7 @@ public class StatisticsService extends BaseService {
     * @param index     指标
     * @return
     */
    public JSONArray getLowLevelIncrementDetail(String startDate, String endDate, String area, int level, String index, int sort) {
    public JSONArray getLowLevelIncrementDetail(String startDate, String endDate, String area, int level, String index, int sort,String lowLevel) throws Exception {
        String areaField = "";
        String lowLevelField = "";
        String lowLevelName = "";
@ -514,8 +527,24 @@ public class StatisticsService extends BaseService {
            lowLevelField = "qkdoctor_code";
            lowLevelName = "qkdoctor_name";
        } else if (level == 1) {
            throw new Exception("param level error");
        }
        if (!StringUtils.isEmpty(lowLevel)) {
            if (lowLevel.equals("3")) {
                lowLevelField = "town";
                lowLevelName = "town_name";
            } else if (lowLevel.equals("2")) {
                lowLevelField = "org_code";
                lowLevelName = "org_name";
            } else if (lowLevel.equals("1")) {
                lowLevelField = "qkdoctor_code";
                lowLevelName = "qkdoctor_name";
            } else {
                throw new Exception("param lowLevel error");
            }
        }
        // 查询语句
        String sql = " select " +
                "     ifnull(" + lowLevelField + ",'') code " +
@ -537,7 +566,7 @@ public class StatisticsService extends BaseService {
            sql += " order by amount asc ";
        }
        List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql, new Object[]{level - 1, startDate, endDate, area});
        List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql, new Object[]{(StringUtils.isEmpty(lowLevel)?(level - 1):lowLevel), startDate, endDate, area});
        // 结果为空时,自建结果集
        if (resultList == null || resultList.size() < 1) {
@ -584,7 +613,7 @@ public class StatisticsService extends BaseService {
                // 截止日期包含当天,则从redis查询当天统计数据
                if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
                    String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + (level - 1) + ":" + code);
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + (StringUtils.isEmpty(lowLevel)?(level - 1):lowLevel) + ":" + code);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
@ -1263,6 +1292,12 @@ public class StatisticsService extends BaseService {
                tnb.put("name", "糖尿病");
                tnb.put("amount", Double.valueOf("0.0"));
                resultList.add(tnb);
                Map<String, Object> tnbGxy = new HashMap<>();
                tnbGxy.put("code", "100");
                tnbGxy.put("name", "高血压+糖尿病");
                tnbGxy.put("amount", Double.valueOf("0.0"));
                resultList.add(tnb);
            } else if (index.equals(AGE)) {
                Map<String, Object> map1 = new HashMap<>();
                map1.put("code", "1");
@ -1323,30 +1358,46 @@ public class StatisticsService extends BaseService {
                if (index.equals(GROUP)) {
                    // 分组指标总数算法
                    String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
                    if (!code.equals("2")) {
                    if (code.equals("1") || code.equals("2") || code.equals("3")) {
                        total += (long) map.get("amount");
                    }
                } else {
                    total += (long) map.get("amount");
                }
            }
            if (!index.equals(AGE)) {
                DecimalFormat df = new DecimalFormat("0.00");
                double rateTotal = 0.00;
                DecimalFormat df = new DecimalFormat("0.0000");
                double rateTotal = 0.0000;
                for (Map<String, Object> map : resultList) {
                    double rateG = (total > 0 ? ((long) map.get("amount")) * 1.00 / total * 100 : 0);
                    String code = String.valueOf(map.get("code"));
                    double rateG = (total > 0 ? ((long) map.get("amount")) * 1.0000 / total * 100 : 0);
                    map.put("rate", df.format(rateG));
                    rateTotal += rateG;
//                    if (index.equals(GROUP)) {
//                        if (code.equals("1") || code.equals("2") || code.equals("3")) {
//                            rateTotal += rateG;
//                        }
//                    } else {
//                        rateTotal += rateG;
//                    }
                }
                if (1 - rateTotal > 0) {
                    for (Map<String, Object> map : resultList) {
                        if ((long) map.get("amount") > 0) {
                            map.put("rate", df.format(Double.valueOf((String) map.get("rate")) + (1 - rateTotal)));
                            break;
                        }
                    }
                }
//                if (1 - rateTotal > 0) {
//                    for (Map<String, Object> map : resultList) {
//                        if (index.equals(GROUP)) {
//                            String code = String.valueOf(map.get("code"));
//                            if ((long) map.get("amount") > 0 && (code.equals("1") || code.equals("2") || code.equals("3"))) {
//                                map.put("rate", df.format(Double.valueOf((String) map.get("rate")) + (1 - rateTotal)));
//                                break;
//                            }
//                        }else{
//                            if ((long) map.get("amount") > 0) {
//                                map.put("rate", df.format(Double.valueOf((String) map.get("rate")) + (1 - rateTotal)));
//                                break;
//                            }
//                        }
//                    }
//                }
            }
            if (index.equals(SEX) && resultList.size() > 0) {
                int i = 0;
@ -1368,4 +1419,188 @@ public class StatisticsService extends BaseService {
        }
    }
    /**
     * 统计65以上人群数据
     *
     * @param startDate
     * @param endDate
     * @param area
     * @param level
     * @return
     */
    public JSONArray getSixFiveStatistics(String startDate, String endDate, String area, int level) {
        String areaField = "";
        if (level == 4) {
            // 市级别
            areaField = "city";
        } else if (level == 3) {
            // 区、城镇级别
            areaField = "town";
        } else if (level == 2) {
            // 机构级别
            areaField = "org_code";
        } else if (level == 1) {
            // 团队
            areaField = "qkdoctor_code";
        }
        // 查询语句
        String sql = " select " +
                "     ifnull(level3_type,'') code " +
                "     ,ifnull(level3_type_name,'') 'name' " +
                "     ,ifnull(sum(result),0) amount" +
                " from  " +
                "     wlyy_quota_result " +
                " where " +
                "     quato_code = '12' " +
                "   and level2_type = '6' " +
                "   and level1_type = ? and del = '1'";
        if (!org.apache.commons.lang3.StringUtils.isEmpty(startDate)) {
            sql += "   and quota_date >= ? ";
        }
        sql += "   and quota_date <= ? " +
                "   and " + areaField + " = ? " +
                " group by level3_type,level3_type_name";
        List<Map<String, Object>> resultList = null;
        if (org.apache.commons.lang3.StringUtils.isEmpty(startDate)) {
            resultList = jdbcTemplate.queryForList(sql, new Object[]{level, endDate, area});
        } else {
            resultList = jdbcTemplate.queryForList(sql, new Object[]{level, startDate, endDate, area});
        }
        if (resultList == null || resultList.size() < 1) {
            resultList = new ArrayList<>();
            Map<String, Object> gxy = new HashMap<>();
            gxy.put("code", "1");
            gxy.put("name", "高血压");
            gxy.put("amount", Double.valueOf("0.0"));
            resultList.add(gxy);
            Map<String, Object> tnb = new HashMap<>();
            tnb.put("code", "2");
            tnb.put("name", "糖尿病");
            tnb.put("amount", Double.valueOf("0.0"));
            resultList.add(tnb);
            Map<String, Object> gxyTnb = new HashMap<>();
            gxyTnb.put("code", "3");
            gxyTnb.put("name", "高血压+糖尿病");
            gxyTnb.put("amount", Double.valueOf("0.0"));
            resultList.add(gxyTnb);
            Map<String, Object> jk = new HashMap<>();
            jk.put("code", "4");
            jk.put("name", "健康人群");
            jk.put("amount", Double.valueOf("0.0"));
            resultList.add(jk);
        }
        if (resultList != null) {
            for (Map<String, Object> map : resultList) {
                map.put("amount", map.get("amount") == null ? 0 : Math.round((double) map.get("amount")));
                // 当天数据统计
                if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
                    String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
                    String val = redisTemplate.opsForValue().get("quota:12:" + level + ":6:" + code + ":" + area);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
                            map.put("amount", (long) map.get("amount") + valJson.getInt("num"));
                        }
                    }
                }
            }
            // 65岁以上人群总数统计
            long sixFiveTotal = getSixFiveTotal(startDate, endDate, area, level);
            Map<String, Object> sixFive = new HashMap<>();
            sixFive.put("code", "0");
            sixFive.put("name", "总数");
            sixFive.put("amount", sixFiveTotal);
            resultList.add(sixFive);
            return new JSONArray(resultList);
        } else {
            return new JSONArray();
        }
    }
    /**
     * 获取65岁以上人群总数
     *
     * @param startDate
     * @param endDate
     * @param area
     * @param level
     * @return
     */
    public long getSixFiveTotal(String startDate, String endDate, String area, int level) {
        String areaField = "";
        long total = 0;
        if (level == 4) {
            // 市级别
            areaField = "city";
        } else if (level == 3) {
            // 区、城镇级别
            areaField = "town";
        } else if (level == 2) {
            // 机构级别
            areaField = "org_code";
        } else if (level == 1) {
            // 团队
            areaField = "qkdoctor_code";
        }
        // 查询语句
        String sql = " select " +
                "     ifnull(sum(result),0) amount" +
                " from  " +
                "     wlyy_quota_result " +
                " where " +
                "     quato_code = '8' " +
                "   and level2_type = '6' " +
                "   and level1_type = ? and del = '1'";
        if (!org.apache.commons.lang3.StringUtils.isEmpty(startDate)) {
            sql += "   and quota_date >= ? ";
        }
        sql += "   and quota_date <= ? " +
                "   and " + areaField + " = ? ";
        Map<String, Object> result = null;
        if (org.apache.commons.lang3.StringUtils.isEmpty(startDate)) {
            result = jdbcTemplate.queryForMap(sql, new Object[]{level, endDate, area});
        } else {
            result = jdbcTemplate.queryForMap(sql, new Object[]{level, startDate, endDate, area});
        }
        if (result != null && result.containsKey("amount")) {
            total += (result.get("amount") == null ? 0 : Math.round((double) result.get("amount")));
        }
        String code = "6";
        String val = redisTemplate.opsForValue().get("quota:8:" + level + ":" + code + ":" + area);
        if (!StringUtils.isEmpty(val)) {
            JSONObject valJson = new JSONObject(val);
            if (valJson.has("num") && valJson.getInt("num") > 0) {
                total += valJson.getInt("num");
            }
        }
        return total;
    }
}

+ 26 - 4
src/main/java/com/yihu/wlyy/web/statistic/StatisticsController.java

@ -118,13 +118,13 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/lowlevel_increment")
    @ResponseBody
    public String getIndexLowLevelIncrement(String startDate, String endDate, String area, int level, String index, int sort) {
    public String getIndexLowLevelIncrement(String startDate, String endDate, String area, int level, String index, int sort,String lowLevel) {
        try {
            String[] indexes = index.split(",");
            JSONObject result = new JSONObject();
            for (String idx : indexes) {
                result.put("index_" + idx, statisticsService.getLowLevelIncrementDetail(startDate, endDate, area, level, idx, sort));
                result.put("index_" + idx, statisticsService.getLowLevelIncrementDetail(startDate, endDate, area, level, idx, sort,lowLevel));
            }
            return write(200, "查询成功", "data", result);
@ -145,13 +145,13 @@ public class StatisticsController extends BaseController {
     */
    @RequestMapping("/lowlevel_total")
    @ResponseBody
    public String getIndexLowLevelTotal(String endDate, String area, int level, String index, int sort) {
    public String getIndexLowLevelTotal(String endDate, String area, int level, String index, int sort, String lowLevel) {
        try {
            String[] indexes = index.split(",");
            JSONObject result = new JSONObject();
            for (String idx : indexes) {
                result.put("index_" + idx, statisticsService.getLowLevelTotalDetail(endDate, area, level, idx, sort));
                result.put("index_" + idx, statisticsService.getLowLevelTotalDetail(endDate, area, level, idx, sort, lowLevel));
            }
            return write(200, "查询成功", "data", result);
@ -217,4 +217,26 @@ public class StatisticsController extends BaseController {
            return error(-1, "查询失败");
        }
    }
    /**
     * 获取三级指标增量
     *
     * @param startDate
     * @param endDate
     * @param area
     * @param level
     * @return
     */
    @RequestMapping(value = "/sixfive_statistics")
    @ResponseBody
    public String getSixFiveStatistics(String startDate, String endDate, String area, int level){
        try{
            JSONArray result = statisticsService.getSixFiveStatistics(startDate,endDate,area,level);
            return write(200,"查询成功","data",result);
        }catch (Exception e){
            e.printStackTrace();
            return error(-1,"查询失败");
        }
    }
}