This commit is contained in:
tongfei
2023-12-18 09:58:26 +08:00
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) public async Task<Result> Save(List<SaveTakeStockRequest> dto, LoginInDto loginInfo)
{ {
_logger.LogInformation($"盘点保存:{JsonConvert.SerializeObject(dto)} 盘点人:{loginInfo.UserInfo.StaffId}"); _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>(); List<TakeStock> list = new List<TakeStock>();
var profitList = dto.Where(w => w.AfterQty >= w.BeforeQty).ToList();//盘盈 var profitList = dto.Where(w => w.AfterQty >= w.BeforeQty).ToList();//盘盈
var lossList = 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> SerialNumbersBoxError = (610002, "序列号已经绑定箱");
public static ValueTuple<int, string> SerialNumbersSrcBoxError = (610003, "序列号不在原有箱号内"); public static ValueTuple<int, string> SerialNumbersSrcBoxError = (610003, "序列号不在原有箱号内");
public static ValueTuple<int, string> TakeStockStockError = (610001, "一次不能盘多个仓库"); public static ValueTuple<int, string> TakeStockStockError = (610001, "一次不能盘多个仓库");
public static ValueTuple<int, string> TakeStockBoxError = (610004, "一次只能盘一个箱");
} }
} }