Commit bf96b9c8 by pengjinyang

保存盘点反馈描述

parent 842c7417
......@@ -25,7 +25,7 @@ namespace IService.TakeStock
/// </summary>
/// <param name="order"></param>
/// <returns></returns>
Task<bool> Feedback(int id, int afterQuantity);
Task<bool> Feedback(int id, int afterQuantity, string description);
///// <summary>
///// 冻结库存
......
......@@ -271,12 +271,13 @@ namespace Service.TakeStock
/// </summary>
/// <param name="order"></param>
/// <returns></returns>
public async Task<bool> Feedback(int id, int afterQuantity)
public async Task<bool> Feedback(int id, int afterQuantity, string description)
{
var order = orderRepository.Get(id);
order.AfterQuantity = afterQuantity;
order.LastModificationTime = DateTime.Now;
var record = await orderRepository.UpdateAsync(order, "AfterQuantity", "LastModificationTime");
order.Description = description;
var record = await orderRepository.UpdateAsync(order, "AfterQuantity", "LastModificationTime", "Description");
bool isSuccess = record > 0;
if (isSuccess)
BackgroundJob.Enqueue(() => ModifAndEnabledAsync(order.Id));
......
......@@ -9,5 +9,7 @@ namespace TakeStock.Application.TakeStock.Dto
public int Id { get; set; }
public int AfterQuantity { get; set; }
public string Description { get; set; }
}
}
......@@ -34,7 +34,7 @@ namespace TakeStock.Application.TakeStock
public async Task<bool> Feedback(FeedbackInputDto input)
{
return await takeStockService.Feedback(input.Id, input.AfterQuantity);
return await takeStockService.Feedback(input.Id, input.AfterQuantity, input.Description);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment