Browse Source

feat: 注释view页面相关代码

weijianghai 2 năm trước cách đây
mục cha
commit
98cb0c0d74

+ 211 - 211
src/main/java/com/nokia/hb/Controller/DataViewController.java

@@ -1,211 +1,211 @@
-package com.nokia.hb.Controller;
-
-import com.alibaba.fastjson.JSON;
-import com.nokia.hb.Service.DataViewService;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.time.LocalDate;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-
-@Controller
-@RequestMapping("/")
-public class DataViewController {
-    public DataViewService dataViewService = new DataViewService();
-
-    @GetMapping("initProvince")
-    @ResponseBody
-    public List<String> initProvince(String type) {
-        System.out.println("initProvince");
-        System.out.println(type);
-        return dataViewService.initProvince(type);
-
-    }
-
-    @GetMapping("initCitys")
-    @ResponseBody
-    public List<String> initCitys(String type, String province) {
-        System.out.println("initCitys");
-        System.out.println(type);
-        System.out.println(province);
-
-
-        return dataViewService.initCitys(type, province);
-
-    }
-
-    @GetMapping("search")
-    @ResponseBody
-    public String search(String from, String range, String stype, String ttype, String provinces, String citys) {
-        String[] split = range.split("-");
-        String t1 = split[0].trim();
-        String t2 = split[1].trim();
-        if (!"".equals(citys)) {
-            String[] split1 = citys.split(",");
-            citys = "";
-            for (String s : split1) {
-                citys += "'" + s + "'" + ",";
-            }
-            citys = citys.substring(0, citys.length() - 1);
-        }
-        String[] split2 = provinces.split(",");
-        provinces = "";
-        for (String s : split2) {
-            provinces += "'" + s + "'" + ",";
-        }
-        provinces = provinces.substring(0, provinces.length() - 1);
-        Map<String, List<Object>> search = dataViewService.search(from, t1, t2, stype, ttype, provinces, citys);
-        String s = JSON.toJSONString(search);
-
-        System.out.println(s);
-        return s;
-
-    }
-
-
-    @GetMapping("typeExport")
-    public void typeExport(HttpServletResponse response, String from, String provinces, String citys, String ttype, String range) {
-        //from :local roaming
-        //etype :导出全量
-        //ttype:天 7天
-        //range: 20210721 - 20210728
-
-        String[] split = range.split("-");
-        String t1 = split[0].trim();
-        String t2 = split[1].trim();
-
-
-
-        String s = dataViewService.typeExport(from, provinces, citys, ttype, t1, t2);
-
-
-//        list.toString().getBytes();
-        ByteArrayInputStream bis = null;
-        try {
-            bis = new ByteArrayInputStream(s.getBytes("gbk"));
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        // 下载本地文件
-        String fileName = "5GTypeDownload_" + range + ".csv"; // 文件的默认保存名
-        // 读到流中
-        //InputStream inStream = new FileInputStream("/home/ubantu/Desktop/seq.java");// 文件的存放路径
-        // 设置输出的格式
-        response.reset();
-        response.setContentType("text/plain");
-        response.addHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
-        response.setCharacterEncoding("UTF-8");
-        // 循环取出流中的数据
-        byte[] b = new byte[100];
-        int len;
-        try {
-            while ((len = bis.read(b)) > 0)
-                response.getOutputStream().write(b, 0, len);
-            bis.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-
-    @GetMapping("exportAll")
-    public void typeExport(HttpServletResponse response, @RequestParam String ttype, @RequestParam String range) {
-
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
-        String[] split = range.split("-");
-        String sts = split[0].trim();
-        String ets = split[1].trim();//最后日期
-        LocalDate sld = LocalDate.parse(sts, formatter);
-        LocalDate eld = LocalDate.parse(ets, formatter);
-        LocalDate smld = sld.minusDays(Integer.valueOf(ttype));
-        LocalDate emld = eld.minusDays(Integer.valueOf(ttype));
-        String smts = formatter.format(smld);
-        String emts = formatter.format(emld);
-        String s = dataViewService.exportAll(ttype, sts, ets, smts, emts);
-
-
-//        list.toString().getBytes();
-        ByteArrayInputStream bis = null;
-        try {
-//            bis = new ByteArrayInputStream(s.getBytes("UTF-8"));
-            bis = new ByteArrayInputStream(s.getBytes("gbk"));
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        // 下载本地文件
-        String fileName = "5GTypeAllDownload_" + range + ".csv"; // 文件的默认保存名
-        // 读到流中
-        //InputStream inStream = new FileInputStream("/home/ubantu/Desktop/seq.java");// 文件的存放路径
-        // 设置输出的格式
-        response.reset();
-        response.setContentType("text/plain");
-        response.addHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
-        response.setCharacterEncoding("UTF-8");
-        // 循环取出流中的数据
-        byte[] b = new byte[100];
-        int len;
-        try {
-            while ((len = bis.read(b)) > 0)
-                response.getOutputStream().write(b, 0, len);
-            bis.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-
-    @GetMapping("exportClose")
-    public void typeExportClose(HttpServletResponse response, @RequestParam String ttype, @RequestParam String range) {
-
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
-        String[] split = range.split("-");
-        String sts = split[0].trim();
-        String ets = split[1].trim();//最后日期
-        LocalDate sld = LocalDate.parse(sts, formatter);
-        LocalDate eld = LocalDate.parse(ets, formatter);
-        LocalDate smld = sld.minusDays(Integer.valueOf(ttype));
-        LocalDate emld = eld.minusDays(Integer.valueOf(ttype));
-        String smts = formatter.format(smld);
-        String emts = formatter.format(emld);
-        String s = dataViewService.exportClose(ttype, sts, ets, smts, emts);
-
-
-//        list.toString().getBytes();
-        ByteArrayInputStream bis = null;
-        try {
-//            bis = new ByteArrayInputStream(s.getBytes("UTF-8"));
-            bis = new ByteArrayInputStream(s.getBytes("gbk"));
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        // 下载本地文件
-        String fileName = "5GTypeCloseDownload_" + range + ".csv"; // 文件的默认保存名
-        // 读到流中
-        //InputStream inStream = new FileInputStream("/home/ubantu/Desktop/seq.java");// 文件的存放路径
-        // 设置输出的格式
-        response.reset();
-        response.setContentType("text/plain");
-        response.addHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
-        response.setCharacterEncoding("UTF-8");
-        // 循环取出流中的数据
-        byte[] b = new byte[100];
-        int len;
-        try {
-            while ((len = bis.read(b)) > 0)
-                response.getOutputStream().write(b, 0, len);
-            bis.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-
-}
+//package com.nokia.hb.Controller;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.nokia.hb.Service.DataViewService;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RequestParam;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.ByteArrayInputStream;
+//import java.io.IOException;
+//import java.io.UnsupportedEncodingException;
+//import java.time.LocalDate;
+//import java.time.format.DateTimeFormatter;
+//import java.util.*;
+//
+//@Controller
+//@RequestMapping("/")
+//public class DataViewController {
+//    public DataViewService dataViewService = new DataViewService();
+//
+//    @GetMapping("initProvince")
+//    @ResponseBody
+//    public List<String> initProvince(String type) {
+//        System.out.println("initProvince");
+//        System.out.println(type);
+//        return dataViewService.initProvince(type);
+//
+//    }
+//
+//    @GetMapping("initCitys")
+//    @ResponseBody
+//    public List<String> initCitys(String type, String province) {
+//        System.out.println("initCitys");
+//        System.out.println(type);
+//        System.out.println(province);
+//
+//
+//        return dataViewService.initCitys(type, province);
+//
+//    }
+//
+//    @GetMapping("search")
+//    @ResponseBody
+//    public String search(String from, String range, String stype, String ttype, String provinces, String citys) {
+//        String[] split = range.split("-");
+//        String t1 = split[0].trim();
+//        String t2 = split[1].trim();
+//        if (!"".equals(citys)) {
+//            String[] split1 = citys.split(",");
+//            citys = "";
+//            for (String s : split1) {
+//                citys += "'" + s + "'" + ",";
+//            }
+//            citys = citys.substring(0, citys.length() - 1);
+//        }
+//        String[] split2 = provinces.split(",");
+//        provinces = "";
+//        for (String s : split2) {
+//            provinces += "'" + s + "'" + ",";
+//        }
+//        provinces = provinces.substring(0, provinces.length() - 1);
+//        Map<String, List<Object>> search = dataViewService.search(from, t1, t2, stype, ttype, provinces, citys);
+//        String s = JSON.toJSONString(search);
+//
+//        System.out.println(s);
+//        return s;
+//
+//    }
+//
+//
+//    @GetMapping("typeExport")
+//    public void typeExport(HttpServletResponse response, String from, String provinces, String citys, String ttype, String range) {
+//        //from :local roaming
+//        //etype :导出全量
+//        //ttype:天 7天
+//        //range: 20210721 - 20210728
+//
+//        String[] split = range.split("-");
+//        String t1 = split[0].trim();
+//        String t2 = split[1].trim();
+//
+//
+//
+//        String s = dataViewService.typeExport(from, provinces, citys, ttype, t1, t2);
+//
+//
+////        list.toString().getBytes();
+//        ByteArrayInputStream bis = null;
+//        try {
+//            bis = new ByteArrayInputStream(s.getBytes("gbk"));
+//        } catch (UnsupportedEncodingException e) {
+//            e.printStackTrace();
+//        }
+//        // 下载本地文件
+//        String fileName = "5GTypeDownload_" + range + ".csv"; // 文件的默认保存名
+//        // 读到流中
+//        //InputStream inStream = new FileInputStream("/home/ubantu/Desktop/seq.java");// 文件的存放路径
+//        // 设置输出的格式
+//        response.reset();
+//        response.setContentType("text/plain");
+//        response.addHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
+//        response.setCharacterEncoding("UTF-8");
+//        // 循环取出流中的数据
+//        byte[] b = new byte[100];
+//        int len;
+//        try {
+//            while ((len = bis.read(b)) > 0)
+//                response.getOutputStream().write(b, 0, len);
+//            bis.close();
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
+//    }
+//
+//
+//    @GetMapping("exportAll")
+//    public void typeExport(HttpServletResponse response, @RequestParam String ttype, @RequestParam String range) {
+//
+//        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
+//        String[] split = range.split("-");
+//        String sts = split[0].trim();
+//        String ets = split[1].trim();//最后日期
+//        LocalDate sld = LocalDate.parse(sts, formatter);
+//        LocalDate eld = LocalDate.parse(ets, formatter);
+//        LocalDate smld = sld.minusDays(Integer.valueOf(ttype));
+//        LocalDate emld = eld.minusDays(Integer.valueOf(ttype));
+//        String smts = formatter.format(smld);
+//        String emts = formatter.format(emld);
+//        String s = dataViewService.exportAll(ttype, sts, ets, smts, emts);
+//
+//
+////        list.toString().getBytes();
+//        ByteArrayInputStream bis = null;
+//        try {
+////            bis = new ByteArrayInputStream(s.getBytes("UTF-8"));
+//            bis = new ByteArrayInputStream(s.getBytes("gbk"));
+//        } catch (UnsupportedEncodingException e) {
+//            e.printStackTrace();
+//        }
+//        // 下载本地文件
+//        String fileName = "5GTypeAllDownload_" + range + ".csv"; // 文件的默认保存名
+//        // 读到流中
+//        //InputStream inStream = new FileInputStream("/home/ubantu/Desktop/seq.java");// 文件的存放路径
+//        // 设置输出的格式
+//        response.reset();
+//        response.setContentType("text/plain");
+//        response.addHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
+//        response.setCharacterEncoding("UTF-8");
+//        // 循环取出流中的数据
+//        byte[] b = new byte[100];
+//        int len;
+//        try {
+//            while ((len = bis.read(b)) > 0)
+//                response.getOutputStream().write(b, 0, len);
+//            bis.close();
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
+//    }
+//
+//
+//    @GetMapping("exportClose")
+//    public void typeExportClose(HttpServletResponse response, @RequestParam String ttype, @RequestParam String range) {
+//
+//        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
+//        String[] split = range.split("-");
+//        String sts = split[0].trim();
+//        String ets = split[1].trim();//最后日期
+//        LocalDate sld = LocalDate.parse(sts, formatter);
+//        LocalDate eld = LocalDate.parse(ets, formatter);
+//        LocalDate smld = sld.minusDays(Integer.valueOf(ttype));
+//        LocalDate emld = eld.minusDays(Integer.valueOf(ttype));
+//        String smts = formatter.format(smld);
+//        String emts = formatter.format(emld);
+//        String s = dataViewService.exportClose(ttype, sts, ets, smts, emts);
+//
+//
+////        list.toString().getBytes();
+//        ByteArrayInputStream bis = null;
+//        try {
+////            bis = new ByteArrayInputStream(s.getBytes("UTF-8"));
+//            bis = new ByteArrayInputStream(s.getBytes("gbk"));
+//        } catch (UnsupportedEncodingException e) {
+//            e.printStackTrace();
+//        }
+//        // 下载本地文件
+//        String fileName = "5GTypeCloseDownload_" + range + ".csv"; // 文件的默认保存名
+//        // 读到流中
+//        //InputStream inStream = new FileInputStream("/home/ubantu/Desktop/seq.java");// 文件的存放路径
+//        // 设置输出的格式
+//        response.reset();
+//        response.setContentType("text/plain");
+//        response.addHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
+//        response.setCharacterEncoding("UTF-8");
+//        // 循环取出流中的数据
+//        byte[] b = new byte[100];
+//        int len;
+//        try {
+//            while ((len = bis.read(b)) > 0)
+//                response.getOutputStream().write(b, 0, len);
+//            bis.close();
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
+//    }
+//
+//
+//}

+ 6 - 6
src/main/java/com/nokia/hb/Controller/ViewController.java

@@ -9,12 +9,12 @@ import org.springframework.web.servlet.ModelAndView;
 @Controller
 @RequestMapping("/")
 public class ViewController {
-    @GetMapping("view")
-    public ModelAndView  view()
-    {
-        ModelAndView model = new ModelAndView("view");
-        return model;
-    }
+//    @GetMapping("view")
+//    public ModelAndView  view()
+//    {
+//        ModelAndView model = new ModelAndView("view");
+//        return model;
+//    }
 
     @GetMapping("template")
     public ModelAndView  template()

+ 50 - 50
src/main/java/com/nokia/hb/Dao/DataViewDao.java

@@ -1,50 +1,50 @@
-package com.nokia.hb.Dao;
-
-import com.alibaba.fastjson.JSON;
-import com.nokia.hb.utils.DbUtil;
-import javafx.application.Application;
-import javafx.stage.Stage;
-
-import java.awt.image.DataBuffer;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class DataViewDao {
-
-
-    public static String typeExport(String from, String provinces, String citys, String ttype, String t1, String t2) {
-
-
-        return DbUtil.typeExport(from, provinces, citys, ttype, t1, t2);
-    }
-
-    public static String exportAll(String ttype, String sts, String ets, String smts, String emts) {
-        return DbUtil.exportAll(ttype, sts, ets, smts, emts);
-    }
-
-    public static Map<String, List<Object>> search(String from, String t1, String t2, String stype, String ttype, String provinces, String citys) {
-        Map<String, List<Object>>res = null;
-        if("5G开关打开率".equals(stype)){
-            res=DbUtil.searchRate(from, t1, t2, ttype, provinces, citys);
-        }else {
-            res=DbUtil.search(from, t1, t2, stype, ttype, provinces, citys);
-        }
-
-        return res;
-    }
-
-    public static String exportClose(String ttype, String sts, String ets, String smts, String emts) {
-        return DbUtil.exportClose(ttype, sts, ets, smts, emts);
-    }
-
-
-    public List<String> initProvince(String type) {
-        return DbUtil.initProvince(type);
-    }
-
-    public List<String> initCitys(String type, String province) {
-        return DbUtil.initCitys(type, province);
-    }
-
-}
+//package com.nokia.hb.Dao;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.nokia.hb.utils.DbUtil;
+//import javafx.application.Application;
+//import javafx.stage.Stage;
+//
+//import java.awt.image.DataBuffer;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//public class DataViewDao {
+//
+//
+//    public static String typeExport(String from, String provinces, String citys, String ttype, String t1, String t2) {
+//
+//
+//        return DbUtil.typeExport(from, provinces, citys, ttype, t1, t2);
+//    }
+//
+//    public static String exportAll(String ttype, String sts, String ets, String smts, String emts) {
+//        return DbUtil.exportAll(ttype, sts, ets, smts, emts);
+//    }
+//
+//    public static Map<String, List<Object>> search(String from, String t1, String t2, String stype, String ttype, String provinces, String citys) {
+//        Map<String, List<Object>>res = null;
+//        if("5G开关打开率".equals(stype)){
+//            res=DbUtil.searchRate(from, t1, t2, ttype, provinces, citys);
+//        }else {
+//            res=DbUtil.search(from, t1, t2, stype, ttype, provinces, citys);
+//        }
+//
+//        return res;
+//    }
+//
+//    public static String exportClose(String ttype, String sts, String ets, String smts, String emts) {
+//        return DbUtil.exportClose(ttype, sts, ets, smts, emts);
+//    }
+//
+//
+//    public List<String> initProvince(String type) {
+//        return DbUtil.initProvince(type);
+//    }
+//
+//    public List<String> initCitys(String type, String province) {
+//        return DbUtil.initCitys(type, province);
+//    }
+//
+//}

+ 37 - 37
src/main/java/com/nokia/hb/Service/DataViewService.java

@@ -1,37 +1,37 @@
-package com.nokia.hb.Service;
-
-import com.nokia.hb.Dao.DataViewDao;
-import org.springframework.stereotype.Service;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class DataViewService {
-    public DataViewDao dataViewDao = new DataViewDao();
-
-    public List<String> initProvince(String type) {
-        return dataViewDao.initProvince(type);
-    }
-
-    public List<String> initCitys(String type, String province) {
-        return dataViewDao.initCitys(type, province);
-    }
-
-    public String typeExport(String from, String provinces, String citys, String ttype, String t1, String t2) {
-        return DataViewDao.typeExport(from, provinces, citys, ttype, t1, t2);
-    }
-
-    public String exportAll(String ttype, String sts, String ets, String smts, String emts) {
-        return DataViewDao.exportAll(ttype, sts, ets, smts, emts);
-    }
-
-    public Map<String, List<Object>> search(String from, String t1, String t2, String stype, String ttype, String provinces, String citys) {
-        return DataViewDao.search(from, t1, t2, stype, ttype, provinces, citys);
-    }
-
-    public String exportClose(String ttype, String sts, String ets, String smts, String emts) {
-        return DataViewDao.exportClose(ttype, sts, ets, smts, emts);
-    }
-}
+//package com.nokia.hb.Service;
+//
+//import com.nokia.hb.Dao.DataViewDao;
+//import org.springframework.stereotype.Service;
+//
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//@Service
+//public class DataViewService {
+//    public DataViewDao dataViewDao = new DataViewDao();
+//
+//    public List<String> initProvince(String type) {
+//        return dataViewDao.initProvince(type);
+//    }
+//
+//    public List<String> initCitys(String type, String province) {
+//        return dataViewDao.initCitys(type, province);
+//    }
+//
+//    public String typeExport(String from, String provinces, String citys, String ttype, String t1, String t2) {
+//        return DataViewDao.typeExport(from, provinces, citys, ttype, t1, t2);
+//    }
+//
+//    public String exportAll(String ttype, String sts, String ets, String smts, String emts) {
+//        return DataViewDao.exportAll(ttype, sts, ets, smts, emts);
+//    }
+//
+//    public Map<String, List<Object>> search(String from, String t1, String t2, String stype, String ttype, String provinces, String citys) {
+//        return DataViewDao.search(from, t1, t2, stype, ttype, provinces, citys);
+//    }
+//
+//    public String exportClose(String ttype, String sts, String ets, String smts, String emts) {
+//        return DataViewDao.exportClose(ttype, sts, ets, smts, emts);
+//    }
+//}

+ 301 - 301
src/main/java/com/nokia/hb/utils/DbUtil.java

@@ -220,59 +220,59 @@ public class DbUtil {
         return res;
     }
 
-    public static Map<String, List<Object>> searchRate(String from, String t1, String t2, String ttype, String provinces, String citys) {
-
-
-        HashMap<String, List<Object>> res = new HashMap<>();
-        PreparedStatement psmt = null;
-        String pn = "province_name";
-        String cn = "city_name";
-        if ("roaming".equals(from)) {
-            pn = "roaming_province_name";
-            cn = "roaming_city_name";
-        }
-        String sql = "select a.sdate as dt,round(a.openusers/b.users,4) as num from \n" +
-                "(select sdate,sum(user_count) as openusers from sqmdb_5g.user_terminal_status_5g_abstract where sdate between ? and ? and stype='打开5G开关用户数' and size_type='" + ttype + "天' and " + pn + " in (" + provinces + ") and " + cn + " in (" + citys + ") group by sdate ) a\n" +
-                "inner join\n" +
-                "(select sdate,sum(user_count) as users from sqmdb_5g.user_terminal_status_5g_abstract where sdate between ? and ? and stype='5G终端用户数' and size_type='" + ttype + "天' and " + pn + " in (" + provinces + ") and " + cn + " in (" + citys + ") group by sdate) b\n" +
-                "on a.sdate=b.sdate\n" +
-                "order by a.sdate";
-        if ("".equals(citys)) {
-            sql = "select a.sdate as dt,round(a.openusers/b.users,4) as num from \n" +
-                    "(select sdate,sum(user_count) as openusers from sqmdb_5g.user_terminal_status_5g_abstract where sdate between ? and ? and stype='打开5G开关用户数' and size_type='" + ttype + "天' and " + pn + " in (" + provinces + ") group by sdate ) a\n" +
-                    "inner join\n" +
-                    "(select sdate,sum(user_count) as users from sqmdb_5g.user_terminal_status_5g_abstract where sdate between ? and ? and stype='5G终端用户数' and size_type='" + ttype + "天' and " + pn + " in (" + provinces + ") group by sdate) b\n" +
-                    "on a.sdate=b.sdate\n" +
-                    "order by a.sdate";
-        }
-
-        List<Object> dtList = new ArrayList<>();
-        List<Object> numList = new ArrayList<>();
-        try {
-            psmt = conn.prepareStatement(sql);
-
-            psmt.setQueryTimeout(60 * 10);
-            psmt.setLong(1, Integer.valueOf(t1));
-            psmt.setLong(2, Integer.valueOf(t2));
-            psmt.setLong(3, Integer.valueOf(t1));
-            psmt.setLong(4, Integer.valueOf(t2));
-
-//            psmt.setString(5,provinces);
-//            psmt.setString(6,citys);
-            ResultSet rs = psmt.executeQuery();
-            while (rs.next()) {
-                String dt = rs.getString("dt");
-                Long num = rs.getLong("num");
-                dtList.add(dt);
-                numList.add(num);
-            }
-            res.put("dt", dtList);
-            res.put("num", numList);
-        } catch (SQLException e) {
-            e.printStackTrace();
-        }
-        return res;
-    }
+//    public static Map<String, List<Object>> searchRate(String from, String t1, String t2, String ttype, String provinces, String citys) {
+//
+//
+//        HashMap<String, List<Object>> res = new HashMap<>();
+//        PreparedStatement psmt = null;
+//        String pn = "province_name";
+//        String cn = "city_name";
+//        if ("roaming".equals(from)) {
+//            pn = "roaming_province_name";
+//            cn = "roaming_city_name";
+//        }
+//        String sql = "select a.sdate as dt,round(a.openusers/b.users,4) as num from \n" +
+//                "(select sdate,sum(user_count) as openusers from sqmdb_5g.user_terminal_status_5g_abstract where sdate between ? and ? and stype='打开5G开关用户数' and size_type='" + ttype + "天' and " + pn + " in (" + provinces + ") and " + cn + " in (" + citys + ") group by sdate ) a\n" +
+//                "inner join\n" +
+//                "(select sdate,sum(user_count) as users from sqmdb_5g.user_terminal_status_5g_abstract where sdate between ? and ? and stype='5G终端用户数' and size_type='" + ttype + "天' and " + pn + " in (" + provinces + ") and " + cn + " in (" + citys + ") group by sdate) b\n" +
+//                "on a.sdate=b.sdate\n" +
+//                "order by a.sdate";
+//        if ("".equals(citys)) {
+//            sql = "select a.sdate as dt,round(a.openusers/b.users,4) as num from \n" +
+//                    "(select sdate,sum(user_count) as openusers from sqmdb_5g.user_terminal_status_5g_abstract where sdate between ? and ? and stype='打开5G开关用户数' and size_type='" + ttype + "天' and " + pn + " in (" + provinces + ") group by sdate ) a\n" +
+//                    "inner join\n" +
+//                    "(select sdate,sum(user_count) as users from sqmdb_5g.user_terminal_status_5g_abstract where sdate between ? and ? and stype='5G终端用户数' and size_type='" + ttype + "天' and " + pn + " in (" + provinces + ") group by sdate) b\n" +
+//                    "on a.sdate=b.sdate\n" +
+//                    "order by a.sdate";
+//        }
+//
+//        List<Object> dtList = new ArrayList<>();
+//        List<Object> numList = new ArrayList<>();
+//        try {
+//            psmt = conn.prepareStatement(sql);
+//
+//            psmt.setQueryTimeout(60 * 10);
+//            psmt.setLong(1, Integer.valueOf(t1));
+//            psmt.setLong(2, Integer.valueOf(t2));
+//            psmt.setLong(3, Integer.valueOf(t1));
+//            psmt.setLong(4, Integer.valueOf(t2));
+//
+////            psmt.setString(5,provinces);
+////            psmt.setString(6,citys);
+//            ResultSet rs = psmt.executeQuery();
+//            while (rs.next()) {
+//                String dt = rs.getString("dt");
+//                Long num = rs.getLong("num");
+//                dtList.add(dt);
+//                numList.add(num);
+//            }
+//            res.put("dt", dtList);
+//            res.put("num", numList);
+//        } catch (SQLException e) {
+//            e.printStackTrace();
+//        }
+//        return res;
+//    }
 
     public static HashMap<String, List<Object>> search(String from, String t1, String t2, String stype, String ttype, String provinces, String citys) {
         HashMap<String, List<Object>> res = new HashMap<>();
@@ -316,174 +316,174 @@ public class DbUtil {
         return res;
     }
 
-    public static String typeExport(String from, String provinces, String citys, String ttype, String t1, String t2) {
-        String res = "";
-        String pn = "province_name";
-        String cn = "city_name";
-        String guishu = "归属地";
-        String area = citys;
-        if ("roaming".equals(from)) {
-            pn = "roaming_province_name";
-            cn = "roaming_city_name";
-            guishu = "拜访地";
-        }
-        String sql = "with tab as (\n" +
-                "select distinct\n" +
-                "stype,\n" +
-                "'" + guishu + "' as 维度, \n" +
-                "size_type as 粒度,\n" +
-                "'" + area + "' as 区域, \n" +
-                "sdate as 日期,\n" +
-                "sum(user_count) over(partition by stype,sdate,size_type) as user_count\n" +
-                "from sqmdb_5g.user_terminal_status_5g_abstract\n" +
-                "where sdate between ? and ? \n" +
-                "and " + pn + " in ('" + provinces + "') and " + cn + " in ('" + citys + "') \n" +
-                "and size_type = '" + ttype + "天'\n" +
-                ") \n" +
-                "\n" +
-                "select \n" +
-                "a.维度,\n" +
-                "a.粒度,\n" +
-                "a.区域,\n" +
-                "a.日期,\n" +
-                "sum(a.user_count) as 终端用户数,\n" +
-                "sum(b.user_count) as 打开5G开关用户数,\n" +
-                "sum(c.user_count) as 关闭5G开关用户数,\n" +
-                "round(sum(b.user_count)/sum(a.user_count),4) as 开关打开率\n" +
-                "from tab a\n" +
-                "join tab b on b.日期=a.日期 and b.stype = '打开5G开关用户数'\n" +
-                "join tab c on c.日期=a.日期 and c.stype = '关闭5G开关用户数'\n" +
-                "where a.stype = '5G终端用户数'\n" +
-                "group by \n" +
-                "a.维度,\n" +
-                "a.粒度,\n" +
-                "a.区域,\n" +
-                "a.日期\n" +
-                "order by 日期";
-
-        if ("".equals(citys)) {
-            area = provinces;
-            sql = "with tab as (\n" +
-                    "select distinct\n" +
-                    "stype,\n" +
-                    "'" + guishu + "' as 维度, \n" +
-                    "size_type as 粒度,\n" +
-                    "'" + area + "' as 区域, \n" +
-                    "sdate as 日期,\n" +
-                    "sum(user_count) over(partition by stype,sdate,size_type) as user_count\n" +
-                    "from sqmdb_5g.user_terminal_status_5g_abstract\n" +
-                    "where sdate between ? and ? \n" +
-                    "and " + pn + " in ('" + provinces + "')  \n" +
-                    "and size_type = '" + ttype + "天'\n" +
-                    ") \n" +
-                    "\n" +
-                    "select \n" +
-                    "a.维度,\n" +
-                    "a.粒度,\n" +
-                    "a.区域,\n" +
-                    "a.日期,\n" +
-                    "sum(a.user_count) as 终端用户数,\n" +
-                    "sum(b.user_count) as 打开5G开关用户数,\n" +
-                    "sum(c.user_count) as 关闭5G开关用户数,\n" +
-                    "round(sum(b.user_count)/sum(a.user_count),4) as 开关打开率\n" +
-                    "from tab a\n" +
-                    "join tab b on b.日期=a.日期 and b.stype = '打开5G开关用户数'\n" +
-                    "join tab c on c.日期=a.日期 and c.stype = '关闭5G开关用户数'\n" +
-                    "where a.stype = '5G终端用户数'\n" +
-                    "group by \n" +
-                    "a.维度,\n" +
-                    "a.粒度,\n" +
-                    "a.区域,\n" +
-                    "a.日期\n" +
-                    "order by 日期";
-        }
-
-
-        PreparedStatement psmt = null;
-
-
-        try {
-            psmt = conn.prepareStatement(sql);
-            psmt.setQueryTimeout(60 * 10);
-
-            psmt.setLong(1, Integer.valueOf(t1));
-            psmt.setLong(2, Integer.valueOf(t2));
-            ResultSet rs = psmt.executeQuery();
-            res = rsprocess(rs);
-        } catch (SQLException e) {
-            e.printStackTrace();
-        }
-        return res;
-    }
-
-    public static String exportAll(String ttype, String sts, String ets, String smts, String emts) {
-        String res = "";
-        String range = smts + "-" + ets;
-        PreparedStatement psmt = null;
-        String sql = "select '" + ttype + "天' as \"粒度\",\n" +
-                "'" + range + "' as \"开始(结束)时间\",\n" +
-                "msisdn as \"号码\",\n" +
-                "province_name as \"归属省\",\n" +
-                "city_name as \"归属地市\",\n" +
-                "roaming_province_name as \"拜访省\",\n" +
-                "roaming_city_name as \"拜访地市\",\n" +
-                "tml_brand as \"终端品牌\",\n" +
-                "tml_name as \"终端型号\",\n" +
-                "case when last_open_date >= ? then 1 else 0 end as \"开关是否打开\"  \n" +
-                "from sqmdb_5g.user_terminal_status_5g_agg\n" +
-                "where sdate=? \n" +
-                "and last_chg_date >= ?  ";
-
-        try {
-            psmt = conn.prepareStatement(sql);
-            psmt.setQueryTimeout(60 * 10);
-
-            psmt.setLong(1, Integer.valueOf(emts));
-            psmt.setLong(2, Integer.valueOf(ets));
-            psmt.setLong(3, Integer.valueOf(emts));
-
-            ResultSet rs = psmt.executeQuery();
-            res = rsprocess(rs);
-        } catch (SQLException e) {
-            e.printStackTrace();
-        }
-        return res;
-    }
-
-    public static String exportClose(String ttype, String sts, String ets, String smts, String emts) {
-        String res = "";
-        String range = smts + "-" + ets;
-        PreparedStatement psmt = null;
-        String sql = "select '" + ttype + "天' as \"粒度\",\n" +
-                "'" + range + "' as \"开始(结束)时间\",\n" +
-                "msisdn as \"号码\",\n" +
-                "province_name as \"归属省\",\n" +
-                "city_name as \"归属地市\",\n" +
-                "roaming_province_name as \"拜访省\",\n" +
-                "roaming_city_name as \"拜访地市\",\n" +
-                "tml_brand as \"终端品牌\",\n" +
-                "tml_name as \"终端型号\",\n" +
-                "0 as \"开关是否打开\"\n" +
-                "from sqmdb_5g.user_terminal_status_5g_agg\n" +
-                "where sdate=? \n" +
-                "and last_chg_date >= ? \n" +
-                "and (last_open_date < ? or last_open_date is null) ";
-
-        try {
-            psmt = conn.prepareStatement(sql);
-            psmt.setQueryTimeout(60 * 10);
-
-            psmt.setLong(1, Integer.valueOf(ets));
-            psmt.setLong(2, Integer.valueOf(emts));
-            psmt.setLong(3, Integer.valueOf(emts));
-
-            ResultSet rs = psmt.executeQuery();
-            res = rsprocess(rs);
-        } catch (SQLException e) {
-            e.printStackTrace();
-        }
-        return res;
-    }
+//    public static String typeExport(String from, String provinces, String citys, String ttype, String t1, String t2) {
+//        String res = "";
+//        String pn = "province_name";
+//        String cn = "city_name";
+//        String guishu = "归属地";
+//        String area = citys;
+//        if ("roaming".equals(from)) {
+//            pn = "roaming_province_name";
+//            cn = "roaming_city_name";
+//            guishu = "拜访地";
+//        }
+//        String sql = "with tab as (\n" +
+//                "select distinct\n" +
+//                "stype,\n" +
+//                "'" + guishu + "' as 维度, \n" +
+//                "size_type as 粒度,\n" +
+//                "'" + area + "' as 区域, \n" +
+//                "sdate as 日期,\n" +
+//                "sum(user_count) over(partition by stype,sdate,size_type) as user_count\n" +
+//                "from sqmdb_5g.user_terminal_status_5g_abstract\n" +
+//                "where sdate between ? and ? \n" +
+//                "and " + pn + " in ('" + provinces + "') and " + cn + " in ('" + citys + "') \n" +
+//                "and size_type = '" + ttype + "天'\n" +
+//                ") \n" +
+//                "\n" +
+//                "select \n" +
+//                "a.维度,\n" +
+//                "a.粒度,\n" +
+//                "a.区域,\n" +
+//                "a.日期,\n" +
+//                "sum(a.user_count) as 终端用户数,\n" +
+//                "sum(b.user_count) as 打开5G开关用户数,\n" +
+//                "sum(c.user_count) as 关闭5G开关用户数,\n" +
+//                "round(sum(b.user_count)/sum(a.user_count),4) as 开关打开率\n" +
+//                "from tab a\n" +
+//                "join tab b on b.日期=a.日期 and b.stype = '打开5G开关用户数'\n" +
+//                "join tab c on c.日期=a.日期 and c.stype = '关闭5G开关用户数'\n" +
+//                "where a.stype = '5G终端用户数'\n" +
+//                "group by \n" +
+//                "a.维度,\n" +
+//                "a.粒度,\n" +
+//                "a.区域,\n" +
+//                "a.日期\n" +
+//                "order by 日期";
+//
+//        if ("".equals(citys)) {
+//            area = provinces;
+//            sql = "with tab as (\n" +
+//                    "select distinct\n" +
+//                    "stype,\n" +
+//                    "'" + guishu + "' as 维度, \n" +
+//                    "size_type as 粒度,\n" +
+//                    "'" + area + "' as 区域, \n" +
+//                    "sdate as 日期,\n" +
+//                    "sum(user_count) over(partition by stype,sdate,size_type) as user_count\n" +
+//                    "from sqmdb_5g.user_terminal_status_5g_abstract\n" +
+//                    "where sdate between ? and ? \n" +
+//                    "and " + pn + " in ('" + provinces + "')  \n" +
+//                    "and size_type = '" + ttype + "天'\n" +
+//                    ") \n" +
+//                    "\n" +
+//                    "select \n" +
+//                    "a.维度,\n" +
+//                    "a.粒度,\n" +
+//                    "a.区域,\n" +
+//                    "a.日期,\n" +
+//                    "sum(a.user_count) as 终端用户数,\n" +
+//                    "sum(b.user_count) as 打开5G开关用户数,\n" +
+//                    "sum(c.user_count) as 关闭5G开关用户数,\n" +
+//                    "round(sum(b.user_count)/sum(a.user_count),4) as 开关打开率\n" +
+//                    "from tab a\n" +
+//                    "join tab b on b.日期=a.日期 and b.stype = '打开5G开关用户数'\n" +
+//                    "join tab c on c.日期=a.日期 and c.stype = '关闭5G开关用户数'\n" +
+//                    "where a.stype = '5G终端用户数'\n" +
+//                    "group by \n" +
+//                    "a.维度,\n" +
+//                    "a.粒度,\n" +
+//                    "a.区域,\n" +
+//                    "a.日期\n" +
+//                    "order by 日期";
+//        }
+//
+//
+//        PreparedStatement psmt = null;
+//
+//
+//        try {
+//            psmt = conn.prepareStatement(sql);
+//            psmt.setQueryTimeout(60 * 10);
+//
+//            psmt.setLong(1, Integer.valueOf(t1));
+//            psmt.setLong(2, Integer.valueOf(t2));
+//            ResultSet rs = psmt.executeQuery();
+//            res = rsprocess(rs);
+//        } catch (SQLException e) {
+//            e.printStackTrace();
+//        }
+//        return res;
+//    }
+
+//    public static String exportAll(String ttype, String sts, String ets, String smts, String emts) {
+//        String res = "";
+//        String range = smts + "-" + ets;
+//        PreparedStatement psmt = null;
+//        String sql = "select '" + ttype + "天' as \"粒度\",\n" +
+//                "'" + range + "' as \"开始(结束)时间\",\n" +
+//                "msisdn as \"号码\",\n" +
+//                "province_name as \"归属省\",\n" +
+//                "city_name as \"归属地市\",\n" +
+//                "roaming_province_name as \"拜访省\",\n" +
+//                "roaming_city_name as \"拜访地市\",\n" +
+//                "tml_brand as \"终端品牌\",\n" +
+//                "tml_name as \"终端型号\",\n" +
+//                "case when last_open_date >= ? then 1 else 0 end as \"开关是否打开\"  \n" +
+//                "from sqmdb_5g.user_terminal_status_5g_agg\n" +
+//                "where sdate=? \n" +
+//                "and last_chg_date >= ?  ";
+//
+//        try {
+//            psmt = conn.prepareStatement(sql);
+//            psmt.setQueryTimeout(60 * 10);
+//
+//            psmt.setLong(1, Integer.valueOf(emts));
+//            psmt.setLong(2, Integer.valueOf(ets));
+//            psmt.setLong(3, Integer.valueOf(emts));
+//
+//            ResultSet rs = psmt.executeQuery();
+//            res = rsprocess(rs);
+//        } catch (SQLException e) {
+//            e.printStackTrace();
+//        }
+//        return res;
+//    }
+
+//    public static String exportClose(String ttype, String sts, String ets, String smts, String emts) {
+//        String res = "";
+//        String range = smts + "-" + ets;
+//        PreparedStatement psmt = null;
+//        String sql = "select '" + ttype + "天' as \"粒度\",\n" +
+//                "'" + range + "' as \"开始(结束)时间\",\n" +
+//                "msisdn as \"号码\",\n" +
+//                "province_name as \"归属省\",\n" +
+//                "city_name as \"归属地市\",\n" +
+//                "roaming_province_name as \"拜访省\",\n" +
+//                "roaming_city_name as \"拜访地市\",\n" +
+//                "tml_brand as \"终端品牌\",\n" +
+//                "tml_name as \"终端型号\",\n" +
+//                "0 as \"开关是否打开\"\n" +
+//                "from sqmdb_5g.user_terminal_status_5g_agg\n" +
+//                "where sdate=? \n" +
+//                "and last_chg_date >= ? \n" +
+//                "and (last_open_date < ? or last_open_date is null) ";
+//
+//        try {
+//            psmt = conn.prepareStatement(sql);
+//            psmt.setQueryTimeout(60 * 10);
+//
+//            psmt.setLong(1, Integer.valueOf(ets));
+//            psmt.setLong(2, Integer.valueOf(emts));
+//            psmt.setLong(3, Integer.valueOf(emts));
+//
+//            ResultSet rs = psmt.executeQuery();
+//            res = rsprocess(rs);
+//        } catch (SQLException e) {
+//            e.printStackTrace();
+//        }
+//        return res;
+//    }
 
     public static String rsprocess(ResultSet rs) {
         List<String> heads = new ArrayList<>();
@@ -517,87 +517,87 @@ public class DbUtil {
     }
 
 
-    public static List<String> initCitys(String type, String province) {
-        PreparedStatement psmt = null;
-        if (type == null) {
-            type = "roaming";
-        }
-
-        String sql = "select distinct roaming_city_name as city from sqmdb_5g.user_terminal_status_5g_abstract where roaming_province_name=? and roaming_city_name!='null' order by roaming_city_name";
-//        Map<String,List<String>>res = new HashMap<>();
-        List<String> res = new ArrayList<>();
-        if ("roaming".equals(type)) {
-            sql = "select distinct roaming_city_name as city from sqmdb_5g.user_terminal_status_5g_abstract where roaming_province_name=? and roaming_city_name!='null' order by roaming_city_name";
-//            sql = "select distinct city from sqmdb_5g.roaming_area where province = ? order by city";
-
-        } else {
-            sql = "select distinct city_name as city from sqmdb_5g.user_terminal_status_5g_abstract where province_name=? and roaming_city_name!='null' order by city_name";
-//            sql = "select distinct city from sqmdb_5g.local_area where province = ? order by city";
-        }
-        try {
-            psmt = conn.prepareStatement(sql);
-            psmt.setQueryTimeout(60 * 10);
-            psmt.setString(1, province);
-
-            ResultSet rs = psmt.executeQuery();
-            while (rs.next()) {
-                String city = rs.getString("city");
-                res.add(city);
-//                if(res.keySet().contains(province)){
-//                    List<String> ls = res.get(province);
-//                    ls.add(city);
-//                }else {
-//                    List<String>as = new ArrayList<>();
-//                    as.add(city);
-//                    res.put(province,as);
-//                }
-            }
-        } catch (SQLException e) {
-            e.printStackTrace();
-        }
-        return res;
-    }
-
-
-    public static List<String> initProvince(String type) {
-        PreparedStatement psmt = null;
-        if (type == null) {
-            type = "roaming";
-        }
-        String sql = "";
-//        String sql = "select distinct roaming_province_name as province from sqmdb_5g.user_terminal_status_5g_abstract order by roaming_province_name";
+//    public static List<String> initCitys(String type, String province) {
+//        PreparedStatement psmt = null;
+//        if (type == null) {
+//            type = "roaming";
+//        }
+//
+//        String sql = "select distinct roaming_city_name as city from sqmdb_5g.user_terminal_status_5g_abstract where roaming_province_name=? and roaming_city_name!='null' order by roaming_city_name";
 ////        Map<String,List<String>>res = new HashMap<>();
-        List<String> res = new ArrayList<>();
-        if ("roaming".equals(type)) {
-            sql = "select distinct roaming_province_name as province from sqmdb_5g.user_terminal_status_5g_abstract order by roaming_province_name";
-//            sql = "select distinct province from sqmdb_5g.roaming_area order by province";
-
-        } else {
-            sql = "select distinct province_name as province from sqmdb_5g.user_terminal_status_5g_abstract order by province_name";
-//            sql = "select distinct province from sqmdb_5g.local_area order by province";
-        }
-        try {
-            psmt = conn.prepareStatement(sql);
-            psmt.setQueryTimeout(60 * 10);
-
-            ResultSet rs = psmt.executeQuery();
-            while (rs.next()) {
-                String province = rs.getString("province");
-                res.add(province);
-//                if(res.keySet().contains(province)){
-//                    List<String> ls = res.get(province);
-//                    ls.add(city);
-//                }else {
-//                    List<String>as = new ArrayList<>();
-//                    as.add(city);
-//                    res.put(province,as);
-//                }
-            }
-        } catch (SQLException e) {
-            e.printStackTrace();
-        }
-        return res;
-    }
+//        List<String> res = new ArrayList<>();
+//        if ("roaming".equals(type)) {
+//            sql = "select distinct roaming_city_name as city from sqmdb_5g.user_terminal_status_5g_abstract where roaming_province_name=? and roaming_city_name!='null' order by roaming_city_name";
+////            sql = "select distinct city from sqmdb_5g.roaming_area where province = ? order by city";
+//
+//        } else {
+//            sql = "select distinct city_name as city from sqmdb_5g.user_terminal_status_5g_abstract where province_name=? and roaming_city_name!='null' order by city_name";
+////            sql = "select distinct city from sqmdb_5g.local_area where province = ? order by city";
+//        }
+//        try {
+//            psmt = conn.prepareStatement(sql);
+//            psmt.setQueryTimeout(60 * 10);
+//            psmt.setString(1, province);
+//
+//            ResultSet rs = psmt.executeQuery();
+//            while (rs.next()) {
+//                String city = rs.getString("city");
+//                res.add(city);
+////                if(res.keySet().contains(province)){
+////                    List<String> ls = res.get(province);
+////                    ls.add(city);
+////                }else {
+////                    List<String>as = new ArrayList<>();
+////                    as.add(city);
+////                    res.put(province,as);
+////                }
+//            }
+//        } catch (SQLException e) {
+//            e.printStackTrace();
+//        }
+//        return res;
+//    }
+
+
+//    public static List<String> initProvince(String type) {
+//        PreparedStatement psmt = null;
+//        if (type == null) {
+//            type = "roaming";
+//        }
+//        String sql = "";
+////        String sql = "select distinct roaming_province_name as province from sqmdb_5g.user_terminal_status_5g_abstract order by roaming_province_name";
+//////        Map<String,List<String>>res = new HashMap<>();
+//        List<String> res = new ArrayList<>();
+//        if ("roaming".equals(type)) {
+//            sql = "select distinct roaming_province_name as province from sqmdb_5g.user_terminal_status_5g_abstract order by roaming_province_name";
+////            sql = "select distinct province from sqmdb_5g.roaming_area order by province";
+//
+//        } else {
+//            sql = "select distinct province_name as province from sqmdb_5g.user_terminal_status_5g_abstract order by province_name";
+////            sql = "select distinct province from sqmdb_5g.local_area order by province";
+//        }
+//        try {
+//            psmt = conn.prepareStatement(sql);
+//            psmt.setQueryTimeout(60 * 10);
+//
+//            ResultSet rs = psmt.executeQuery();
+//            while (rs.next()) {
+//                String province = rs.getString("province");
+//                res.add(province);
+////                if(res.keySet().contains(province)){
+////                    List<String> ls = res.get(province);
+////                    ls.add(city);
+////                }else {
+////                    List<String>as = new ArrayList<>();
+////                    as.add(city);
+////                    res.put(province,as);
+////                }
+//            }
+//        } catch (SQLException e) {
+//            e.printStackTrace();
+//        }
+//        return res;
+//    }
 
 
 }

+ 633 - 633
src/main/resources/templates/view.html

@@ -1,633 +1,633 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-    <meta charset="UTF-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>View</title>
-
-    <style>
-        * {
-            box-sizing: border-box;
-        }
-
-        .header {
-            text-align: center;
-        }
-
-        .column {
-            text-align: center;
-            float: left;
-            padding: 10px;
-        }
-
-        /* 左右两侧宽度 */
-        .column.left {
-            width: 20%;
-            /* padding-left: 10% */
-        }
-
-        .column.right {
-            width: 25%;
-            /* padding-top: 10%; */
-            padding-right: 10%;
-        }
-
-        .column.right>button {
-            margin-top: 25%;
-        }
-
-        /* 中间区域宽度 */
-        .column.middle {
-            width: 50%;
-            text-align: center;
-        }
-
-        .row {
-            margin-top: 20px;
-        }
-
-        /* 列后面清除浮动 */
-        .row:after {
-            content: "";
-            display: table;
-            clear: both;
-        }
-
-        .select {
-            width: 80%;
-            padding-left: 20%;
-        }
-
-        .test1 {
-            position: relative;
-            left: 100px;
-            text-align: center;
-            margin: 10px;
-            padding: 0;
-            height: 200px;
-            /* overflow: hidden; */
-            font-family: inherit;
-            font-size: 180%;
-            font-style: inherit;
-            font-weight: inherit;
-            /* outline: 0; */
-            border-color: #eee;
-            /* line-height: 2; */
-            /* border-width: 1px; */
-            border-style: solid;
-            background-color: #fff;
-            /* color: rgba(0, 0, 0, .85); */
-            border-radius: 2px;
-            display: block;
-            width: 100%;
-            /* padding-left: 10px; */
-            /* padding-right: 30px; */
-            cursor: pointer;
-        }
-
-        .test2 {
-            position: relative;
-            left: 100px;
-            text-align: center;
-            margin: 10px;
-            padding: 0;
-            height: 200px;
-            /* overflow: hidden; */
-            font-family: inherit;
-            font-size: 180%;
-            font-style: inherit;
-            font-weight: inherit;
-            /* outline: 0; */
-            border-color: #eee;
-            /* line-height: 2; */
-            /* border-width: 1px; */
-            border-style: solid;
-            background-color: #fff;
-            /* color: rgba(0, 0, 0, .85); */
-            border-radius: 2px;
-            display: block;
-            width: 100%;
-            /* padding-left: 10px; */
-            /* padding-right: 30px; */
-            cursor: pointer;
-        }
-
-        .one {
-            padding-left: 25%;
-        }
-
-        .gis {
-            padding-left: 20%;
-        }
-    </style>
-    <link rel="stylesheet" href="./js/layui/css/layui.css">
-</head>
-
-<body>
-<div class="header">
-    <!-- 页面数据展示 -->
-</div>
-<div class="row">
-    <div class="one">
-        <form class="layui-form" action="">
-            <div class="column" id="guishudi">
-                <input type="radio" name="where" value="local" title="归属地" lay-filter="where" checked>
-                <input type="radio" name="where" value="roaming" title="拜访地" lay-filter="where">
-            </div>
-            <div class="column">
-                <select name="timeType" id="timeTpye">
-                    <option value="">天</option>
-                    <option value="7">7天</option>
-                    <option value="30" selected>30天</option>
-                    <option value="60">60天</option>
-                </select>
-            </div>
-            <div class="column">
-                日期范围
-                <!-- <div class="layui-inline" id="test6"> -->
-                <div class="layui-input-inline">
-                    <input type="text" autocomplete="off" id="startDate" class="layui-input" placeholder="开始日期">
-                </div>
-                <!-- <div class="layui-form-mid">-</div>- -->
-                <!-- <div class="layui-input-inline">
-                        <input type="text" autocomplete="off" id="endDate" class="layui-input" placeholder="结束日期">
-                    </div> -->
-                <!-- </div> -->
-            </div>
-        </form>
-        <div class="column">
-            <!-- <button class="layui-btn" lay-submit lay-filter="search">查询</button> -->
-            <button class="layui-btn" onclick="searchGrp()">查询</button>
-            <!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button> -->
-        </div>
-
-
-
-    </div>
-</div>
-<div class="row">
-    <div class="column left">
-        <!-- <form class="layui-form" action="">
-            <div class="select">
-                <select multiple="multiple" name="city1" class="test">
-                    <option value=""></option>
-                    <option value="0">北京</option>
-                    <option value="1">上海</option>
-                    <option value="2">广州</option>
-                    <option value="3">深圳</option>
-                    <option value="4">杭州</option>
-                </select>
-            </div>
-
-
-        </form> -->
-        <div class="select">
-            <select multiple="multiple" name="province" class="test1" id="selectProvince"
-                    onchange="provinceSelect()">
-                <option value="0">北京</option>
-                <option value="1">天津</option>
-                <option value="2">河北</option>
-                <option value="3">河南</option>
-
-            </select>
-
-        </div>
-
-        <div class="select">
-            <select multiple="multiple" name="city" class="test2" id="selectCity">
-                <option value="0">石家庄</option>
-                <option value="1">唐山</option>
-                <option value="2">张家口</option>
-                <option value="3">保定</option>
-                <option value="4">秦皇岛</option>
-                <option value="5">廊坊</option>
-            </select>
-
-        </div>
-
-
-    </div>
-    <div class="column middle">
-        <div class="layui-form">
-            <div class="layui-input-inline" id="cb">
-                <input type="radio" name="searchType" lay-filter="cb" title="5G终端用户数" value="5G终端用户数" checked>
-                <input type="radio" name="searchType" lay-filter="cb" title="打开5G开关用户数" value="打开5G开关用户数">
-                <input type="radio" name="searchType" lay-filter="cb" title="关闭5G开关用户数" value="关闭5G开关用户数">
-                <input type="radio" name="searchType" lay-filter="cb" title="5G开关打开率" value="5G开关打开率">
-            </div>
-        </div>
-        <div class="gis">
-            <div id="graph" style="width: 600px;height:400px;"></div>
-        </div>
-    </div>
-    <div class="column right">
-
-        <button class="layui-btn export" lay-submit lay-filter="export">导出指标</button>
-        <br>
-        <button class="layui-btn export" lay-submit lay-filter="exportAll">导出全量</button>
-        <br>
-        <button class="layui-btn export" lay-submit lay-filter="exportClose">导出未开</button>
-
-    </div>
-</div>
-<script src="./js/jquery-3.5.1.min.js"></script>
-<script src="./js/layui/layui.js"></script>
-<script src="./js/echarts.js"></script>
-<script>
-        function initGrp() {
-            console.log('initgrp')
-            $.ajax({
-                type: "GET",
-                // url: './json/et.json',
-                url: './search',
-                data: {
-                    "from":$('#guishudi').find('input:checked').val(),
-                    "range": $('#startDate').val(),
-                    // "range": '20210719 - 20210722',
-                    "stype": $('#cb').find('input:checked').val(),
-                    "ttype": $('#timeTpye').val(),
-                    "provinces": '河北',
-                    "citys": ''
-
-                },
-                success: function (r) {
-
-                    console.log(r)
-                    let o = r instanceof Object
-                    if (!o) {
-                        r = JSON.parse(r)
-                    }
-                    option.xAxis.data = r.dt;
-                    option.series[0].data = r.num;
-                    myChart.setOption(option);
-                    return false;
-
-                }
-
-            });
-
-        }
-        function searchGrp() {
-
-            let provinceSize = $('#selectProvince').find('option:selected').length;
-            let cbSize = $("#cb").find('input:checked').length;
-
-            if (provinceSize < 1) {
-                alert('请选择省市')
-                return;
-            }
-
-            if (cbSize < 1) {
-                alert('请选择类型')
-                return;
-            }
-
-            var ps = new Array();
-            $('#selectProvince').find('option:selected').each(function (i, t) {
-                ps.push($(t).val());
-            });
-            var cs = new Array();
-            $('#selectCity').find('option:selected').each(function (i, t) {
-                cs.push($(t).val());
-            });
-            let provinces = ps.join(',');
-            let citys = cs.join(',');
-
-            $.ajax({
-                type: "GET",
-                // url: './json/et.json',
-                url: './search',
-                data: {
-                    "from":$('#guishudi').find('input:checked').val(),
-                    "range": $('#startDate').val(),
-                    "stype": $('#cb').find('input:checked').val(),
-                    "ttype": $('#timeTpye').val(),
-                    "provinces": provinces,
-                    "citys": citys
-
-                },
-                success: function (r) {
-
-                    console.log(r)
-                    let o = r instanceof Object
-                    if (!o) {
-                        r = JSON.parse(r)
-                    }
-                    option.xAxis.data = r.dt;
-                    option.series[0].data = r.num;
-                    myChart.setOption(option);
-                    return false;
-
-                }
-
-            });
-
-        }
-        function typeExportClose() {
-            console.log("exportClose")
-            this.location.href = "/exportClose?" + "ttype=" + $('#timeTpye').val() + "&range=" + $('#startDate').val()
-        }
-        function typeExportAll() {
-            console.log("exportAll")
-            this.location.href = "/exportAll?" + "ttype=" + $('#timeTpye').val() + "&range=" + $('#startDate').val()
-
-        }
-
-        function typeExport(guishu) {
-            var ps = new Array();
-            $('#selectProvince').find('option:selected').each(function (i, t) {
-                ps.push($(t).val());
-            });
-            var cs = new Array();
-            $('#selectCity').find('option:selected').each(function (i, t) {
-                cs.push($(t).val());
-            });
-            let provinces = ps.join(',');
-            let citys = cs.join(',');
-            this.location.href = "/typeExport?" + "from=" + guishu + "&provinces="+provinces+"&citys="+citys+"&ttype=" + $('#timeTpye').val() + "&range=" + $('#startDate').val()
-        }
-
-        function provinceSelect() {
-            console.log("province change")
-            let selectSice = $('#selectProvince').find('option:selected').length
-            if (selectSice < 1) {
-                $('#selectCity').empty();
-            } else if (selectSice == 1) {
-                $('#selectCity').removeAttr("disabled"); $('#selectProvince').find
-                changeProvince($('#guishudi').find('input:checked').val(), $('#selectProvince').find('option:selected')[0].text);
-            } else {
-                $('#selectCity').attr("disabled", "disabled");
-            }
-        }
-
-        function changeProvince(type, province) {
-            console.log('changeprovince')
-
-            $.ajax({
-                type: "GET",
-                // url: './json/citys.json',
-                url: './initCitys',
-                async: false,
-                data: {
-                    "type": type,
-                    "province": province
-                },
-                success: function (data) {
-                    let o = data instanceof Object
-                    console.log(o)
-                    if (!o) {
-                        data = JSON.parse(data)
-                    }
-                    $('#selectCity').empty();
-                    var html = '';
-                    $.each(data, function (commentIndex, comment) {
-                        html += '<option value="' + comment + '">' + comment + '</option>';
-                        // console.log(commentIndex,comment)
-                    });
-
-                    $('#selectCity').html(html);
-
-                }
-            });
-        }
-
-        function dateFormat(fmt, date, n) {
-            if (n == undefined || n == '') {
-                n = 0;
-            }
-            let ret;
-            const opt = {
-                "Y+": date.getFullYear().toString(), // 年
-                "m+": (date.getMonth() + 1).toString(), // 月
-                "d+": (date.getDate() + n).toString(), // 日
-                "H+": date.getHours().toString(), // 时
-                "M+": date.getMinutes().toString(), // 分
-                "S+": date.getSeconds().toString() // 秒
-                // 有其他格式化字符需求可以继续添加,必须转化成字符串
-            };
-            for (let k in opt) {
-                ret = new RegExp("(" + k + ")").exec(fmt);
-                if (ret) {
-                    fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
-                };
-            };
-            return fmt;
-        }
-
-        // function searct(data) {
-
-        // this.location.href="/cmcc/alert/cellAlertDownload"+"?start_time_o="+stime+"&end_time_o="+etime+"&type="+type+"&aType="+aType;
-
-        // }
-
-        function radioChange(t) {
-
-            let type = $('#guishudi').find('input:checked').val();
-            // let where = $("input[type='radio']:checked").val();
-
-            $.ajax({
-                type: "GET",
-                // url: './json/' + where + '.json',
-                url: './initProvince',
-                async: false,
-                data: {
-                    "type": type
-                },
-                success: function (data) {
-                    let o = data instanceof Object
-                    console.log(o)
-                    if (!o) {
-                        data = JSON.parse(data)
-                    }
-
-                    // console.log(pc)
-                    $('#selectProvince').empty();
-                    var html = '';
-                    $.each(data, function (commentIndex, comment) {
-                        console.log(commentIndex, comment)
-                        html += '<option value="' + comment + '">' + comment + '</option>';
-                        // console.log(commentIndex,comment)
-
-                    });
-
-                    $('#selectProvince').html(html);
-                    changeProvince($('#guishudi').find('input:checked').val(), $('#selectProvince').find('option')[0].text);
-                }
-            });
-        }
-
-        // function preTimeSelect() {
-
-        //     $.ajax({
-        //         type: "GET",
-        //         url: './json/timeSelect.json',
-        //         success: function (data) {
-
-        //             $('#timeSelect').empty();
-        //             var html = '';
-        //             $.each(data, function (commentIndex, comment) {
-        //                 html += '<option value="' + comment + '">' + comment + '</option>';
-        //                 // console.log(commentIndex,comment)
-        //             });
-
-        //             $('#timeSelect').html(html);
-        //             layui.use(['form'], function () {
-        //                 var form = layui.form;
-
-        //                 form.render('select')
-        //             });
-
-        //         }
-        //     });
-        // }
-
-        // $('input[type=radio][name=where]').change(function () {
-        //     console.log('change')
-        //     alert(this.value)
-        // })
-    </script>
-
-<script>
-        var myChart = echarts.init(document.getElementById('graph'));
-        option = {
-            xAxis: {
-                type: 'category',
-                data: ['20210721', '20210722', '20210723', '20210724', '20210725', '20210726', '20210727']
-            },
-            yAxis: {
-                type: 'value'
-            },
-            series: [{
-                data: [150, 230, 224, 218, 135, 147, 260],
-                type: 'line'
-            }]
-        };
-        // myChart.setOption(option);
-        layui.use(['layer', 'tree', 'form', 'laydate', 'table'], function () {
-            var layer = layui.layer,
-                tree = layui.tree,
-                form = layui.form,
-                table = layui.table,
-                laydate = layui.laydate;
-            let date = new Date();
-            let date1 = dateFormat('YYYYmmdd', date, -7);
-            let date2 = dateFormat('YYYYmmdd', date);
-            let dateValue = date1 + ' - ' + date2;
-            // console.log(dateValue)
-            laydate.render({
-                elem: '#startDate',
-                type: 'date',
-                format: 'yyyyMMdd',
-                value: dateValue,
-                isInitValue: true,
-                range: '-',
-                // range: ['#startDate', '#endDate']
-            });
-
-
-            form.render('select')
-            form.on("radio(cb)", function (data) {
-                // let stype = $('#cb').find('input:checked').val()
-                // if (stype == '5G开关打开率') {
-                //     $('.export').attr("disabled", "disabled");
-                //     $(".export").addClass("layui-btn-disabled")
-
-                // } else {
-                //     $('.export').removeAttr("disabled");
-                //     $(".export").removeClass("layui-btn-disabled")
-                // }
-
-            });
-            //监听提交
-            form.on("radio(where)", function (data) {
-                radioChange(data.value);
-
-            });
-            // form.on('submit(search)', function (data) {
-            //     // console.log(data.field);
-            //     // let where = data.field.where;
-            //     // let timeType = data.field.Type;
-            //     let provinceSize = $('#selectProvince').find('option:selected').length;
-            //     let cbSize = $("#cb").find('input:checked').length;
-            //     console.log(cbSize);
-            //     // console.log(provinceSize)
-            //     if (provinceSize < 1) {
-            //         alert('请选择省市')
-            //         return false;
-            //     }
-
-            //     if (cbSize < 1) {
-            //         alert('请选择类型')
-            //         return false;
-            //     }
-
-            //     var ps = new Array();
-            //     $('#selectProvince').find('option:selected').each(function (i, t) {
-            //         ps.push($(t).val());
-            //     });
-            //     var cs = new Array();
-            //     $('#selectCity').find('option:selected').each(function (i, t) {
-            //         cs.push($(t).val());
-            //     });
-            //     let provinces = ps.join(',');
-            //     let citys = cs.join(',');
-
-            //     $.ajax({
-            //         type: "GET",
-            //         // url: './json/' + where + '.json',
-            //         url: './typeExport',
-            //         data: {
-            //             "range": $('#startDate').val(),
-            //             "stype": stype,
-            //             "ttype": $('#timeTpye').val(),
-            //             "provinces": provinces,
-            //             "citys": citys
-
-            //         },
-            //         success: function (data) {
-            //             let o = data instanceof Object
-            //             if (!o) {
-            //                 data = JSON.parse(data)
-            //             }
-            //             option.data = data.dt;
-            //             option.series[0].data = date.num;
-            //             myChart.setOption(option);
-
-            //         }
-            //     });
-            //     // searchGrp()
-            //     // layer.msg(JSON.stringify(data));
-            //     return false;
-            // });
-
-
-            form.on('submit(export)', function () {
-                let guishu = $('#guishudi').find('input:checked').val()
-                typeExport(guishu)
-
-            });
-            form.on('submit(exportAll)', function () {
-                // let stype=$('#cb').find('input:checked').val()
-                typeExportAll()
-            });
-            form.on('submit(exportClose)', function () {
-                // let stype=$('#cb').find('input:checked').val()
-                typeExportClose()
-            });
-
-        });
-    </script>
-<script>
-        $(function () {
-
-            radioChange();
-            changeProvince($('#guishudi').find('input:checked').val(), $('#selectProvince').find('option')[0].text);
-            initGrp()
-        })
-    </script>
-
-</body>
-
-</html>
+<!--<!DOCTYPE html>-->
+<!--<html lang="en">-->
+
+<!--<head>-->
+<!--    <meta charset="UTF-8">-->
+<!--    <meta http-equiv="X-UA-Compatible" content="IE=edge">-->
+<!--    <meta name="viewport" content="width=device-width, initial-scale=1.0">-->
+<!--    <title>View</title>-->
+
+<!--    <style>-->
+<!--        * {-->
+<!--            box-sizing: border-box;-->
+<!--        }-->
+
+<!--        .header {-->
+<!--            text-align: center;-->
+<!--        }-->
+
+<!--        .column {-->
+<!--            text-align: center;-->
+<!--            float: left;-->
+<!--            padding: 10px;-->
+<!--        }-->
+
+<!--        /* 左右两侧宽度 */-->
+<!--        .column.left {-->
+<!--            width: 20%;-->
+<!--            /* padding-left: 10% */-->
+<!--        }-->
+
+<!--        .column.right {-->
+<!--            width: 25%;-->
+<!--            /* padding-top: 10%; */-->
+<!--            padding-right: 10%;-->
+<!--        }-->
+
+<!--        .column.right>button {-->
+<!--            margin-top: 25%;-->
+<!--        }-->
+
+<!--        /* 中间区域宽度 */-->
+<!--        .column.middle {-->
+<!--            width: 50%;-->
+<!--            text-align: center;-->
+<!--        }-->
+
+<!--        .row {-->
+<!--            margin-top: 20px;-->
+<!--        }-->
+
+<!--        /* 列后面清除浮动 */-->
+<!--        .row:after {-->
+<!--            content: "";-->
+<!--            display: table;-->
+<!--            clear: both;-->
+<!--        }-->
+
+<!--        .select {-->
+<!--            width: 80%;-->
+<!--            padding-left: 20%;-->
+<!--        }-->
+
+<!--        .test1 {-->
+<!--            position: relative;-->
+<!--            left: 100px;-->
+<!--            text-align: center;-->
+<!--            margin: 10px;-->
+<!--            padding: 0;-->
+<!--            height: 200px;-->
+<!--            /* overflow: hidden; */-->
+<!--            font-family: inherit;-->
+<!--            font-size: 180%;-->
+<!--            font-style: inherit;-->
+<!--            font-weight: inherit;-->
+<!--            /* outline: 0; */-->
+<!--            border-color: #eee;-->
+<!--            /* line-height: 2; */-->
+<!--            /* border-width: 1px; */-->
+<!--            border-style: solid;-->
+<!--            background-color: #fff;-->
+<!--            /* color: rgba(0, 0, 0, .85); */-->
+<!--            border-radius: 2px;-->
+<!--            display: block;-->
+<!--            width: 100%;-->
+<!--            /* padding-left: 10px; */-->
+<!--            /* padding-right: 30px; */-->
+<!--            cursor: pointer;-->
+<!--        }-->
+
+<!--        .test2 {-->
+<!--            position: relative;-->
+<!--            left: 100px;-->
+<!--            text-align: center;-->
+<!--            margin: 10px;-->
+<!--            padding: 0;-->
+<!--            height: 200px;-->
+<!--            /* overflow: hidden; */-->
+<!--            font-family: inherit;-->
+<!--            font-size: 180%;-->
+<!--            font-style: inherit;-->
+<!--            font-weight: inherit;-->
+<!--            /* outline: 0; */-->
+<!--            border-color: #eee;-->
+<!--            /* line-height: 2; */-->
+<!--            /* border-width: 1px; */-->
+<!--            border-style: solid;-->
+<!--            background-color: #fff;-->
+<!--            /* color: rgba(0, 0, 0, .85); */-->
+<!--            border-radius: 2px;-->
+<!--            display: block;-->
+<!--            width: 100%;-->
+<!--            /* padding-left: 10px; */-->
+<!--            /* padding-right: 30px; */-->
+<!--            cursor: pointer;-->
+<!--        }-->
+
+<!--        .one {-->
+<!--            padding-left: 25%;-->
+<!--        }-->
+
+<!--        .gis {-->
+<!--            padding-left: 20%;-->
+<!--        }-->
+<!--    </style>-->
+<!--    <link rel="stylesheet" href="./js/layui/css/layui.css">-->
+<!--</head>-->
+
+<!--<body>-->
+<!--<div class="header">-->
+<!--    &lt;!&ndash; 页面数据展示 &ndash;&gt;-->
+<!--</div>-->
+<!--<div class="row">-->
+<!--    <div class="one">-->
+<!--        <form class="layui-form" action="">-->
+<!--            <div class="column" id="guishudi">-->
+<!--                <input type="radio" name="where" value="local" title="归属地" lay-filter="where" checked>-->
+<!--                <input type="radio" name="where" value="roaming" title="拜访地" lay-filter="where">-->
+<!--            </div>-->
+<!--            <div class="column">-->
+<!--                <select name="timeType" id="timeTpye">-->
+<!--                    <option value="">天</option>-->
+<!--                    <option value="7">7天</option>-->
+<!--                    <option value="30" selected>30天</option>-->
+<!--                    <option value="60">60天</option>-->
+<!--                </select>-->
+<!--            </div>-->
+<!--            <div class="column">-->
+<!--                日期范围-->
+<!--                &lt;!&ndash; <div class="layui-inline" id="test6"> &ndash;&gt;-->
+<!--                <div class="layui-input-inline">-->
+<!--                    <input type="text" autocomplete="off" id="startDate" class="layui-input" placeholder="开始日期">-->
+<!--                </div>-->
+<!--                &lt;!&ndash; <div class="layui-form-mid">-</div>- &ndash;&gt;-->
+<!--                &lt;!&ndash; <div class="layui-input-inline">-->
+<!--                        <input type="text" autocomplete="off" id="endDate" class="layui-input" placeholder="结束日期">-->
+<!--                    </div> &ndash;&gt;-->
+<!--                &lt;!&ndash; </div> &ndash;&gt;-->
+<!--            </div>-->
+<!--        </form>-->
+<!--        <div class="column">-->
+<!--            &lt;!&ndash; <button class="layui-btn" lay-submit lay-filter="search">查询</button> &ndash;&gt;-->
+<!--            <button class="layui-btn" onclick="searchGrp()">查询</button>-->
+<!--            &lt;!&ndash; <button type="reset" class="layui-btn layui-btn-primary">重置</button> &ndash;&gt;-->
+<!--        </div>-->
+
+
+
+<!--    </div>-->
+<!--</div>-->
+<!--<div class="row">-->
+<!--    <div class="column left">-->
+<!--        &lt;!&ndash; <form class="layui-form" action="">-->
+<!--            <div class="select">-->
+<!--                <select multiple="multiple" name="city1" class="test">-->
+<!--                    <option value=""></option>-->
+<!--                    <option value="0">北京</option>-->
+<!--                    <option value="1">上海</option>-->
+<!--                    <option value="2">广州</option>-->
+<!--                    <option value="3">深圳</option>-->
+<!--                    <option value="4">杭州</option>-->
+<!--                </select>-->
+<!--            </div>-->
+
+
+<!--        </form> &ndash;&gt;-->
+<!--        <div class="select">-->
+<!--            <select multiple="multiple" name="province" class="test1" id="selectProvince"-->
+<!--                    onchange="provinceSelect()">-->
+<!--                <option value="0">北京</option>-->
+<!--                <option value="1">天津</option>-->
+<!--                <option value="2">河北</option>-->
+<!--                <option value="3">河南</option>-->
+
+<!--            </select>-->
+
+<!--        </div>-->
+
+<!--        <div class="select">-->
+<!--            <select multiple="multiple" name="city" class="test2" id="selectCity">-->
+<!--                <option value="0">石家庄</option>-->
+<!--                <option value="1">唐山</option>-->
+<!--                <option value="2">张家口</option>-->
+<!--                <option value="3">保定</option>-->
+<!--                <option value="4">秦皇岛</option>-->
+<!--                <option value="5">廊坊</option>-->
+<!--            </select>-->
+
+<!--        </div>-->
+
+
+<!--    </div>-->
+<!--    <div class="column middle">-->
+<!--        <div class="layui-form">-->
+<!--            <div class="layui-input-inline" id="cb">-->
+<!--                <input type="radio" name="searchType" lay-filter="cb" title="5G终端用户数" value="5G终端用户数" checked>-->
+<!--                <input type="radio" name="searchType" lay-filter="cb" title="打开5G开关用户数" value="打开5G开关用户数">-->
+<!--                <input type="radio" name="searchType" lay-filter="cb" title="关闭5G开关用户数" value="关闭5G开关用户数">-->
+<!--                <input type="radio" name="searchType" lay-filter="cb" title="5G开关打开率" value="5G开关打开率">-->
+<!--            </div>-->
+<!--        </div>-->
+<!--        <div class="gis">-->
+<!--            <div id="graph" style="width: 600px;height:400px;"></div>-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="column right">-->
+
+<!--        <button class="layui-btn export" lay-submit lay-filter="export">导出指标</button>-->
+<!--        <br>-->
+<!--        <button class="layui-btn export" lay-submit lay-filter="exportAll">导出全量</button>-->
+<!--        <br>-->
+<!--        <button class="layui-btn export" lay-submit lay-filter="exportClose">导出未开</button>-->
+
+<!--    </div>-->
+<!--</div>-->
+<!--<script src="./js/jquery-3.5.1.min.js"></script>-->
+<!--<script src="./js/layui/layui.js"></script>-->
+<!--<script src="./js/echarts.js"></script>-->
+<!--<script>-->
+<!--        function initGrp() {-->
+<!--            console.log('initgrp')-->
+<!--            $.ajax({-->
+<!--                type: "GET",-->
+<!--                // url: './json/et.json',-->
+<!--                url: './search',-->
+<!--                data: {-->
+<!--                    "from":$('#guishudi').find('input:checked').val(),-->
+<!--                    "range": $('#startDate').val(),-->
+<!--                    // "range": '20210719 - 20210722',-->
+<!--                    "stype": $('#cb').find('input:checked').val(),-->
+<!--                    "ttype": $('#timeTpye').val(),-->
+<!--                    "provinces": '河北',-->
+<!--                    "citys": ''-->
+
+<!--                },-->
+<!--                success: function (r) {-->
+
+<!--                    console.log(r)-->
+<!--                    let o = r instanceof Object-->
+<!--                    if (!o) {-->
+<!--                        r = JSON.parse(r)-->
+<!--                    }-->
+<!--                    option.xAxis.data = r.dt;-->
+<!--                    option.series[0].data = r.num;-->
+<!--                    myChart.setOption(option);-->
+<!--                    return false;-->
+
+<!--                }-->
+
+<!--            });-->
+
+<!--        }-->
+<!--        function searchGrp() {-->
+
+<!--            let provinceSize = $('#selectProvince').find('option:selected').length;-->
+<!--            let cbSize = $("#cb").find('input:checked').length;-->
+
+<!--            if (provinceSize < 1) {-->
+<!--                alert('请选择省市')-->
+<!--                return;-->
+<!--            }-->
+
+<!--            if (cbSize < 1) {-->
+<!--                alert('请选择类型')-->
+<!--                return;-->
+<!--            }-->
+
+<!--            var ps = new Array();-->
+<!--            $('#selectProvince').find('option:selected').each(function (i, t) {-->
+<!--                ps.push($(t).val());-->
+<!--            });-->
+<!--            var cs = new Array();-->
+<!--            $('#selectCity').find('option:selected').each(function (i, t) {-->
+<!--                cs.push($(t).val());-->
+<!--            });-->
+<!--            let provinces = ps.join(',');-->
+<!--            let citys = cs.join(',');-->
+
+<!--            $.ajax({-->
+<!--                type: "GET",-->
+<!--                // url: './json/et.json',-->
+<!--                url: './search',-->
+<!--                data: {-->
+<!--                    "from":$('#guishudi').find('input:checked').val(),-->
+<!--                    "range": $('#startDate').val(),-->
+<!--                    "stype": $('#cb').find('input:checked').val(),-->
+<!--                    "ttype": $('#timeTpye').val(),-->
+<!--                    "provinces": provinces,-->
+<!--                    "citys": citys-->
+
+<!--                },-->
+<!--                success: function (r) {-->
+
+<!--                    console.log(r)-->
+<!--                    let o = r instanceof Object-->
+<!--                    if (!o) {-->
+<!--                        r = JSON.parse(r)-->
+<!--                    }-->
+<!--                    option.xAxis.data = r.dt;-->
+<!--                    option.series[0].data = r.num;-->
+<!--                    myChart.setOption(option);-->
+<!--                    return false;-->
+
+<!--                }-->
+
+<!--            });-->
+
+<!--        }-->
+<!--        function typeExportClose() {-->
+<!--            console.log("exportClose")-->
+<!--            this.location.href = "/exportClose?" + "ttype=" + $('#timeTpye').val() + "&range=" + $('#startDate').val()-->
+<!--        }-->
+<!--        function typeExportAll() {-->
+<!--            console.log("exportAll")-->
+<!--            this.location.href = "/exportAll?" + "ttype=" + $('#timeTpye').val() + "&range=" + $('#startDate').val()-->
+
+<!--        }-->
+
+<!--        function typeExport(guishu) {-->
+<!--            var ps = new Array();-->
+<!--            $('#selectProvince').find('option:selected').each(function (i, t) {-->
+<!--                ps.push($(t).val());-->
+<!--            });-->
+<!--            var cs = new Array();-->
+<!--            $('#selectCity').find('option:selected').each(function (i, t) {-->
+<!--                cs.push($(t).val());-->
+<!--            });-->
+<!--            let provinces = ps.join(',');-->
+<!--            let citys = cs.join(',');-->
+<!--            this.location.href = "/typeExport?" + "from=" + guishu + "&provinces="+provinces+"&citys="+citys+"&ttype=" + $('#timeTpye').val() + "&range=" + $('#startDate').val()-->
+<!--        }-->
+
+<!--        function provinceSelect() {-->
+<!--            console.log("province change")-->
+<!--            let selectSice = $('#selectProvince').find('option:selected').length-->
+<!--            if (selectSice < 1) {-->
+<!--                $('#selectCity').empty();-->
+<!--            } else if (selectSice == 1) {-->
+<!--                $('#selectCity').removeAttr("disabled"); $('#selectProvince').find-->
+<!--                changeProvince($('#guishudi').find('input:checked').val(), $('#selectProvince').find('option:selected')[0].text);-->
+<!--            } else {-->
+<!--                $('#selectCity').attr("disabled", "disabled");-->
+<!--            }-->
+<!--        }-->
+
+<!--        function changeProvince(type, province) {-->
+<!--            console.log('changeprovince')-->
+
+<!--            $.ajax({-->
+<!--                type: "GET",-->
+<!--                // url: './json/citys.json',-->
+<!--                url: './initCitys',-->
+<!--                async: false,-->
+<!--                data: {-->
+<!--                    "type": type,-->
+<!--                    "province": province-->
+<!--                },-->
+<!--                success: function (data) {-->
+<!--                    let o = data instanceof Object-->
+<!--                    console.log(o)-->
+<!--                    if (!o) {-->
+<!--                        data = JSON.parse(data)-->
+<!--                    }-->
+<!--                    $('#selectCity').empty();-->
+<!--                    var html = '';-->
+<!--                    $.each(data, function (commentIndex, comment) {-->
+<!--                        html += '<option value="' + comment + '">' + comment + '</option>';-->
+<!--                        // console.log(commentIndex,comment)-->
+<!--                    });-->
+
+<!--                    $('#selectCity').html(html);-->
+
+<!--                }-->
+<!--            });-->
+<!--        }-->
+
+<!--        function dateFormat(fmt, date, n) {-->
+<!--            if (n == undefined || n == '') {-->
+<!--                n = 0;-->
+<!--            }-->
+<!--            let ret;-->
+<!--            const opt = {-->
+<!--                "Y+": date.getFullYear().toString(), // 年-->
+<!--                "m+": (date.getMonth() + 1).toString(), // 月-->
+<!--                "d+": (date.getDate() + n).toString(), // 日-->
+<!--                "H+": date.getHours().toString(), // 时-->
+<!--                "M+": date.getMinutes().toString(), // 分-->
+<!--                "S+": date.getSeconds().toString() // 秒-->
+<!--                // 有其他格式化字符需求可以继续添加,必须转化成字符串-->
+<!--            };-->
+<!--            for (let k in opt) {-->
+<!--                ret = new RegExp("(" + k + ")").exec(fmt);-->
+<!--                if (ret) {-->
+<!--                    fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))-->
+<!--                };-->
+<!--            };-->
+<!--            return fmt;-->
+<!--        }-->
+
+<!--        // function searct(data) {-->
+
+<!--        // this.location.href="/cmcc/alert/cellAlertDownload"+"?start_time_o="+stime+"&end_time_o="+etime+"&type="+type+"&aType="+aType;-->
+
+<!--        // }-->
+
+<!--        function radioChange(t) {-->
+
+<!--            let type = $('#guishudi').find('input:checked').val();-->
+<!--            // let where = $("input[type='radio']:checked").val();-->
+
+<!--            $.ajax({-->
+<!--                type: "GET",-->
+<!--                // url: './json/' + where + '.json',-->
+<!--                url: './initProvince',-->
+<!--                async: false,-->
+<!--                data: {-->
+<!--                    "type": type-->
+<!--                },-->
+<!--                success: function (data) {-->
+<!--                    let o = data instanceof Object-->
+<!--                    console.log(o)-->
+<!--                    if (!o) {-->
+<!--                        data = JSON.parse(data)-->
+<!--                    }-->
+
+<!--                    // console.log(pc)-->
+<!--                    $('#selectProvince').empty();-->
+<!--                    var html = '';-->
+<!--                    $.each(data, function (commentIndex, comment) {-->
+<!--                        console.log(commentIndex, comment)-->
+<!--                        html += '<option value="' + comment + '">' + comment + '</option>';-->
+<!--                        // console.log(commentIndex,comment)-->
+
+<!--                    });-->
+
+<!--                    $('#selectProvince').html(html);-->
+<!--                    changeProvince($('#guishudi').find('input:checked').val(), $('#selectProvince').find('option')[0].text);-->
+<!--                }-->
+<!--            });-->
+<!--        }-->
+
+<!--        // function preTimeSelect() {-->
+
+<!--        //     $.ajax({-->
+<!--        //         type: "GET",-->
+<!--        //         url: './json/timeSelect.json',-->
+<!--        //         success: function (data) {-->
+
+<!--        //             $('#timeSelect').empty();-->
+<!--        //             var html = '';-->
+<!--        //             $.each(data, function (commentIndex, comment) {-->
+<!--        //                 html += '<option value="' + comment + '">' + comment + '</option>';-->
+<!--        //                 // console.log(commentIndex,comment)-->
+<!--        //             });-->
+
+<!--        //             $('#timeSelect').html(html);-->
+<!--        //             layui.use(['form'], function () {-->
+<!--        //                 var form = layui.form;-->
+
+<!--        //                 form.render('select')-->
+<!--        //             });-->
+
+<!--        //         }-->
+<!--        //     });-->
+<!--        // }-->
+
+<!--        // $('input[type=radio][name=where]').change(function () {-->
+<!--        //     console.log('change')-->
+<!--        //     alert(this.value)-->
+<!--        // })-->
+<!--    </script>-->
+
+<!--<script>-->
+<!--        var myChart = echarts.init(document.getElementById('graph'));-->
+<!--        option = {-->
+<!--            xAxis: {-->
+<!--                type: 'category',-->
+<!--                data: ['20210721', '20210722', '20210723', '20210724', '20210725', '20210726', '20210727']-->
+<!--            },-->
+<!--            yAxis: {-->
+<!--                type: 'value'-->
+<!--            },-->
+<!--            series: [{-->
+<!--                data: [150, 230, 224, 218, 135, 147, 260],-->
+<!--                type: 'line'-->
+<!--            }]-->
+<!--        };-->
+<!--        // myChart.setOption(option);-->
+<!--        layui.use(['layer', 'tree', 'form', 'laydate', 'table'], function () {-->
+<!--            var layer = layui.layer,-->
+<!--                tree = layui.tree,-->
+<!--                form = layui.form,-->
+<!--                table = layui.table,-->
+<!--                laydate = layui.laydate;-->
+<!--            let date = new Date();-->
+<!--            let date1 = dateFormat('YYYYmmdd', date, -7);-->
+<!--            let date2 = dateFormat('YYYYmmdd', date);-->
+<!--            let dateValue = date1 + ' - ' + date2;-->
+<!--            // console.log(dateValue)-->
+<!--            laydate.render({-->
+<!--                elem: '#startDate',-->
+<!--                type: 'date',-->
+<!--                format: 'yyyyMMdd',-->
+<!--                value: dateValue,-->
+<!--                isInitValue: true,-->
+<!--                range: '-',-->
+<!--                // range: ['#startDate', '#endDate']-->
+<!--            });-->
+
+
+<!--            form.render('select')-->
+<!--            form.on("radio(cb)", function (data) {-->
+<!--                // let stype = $('#cb').find('input:checked').val()-->
+<!--                // if (stype == '5G开关打开率') {-->
+<!--                //     $('.export').attr("disabled", "disabled");-->
+<!--                //     $(".export").addClass("layui-btn-disabled")-->
+
+<!--                // } else {-->
+<!--                //     $('.export').removeAttr("disabled");-->
+<!--                //     $(".export").removeClass("layui-btn-disabled")-->
+<!--                // }-->
+
+<!--            });-->
+<!--            //监听提交-->
+<!--            form.on("radio(where)", function (data) {-->
+<!--                radioChange(data.value);-->
+
+<!--            });-->
+<!--            // form.on('submit(search)', function (data) {-->
+<!--            //     // console.log(data.field);-->
+<!--            //     // let where = data.field.where;-->
+<!--            //     // let timeType = data.field.Type;-->
+<!--            //     let provinceSize = $('#selectProvince').find('option:selected').length;-->
+<!--            //     let cbSize = $("#cb").find('input:checked').length;-->
+<!--            //     console.log(cbSize);-->
+<!--            //     // console.log(provinceSize)-->
+<!--            //     if (provinceSize < 1) {-->
+<!--            //         alert('请选择省市')-->
+<!--            //         return false;-->
+<!--            //     }-->
+
+<!--            //     if (cbSize < 1) {-->
+<!--            //         alert('请选择类型')-->
+<!--            //         return false;-->
+<!--            //     }-->
+
+<!--            //     var ps = new Array();-->
+<!--            //     $('#selectProvince').find('option:selected').each(function (i, t) {-->
+<!--            //         ps.push($(t).val());-->
+<!--            //     });-->
+<!--            //     var cs = new Array();-->
+<!--            //     $('#selectCity').find('option:selected').each(function (i, t) {-->
+<!--            //         cs.push($(t).val());-->
+<!--            //     });-->
+<!--            //     let provinces = ps.join(',');-->
+<!--            //     let citys = cs.join(',');-->
+
+<!--            //     $.ajax({-->
+<!--            //         type: "GET",-->
+<!--            //         // url: './json/' + where + '.json',-->
+<!--            //         url: './typeExport',-->
+<!--            //         data: {-->
+<!--            //             "range": $('#startDate').val(),-->
+<!--            //             "stype": stype,-->
+<!--            //             "ttype": $('#timeTpye').val(),-->
+<!--            //             "provinces": provinces,-->
+<!--            //             "citys": citys-->
+
+<!--            //         },-->
+<!--            //         success: function (data) {-->
+<!--            //             let o = data instanceof Object-->
+<!--            //             if (!o) {-->
+<!--            //                 data = JSON.parse(data)-->
+<!--            //             }-->
+<!--            //             option.data = data.dt;-->
+<!--            //             option.series[0].data = date.num;-->
+<!--            //             myChart.setOption(option);-->
+
+<!--            //         }-->
+<!--            //     });-->
+<!--            //     // searchGrp()-->
+<!--            //     // layer.msg(JSON.stringify(data));-->
+<!--            //     return false;-->
+<!--            // });-->
+
+
+<!--            form.on('submit(export)', function () {-->
+<!--                let guishu = $('#guishudi').find('input:checked').val()-->
+<!--                typeExport(guishu)-->
+
+<!--            });-->
+<!--            form.on('submit(exportAll)', function () {-->
+<!--                // let stype=$('#cb').find('input:checked').val()-->
+<!--                typeExportAll()-->
+<!--            });-->
+<!--            form.on('submit(exportClose)', function () {-->
+<!--                // let stype=$('#cb').find('input:checked').val()-->
+<!--                typeExportClose()-->
+<!--            });-->
+
+<!--        });-->
+<!--    </script>-->
+<!--<script>-->
+<!--        $(function () {-->
+
+<!--            radioChange();-->
+<!--            changeProvince($('#guishudi').find('input:checked').val(), $('#selectProvince').find('option')[0].text);-->
+<!--            initGrp()-->
+<!--        })-->
+<!--    </script>-->
+
+<!--</body>-->
+
+<!--</html>-->