diff --git a/src/WMS.Web.Domain/IService/Public/IOutStockTaskService.cs b/src/WMS.Web.Domain/IService/Public/IOutStockTaskService.cs
index 727fb418..f52995e3 100644
--- a/src/WMS.Web.Domain/IService/Public/IOutStockTaskService.cs
+++ b/src/WMS.Web.Domain/IService/Public/IOutStockTaskService.cs
@@ -47,8 +47,8 @@ namespace WMS.Web.Domain.IService.Public
///
/// 同步金蝶数据 不传源订单号则更新所有
///
- ///
+ ///
///
- Task Sync(List sourceBillNos = null);
+ Task Sync(List billNos = null);
}
}
diff --git a/src/WMS.Web.Domain/Infrastructure/IOutStockTaskRepositories.cs b/src/WMS.Web.Domain/Infrastructure/IOutStockTaskRepositories.cs
index 5bf69f66..f5e57db1 100644
--- a/src/WMS.Web.Domain/Infrastructure/IOutStockTaskRepositories.cs
+++ b/src/WMS.Web.Domain/Infrastructure/IOutStockTaskRepositories.cs
@@ -28,6 +28,12 @@ namespace WMS.Web.Domain.Infrastructure
///
///
Task> GetListBySourceBillNo(List sourceBillNos);
+ ///
+ /// 列表-根据订单号
+ ///
+ ///
+ ///
+ Task> GetListByBillNo(List billNos);
/// 修改实体集合
Task EditEntityList(List entitys, bool isTransaction = true);
//编辑
diff --git a/src/WMS.Web.Domain/Services/OutStockTaskService.cs b/src/WMS.Web.Domain/Services/OutStockTaskService.cs
index d2f92027..d803158b 100644
--- a/src/WMS.Web.Domain/Services/OutStockTaskService.cs
+++ b/src/WMS.Web.Domain/Services/OutStockTaskService.cs
@@ -236,7 +236,7 @@ namespace WMS.Web.Domain.Services
///
///
///
- public async Task Sync(List sourceBillNos = null)
+ public async Task Sync(List billNos = null)
{
//1.事务
IDbContextTransaction _transaction = _transactionRepositories.GetTransaction();
@@ -244,7 +244,7 @@ namespace WMS.Web.Domain.Services
bool isSuccess = true;
Result result;
//定时任务更新
- if (sourceBillNos == null)
+ if (billNos == null)
{
DateTime begin = await _erpOpsSyncDateRepositories.Get(ErpOpsSyncType.OutStock);
//更新时间范围内所有
@@ -277,7 +277,7 @@ namespace WMS.Web.Domain.Services
List TransferOut_Nos = new List();
List AssembledApp_Nos = new List();
List MisDeliveryOut_Nos = new List();
- var taskList = await _outStockTaskRepositories.GetListBySourceBillNo(sourceBillNos);
+ var taskList = await _outStockTaskRepositories.GetListByBillNo(billNos);
foreach (var entity in taskList)
{
if (entity.Type == OutStockType.Sal)
diff --git a/src/WMS.Web.Repositories/OutStockTaskRepositories.cs b/src/WMS.Web.Repositories/OutStockTaskRepositories.cs
index 8430849d..b852ceea 100644
--- a/src/WMS.Web.Repositories/OutStockTaskRepositories.cs
+++ b/src/WMS.Web.Repositories/OutStockTaskRepositories.cs
@@ -376,11 +376,22 @@ namespace WMS.Web.Repositories
///
///
///
- public async Task> GetListBySourceBillNo(List billNos)
+ public async Task> GetListBySourceBillNo(List sourcebillNos)
{
+ List ids = new List();
+ string str=$"SELECT Fid FROM t_erp_outstock_task_details WHERE ";
+ for (int i=0;i s.Id).ToListAsync();
+
var entitys = await _context.OutStockTask
.Include(s => s.Details)
- .Where(w => billNos.Contains(w.BillNo))
+ .Where(w => ids.Contains(w.Id))
.OrderByDescending(o => o.Id)
.ToListAsync();
@@ -447,5 +458,16 @@ namespace WMS.Web.Repositories
{
return await GetListAsync(dto);
}
+
+ public async Task> GetListByBillNo(List billNos)
+ {
+ var entitys = await _context.OutStockTask
+ .Include(s => s.Details)
+ .Where(w => billNos.Contains(w.BillNo))
+ .OrderByDescending(o => o.Id)
+ .ToListAsync();
+
+ return entitys.Clone();
+ }
}
}