导入导出
This commit is contained in:
@@ -133,7 +133,14 @@ namespace DOAN.Admin.WebApi.Controllers.BZFM
|
|||||||
[ActionPermissionFilter(Permission = "mmmaterial:import")]
|
[ActionPermissionFilter(Permission = "mmmaterial:import")]
|
||||||
public IActionResult ImportData([FromForm(Name = "file")] IFormFile formFile)
|
public IActionResult ImportData([FromForm(Name = "file")] IFormFile formFile)
|
||||||
{
|
{
|
||||||
return SUCCESS(_MmMaterialService.Importmaterial(material));
|
//return SUCCESS(_MmMaterialService.Importmaterial(material));
|
||||||
|
if (formFile == null)
|
||||||
|
{
|
||||||
|
return SUCCESS(null);
|
||||||
|
}
|
||||||
|
int response = _MmMaterialService.Importmaterial(formFile, HttpContext.GetName());
|
||||||
|
|
||||||
|
return SUCCESS(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using DOAN.Model.BZFM;
|
|||||||
using DOAN.Model.BZFM.Dto;
|
using DOAN.Model.BZFM.Dto;
|
||||||
using DOAN.Model.System;
|
using DOAN.Model.System;
|
||||||
using DOAN.Model.System.Dto;
|
using DOAN.Model.System.Dto;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
||||||
namespace DOAN.Service.BZFM.IBZFMService
|
namespace DOAN.Service.BZFM.IBZFMService
|
||||||
{
|
{
|
||||||
@@ -27,7 +28,7 @@ namespace DOAN.Service.BZFM.IBZFMService
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="material"></param>
|
/// <param name="material"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
ImportResultDto Importmaterial(List<MmMaterialExcelDto> material);
|
int Importmaterial(IFormFile formFile, string username);
|
||||||
|
|
||||||
public PagedInfo<MmMaterialExcelDto> SelectMaterialList(MmMaterialQueryDto material, PagerInfo pager);
|
public PagedInfo<MmMaterialExcelDto> SelectMaterialList(MmMaterialQueryDto material, PagerInfo pager);
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ namespace DOAN.Service.BZFM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="material"></param>
|
/// <param name="material"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ImportResultDto Importmaterial(IFormFile formFile)
|
public int Importmaterial(IFormFile formFile)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
List<ProWorkorder> materialList = new();
|
List<ProWorkorder> materialList = new();
|
||||||
|
|||||||
Reference in New Issue
Block a user