供应商bug修改
This commit is contained in:
@ -85,13 +85,14 @@ public class TenderSupplierInputController extends BaseController {
|
||||
@SaCheckPermission("supplierInput:supplierInput:import")
|
||||
@Log(title = "供应商入库", businessType = BusinessType.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<TenderSupplierInput> 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));
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user