物料呼叫接口修改

This commit is contained in:
2024-06-21 16:05:56 +08:00
parent f8e3e89b50
commit 112f15a096
3 changed files with 126 additions and 5 deletions

View File

@@ -554,13 +554,19 @@ namespace Tnb.WarehouseMgr
throw new AppFriendlyException($"此料架目标工位为空!{input.carry_code}", 500);
}
if (string.IsNullOrEmpty(wmsCarryH.location_id))
//if (string.IsNullOrEmpty(wmsCarryH.location_id))
//{
// Logger.LogWarning($"【CallRackToProductionLine】此料架的库位为空{input.carry_code}");
// throw new AppFriendlyException($"此料架的库位为空!{input.carry_code}", 500);
//}
if (string.IsNullOrEmpty(input.endlocation_id))
{
Logger.LogWarning($"【CallRackToProductionLine】此料架的库位为空!{input.carry_code}");
throw new AppFriendlyException($"此料架的库位为空!{input.carry_code}", 500);
Logger.LogWarning($"【CallRackToProductionLine】终点库位不能为空!{input.carry_code}");
throw new AppFriendlyException($"终点库位不能为空!{input.carry_code}", 500);
}
BasLocation endlocation = _db.Queryable<BasLocation>().Where(r => r.location_code == wmsCarryH.work_station).First();
//BasLocation endlocation = _db.Queryable<BasLocation>().Where(r => r.location_code == wmsCarryH.work_station).First();
WmsPretaskH wmsPretaskH = _db.Queryable<WmsPretaskH>().Where(r => r.carry_code == wmsCarryH.carry_code && r.status != WmsWareHouseConst.PRETASK_BILL_STATUS_COMPLE_ID).First();
if (wmsPretaskH != null)
@@ -571,7 +577,7 @@ namespace Tnb.WarehouseMgr
CommonCreatePretaskInput commonCreatePretaskInput = new CommonCreatePretaskInput();
commonCreatePretaskInput.startlocation_id = wmsCarryH.location_id;
commonCreatePretaskInput.endlocation_id = endlocation.id;
commonCreatePretaskInput.endlocation_id = input.endlocation_id;
commonCreatePretaskInput.carry_id = wmsCarryH.id;
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
commonCreatePretaskInput.task_type = "";