From 113b5debc954c577c6dde04b75fe17fec71bc0bf Mon Sep 17 00:00:00 2001 From: dfdg <2710245601@qq.com> Date: Tue, 9 Sep 2025 10:40:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86bug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tender/controller/TenderSupplierInputController.java | 3 ++- .../org/dromara/tender/domain/vo/TenderSupplierInputVo.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/controller/TenderSupplierInputController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/controller/TenderSupplierInputController.java index ab788e61..2dd7bc3d 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/controller/TenderSupplierInputController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/controller/TenderSupplierInputController.java @@ -85,13 +85,14 @@ public class TenderSupplierInputController extends BaseController { @SaCheckPermission("supplierInput:supplierInput:import") @Log(title = "供应商入库", businessType = BusinessType.IMPORT) @PostMapping("/import") - public R importData(@RequestParam("file")MultipartFile file) throws IOException { + public R importData(Long projectId,@RequestParam("file")MultipartFile file) throws IOException { List tenderSupplierInputVos = ExcelUtil.importExcel(file.getInputStream(), TenderSupplierInputVo.class); List tenderSupplierInputs = new ArrayList<>(); for (TenderSupplierInputVo tenderSupplierInputVo : tenderSupplierInputVos) { TenderSupplierInput newTenderSupplierInput = new TenderSupplierInput(); BeanUtils.copyProperties(tenderSupplierInputVo, newTenderSupplierInput); + newTenderSupplierInput.setProjectId(projectId); tenderSupplierInputs.add(newTenderSupplierInput); } return toAjax(tenderSupplierInputService.saveOrUpdateBatch(tenderSupplierInputs)); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/TenderSupplierInputVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/TenderSupplierInputVo.java index 6ffefbab..c77b57ff 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/TenderSupplierInputVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/TenderSupplierInputVo.java @@ -33,13 +33,13 @@ public class TenderSupplierInputVo implements Serializable { /** * */ - @ExcelProperty(value = "序号") +// @ExcelProperty(value = "序号") private Long id; /** * 项目Id */ - @ExcelProperty(value = "项目Id") +// @ExcelProperty(value = "项目Id") private Long projectId; /**