电梯优化
This commit is contained in:
@@ -2257,6 +2257,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
/// <param name="args"></param>
|
||||
private async void Floor4MJX2MJC(object? args)
|
||||
{
|
||||
BasLocation startlocation = await db_Floor4MJX2MJC.Queryable<BasLocation>().Where(r => r.location_code == "MJQ-QU02").FirstAsync();
|
||||
if (s_taskFloor4MJX2MJCService.CurrentCount == 0)
|
||||
return;
|
||||
await s_taskFloor4MJX2MJCService.WaitAsync();
|
||||
@@ -2268,19 +2269,10 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
LoggerTimer.LogInformation($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 开始执行四楼待灭菌线到灭菌仓");
|
||||
|
||||
Dictionary<string, string[]> getdic = new Dictionary<string, string[]>();
|
||||
getdic.Add("MJQ-QU02", new string[] { "4下上料输送西区", "下料工位2请求取盘", "下料工位2条码" });
|
||||
getdic.Add("MJQ-QU01", new string[] { "4下上料输送西区", "下料工位1请求取盘", "下料工位1条码" });
|
||||
|
||||
//List<BasLocation> startLocations = db_Floor4MJX2MJC.Queryable<BasLocation>().Where(r => r.wh_id == WmsWareHouseConst.WAREHOUSE_MJC_ID
|
||||
//&& r.is_type == ((int)EnumLocationType.分拣库位).ToString() && r.is_lock == 0).ToList();
|
||||
|
||||
//Dictionary<BasLocation, string[]> getdic = new Dictionary<BasLocation, string[]>();
|
||||
|
||||
//foreach (BasLocation startLocation in getdic)
|
||||
//{
|
||||
// getdic.Add(startLocation, new string[] { "", "" });
|
||||
//}
|
||||
getdic.Add("MJQ-QU01", new string[] { "4楼下料输送西区", "下料工位1请求取盘", "下料工位1条码" });
|
||||
getdic.Add("MJQ-QU02", new string[] { "4楼下料输送西区", "下料工位2请求取盘", "下料工位2条码" });
|
||||
|
||||
|
||||
foreach (var key in getdic.Keys)
|
||||
{
|
||||
var strs = getdic.Where(p => p.Key == key).First().Value;
|
||||
@@ -2301,13 +2293,19 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
LoggerFloor4MJX2MJC.LogWarning($"【四楼待灭菌线到灭菌仓】 没有可以入库的库位");
|
||||
break;
|
||||
}
|
||||
var endlocation = items.First();
|
||||
|
||||
await db_Floor4MJX2MJC.Ado.BeginTranAsync();
|
||||
startlocation = await db_Floor4MJX2MJC.Queryable<BasLocation>().Where(r => r.location_code == key).FirstAsync();
|
||||
|
||||
BasLocation startlocation = await db_Floor4DMJ2MJX.Queryable<BasLocation>().Where(r => r.location_code == key).FirstAsync();
|
||||
BasLocation endlocation = items[0];
|
||||
|
||||
string carry_code = await GetStringTag(strs[0], strs[2]);
|
||||
if (startlocation.is_lock == 1)
|
||||
{
|
||||
LoggerFloor4MJX2MJC.LogWarning($"【四楼待灭菌线到灭菌仓】 起点库位{startlocation.location_code}已锁定");
|
||||
continue;
|
||||
}
|
||||
string carry_code = (await GetStringTag(strs[0], strs[2])).Replace("\r", "").Replace(" ", "");
|
||||
LoggerFloor4MJX2MJC.LogInformation($"【四楼待灭菌线到灭菌仓】 下料点 {key} {strs[2]}采集到 {carry_code}");
|
||||
LoggerFloor4MJX2MJC.LogInformation($"【四楼待灭菌线到灭菌仓】 下料点 {key} {strs[2]}采集到长度 {carry_code.Length}");
|
||||
WmsCarryH wmsCarryH = await db_Floor4MJX2MJC.Queryable<WmsCarryH>().Where(r => r.carry_code == carry_code).FirstAsync();
|
||||
|
||||
//锁定起点库位
|
||||
@@ -2441,9 +2439,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
BasLocation endlocation = items[0];
|
||||
|
||||
//锁定起点库位
|
||||
await db_Floor4MJX2MJC.Updateable<BasLocation>().SetColumns(r => new BasLocation { is_lock = 1 }).Where(r => r.id == startlocation.id).ExecuteCommandAsync();
|
||||
await db_Floor4DMC2CPK.Updateable<BasLocation>().SetColumns(r => new BasLocation { is_lock = 1 }).Where(r => r.id == startlocation.id).ExecuteCommandAsync();
|
||||
//锁定终点库位
|
||||
await db_Floor4MJX2MJC.Updateable<BasLocation>().SetColumns(r => new BasLocation { is_lock = 1 }).Where(r => r.id == endlocation.id).ExecuteCommandAsync();
|
||||
await db_Floor4DMC2CPK.Updateable<BasLocation>().SetColumns(r => new BasLocation { is_lock = 1 }).Where(r => r.id == endlocation.id).ExecuteCommandAsync();
|
||||
|
||||
bool result_createPretask = await createPretask(startlocation.id, endlocation.id, wmsCarryH.id, wmsCarryH.carry_code,
|
||||
LoggerFloor4DMC2CPK, db_Floor4DMC2CPK, WmsWareHouseConst.BIZTYPE_WMSSTERILIZATIONINSTOCKCH_ID, "", wmsSterilizationInstockH.id);
|
||||
|
||||
Reference in New Issue
Block a user