|
|
@@ -178,6 +178,8 @@ public class BizWaybillOrderController extends BaseController
|
|
|
@PostMapping("/batchAdd")
|
|
|
public AjaxResult batchAdd(@RequestParam("file") MultipartFile file,
|
|
|
@RequestParam("orderType") Integer orderType) {
|
|
|
+
|
|
|
+ int total=0;
|
|
|
try {
|
|
|
// 校验订单类型
|
|
|
if (orderType == null || (orderType != 1 && orderType != 2)) {
|
|
|
@@ -222,14 +224,11 @@ public class BizWaybillOrderController extends BaseController
|
|
|
if (StringUtils.isNotBlank(result.get("errorMsg").toString())) {
|
|
|
return AjaxResult.error(result.get("errorMsg").toString());
|
|
|
}
|
|
|
-
|
|
|
+ total=orderList.size();
|
|
|
// 调用异步批量下单方法
|
|
|
bizWaybillOrderService.asyncBatchInsert((List<BizWaybillOrder>) result.get("orederList"), orderType);
|
|
|
}
|
|
|
-
|
|
|
- return AjaxResult.success("校验通过,已开始异步导入,清稍后刷新订单进行查看仔细核对!");
|
|
|
- // return AjaxResult.success(String.format("批量下单完成!成功 %d 单,失败 %d 单", result[0], result[1]));
|
|
|
-
|
|
|
+ return AjaxResult.success(String.format("本次导入共【%d】条数据,后台已自动开启对接第三方接口下单,请 1-2 分钟后刷新列表仔细核对导入结果!",total));
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
log.error("批量下单异常", e);
|