|
|
@@ -133,38 +133,87 @@ public class AnalysisController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @RequestMapping(value = "/week/data/count_1/export", method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value = "/week/data/count_1/export_1", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public void weekDataCount_1_Export(Model model,String weekDate) {
|
|
|
+ public void weekDataCount_1_1_Export(Model model,String weekDate) {
|
|
|
ServletOutputStream os = null;
|
|
|
try {
|
|
|
- String name="小塾学伴新增数据_"+weekDate;
|
|
|
+ String name="新签机构1周内账号开通数(校长&教师)_"+weekDate;
|
|
|
os = response.getOutputStream();response.reset();
|
|
|
String fileName = new String(name.getBytes("gb2312"), "ISO8859-1") +".xlsx";
|
|
|
response.setHeader("Content-disposition", "attachment; filename="+ fileName); //设定输出文件头
|
|
|
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
|
|
response.setCharacterEncoding("utf-8");
|
|
|
|
|
|
- List<Map<String,Object>> list= new ArrayList<Map<String,Object>>();
|
|
|
- Map<String,Object> map=new HashMap<String, Object>();
|
|
|
-
|
|
|
String[] weeks=getWeekDays(weekDate);
|
|
|
- String[] weekNexts=getNextWeekDays(weekDate);
|
|
|
|
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
|
params.put("date", weeks[0]);
|
|
|
params.put("date2", weeks[1]);
|
|
|
- map.put("column_0", analysisWeekService.countLibJoinCountCommonByCountDate(params).get("count_0"));
|
|
|
+ List<Map<String, Object>> list=analysisWeekService.countLibJoinCountCommonByCountDateExport(params);
|
|
|
|
|
|
- params = new HashMap<String, Object>();
|
|
|
+ List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
|
|
|
+ myColumns3.add(new ExcelColumn("机构名称", "league_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("机构code", "league_code", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("机构地址", "league_address", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("机构电话", "leadue_phone", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("机构城市", "league_city", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("创建时间", "create_time", 20));
|
|
|
+
|
|
|
+ CustomizeToExcel.downFile(myColumns3, list, os);
|
|
|
+ }catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }catch (Exception e1){
|
|
|
+ e1.printStackTrace();
|
|
|
+ }finally{
|
|
|
+ if(os != null){
|
|
|
+ try {
|
|
|
+ os.flush();
|
|
|
+ os.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping(value = "/week/data/count_1/export_2", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public void weekDataCount_1_2_Export(Model model,String weekDate) {
|
|
|
+ ServletOutputStream os = null;
|
|
|
+ try {
|
|
|
+ String name="新签机构2周内学生账号激活_"+weekDate;
|
|
|
+ os = response.getOutputStream();response.reset();
|
|
|
+ String fileName = new String(name.getBytes("gb2312"), "ISO8859-1") +".xlsx";
|
|
|
+ response.setHeader("Content-disposition", "attachment; filename="+ fileName); //设定输出文件头
|
|
|
+ response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
|
|
+ response.setCharacterEncoding("utf-8");
|
|
|
+
|
|
|
+ String[] weeks=getWeekDays(weekDate);
|
|
|
+ String[] weekNexts=getNextWeekDays(weekDate);
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
params.put("date", weekNexts[0]);
|
|
|
params.put("date2", weeks[1]);
|
|
|
- map.put("column_1",analysisWeekService.countVipActivateCountCommonByCountDate(params).get("count_0"));
|
|
|
+ List<Map<String, Object>> list=analysisWeekService.countVipActivateCountCommonByCountDateExport(params);
|
|
|
|
|
|
List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
|
|
|
- myColumns3.add(new ExcelColumn("新签机构1周内账号开通数(校长&教师)", "column_0", 20));
|
|
|
- myColumns3.add(new ExcelColumn("新签机构2周内学生账号激活", "column_1", 20));
|
|
|
- list.add(map);
|
|
|
+ myColumns3.add(new ExcelColumn("所属机构", "league_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("学生姓名", "child_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("家长姓名", "parent_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("联系电话", "phone", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("就读学校", "school", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("学校地区", "area_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("生日日期", "birthday", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("年级", "grade", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("家庭地址", "family", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("设备号", "derver", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("科目", "course_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("激活时间", "activate_time", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("创建时间", "create_time", 20));
|
|
|
+
|
|
|
CustomizeToExcel.downFile(myColumns3, list, os);
|
|
|
}catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -183,7 +232,6 @@ public class AnalysisController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@RequestMapping(value = "/week/data/count_2")
|
|
|
@ResponseBody
|
|
|
public ResponseEntity weekCount_2(String weekDate) {
|