Commit db949bd4 authored by liuzeheng's avatar liuzeheng

订单导出

parent 72a429ff
......@@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.vo.order.*;
import cn.iocoder.yudao.module.system.api.file.FileMakeApi;
import cn.iocoder.yudao.module.system.api.file.dto.FileMakeReqDTO;
......@@ -45,7 +46,7 @@ public class OrderExportController {
@GetMapping("/search")
@ApiOperation(value = "参数搜索导出订单管理 Excel", notes = "参数搜索和指定订单导出管理")
@OperateLog(type = EXPORT)
public CommonResult<Boolean> exportOrderExcel(OrderQueryVO query) {
public CommonResult<Boolean> exportOrderExcel(OrderQueryDTO query) {
FileMakeReqDTO reqDTO = new FileMakeReqDTO();
reqDTO.setType(DownloadTypeEnum.ORDER_SEARCH_EXCEL_EXPORT.getType());
reqDTO.setName("订单导出Excel");
......@@ -62,7 +63,7 @@ public class OrderExportController {
@ApiOperation(value = "参数搜索导出我的订单管理 Excel", notes = "参数搜索和指定我的订单导出管理")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportMyOrderExcel(OrderQueryVO query) {
public CommonResult<Boolean> exportMyOrderExcel(OrderQueryDTO query) {
Long salesmanId = SecurityFrameworkUtils.getLoginUserId(); // 获取当前登录用户ID
query.setUserType(UserTypeEnum.ADMIN.getValue());
// query.setSalesmanId(salesmanId);
......@@ -84,7 +85,7 @@ public class OrderExportController {
@ApiOperation(value = "参数搜索导出部门订单管理 Excel", notes = "参数搜索和指定部门订单导出管理")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportDeptOrderExcel(OrderQueryVO query) {
public CommonResult<Boolean> exportDeptOrderExcel(OrderQueryDTO query) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); // 获取当前登录用户ID
query.setUserType(UserTypeEnum.ADMIN.getValue());
query.setDeptId(Objects.isNull(loginUser) || Objects.isNull(loginUser.getDeptId()) ? 0L : loginUser.getDeptId());
......@@ -105,7 +106,7 @@ public class OrderExportController {
@ApiOperation("参数搜索导出控货订单列表")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportCargoControlOrderExcel(OrderQueryVO query) {
public CommonResult<Boolean> exportCargoControlOrderExcel(OrderQueryDTO query) {
FileMakeReqDTO reqDTO = new FileMakeReqDTO();
reqDTO.setType(DownloadTypeEnum.CARGO_CONTROL_ORDER_SEARCH_EXCEL_EXPORT.getType());
reqDTO.setName("控货订单导出Excel");
......@@ -122,7 +123,7 @@ public class OrderExportController {
@ApiOperation("导出异常单统计 Excel")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportOrderExceptionExcel(OrderQueryVO query) {
public CommonResult<Boolean> exportOrderExceptionExcel(OrderQueryDTO query) {
FileMakeReqDTO reqDTO = new FileMakeReqDTO();
reqDTO.setType(DownloadTypeEnum.EXCEPTION_ORDER_STATISTICS_SEARCH_EXCEL_EXPORT.getType());
reqDTO.setName("异常订单统计导出Excel");
......@@ -139,7 +140,7 @@ public class OrderExportController {
@ApiOperation("导出重货单统计 Excel")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportHeavyOrder(OrderQueryVO query) {
public CommonResult<Boolean> exportHeavyOrder(OrderQueryDTO query) {
FileMakeReqDTO reqDTO = new FileMakeReqDTO();
reqDTO.setType(DownloadTypeEnum.HEAVY_ORDER_SEARCH_EXCEL_EXPORT.getType());
reqDTO.setName("重货订单导出Excel");
......@@ -157,7 +158,7 @@ public class OrderExportController {
@ApiOperation("导出退仓单统计 Excel")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportReturnOrder(OrderQueryVO query) {
public CommonResult<Boolean> exportReturnOrder(OrderQueryDTO query) {
FileMakeReqDTO reqDTO = new FileMakeReqDTO();
reqDTO.setType(DownloadTypeEnum.RETURN_ORDER_SEARCH_EXCEL_EXPORT.getType());
reqDTO.setName("退仓订单导出Excel");
......@@ -174,7 +175,7 @@ public class OrderExportController {
@ApiOperation("导出售后赔偿金额统计 Excel")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportSaleRepay(OrderQueryVO query, HttpServletResponse response) throws IOException {
public CommonResult<Boolean> exportSaleRepay(OrderQueryDTO query, HttpServletResponse response) throws IOException {
// List<OrderSaleRepayExcelVo> list = orderQueryService.getSaleRepayExcelList(query);
// String sheetName = I18nMessage.getLang() == 0 ? "售后赔偿金额统计" : "sale repay statistics";
// ExcelUtils.write(response, "售后赔偿金额统计.xls", sheetName, OrderSaleRepayExcelVo.class, list);
......@@ -194,7 +195,7 @@ public class OrderExportController {
@ApiOperation("导出报关数统计 Excel")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportCustomsDatas(OrderQueryVO query, HttpServletResponse response) throws IOException {
public CommonResult<Boolean> exportCustomsDatas(OrderQueryDTO query, HttpServletResponse response) throws IOException {
// List<OrderCustomsDatasExcelVo> list = orderQueryService.getCustomsDatasExcelList(query);
// String sheetName = I18nMessage.getLang() == 0 ? "报关数据统计" : "customs data statistics";
// ExcelUtils.write(response, "报关数据统计.xls", sheetName, OrderCustomsDatasExcelVo.class, list);
......@@ -214,7 +215,7 @@ public class OrderExportController {
@ApiOperation("导出客户出货量统计 Excel")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportShippingDatas(OrderQueryVO query, HttpServletResponse response) throws IOException {
public CommonResult<Boolean> exportShippingDatas(OrderQueryDTO query, HttpServletResponse response) throws IOException {
// List<OrderShipDataExcelVo> list = orderQueryService.getShipDatasExcelList(query);
// String sheetName = I18nMessage.getLang() == 0 ? "客户出货量统计" : "shipping data statistics";
// ExcelUtils.write(response, "客户出货量统计.xls", sheetName, OrderShipDataExcelVo.class, list);
......@@ -234,7 +235,7 @@ public class OrderExportController {
@ApiOperation("导出预付运费统计 Excel")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportShipFee(OrderQueryVO query, HttpServletResponse response) throws IOException {
public CommonResult<Boolean> exportShipFee(OrderQueryDTO query, HttpServletResponse response) throws IOException {
// List<OrderShipFeeExcelVo> list = orderQueryService.getShipFeeExcelList(query);
// String sheetName = I18nMessage.getLang() == 0 ? "预付运费统计" : "ship fee statistics";
// ExcelUtils.write(response, "预付运费统计.xls", sheetName, OrderShipFeeExcelVo.class, list);
......@@ -253,9 +254,9 @@ public class OrderExportController {
@GetMapping("/can-shipment/search")
@ApiOperation(value = "参数搜索导出待备货(可出-备货中)订单管理 Excel", notes = "参数搜索和指定待备货订单导出管理")
@OperateLog(type = EXPORT)
public CommonResult<Boolean> canShipmentOrderExcel(OrderQueryVO query, HttpServletResponse response) throws IOException {
public CommonResult<Boolean> canShipmentOrderExcel(OrderQueryDTO query, HttpServletResponse response) throws IOException {
if (Objects.isNull(query)){
query = new OrderQueryVO();
query = new OrderQueryDTO();
}
query.setUserType(UserTypeEnum.ADMIN.getValue());
query.setAirShipment(12); // 可出、备货中
......@@ -275,9 +276,9 @@ public class OrderExportController {
@GetMapping("/ready-stock/search")
@ApiOperation(value = "参数搜索导出备货订单管理 Excel", notes = "参数搜索和指定备货订单导出管理")
@OperateLog(type = EXPORT)
public CommonResult<Boolean> readyStockOrderExcel(OrderQueryVO query, HttpServletResponse response) throws IOException {
public CommonResult<Boolean> readyStockOrderExcel(OrderQueryDTO query, HttpServletResponse response) throws IOException {
if (Objects.isNull(query)){
query = new OrderQueryVO();
query = new OrderQueryDTO();
}
query.setUserType(UserTypeEnum.ADMIN.getValue());
query.setAirShipment(10); // 可出-备货中-已备货
......@@ -297,9 +298,9 @@ public class OrderExportController {
@GetMapping("/waiting-shipment/search")
@ApiOperation(value = "参数搜索导出待出订单管理 Excel", notes = "参数搜索和指定待出订单导出管理")
@OperateLog(type = EXPORT)
public CommonResult<Boolean> waitingShipmentOrderExcel(OrderQueryVO query, HttpServletResponse response) throws IOException {
public CommonResult<Boolean> waitingShipmentOrderExcel(OrderQueryDTO query, HttpServletResponse response) throws IOException {
if (Objects.isNull(query)){
query = new OrderQueryVO();
query = new OrderQueryDTO();
}
query.setUserType(UserTypeEnum.ADMIN.getValue());
query.setAirShipment(1); // 待出
......@@ -321,7 +322,7 @@ public class OrderExportController {
@ApiOperation("导出自编号订单汇总列表 Excel")
@OperateLog(type = EXPORT)
@Idempotent(timeout = 5)
public CommonResult<Boolean> exportOrderSummary(OrderQueryVO query, HttpServletResponse response) throws IOException {
public CommonResult<Boolean> exportOrderSummary(OrderQueryDTO query, HttpServletResponse response) throws IOException {
if (StringUtils.isBlank(query.getContainerNumber())){
throw exception(CONTAINER_NUMBER_NOT_NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment