修复bug

This commit is contained in:
18942506660
2023-12-18 09:55:19 +08:00
parent 1060c964d3
commit c35351bfb9
2 changed files with 4 additions and 0 deletions

View File

@@ -65,6 +65,9 @@ namespace WMS.Web.Domain.Services
public async Task<Result> Save(List<SaveTakeStockRequest> dto, LoginInDto loginInfo)
{
_logger.LogInformation($"盘点保存:{JsonConvert.SerializeObject(dto)} 盘点人:{loginInfo.UserInfo.StaffId}");
if(dto.GroupBy(g=>g.BoxId).Count()>1)
return Result.ReFailure(ResultCodes.TakeStockBoxError);
List<TakeStock> list = new List<TakeStock>();
var profitList = dto.Where(w => w.AfterQty >= w.BeforeQty).ToList();//盘盈
var lossList = dto.Where(w => w.AfterQty < w.BeforeQty).ToList();//盘亏

View File

@@ -71,5 +71,6 @@ namespace WMS.Web.Domain.Values
public static ValueTuple<int, string> SerialNumbersBoxError = (610002, "序列号已经绑定箱");
public static ValueTuple<int, string> SerialNumbersSrcBoxError = (610003, "序列号不在原有箱号内");
public static ValueTuple<int, string> TakeStockStockError = (610001, "一次不能盘多个仓库");
public static ValueTuple<int, string> TakeStockBoxError = (610004, "一次只能盘一个箱");
}
}