|
@@ -22,7 +22,6 @@ import org.springframework.http.MediaType;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
-import javax.servlet.ServletOutputStream;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.awt.image.BufferedImage;
|
|
@@ -120,10 +119,10 @@ public class ImageManagerController {
|
|
|
}
|
|
|
// 读取记录数
|
|
|
int total = 0;
|
|
|
- if(catalog != null && !catalog.trim().isEmpty()){
|
|
|
- total= imageService.getTotal(startDate, endDate,catalog);
|
|
|
- }else{
|
|
|
- total= imageService.getTotal(startDate, endDate);
|
|
|
+ if (catalog != null && !catalog.trim().isEmpty()) {
|
|
|
+ total = imageService.getTotal(startDate, endDate, catalog);
|
|
|
+ } else {
|
|
|
+ total = imageService.getTotal(startDate, endDate);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -143,9 +142,9 @@ public class ImageManagerController {
|
|
|
* @Time : 19:09
|
|
|
*/
|
|
|
@RequestMapping(value = "/getPreviousImage", method = RequestMethod.GET)
|
|
|
- public Result getPreviousImage(@RequestParam(value = "imageId", required = true) int imageId) {
|
|
|
+ public Result getPreviousImage(@RequestParam(value = "imageId", required = true) int imageId, @RequestParam(value = "catalog", required = false) String catalog) {
|
|
|
//
|
|
|
- ImagePathEntity imagePathEntity = imageService.getOneImage("previous", imageId);
|
|
|
+ ImagePathEntity imagePathEntity = imageService.getOneImage("previous", imageId,catalog);
|
|
|
if (imagePathEntity == null) {
|
|
|
return new Result(10001, "未查询到任何记录.", false);
|
|
|
} else {
|
|
@@ -163,9 +162,9 @@ public class ImageManagerController {
|
|
|
* @Time : 19:09
|
|
|
*/
|
|
|
@RequestMapping(value = "/getNextImage", method = RequestMethod.GET)
|
|
|
- public Result getNextImage(@RequestParam(value = "imageId", required = true) int imageId) {
|
|
|
+ public Result getNextImage(@RequestParam(value = "imageId", required = true) int imageId, @RequestParam(value = "catalog", required = false) String catalog) {
|
|
|
//
|
|
|
- ImagePathEntity imagePathEntity = imageService.getOneImage("next", imageId);
|
|
|
+ ImagePathEntity imagePathEntity = imageService.getOneImage("next", imageId, catalog);
|
|
|
if (imagePathEntity == null) {
|
|
|
return new Result(10001, "未查询到任何记录.", false);
|
|
|
} else {
|
|
@@ -337,7 +336,7 @@ public class ImageManagerController {
|
|
|
List<ImagePathEntity> imageList = new ArrayList<>();
|
|
|
if (catalog != null && !catalog.trim().isEmpty()) {
|
|
|
// 读取图片文件
|
|
|
- imageList = imageService.getExportImageList(startDate, endDate, imageIds,catalog);
|
|
|
+ imageList = imageService.getExportImageList(startDate, endDate, imageIds, catalog);
|
|
|
} else {
|
|
|
// 读取图片文件
|
|
|
imageList = imageService.getExportImageList(startDate, endDate, imageIds);
|
|
@@ -367,7 +366,7 @@ public class ImageManagerController {
|
|
|
if (catalog != null && !catalog.trim().isEmpty()) {
|
|
|
name = camera;
|
|
|
}
|
|
|
- String fileName = name +"_"+ dateUtil.formatLongTimeForTime(new Date().getTime());
|
|
|
+ String fileName = name + "_" + dateUtil.formatLongTimeForTime(new Date().getTime());
|
|
|
String zipFileName = fileName + ".zip";
|
|
|
File zipFile = null;
|
|
|
String path = rootPath + "temp_download";
|
|
@@ -571,7 +570,6 @@ public class ImageManagerController {
|
|
|
if (imagePathEntity == null) {
|
|
|
log.error("imagePathEntity[" + imagePathEntity.toString() + "]==null");
|
|
|
}
|
|
|
-
|
|
|
// 拼接完整图片路径。这里填写图片链接
|
|
|
// String urlPath = "";
|
|
|
// 获取图片文件后缀名
|