任务完成时,更新条码的库位和仓库信息
This commit is contained in:
@@ -108,5 +108,9 @@ public partial class WmsCarryCode : BaseEntity<string>, IWmsCarryEntity
|
|||||||
/// 修改时间
|
/// 修改时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? modify_time { get; set; }
|
public DateTime? modify_time { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库ID
|
||||||
|
/// </summary>
|
||||||
|
public string? warehouse_id { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -473,6 +473,13 @@ namespace Tnb.WarehouseMgr
|
|||||||
for (int i = 0; i < multiList.Count; i++)
|
for (int i = 0; i < multiList.Count; i++)
|
||||||
{
|
{
|
||||||
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { is_lock = 0, location_id = multiList[i].endlocation_id, location_code = multiList[i].endlocation_code }).Where(it => it.id == multiList[i].carry_id).ExecuteCommandAsync();
|
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { is_lock = 0, location_id = multiList[i].endlocation_id, location_code = multiList[i].endlocation_code }).Where(it => it.id == multiList[i].carry_id).ExecuteCommandAsync();
|
||||||
|
//更新条码的库位和仓库信息
|
||||||
|
var carryCodes = await _db.Queryable<WmsCarryCode>().Where(it => it.id == multiList[i].carry_id).ToListAsync();
|
||||||
|
if (carryCodes?.Count>0) {
|
||||||
|
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == multiList[i].endlocation_id);
|
||||||
|
await _db.Updateable<WmsCarryCode>().SetColumns(it => new WmsCarryCode { warehouse_id = loc.wh_id, location_id = multiList[i].endlocation_id, location_code = multiList[i].endlocation_code }).Where(it => it.id == multiList[i].carry_id).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//更新库位信息,使用状态为 使用,锁定状态为未锁定
|
//更新库位信息,使用状态为 使用,锁定状态为未锁定
|
||||||
|
|||||||
Reference in New Issue
Block a user