Ver Código Fonte

添加注释,增加轨迹文件等

wangchao 4 anos atrás
pai
commit
74f666ab34
19 arquivos alterados com 371 adições e 44 exclusões
  1. 7 11
      ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/CallRescuerController.java
  2. 3 1
      ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/DeviceManageController.java
  3. 3 1
      ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/EquipmentManageController.java
  4. 12 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/ExportToExcelController.java
  5. 3 15
      ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/MapTagManageController.java
  6. 39 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/TrackAnalysisController.java
  7. 40 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/TrackController.java
  8. 3 7
      ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/UserManageController.java
  9. 46 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/impl/TrackAnalysisDaoImpl.java
  10. 46 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/impl/TrackDaoImpl.java
  11. 12 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/interfaces/TrackAnalysisDao.java
  12. 12 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/interfaces/TrackDao.java
  13. 63 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/service/impl/ExportToExcelServiceImpl.java
  14. 26 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/service/impl/TrackAnalysisServiceImpl.java
  15. 27 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/service/impl/TrackServiceImpl.java
  16. 2 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/service/interfaces/ExportService.java
  17. 12 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/service/interfaces/TrackAnalysisService.java
  18. 12 0
      ebc-sea-platform/src/main/java/com/ai/ipu/server/service/interfaces/TrackService.java
  19. 3 9
      ebc-sea-platform/src/main/java/com/ai/ipu/server/util/ExcelFormatUtil.java

+ 7 - 11
ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/CallRescuerController.java

@ -1,27 +1,23 @@
1 1
package com.ai.ipu.server.controller;
2 2
3
4
import com.ai.ipu.basic.util.IpuUtility;
5 3
import com.ai.ipu.data.JMap;
6 4
import com.ai.ipu.data.impl.JsonMap;
7 5
import com.ai.ipu.server.service.interfaces.ExportService;
8 6
import com.ai.ipu.server.service.interfaces.CallRescuerService;
9
import com.ai.ipu.server.util.RestScaffoldConstant;
10 7
import com.github.pagehelper.PageInfo;
11 8
import org.slf4j.Logger;
12 9
import org.slf4j.LoggerFactory;
13 10
import org.springframework.beans.factory.annotation.Autowired;
14
import org.springframework.beans.factory.annotation.Qualifier;
15
import org.springframework.http.ResponseEntity;
16 11
import org.springframework.stereotype.Controller;
17 12
import org.springframework.web.bind.annotation.RequestMapping;
18 13
import org.springframework.web.bind.annotation.ResponseBody;
19 14
20
import javax.servlet.http.HttpServletRequest;
21
import javax.servlet.http.HttpServletResponse;
22 15
16
/**
17
 * 报警救援
18
 */
23 19
@Controller
24
@RequestMapping("/terminal")
20
@RequestMapping("/callRescuer")
25 21
public class CallRescuerController {
26 22
27 23
    @Autowired
@ -33,7 +29,7 @@ public class CallRescuerController {
33 29
34 30
    Logger logger = LoggerFactory.getLogger(CallRescuerController.class);
35 31
    /**
36
     * 查询终端信息
32
     * 查询历史报警
37 33
     */
38 34
    @ResponseBody
39 35
    @RequestMapping("/queryCallRescuerInfo")
@ -47,7 +43,7 @@ public class CallRescuerController {
47 43
48 44
49 45
    /**
50
     * 编辑地图标记
46
     * 编辑历史报警
51 47
     */
52 48
    @ResponseBody
53 49
    @RequestMapping("/modifyCallRescuerInfo")
@ -74,7 +70,7 @@ public class CallRescuerController {
74 70
    }
75 71
76 72
    /**
77
     * 刪除地图标记
73
     * 刪除历史报警
78 74
     */
79 75
    @ResponseBody
80 76
    @RequestMapping("/deleteCallRescuerXyInfo")

+ 3 - 1
ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/DeviceManageController.java

@ -2,7 +2,6 @@ package com.ai.ipu.server.controller;
2 2
3 3
import com.ai.ipu.data.JMap;
4 4
import com.ai.ipu.data.impl.JsonMap;
5
import com.ai.ipu.server.service.interfaces.ExportService;
6 5
import com.ai.ipu.server.service.interfaces.DeviceManageService;
7 6
import com.github.pagehelper.PageInfo;
8 7
import org.slf4j.Logger;
@ -12,6 +11,9 @@ import org.springframework.stereotype.Controller;
12 11
import org.springframework.web.bind.annotation.RequestMapping;
13 12
import org.springframework.web.bind.annotation.ResponseBody;
14 13
14
/**
15
 * 终端管理
16
 */
15 17
@Controller
16 18
@RequestMapping("/device")
17 19
public class DeviceManageController {

+ 3 - 1
ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/EquipmentManageController.java

@ -12,7 +12,9 @@ import org.springframework.stereotype.Controller;
12 12
import org.springframework.web.bind.annotation.RequestMapping;
13 13
import org.springframework.web.bind.annotation.ResponseBody;
14 14
15
15
/**
16
 * 设备管理
17
 */
16 18
@Controller
17 19
@RequestMapping("/equipment")
18 20
public class EquipmentManageController {

+ 12 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/ExportToExcelController.java

@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
11 11
import javax.servlet.http.HttpServletRequest;
12 12
import javax.servlet.http.HttpServletResponse;
13 13
14
/**
15
 * 导出信息到excel
16
 */
14 17
@RequestMapping("/ExportToExcel")
15 18
@Controller
16 19
public class ExportToExcelController {
@ -67,4 +70,13 @@ public class ExportToExcelController {
67 70
        return exportService.exportMapTagInfoToExcel(request,response,params);
68 71
    }
69 72
73
    /**
74
     * 导出轨迹分析信息到excel
75
     */
76
    @ResponseBody
77
    @RequestMapping("/exportTrackAnalysisInfoToExcel")
78
    public ResponseEntity<byte[]> exportTrackAnalysisInfoToExcel(JMap params, HttpServletRequest request, HttpServletResponse response) throws Exception {
79
80
        return exportService.exportTrackAnalysisInfoToExcel(request,response,params);
81
    }
70 82
}

+ 3 - 15
ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/MapTagManageController.java

@ -1,33 +1,21 @@
1 1
package com.ai.ipu.server.controller;
2 2
3
4
import com.ai.ipu.basic.util.IpuUtility;
5 3
import com.ai.ipu.data.JMap;
6 4
import com.ai.ipu.data.impl.JsonMap;
7
import com.ai.ipu.server.model.MapTag;
8 5
import com.ai.ipu.server.service.interfaces.ExportService;
9 6
import com.ai.ipu.server.service.interfaces.MapTagManageService;
10
import com.ai.ipu.server.util.RestScaffoldConstant;
11 7
import com.github.pagehelper.PageInfo;
12 8
import org.slf4j.Logger;
13 9
import org.slf4j.LoggerFactory;
14 10
import org.springframework.beans.factory.annotation.Autowired;
15
import org.springframework.beans.factory.annotation.Qualifier;
16
import org.springframework.http.MediaType;
17
import org.springframework.http.ResponseEntity;
18 11
import org.springframework.stereotype.Controller;
19
import org.springframework.web.bind.annotation.RequestBody;
20 12
import org.springframework.web.bind.annotation.RequestMapping;
21
import org.springframework.web.bind.annotation.RequestParam;
22 13
import org.springframework.web.bind.annotation.ResponseBody;
23
import sun.java2d.pipe.SpanClipRenderer;
24
25
import javax.servlet.http.HttpServletRequest;
26
import javax.servlet.http.HttpServletResponse;
27
import java.util.Date;
28
import java.util.List;
29 14
import java.util.Map;
30 15
16
/**
17
 * 地图标记
18
 */
31 19
@Controller
32 20
@RequestMapping("/mapTag")
33 21
public class MapTagManageController {

+ 39 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/TrackAnalysisController.java

@ -0,0 +1,39 @@
1
package com.ai.ipu.server.controller;
2
3
4
import com.ai.ipu.data.JMap;
5
import com.ai.ipu.data.impl.JsonMap;
6
import com.ai.ipu.server.service.interfaces.TrackAnalysisService;
7
import com.github.pagehelper.PageInfo;
8
import org.slf4j.Logger;
9
import org.slf4j.LoggerFactory;
10
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.stereotype.Controller;
12
import org.springframework.web.bind.annotation.RequestMapping;
13
import org.springframework.web.bind.annotation.ResponseBody;
14
15
import java.util.Map;
16
/**
17
 * 轨迹分析
18
 */
19
@Controller
20
@RequestMapping("/trackAnalysis")
21
public class TrackAnalysisController {
22
    
23
    @Autowired
24
    TrackAnalysisService trackAnalysisService;
25
26
    Logger logger = LoggerFactory.getLogger(TrackAnalysisController.class);
27
    /**
28
     * 查询轨迹分析信息
29
     */
30
    @ResponseBody
31
    @RequestMapping("/queryTrackAnalysisInfo")
32
    public JMap queryTrackAnalysisInfo(JMap params) throws Exception {
33
34
        PageInfo trackAnalysisList=  trackAnalysisService.queryTrackAnalysisInfo(params);
35
        JMap result = new JsonMap();
36
        result.put("result", trackAnalysisList);
37
        return result;
38
    }
39
}

+ 40 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/TrackController.java

@ -0,0 +1,40 @@
1
package com.ai.ipu.server.controller;
2
3
4
import com.ai.ipu.data.JMap;
5
import com.ai.ipu.data.impl.JsonMap;
6
import com.ai.ipu.server.service.interfaces.TrackService;
7
import com.github.pagehelper.PageInfo;
8
import org.slf4j.Logger;
9
import org.slf4j.LoggerFactory;
10
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.stereotype.Controller;
12
import org.springframework.web.bind.annotation.RequestMapping;
13
import org.springframework.web.bind.annotation.ResponseBody;
14
15
/**
16
 * 历史轨迹
17
 */
18
@Controller
19
@RequestMapping("/track")
20
public class TrackController {
21
22
    @Autowired
23
    TrackService trackService;
24
25
    Logger logger = LoggerFactory.getLogger(TrackController.class);
26
    /**
27
     * 查询历史轨迹查询
28
     */
29
    @ResponseBody
30
    @RequestMapping("/queryTrackInfo")
31
    public JMap queryTrackInfo(JMap params) throws Exception {
32
33
        PageInfo trackList=  trackService.queryTrackInfo(params);
34
        JMap result = new JsonMap();
35
        result.put("result", trackList);
36
        return result;
37
    }
38
39
40
}

+ 3 - 7
ebc-sea-platform/src/main/java/com/ai/ipu/server/controller/UserManageController.java

@ -1,25 +1,21 @@
1 1
package com.ai.ipu.server.controller;
2 2
3
4
import com.ai.ipu.basic.util.IpuUtility;
5 3
import com.ai.ipu.data.JMap;
6 4
import com.ai.ipu.data.impl.JsonMap;
7 5
import com.ai.ipu.server.service.interfaces.ExportService;
8 6
import com.ai.ipu.server.service.interfaces.UserManageService;
9
import com.ai.ipu.server.util.RestScaffoldConstant;
10 7
import com.github.pagehelper.PageInfo;
11 8
import org.slf4j.Logger;
12 9
import org.slf4j.LoggerFactory;
13 10
import org.springframework.beans.factory.annotation.Autowired;
14
import org.springframework.beans.factory.annotation.Qualifier;
15
import org.springframework.http.ResponseEntity;
16 11
import org.springframework.stereotype.Controller;
17 12
import org.springframework.web.bind.annotation.RequestMapping;
18 13
import org.springframework.web.bind.annotation.ResponseBody;
19 14
20
import javax.servlet.http.HttpServletRequest;
21
import javax.servlet.http.HttpServletResponse;
22 15
16
/**
17
 * 用户信息
18
 */
23 19
@Controller
24 20
@RequestMapping("/user")
25 21
public class UserManageController {

+ 46 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/impl/TrackAnalysisDaoImpl.java

@ -0,0 +1,46 @@
1
package com.ai.ipu.server.dao.impl;
2
3
import com.ai.ipu.data.JList;
4
import com.ai.ipu.data.JMap;
5
import com.ai.ipu.data.impl.JsonList;
6
import com.ai.ipu.data.impl.JsonMap;
7
import com.ai.ipu.database.dao.IpuDaoManager;
8
import com.ai.ipu.server.dao.interfaces.TrackAnalysisDao;
9
import com.ai.ipu.sql.mgmt.ISqlMgmtDao;
10
import com.ai.ipu.sql.mgmt.SqlMgmtDaoFactory;
11
import com.alibaba.fastjson.JSON;
12
import com.alibaba.fastjson.JSONObject;
13
import com.github.pagehelper.PageHelper;
14
import com.github.pagehelper.PageInfo;
15
import org.springframework.stereotype.Component;
16
17
import java.util.HashMap;
18
import java.util.List;
19
import java.util.Map;
20
21
@Component
22
public class TrackAnalysisDaoImpl implements TrackAnalysisDao {
23
24
    private String connName = "ebc";
25
    private String JdbcConnName = "JDBC";
26
    private String tableName = "ebc_map_tag";
27
    private String tableNameXy = "ebc_map_tag_xy";
28
29
30
    @Override
31
    public PageInfo queryTrackAnalysisInfo(JMap params) throws Exception {
32
        JMap params1 = params.getJMap("params");
33
        PageHelper.startPage(params1.getInt("pageNum"),params1.getInt("pageSize"));
34
35
        ISqlMgmtDao dao = SqlMgmtDaoFactory.createFileSqlMgmtDao(connName);
36
        List<Map<String, Object>> trackAnalysisList= dao.executeSelect("ipu.TrackAnalysisDao", "queryTrackAnalysisInfo", params1);
37
38
      /*  CommonTableDao dao1 = IpuDaor.takeDao(CommonTableDao.class, connName);
39
        List<Map<String, Object>> trackAnalysisList1 = dao1.selectByCond(tableName, params1);*/
40
41
42
        PageInfo pageInfo = new PageInfo(trackAnalysisList);
43
        return pageInfo;
44
    }
45
46
}

+ 46 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/impl/TrackDaoImpl.java

@ -0,0 +1,46 @@
1
package com.ai.ipu.server.dao.impl;
2
3
import com.ai.ipu.data.JList;
4
import com.ai.ipu.data.JMap;
5
import com.ai.ipu.data.impl.JsonList;
6
import com.ai.ipu.data.impl.JsonMap;
7
import com.ai.ipu.database.dao.IpuDaoManager;
8
import com.ai.ipu.server.dao.interfaces.TrackDao;
9
import com.ai.ipu.sql.mgmt.ISqlMgmtDao;
10
import com.ai.ipu.sql.mgmt.SqlMgmtDaoFactory;
11
import com.alibaba.fastjson.JSON;
12
import com.alibaba.fastjson.JSONObject;
13
import com.github.pagehelper.PageHelper;
14
import com.github.pagehelper.PageInfo;
15
import org.springframework.stereotype.Component;
16
17
import java.util.HashMap;
18
import java.util.List;
19
import java.util.Map;
20
21
@Component
22
public class TrackDaoImpl implements TrackDao {
23
24
    private String connName = "ebc";
25
    private String JdbcConnName = "JDBC";
26
    private String tableName = "ebc_map_tag";
27
    private String tableNameXy = "ebc_map_tag_xy";
28
29
30
    @Override
31
    public PageInfo queryTrackInfo(JMap params) throws Exception {
32
        JMap params1 = params.getJMap("params");
33
        PageHelper.startPage(params1.getInt("pageNum"),params1.getInt("pageSize"));
34
35
        ISqlMgmtDao dao = SqlMgmtDaoFactory.createFileSqlMgmtDao(connName);
36
        List<Map<String, Object>> trackList= dao.executeSelect("ipu.TrackDao", "queryTrackInfo", params1);
37
38
      /*  CommonTableDao dao1 = IpuDaor.takeDao(CommonTableDao.class, connName);
39
        List<Map<String, Object>> trackList1 = dao1.selectByCond(tableName, params1);*/
40
41
42
        PageInfo pageInfo = new PageInfo(trackList);
43
        return pageInfo;
44
    }
45
46
}

+ 12 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/interfaces/TrackAnalysisDao.java

@ -0,0 +1,12 @@
1
package com.ai.ipu.server.dao.interfaces;
2
3
import com.ai.ipu.data.JMap;
4
import com.github.pagehelper.PageInfo;
5
6
import java.util.Map;
7
8
public interface TrackAnalysisDao {
9
10
    PageInfo queryTrackAnalysisInfo(JMap params) throws Exception;
11
12
}

+ 12 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/interfaces/TrackDao.java

@ -0,0 +1,12 @@
1
package com.ai.ipu.server.dao.interfaces;
2
3
import com.ai.ipu.data.JMap;
4
import com.github.pagehelper.PageInfo;
5
6
import java.util.Map;
7
8
public interface TrackDao {
9
10
    PageInfo queryTrackInfo(JMap params) throws Exception;
11
12
}

+ 63 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/service/impl/ExportToExcelServiceImpl.java

@ -98,8 +98,71 @@ public class ExportToExcelServiceImpl implements ExportService {
98 98
        return null;
99 99
    }
100 100
101
    /**
102
     * 导出轨迹分析信息到excel
103
     */
104
    @Override
105
    public ResponseEntity<byte[]> exportTrackAnalysisInfoToExcel(HttpServletRequest request, HttpServletResponse response,Object object) {
106
        try {
107
            logger.info(">>>>>>>>>>开始导出excel>>>>>>>>>>");
108
            JMap object1 = (JMap) object;
109
            JMap params1 = object1.getJMap("params");
110
111
            params1.put("pageNum",0 );
112
            params1.put("pageSize",0 );
113
            // 查询数据
114
            PageInfo pageInfo = mapTagManageService.queryMapTagInfo(object1);
115
            List<JMap> mapTagList = pageInfo.getList();
116
            //设置表格名字
117
            String strName="地图标记导出表.xls";
101 118
119
            logger.info(">>>>>>>>>>>>>>>>>>>>开始进入导出方法>>>>>>>>>>");
102 120
121
            SXSSFWorkbook wb = new SXSSFWorkbook(1000);// 保留1000条数据在内存中
122
            SXSSFSheet sheet = wb.createSheet();
123
            // 设置报表头样式
124
            CellStyle header = ExcelFormatUtil.headSytle(wb);// cell样式
125
            CellStyle content = ExcelFormatUtil.contentStyle(wb);// 报表体样式
126
127
            // 每一列字段名
128
            String[] strs = new String[] { "标记名称", "类型", "创建时间"};
129
130
            // 字段名所在表格的宽度
131
            int[] ints = new int[] { 5000, 5000, 5000, 5000, 5000, 5000 };
132
133
            // 设置表头样式
134
            ExcelFormatUtil.initTitleEX(sheet, header, strs, ints);
135
            logger.info(">>>>>>>>>>>>>>>>>>>>表头样式设置完成>>>>>>>>>>");
136
137
            if (mapTagList != null && mapTagList.size() > 0) {
138
                logger.info(">>>>>>>>>>>>>>>>>>>>开始遍历数据组装单元格内容>>>>>>>>>>");
139
140
                for (int i = 0; i < mapTagList.size(); i++) {
141
                    Map mapTagJMap = mapTagList.get(i);
142
                    SXSSFRow row = sheet.createRow(i + 1);
143
                    int j = 0;
144
145
                    SXSSFCell cell = row.createCell(j++);
146
                    cell.setCellValue(mapTagJMap.get("MAP_TAG_NAME").toString()); // 标记名称
147
                    cell.setCellStyle(content);
148
149
                    cell = row.createCell(j++);
150
                    cell.setCellValue(mapTagJMap.get("MAP_TAG_TYPE").toString()); // 类型
151
                    cell.setCellStyle(content);
152
153
                    cell = row.createCell(j++);
154
                    String createDate = mapTagJMap.get("CREATE_DATE").toString();
155
                    cell.setCellValue(createDate.substring(0,createDate.length()-2)); // 创建时间
156
                    cell.setCellStyle(content);
157
                }
158
                logger.info(">>>>>>>>>>>>>>>>>>>>结束遍历数据组装单元格内容>>>>>>>>>>");
159
            }
160
            return ExcelFormatUtil.downloadFiles( ExcelFormatUtil.exportFiles(wb), strName);
161
        } catch (Exception e) {
162
            logger.error(">>>>>>>>>>导出excel 异常,原因为:" + e.getMessage());
163
        }
164
        return null;
165
    }
103 166
104 167
105 168
}

+ 26 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/service/impl/TrackAnalysisServiceImpl.java

@ -0,0 +1,26 @@
1
package com.ai.ipu.server.service.impl;
2
3
import com.ai.ipu.data.JMap;
4
import com.ai.ipu.server.dao.interfaces.TrackAnalysisDao;
5
import com.ai.ipu.server.service.interfaces.TrackAnalysisService;
6
import com.github.pagehelper.PageInfo;
7
import org.slf4j.Logger;
8
import org.slf4j.LoggerFactory;
9
import org.springframework.beans.factory.annotation.Autowired;
10
import org.springframework.stereotype.Service;
11
12
import java.util.Map;
13
14
15
@Service
16
public class TrackAnalysisServiceImpl implements TrackAnalysisService {
17
    Logger logger = LoggerFactory.getLogger(TrackAnalysisServiceImpl.class);
18
19
    @Autowired
20
    TrackAnalysisDao trackAnalysisDao;
21
22
    @Override
23
    public PageInfo queryTrackAnalysisInfo(JMap params) throws Exception {
24
        return trackAnalysisDao.queryTrackAnalysisInfo(params);
25
    }
26
}

+ 27 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/service/impl/TrackServiceImpl.java

@ -0,0 +1,27 @@
1
package com.ai.ipu.server.service.impl;
2
3
import com.ai.ipu.data.JMap;
4
import com.ai.ipu.server.dao.interfaces.TrackDao;
5
import com.ai.ipu.server.service.interfaces.TrackService;
6
import com.github.pagehelper.PageInfo;
7
import org.slf4j.Logger;
8
import org.slf4j.LoggerFactory;
9
import org.springframework.beans.factory.annotation.Autowired;
10
import org.springframework.stereotype.Service;
11
12
import java.util.Map;
13
14
15
@Service
16
public class TrackServiceImpl implements TrackService {
17
    Logger logger = LoggerFactory.getLogger(TrackServiceImpl.class);
18
19
    @Autowired
20
    TrackDao trackDao;
21
22
    @Override
23
    public PageInfo queryTrackInfo(JMap params) throws Exception {
24
        return trackDao.queryTrackInfo(params);
25
    }
26
27
}

+ 2 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/service/interfaces/ExportService.java

@ -9,4 +9,6 @@ import javax.servlet.http.HttpServletResponse;
9 9
public interface ExportService {
10 10
11 11
    ResponseEntity<byte[]> exportMapTagInfoToExcel(HttpServletRequest request, HttpServletResponse response, Object object);
12
13
    ResponseEntity<byte[]> exportTrackAnalysisInfoToExcel(HttpServletRequest request, HttpServletResponse response, Object object);
12 14
}

+ 12 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/service/interfaces/TrackAnalysisService.java

@ -0,0 +1,12 @@
1
package com.ai.ipu.server.service.interfaces;
2
3
import com.ai.ipu.data.JMap;
4
import com.github.pagehelper.PageInfo;
5
6
import java.util.Map;
7
8
public interface TrackAnalysisService {
9
10
    PageInfo queryTrackAnalysisInfo(JMap params) throws Exception;
11
12
}

+ 12 - 0
ebc-sea-platform/src/main/java/com/ai/ipu/server/service/interfaces/TrackService.java

@ -0,0 +1,12 @@
1
package com.ai.ipu.server.service.interfaces;
2
3
import com.ai.ipu.data.JMap;
4
import com.github.pagehelper.PageInfo;
5
6
import java.util.Map;
7
8
public interface TrackService {
9
10
    PageInfo queryTrackInfo(JMap params) throws Exception;
11
12
}

+ 3 - 9
ebc-sea-platform/src/main/java/com/ai/ipu/server/util/ExcelFormatUtil.java

@ -1,5 +1,6 @@
1 1
package com.ai.ipu.server.util;
2 2
3
import com.ai.ipu.common.date.TimeUtil;
3 4
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
4 5
import org.apache.poi.hssf.usermodel.HSSFFont;
5 6
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@ -131,18 +132,11 @@ public class ExcelFormatUtil {
131 132
        logger.info(">>>>>>>>>>>>>>>>>>>>开始下载文件>>>>>>>>>>");
132 133
133 134
        HttpHeaders header = new HttpHeaders();
134
135
        Calendar cal = Calendar.getInstance();
136
        int year = cal.get(Calendar.YEAR);//获取年份
137
        int month=cal.get(Calendar.MONTH)+1;//获取月份
138
        int day=cal.get(Calendar.DATE);//获取日
139
        int hour=cal.get(Calendar.HOUR);//小时
140
        int minute=cal.get(Calendar.MINUTE);//分
141
        int second=cal.get(Calendar.SECOND);//秒
135
        String timeName= TimeUtil.getSysDate("yyyyMMddHHmmss");
142 136
        String filePrefix = name.substring(0,name.lastIndexOf('.') - 1);
143 137
        String fileSuffix = name.substring(name.lastIndexOf('.') + 1);
144 138
        fileSuffix = fileSuffix.toLowerCase();
145
        String fileName=filePrefix+year+month+day+hour+minute+second+"."+fileSuffix;
139
        String fileName=filePrefix+timeName+"."+fileSuffix;
146 140
        Map<String, String> arguments = new HashMap<String, String>();
147 141
        arguments.put("xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
148 142
        arguments.put("xls", "application/vnd.ms-excel");