Switch warehouse matching to use IDs

This commit is contained in:
2026-06-24 23:25:06 +08:00
parent 4670220614
commit bd9b5a6f4d
27 changed files with 776 additions and 419 deletions
@@ -82,12 +82,12 @@ namespace BLL
return Funs.DB.Tw_InOutPlanDetail_Relation.FirstOrDefault(x => x.Id == Id);
}
public static Model.Tw_InOutPlanDetail_Relation GetByPipelineId(string pipelineId, string WarehouseCode)
public static Model.Tw_InOutPlanDetail_Relation GetByPipelineId(string pipelineId, string warehouseId)
{
int typeInt = (int)TwConst.TypeInt.;
var q = from x in Funs.DB.Tw_InOutPlanDetail_Relation
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
where x.PipelineId == pipelineId && y.WarehouseCode == WarehouseCode && y.TypeInt != typeInt
where x.PipelineId == pipelineId && y.WarehouseId == warehouseId && y.TypeInt != typeInt
select x;
return q.FirstOrDefault();
}