|
@@ -1,10 +1,12 @@
|
|
|
package com.sckw.transport.controller;
|
|
package com.sckw.transport.controller;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.sckw.core.exception.CustomPromptException;
|
|
|
import com.sckw.core.model.enums.OrderRuleEnum;
|
|
import com.sckw.core.model.enums.OrderRuleEnum;
|
|
|
import com.sckw.core.model.enums.RedisOrderGenerateEnum;
|
|
import com.sckw.core.model.enums.RedisOrderGenerateEnum;
|
|
|
import com.sckw.core.model.page.PageRes;
|
|
import com.sckw.core.model.page.PageRes;
|
|
|
import com.sckw.core.model.vo.BaseList;
|
|
import com.sckw.core.model.vo.BaseList;
|
|
|
|
|
+import com.sckw.core.utils.CollectionUtils;
|
|
|
import com.sckw.core.utils.OrderGenerateSeqNoUtils;
|
|
import com.sckw.core.utils.OrderGenerateSeqNoUtils;
|
|
|
import com.sckw.core.web.constant.HttpStatus;
|
|
import com.sckw.core.web.constant.HttpStatus;
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
import com.sckw.core.web.response.HttpResult;
|
|
@@ -91,12 +93,12 @@ public class ConsignOrderController {
|
|
|
@RequestMapping(value = "/consignExport", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/consignExport", method = RequestMethod.POST)
|
|
|
public HttpResult exportConsign(@Validated @RequestBody ConsignOrderQuery query) {
|
|
public HttpResult exportConsign(@Validated @RequestBody ConsignOrderQuery query) {
|
|
|
HttpServletResponse response = RequestHolder.getResponse();
|
|
HttpServletResponse response = RequestHolder.getResponse();
|
|
|
- List<ConsignOrderExcelVo> list = consignOrderService.exportConsign(query,"1");
|
|
|
|
|
- if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
|
|
|
|
- ExcelUtil.download(response, ConsignOrderExcelVo.class, list);
|
|
|
|
|
- return null;
|
|
|
|
|
|
|
+ List<ConsignOrderExcelVo> list = consignOrderService.exportConsign(query, "1");
|
|
|
|
|
+ if (CollectionUtils.isEmpty(list)) {
|
|
|
|
|
+ throw new CustomPromptException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认");
|
|
|
}
|
|
}
|
|
|
- return HttpResult.ok("没有可导出的数据");
|
|
|
|
|
|
|
+ ExcelUtil.download(response, ConsignOrderExcelVo.class, list);
|
|
|
|
|
+ return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -156,7 +158,7 @@ public class ConsignOrderController {
|
|
|
/**
|
|
/**
|
|
|
* 托运订单-设置停止接单-提交-针对循环单
|
|
* 托运订单-设置停止接单-提交-针对循环单
|
|
|
*
|
|
*
|
|
|
- * @param stopOrderTakingDTO 请求参数
|
|
|
|
|
|
|
+ * @param stopOrderTakingDTO 请求参数
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/consignStopDocumentCommit", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/consignStopDocumentCommit", method = RequestMethod.POST)
|
|
@@ -230,9 +232,9 @@ public class ConsignOrderController {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/getRejectReason", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/getRejectReason", method = RequestMethod.GET)
|
|
|
- public HttpResult getRejectReasonById( @NotBlank @RequestParam("id") String id,
|
|
|
|
|
- @NotNull @RequestParam("status") Integer status) {
|
|
|
|
|
- return consignOrderService.getRejectReasonById(id,status);
|
|
|
|
|
|
|
+ public HttpResult getRejectReasonById(@NotBlank @RequestParam("id") String id,
|
|
|
|
|
+ @NotNull @RequestParam("status") Integer status) {
|
|
|
|
|
+ return consignOrderService.getRejectReasonById(id, status);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|