退料到中储仓

This commit is contained in:
2024-06-27 22:17:23 +08:00
parent 91c451cfc5
commit 6284ea4b56
5 changed files with 32 additions and 12 deletions

View File

@@ -518,7 +518,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
if (!result_createPretask)
{
LoggerBGWCarrySupplement.LogWarning($"【BGWCarrySupplementtimer】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败 ");
continue;
throw new Exception($"【BGWCarrySupplementtimer】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
}
LoggerBGWCarrySupplement.LogInformation($"【BGWCarrySupplementtimer】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成成功");
@@ -611,7 +611,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
if (!result_createPretask)
{
LoggerYCLGLDPJInstock.LogWarning($"【YCLGLDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
continue;
throw new Exception($"【YCLGLDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
}
LoggerYCLGLDPJInstock.LogWarning($"【YCLGLDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成成功");
@@ -699,7 +699,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
if (!result_createPretask)
{
LoggerYCLGLDPJInstock.LogWarning($"【YCLWXDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
continue;
throw new Exception($"【YCLWXDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
}
LoggerYCLGLDPJInstock.LogWarning($"【YCLWXDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成成功");
@@ -1190,13 +1190,15 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
.Where((a, b, c, d) => a.wh_id == "33780009364245" && a.is_use == "1" && a.is_lock == 0 && a.is_type == "0" && !string.IsNullOrEmpty(c.id)
&& b.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID).OrderBy((a, b, c, d) => d.id).Select((a, b, c, d) => new // 关联载具物料明细表
{
wmsCarryH = b,
basLocation = a,
WmsCarryCode_id = d.id
}).ToList().GroupBy(r => r.basLocation.location_code).Select(r =>
{
var item = r.FirstOrDefault();
// 前面通过OrderBy(d => d.id)对WmsCarryCode_id进行了排序 那么如果第一行有数据则说明存在非空料箱
if (!string.IsNullOrEmpty(item.WmsCarryCode_id))
// 空载具入库: 前面通过OrderBy(d => d.id)对WmsCarryCode_id进行了排序 那么如果第一行有数据则说明存在非空料箱
// 没有物料且没有退料标记的不满足出库条件
if (!string.IsNullOrEmpty(item.WmsCarryCode_id) && (item.wmsCarryH.need_return == 0 || item.wmsCarryH.need_return == null))
{
return new BasLocation();
}
@@ -1257,11 +1259,16 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
LoggerFloor2RackDelivery.LogInformation($"【送满托到下升降区】 开始生成预任务 起点{startLocation.location_code} 终点{wmsMechanicalArmH.location_code} 料架 {targetCarry.carry_code}");
await db_Floor2timer送满托到下升降区.Updateable<WmsCarryH>().SetColumns(r => new WmsCarryH
{
need_return = 0
}).Where(r => r.id == targetCarry.id).ExecuteCommandAsync();
bool result = await createPretask(startLocation.id, wmsMechanicalArmH.location_id, targetCarry.id, targetCarry.carry_code, LoggerFloor2RackDelivery, db_Floor2timer送满托到下升降区);
if (!result)
{
LoggerFloor2RackDelivery.LogInformation($"【送满托到下升降区】 未成功生成预任务 起点{startLocation.location_code} 终点{wmsMechanicalArmH.location_code} 料架 {targetCarry.carry_code}");
continue;
throw new Exception($"【送满托到下升降区】 未成功生成预任务 起点{startLocation.location_code} 终点{wmsMechanicalArmH.location_code} 料架 {targetCarry.carry_code}");
}
}
await db_Floor2timer送满托到下升降区.Ado.CommitTranAsync();
@@ -1473,7 +1480,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
if (!result)
{
LoggerFloor2RackDelivery.LogInformation($"【移走下升降区空托的料架】 未成功生成预任务 起点{wmsMechanicalArmH.location_code} 终点{endLocation.location_code} 料架 {wmsMechanicalArmH.rackcode}");
continue;
throw new Exception($"【移走下升降区空托的料架】 未成功生成预任务 起点{wmsMechanicalArmH.location_code} 终点{endLocation.location_code} 料架 {wmsMechanicalArmH.rackcode}");
}
}
await db_Floor2timer移走下升降区未生成预任务且空托的料架.Ado.CommitTranAsync();