修复单次解日志导出错误的问题

This commit is contained in:
fengyarnom 2024-11-06 16:20:43 +08:00
parent bcc821ac60
commit c8d1e125da
2 changed files with 8 additions and 1 deletions

View File

@ -12,6 +12,8 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.time.Duration; import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -80,6 +82,11 @@ public class GnssSingleDataController extends BasicController implements CommonE
return this.pageList(session, page, limit, searchParams); return this.pageList(session, page, limit, searchParams);
} }
@RequestMapping("/gnss/data/single/export")
@ResponseBody
public void exportData(HttpSession session, HttpServletRequest request, HttpServletResponse response) throws Exception {
this.export(session, request, response);
}
@Override @Override
public Class<GnssSingleData> getEntityClass() { public Class<GnssSingleData> getEntityClass() {

View File

@ -149,7 +149,7 @@
// 监听导出操作 // 监听导出操作
form.on('submit(data-export-btn)', function (data) { form.on('submit(data-export-btn)', function (data) {
var result = $('#searchFrm').serialize(); var result = $('#searchFrm').serialize();
var u = "/gnss/data/calc/export?" + result; var u = "/gnss/data/single/export?" + result;
window.open(u, "_blank"); window.open(u, "_blank");
return false; return false;
}); });