diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/TencentDocController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/TencentDocController.java index 4ffa4ce..c028ab7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/TencentDocController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/TencentDocController.java @@ -325,6 +325,8 @@ public class TencentDocController extends BaseController { String fileId = (String) params.get("fileId"); String sheetId = (String) params.get("sheetId"); Long orderId = params.get("orderId") != null ? Long.valueOf(params.get("orderId").toString()) : null; + // 起始行号,默认为3 + Integer startRow = params.get("startRow") != null ? Integer.valueOf(params.get("startRow").toString()) : 3; if (accessToken == null || fileId == null || sheetId == null || orderId == null) { return AjaxResult.error("accessToken、fileId、sheetId和orderId不能为空"); @@ -336,7 +338,7 @@ public class TencentDocController extends BaseController { return AjaxResult.error("未找到订单信息"); } - JSONObject result = tencentDocService.appendLogisticsToSheet(accessToken, fileId, sheetId, order); + JSONObject result = tencentDocService.appendLogisticsToSheet(accessToken, fileId, sheetId, startRow, order); return AjaxResult.success("追加物流信息成功", result); } catch (Exception e) { log.error("追加物流信息失败", e); @@ -401,6 +403,8 @@ public class TencentDocController extends BaseController { String fileId = (String) params.get("fileId"); String sheetId = (String) params.get("sheetId"); Long orderId = params.get("orderId") != null ? Long.valueOf(params.get("orderId").toString()) : null; + // 起始行号,默认为3 + Integer startRow = params.get("startRow") != null ? Integer.valueOf(params.get("startRow").toString()) : 3; if (accessToken == null || fileId == null || sheetId == null || orderId == null) { return AjaxResult.error("accessToken、fileId、sheetId和orderId不能为空"); @@ -418,7 +422,7 @@ public class TencentDocController extends BaseController { } // 上传物流信息到腾讯文档 - JSONObject uploadResult = tencentDocService.appendLogisticsToSheet(accessToken, fileId, sheetId, order); + JSONObject uploadResult = tencentDocService.appendLogisticsToSheet(accessToken, fileId, sheetId, startRow, order); // 更新订单状态为已发货(可选) // order.setStatus("已发货");