20250723 修改工厂预制管理

This commit is contained in:
2025-07-23 13:27:58 +08:00
parent acbd44856f
commit be011ed6a3
23 changed files with 265 additions and 188 deletions
@@ -134,7 +134,7 @@ namespace BLL
var result = new List<Model.PipelinePrefabricatedComponentsItem>();
if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.)
{
var q = from detail in Funs.DB.HJGL_PackagingManageDetail
var q = from detail in Funs.DB.HJGL_PackagingManageDetail
join lib in Funs.DB.HJGL_MaterialCodeLib on detail.MaterialCode equals lib.MaterialCode into libJoin
from libItem in libJoin.DefaultIfEmpty()
join line in Funs.DB.HJGL_Pipeline on detail.PipelineId equals line.PipelineId into lineJoin
@@ -152,7 +152,8 @@ namespace BLL
Number = detail.Number,
PipelineId = lineItem.PipelineId,
PipelineCode = lineItem.PipelineCode,
UnitWorkId=lineItem.UnitWorkId,
UnitWorkId = lineItem.UnitWorkId,
FlowingSection = lineItem.FlowingSection,
};
result= q.ToList();
@@ -177,6 +178,7 @@ namespace BLL
Number = detail.Number,
PipelineId = lineItem.PipelineId,
PipelineCode = lineItem.PipelineCode,
FlowingSection = lineItem.FlowingSection,
};
result = q.ToList();
@@ -179,7 +179,7 @@ namespace BLL
if (!string.IsNullOrEmpty(model.PipelineComponentId))
{
var PipelineComponentIds = model.PipelineComponentId.Split(',');
string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,isnull(pipe.PlanStartDate,getdate()) as PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU
string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,isnull(pipe.PlanStartDate,getdate()) as PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU,pipe.FlowingSection
from HJGL_Pipeline_Component com
left join HJGL_Pipeline pipe on com.PipelineId=pipe.PipelineId
left join WBS_UnitWork unitwork on pipe.UnitWorkId=unitwork.UnitWorkId
@@ -122,5 +122,38 @@ namespace BLL
}
}
/// <summary>
/// 根据单位工程删除排产计划
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitWorkName"></param>
public static void DeleteProductionSchedulingPlanByUnitWork(string projectId,string unitWorkName)
{
SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_ProductionSchedulingPlan where x.ProjectId == projectId && x.MainItemName == unitWorkName select x).ToList();
if (q.Count > 0)
{
db.HJGL_ProductionSchedulingPlan.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
/// <summary>
/// 根据单位工程、流水号删除排产计划
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitWorkName"></param>
/// <param name="flowNum"></param>
public static void DeleteProductionSchedulingPlanByUnitWorkIdAndFlowNum(string projectId, string unitWorkName, string flowNum)
{
SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_ProductionSchedulingPlan where x.ProjectId == projectId && x.MainItemName == unitWorkName && x.FlowNum == flowNum select x).ToList();
if (q.Count > 0)
{
db.HJGL_ProductionSchedulingPlan.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
}
}