|
@@ -4,13 +4,11 @@ import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.sckw.core.exception.SystemException;
|
|
import com.sckw.core.exception.SystemException;
|
|
|
import com.sckw.core.model.constant.Global;
|
|
import com.sckw.core.model.constant.Global;
|
|
|
-import com.sckw.core.model.enums.SystemTypeEnum;
|
|
|
|
|
import com.sckw.core.model.page.PageHelperUtil;
|
|
import com.sckw.core.model.page.PageHelperUtil;
|
|
|
import com.sckw.core.model.page.PageResult;
|
|
import com.sckw.core.model.page.PageResult;
|
|
|
import com.sckw.core.utils.StringUtils;
|
|
import com.sckw.core.utils.StringUtils;
|
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
import com.sckw.core.web.response.HttpResult;
|
|
|
-import com.sckw.excel.easyexcel.RequestHolder;
|
|
|
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
|
import com.sckw.fleet.model.dto.*;
|
|
import com.sckw.fleet.model.dto.*;
|
|
|
import com.sckw.fleet.model.vo.*;
|
|
import com.sckw.fleet.model.vo.*;
|
|
@@ -18,6 +16,7 @@ import com.sckw.fleet.service.KwfDriverService;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.Valid;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.http.MediaType;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -125,13 +124,12 @@ public class KwfDriverController {
|
|
|
* @author zk
|
|
* @author zk
|
|
|
* @date 2023/07/11
|
|
* @date 2023/07/11
|
|
|
**/
|
|
**/
|
|
|
- @PostMapping("/export")
|
|
|
|
|
- public void export(@RequestBody Map<String, Object> params) {
|
|
|
|
|
|
|
+ @PostMapping(value = "/export", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
+ public void export(@RequestBody Map<String, Object> params, HttpServletResponse response) {
|
|
|
/**分页数据**/
|
|
/**分页数据**/
|
|
|
List<KwfDriverVo> drivers = driverService.findPage(params);
|
|
List<KwfDriverVo> drivers = driverService.findPage(params);
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(drivers)) {
|
|
if (!CollectionUtils.isEmpty(drivers)) {
|
|
|
- HttpServletResponse response = RequestHolder.getResponse();
|
|
|
|
|
ExcelUtil.downData(response, KwfDriverVo.class, drivers);
|
|
ExcelUtil.downData(response, KwfDriverVo.class, drivers);
|
|
|
//return null;
|
|
//return null;
|
|
|
}
|
|
}
|