|
@@ -1,20 +1,17 @@
|
|
|
package com.dgtly.order.controller;
|
|
package com.dgtly.order.controller;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.dgtly.common.core.domain.AjaxResult;
|
|
|
import com.dgtly.common.exception.base.BaseException;
|
|
import com.dgtly.common.exception.base.BaseException;
|
|
|
-import com.dgtly.common.utils.MapDataUtil;
|
|
|
|
|
|
|
+import com.dgtly.common.utils.poi.ExcelUtil;
|
|
|
import com.dgtly.order.domain.MetaHanaSalesOrder;
|
|
import com.dgtly.order.domain.MetaHanaSalesOrder;
|
|
|
import com.dgtly.order.domain.OrderDetailModel;
|
|
import com.dgtly.order.domain.OrderDetailModel;
|
|
|
import com.dgtly.order.service.IMetaHanaSalesOrderService;
|
|
import com.dgtly.order.service.IMetaHanaSalesOrderService;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.http.HttpEntity;
|
|
|
|
|
-import org.springframework.http.HttpHeaders;
|
|
|
|
|
-import org.springframework.http.MediaType;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
|
-import org.springframework.util.MultiValueMap;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -23,9 +20,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import com.dgtly.common.core.controller.BaseController;
|
|
import com.dgtly.common.core.controller.BaseController;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 订单基础 订单的基础信息Controller
|
|
* 订单基础 订单的基础信息Controller
|
|
@@ -92,6 +87,19 @@ public class OrderBaseController extends BaseController {
|
|
|
|
|
|
|
|
return prefix + "/edit";
|
|
return prefix + "/edit";
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @RequiresPermissions("order:orderbase:export")
|
|
|
|
|
+ @PostMapping("/export")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public AjaxResult export(MetaHanaSalesOrder order)
|
|
|
|
|
+ {
|
|
|
|
|
+ List<MetaHanaSalesOrder> list = metaHanaSalesOrderService.selectDistinctMetaHanaSalesOrder(order);
|
|
|
|
|
+ if(list.size() >= 10000){
|
|
|
|
|
+ return new AjaxResult(301,"数据大于 10000 条Excel将无法打开,请过滤查询条件");
|
|
|
|
|
+ }
|
|
|
|
|
+ ExcelUtil<MetaHanaSalesOrder> util = new ExcelUtil<MetaHanaSalesOrder>(MetaHanaSalesOrder.class);
|
|
|
|
|
+ return util.exportExcel(list, "订单数据");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|