订单Excel添加追加导入功能
This commit is contained in:
parent
e0425af58e
commit
d2f16241bb
@ -125,18 +125,19 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
/// 采购导入
|
||||
/// </summary>
|
||||
/// <param name="formFile">使用IFromFile必须使用name属性否则获取不到文件</param>
|
||||
/// <param name="uploadType">true-追加导入 false-覆盖导入</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("importData")]
|
||||
[Log(Title = "采购导入", BusinessType = BusinessType.IMPORT, IsSaveRequestData = false, IsSaveResponseData = true)]
|
||||
[AllowAnonymous]
|
||||
public IActionResult ImportData([FromForm(Name = "file")] IFormFile formFile,bool? value)
|
||||
public IActionResult ImportData([FromForm(Name = "file")] IFormFile formFile,bool? uploadType)
|
||||
{
|
||||
|
||||
if (formFile == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
int response = _OrderPurchaseService.ImportData(formFile, HttpContext.GetName(),value);
|
||||
int response = _OrderPurchaseService.ImportData(formFile, HttpContext.GetName(), uploadType);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ namespace DOAN.Service.MES.order.IService
|
||||
|
||||
OrderPurchase GetInfo(string Id);
|
||||
|
||||
int ImportData(IFormFile formFile, string username,bool? value);
|
||||
int ImportData(IFormFile formFile, string username,bool? uploadType);
|
||||
OrderPurchase AddOrderPurchase(OrderPurchase parm);
|
||||
int UpdateOrderPurchase(OrderPurchase parm);
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ namespace DOAN.Service.MES.order
|
||||
}
|
||||
|
||||
|
||||
public int ImportData(IFormFile formFile, string username, bool? value)
|
||||
public int ImportData(IFormFile formFile, string username, bool? uploadType)
|
||||
{
|
||||
List<OrderPurchase> orderPurchases = new List<OrderPurchase>();
|
||||
DateTime importDate = DateTime.MinValue;
|
||||
@ -184,7 +184,8 @@ namespace DOAN.Service.MES.order
|
||||
throw new Exception(ex.Message);
|
||||
}
|
||||
}
|
||||
if (value==true)
|
||||
// 追加导入
|
||||
if (uploadType == true)
|
||||
{
|
||||
int result = 0;
|
||||
UseTran2(() =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user