供应商bug修改
This commit is contained in:
@ -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));
|
||||||
|
@ -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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user