原材料仓逻辑、看板调整

This commit is contained in:
2024-07-31 09:04:20 +08:00
parent ac43e1edf4
commit 9221113607
17 changed files with 743 additions and 45 deletions

View File

@@ -479,15 +479,18 @@ namespace Tnb.WarehouseMgr
{
// 排除电梯任务 其他任务取消时自动解锁起点和终点库位
//int unlockStartRow = await _db.Updateable<BasLocation>().SetColumns(r => r.is_lock == 0).Where(r => r.location_code == wmsDistaskH.startlocation_code).ExecuteCommandAsync();
//if (unlockStartRow > 0)
//{
// Logger.Information($"成功解锁起点库位{wmsDistaskH.startlocation_code}");
//}
//else
//{
// Logger.Information($"未成功解锁起点库位{wmsDistaskH.startlocation_code}");
//}
if (wmsDistaskH.act_start_date == null)
{
int unlockStartRow = await _db.Updateable<BasLocation>().SetColumns(r => r.is_lock == 0).Where(r => r.location_code == wmsDistaskH.startlocation_code).ExecuteCommandAsync();
if (unlockStartRow > 0)
{
Logger.Information($"成功解锁起点库位{wmsDistaskH.startlocation_code}");
}
else
{
Logger.Information($"未成功解锁起点库位{wmsDistaskH.startlocation_code}");
}
}
int unlockEndRow = await _db.Updateable<BasLocation>().SetColumns(r => r.is_lock == 0).Where(r => r.location_code == wmsDistaskH.endlocation_code).ExecuteCommandAsync();
if (unlockEndRow > 0)
@@ -502,8 +505,8 @@ namespace Tnb.WarehouseMgr
int unlockCarryRow = await _db.Updateable<WmsCarryH>().SetColumns(r => new WmsCarryH
{
is_lock = 0,
//location_id = wmsDistaskH.startlocation_code.Contains("BGWRKYCL0") ? WmsWareHouseConst.LOCATION_YCLBGWDRK : r.location_id,
//location_code = wmsDistaskH.startlocation_code.Contains("BGWRKYCL0") ? "YCLBGWDRK" : r.location_code
location_id = wmsDistaskH.startlocation_code.Contains("BGWRKYCL0") ? WmsWareHouseConst.LOCATION_YCLBGWDRK : r.location_id,
location_code = wmsDistaskH.startlocation_code.Contains("BGWRKYCL0") ? "YCLBGWDRK" : r.location_code
}).Where(r => r.carry_code == wmsDistaskH.carry_code).ExecuteCommandAsync();
if (unlockCarryRow > 0)
{
@@ -557,15 +560,18 @@ namespace Tnb.WarehouseMgr
{
// 排除电梯任务 其他任务取消时自动解锁起点和终点库位
//int unlockStartRow = await _db.Updateable<BasLocation>().SetColumns(r => r.is_lock == 0).Where(r => r.location_code == wmsDistaskH.startlocation_code).ExecuteCommandAsync();
//if (unlockStartRow > 0)
//{
// Logger.Information($"成功起点解锁库位{wmsDistaskH.startlocation_code}");
//}
//else
//{
// Logger.Information($"未成功解锁起点库位{wmsDistaskH.startlocation_code}");
//}
if (wmsDistaskH.act_start_date == null)
{
int unlockStartRow = await _db.Updateable<BasLocation>().SetColumns(r => r.is_lock == 0).Where(r => r.location_code == wmsDistaskH.startlocation_code).ExecuteCommandAsync();
if (unlockStartRow > 0)
{
Logger.Information($"成功起点解锁库位{wmsDistaskH.startlocation_code}");
}
else
{
Logger.Information($"未成功解锁起点库位{wmsDistaskH.startlocation_code}");
}
}
int unlockEndRow = await _db.Updateable<BasLocation>().SetColumns(r => r.is_lock == 0).Where(r => r.location_code == wmsDistaskH.endlocation_code).ExecuteCommandAsync();
if (unlockEndRow > 0)
@@ -580,8 +586,8 @@ namespace Tnb.WarehouseMgr
int unlockCarryRow = await _db.Updateable<WmsCarryH>().SetColumns(r => new WmsCarryH
{
is_lock = 0,
//location_id = wmsDistaskH.startlocation_code.Contains("BGWRKYCL0") ? WmsWareHouseConst.LOCATION_YCLBGWDRK : wmsDistaskH.startlocation_id,
//location_code = wmsDistaskH.startlocation_code.Contains("BGWRKYCL0") ? "YCLBGWDRK" : wmsDistaskH.startlocation_code
location_id = wmsDistaskH.startlocation_code.Contains("BGWRKYCL0") ? WmsWareHouseConst.LOCATION_YCLBGWDRK : r.location_id,
location_code = wmsDistaskH.startlocation_code.Contains("BGWRKYCL0") ? "YCLBGWDRK" : r.location_code
}).Where(r => r.carry_code == wmsDistaskH.carry_code).ExecuteCommandAsync();
if (unlockCarryRow > 0)
{