20250603 排产计划

This commit is contained in:
2025-06-03 11:26:24 +08:00
parent da1100c508
commit 5d4dddd465
7 changed files with 433 additions and 115 deletions
@@ -23,22 +23,17 @@ namespace BLL
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProductionSchedulingPlanId == productionSchedulingPlanId);
}
/// <summary>
/// 根据管线Id获取排产计划
/// </summary>
/// <param name="projectId"></param>
/// <param name="pipelineId"></param>
/// <returns></returns>
public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlanByPipelineId(string projectId, string pipelineId)
public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlan(string loginProjectId, string flowingSection, string unitWorkName, string material, string caliber)
{
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == projectId && e.PipelineId == pipelineId);
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.MainItemName == unitWorkName && e.Caliber == caliber);
}
/// <summary>
/// 增加排产计划
/// </summary>
/// <param name="plan"></param>
public static void AddProductionSchedulingPlan(Model.HJGL_ProductionSchedulingPlan plan)
/// <summary>
/// 增加排产计划
/// </summary>
/// <param name="plan"></param>
public static void AddProductionSchedulingPlan(Model.HJGL_ProductionSchedulingPlan plan)
{
SGGLDB db = Funs.DB;
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
@@ -83,7 +78,7 @@ namespace BLL
newPlan.PlanStartDate = plan.PlanStartDate;
newPlan.PlanEndDate = plan.PlanEndDate;
newPlan.Days = plan.Days;
newPlan.AvgDailyWorkload = plan.Days;
newPlan.AvgDailyWorkload = plan.AvgDailyWorkload;
try
{
db.SubmitChanges(System.Data.Linq.ConflictMode.ContinueOnConflict);
@@ -120,5 +115,6 @@ namespace BLL
db.SubmitChanges();
}
}
}
}