供应商bug修改

This commit is contained in:
2025-09-09 10:40:17 +08:00
parent 6b4cd4ae0d
commit 113b5debc9
2 changed files with 4 additions and 3 deletions

View File

@ -85,13 +85,14 @@ public class TenderSupplierInputController extends BaseController {
@SaCheckPermission("supplierInput:supplierInput:import") @SaCheckPermission("supplierInput:supplierInput:import")
@Log(title = "供应商入库", businessType = BusinessType.IMPORT) @Log(title = "供应商入库", businessType = BusinessType.IMPORT)
@PostMapping("/import") @PostMapping("/import")
public R<Void> importData(@RequestParam("file")MultipartFile file) throws IOException { public R<Void> importData(Long projectId,@RequestParam("file")MultipartFile file) throws IOException {
List<TenderSupplierInputVo> tenderSupplierInputVos = ExcelUtil.importExcel(file.getInputStream(), TenderSupplierInputVo.class); List<TenderSupplierInputVo> tenderSupplierInputVos = ExcelUtil.importExcel(file.getInputStream(), TenderSupplierInputVo.class);
List<TenderSupplierInput> tenderSupplierInputs = new ArrayList<>(); List<TenderSupplierInput> tenderSupplierInputs = new ArrayList<>();
for (TenderSupplierInputVo tenderSupplierInputVo : tenderSupplierInputVos) { for (TenderSupplierInputVo tenderSupplierInputVo : tenderSupplierInputVos) {
TenderSupplierInput newTenderSupplierInput = new TenderSupplierInput(); TenderSupplierInput newTenderSupplierInput = new TenderSupplierInput();
BeanUtils.copyProperties(tenderSupplierInputVo, newTenderSupplierInput); BeanUtils.copyProperties(tenderSupplierInputVo, newTenderSupplierInput);
newTenderSupplierInput.setProjectId(projectId);
tenderSupplierInputs.add(newTenderSupplierInput); tenderSupplierInputs.add(newTenderSupplierInput);
} }
return toAjax(tenderSupplierInputService.saveOrUpdateBatch(tenderSupplierInputs)); return toAjax(tenderSupplierInputService.saveOrUpdateBatch(tenderSupplierInputs));

View File

@ -33,13 +33,13 @@ public class TenderSupplierInputVo implements Serializable {
/** /**
* *
*/ */
@ExcelProperty(value = "序号") // @ExcelProperty(value = "序号")
private Long id; private Long id;
/** /**
* 项目Id * 项目Id
*/ */
@ExcelProperty(value = "项目Id") // @ExcelProperty(value = "项目Id")
private Long projectId; private Long projectId;
/** /**