增加追加导入逻辑
This commit is contained in:
@@ -10,6 +10,7 @@ using NPOI.XSSF.UserModel;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Aliyun.OSS;
|
||||
using Mapster;
|
||||
using ZXing;
|
||||
|
||||
namespace DOAN.Service.MES.order
|
||||
{
|
||||
@@ -90,7 +91,7 @@ namespace DOAN.Service.MES.order
|
||||
}
|
||||
|
||||
|
||||
public int ImportData(IFormFile formFile, string username)
|
||||
public int ImportData(IFormFile formFile, string username, bool? value)
|
||||
{
|
||||
List<OrderPurchase> orderPurchases = new List<OrderPurchase>();
|
||||
DateTime importDate = DateTime.MinValue;
|
||||
@@ -183,7 +184,16 @@ namespace DOAN.Service.MES.order
|
||||
throw new Exception(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
if (value==true)
|
||||
{
|
||||
int result = 0;
|
||||
UseTran2(() =>
|
||||
{
|
||||
|
||||
result = Context.Insertable(orderPurchases).ExecuteCommand();
|
||||
});
|
||||
return result;
|
||||
}
|
||||
if(orderPurchases.Count>0)
|
||||
{
|
||||
int result = 0;
|
||||
@@ -210,5 +220,6 @@ namespace DOAN.Service.MES.order
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user