bug修复
This commit is contained in:
@@ -245,9 +245,11 @@ namespace WMS.Web.Domain.Services
|
||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
|
||||
//同步金蝶后,反写任务单的已交数量
|
||||
var taskId = dto.Details.GroupBy(x => x.TaskId).Select(x => x.Key).FirstOrDefault();
|
||||
var task = await _inStockTaskRepositories.Get(taskId);
|
||||
if (task != null)
|
||||
var taskIds = dto.Details.GroupBy(x => x.TaskId).Select(x => x.Key).ToList();
|
||||
var tasks = await _inStockTaskRepositories.GetList(taskIds);
|
||||
if (tasks != null && tasks.Count!=0)
|
||||
{
|
||||
foreach (var task in tasks)
|
||||
{
|
||||
task.Details.ForEach(x =>
|
||||
{
|
||||
@@ -260,8 +262,10 @@ namespace WMS.Web.Domain.Services
|
||||
}
|
||||
});
|
||||
task.Shelf(loginInfo.UserInfo.StaffId);
|
||||
task = await _inStockTaskRepositories.Update(task, isTransaction);
|
||||
if (task == null)
|
||||
}
|
||||
|
||||
var isSuccess = await _inStockTaskRepositories.UpdateRange(tasks, isTransaction);
|
||||
if (!isSuccess)
|
||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user