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; /**