wms调整插入操作记录逻辑代码

This commit is contained in:
alex
2023-06-15 18:44:45 +08:00
parent 31a5ad8b1e
commit e7f2337eeb
5 changed files with 361 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ namespace Tnb.WarehouseMgr
private readonly IWareHouseService _wareHouseService;
private readonly IBillRullService _billRullService;
private readonly IUserManager _userManager;
public WmsCarryMoveInStockService(
ISqlSugarRepository<WmsCarryH> repository,
@@ -124,8 +124,21 @@ namespace Tnb.WarehouseMgr
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault().location_id;
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault().location_code;
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
WmsHandleH handleH = new();
handleH.org_id = _userManager.User.OrganizeId;
handleH.startlocation_id = input.data[nameof(WmsPointH.location_id)]?.ToString();
handleH.endlocation_id = endLocations[0].id;
handleH.bill_code = input.data[nameof(WmsHandleH.bill_code)]?.ToString();
handleH.biz_type = input.data[nameof(WmsHandleH.biz_type)]?.ToString();
handleH.carry_id = input.data[nameof(WmsHandleH.carry_id)]?.ToString();
handleH.carry_code = input.data[nameof(WmsHandleH.carry_code)]?.ToString();
handleH.require_id = input.data["ReturnIdentity"].ToString();
handleH.require_code = input.data[nameof(WmsHandleH.bill_code)]?.ToString()!;
handleH.create_id = _userManager.UserId;
handleH.create_time = DateTime.Now;
preTaskUpInput.PreTaskRecord = handleH;
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
}
}