This commit is contained in:
van
2026-03-24 16:23:57 +08:00
parent 318cef274e
commit 066ab35a17
10 changed files with 429 additions and 8 deletions

View File

@@ -163,6 +163,24 @@ public class JDOrderListController extends BaseController
}
}
/**
* 批量导入后返表:请求内按顺序处理多个文件,前端仅需一次提交;结果概要返回,明细见上传记录。
*/
@Log(title = "JD订单后返表批量导入", businessType = BusinessType.IMPORT)
@PostMapping("/importGroupRebateExcelBatch")
public AjaxResult importGroupRebateExcelBatch(@RequestParam("files") MultipartFile[] files,
@RequestParam(value = "documentTitle", required = false) String documentTitle) {
try {
Map<String, Object> data = groupRebateExcelImportService.importExcelBatch(files, documentTitle);
if (Boolean.FALSE.equals(data.get("success"))) {
return AjaxResult.error((String) data.get("message"));
}
return AjaxResult.success(data);
} catch (Exception e) {
return AjaxResult.error("批量导入失败: " + e.getMessage());
}
}
/**
* 后返表上传记录(分页)
*/
@@ -185,6 +203,15 @@ public class JDOrderListController extends BaseController
* 重新下载已上传的后返表原件(与通用 download 一致,使用 POST + blob
*/
@Log(title = "后返表上传记录下载", businessType = BusinessType.EXPORT)
/**
* 删除一条后返表上传记录,并撤销写入订单的后返备注(依赖 uploadRecordId / affectedOrderIds历史导入可能仅删记录
*/
@Log(title = "后返表上传记录", businessType = BusinessType.DELETE)
@DeleteMapping("/groupRebateUpload/{id}")
public AjaxResult deleteGroupRebateUpload(@PathVariable("id") Long id) {
return AjaxResult.success(groupRebateExcelImportService.deleteUploadRecord(id));
}
@PostMapping("/groupRebateUpload/download/{id}")
public void downloadGroupRebateUpload(@PathVariable("id") Long id, HttpServletResponse response) throws Exception {
GroupRebateExcelUpload rec = groupRebateExcelUploadService.selectGroupRebateExcelUploadById(id);