diff --git a/DataBase/版本日志/SGGLDB_V2025-05-14-001_bwj.sql b/DataBase/版本日志/SGGLDB_V2025-05-14-001_bwj.sql
new file mode 100644
index 00000000..87bbe5db
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-05-14-001_bwj.sql
@@ -0,0 +1,57 @@
+
+CREATE VIEW [dbo].[View_HJGL_ProductionSchedulingPlanStatistics]
+as
+/************Ųƻͳ**********/
+SELECT distinct unitWork.UnitWorkId,
+unitWork.UnitWorkCode,
+unitWork.UnitWorkName,
+unitWork.ProjectId,
+pipeline.FlowingSection,
+(case p.SteelType when '1' then '̼' when '2' then '' when '3' then '' when '4' then 'ͺϽ' when '5' then 'Ͻ' when '6' then 'ѺϽ' when '7' then '' end) as Material,
+'<100' as Caliber,
+isnull(weldJoint.Dia,0) as Dia
+FROM WBS_UnitWork AS unitWork
+LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId
+
+LEFT JOIN (select distinct Base_Material.SteelType,UnitWorkId from HJGL_WeldJoint
+ left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId
+ left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id
+ where PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ') as p on p.UnitWorkId = unitWork.UnitWorkId
+--
+LEFT JOIN (select sum(Dia) as Dia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint
+ left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId
+ left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id
+ where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ'
+ and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)<100
+ group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as weldJoint on weldJoint.UnitWorkId =unitWork.UnitWorkId
+ and weldJoint.FlowingSection = pipeline.FlowingSection
+
+union
+
+SELECT distinct unitWork.UnitWorkId,
+unitWork.UnitWorkCode,
+unitWork.UnitWorkName,
+unitWork.ProjectId,
+pipeline.FlowingSection,
+(case p.SteelType when '1' then '̼' when '2' then '' when '3' then '' when '4' then 'ͺϽ' when '5' then 'Ͻ' when '6' then 'ѺϽ' when '7' then '' end) as Material,
+'100' as Caliber,
+isnull(weldJoint.Dia,0) as Dia
+FROM WBS_UnitWork AS unitWork
+LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId
+
+LEFT JOIN (select distinct Base_Material.SteelType,UnitWorkId from HJGL_WeldJoint
+ left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId
+ left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id
+ where PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ') as p on p.UnitWorkId = unitWork.UnitWorkId
+
+LEFT JOIN (select sum(Dia) as Dia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint
+ left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId
+ left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id
+ where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ'
+ and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)>=100
+ group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as weldJoint on weldJoint.UnitWorkId =unitWork.UnitWorkId
+ and weldJoint.FlowingSection = pipeline.FlowingSection
+
+GO
+
+
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 5a9981a1..00cd10f3 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -4801,6 +4801,11 @@ namespace BLL
///
public const string Pipeline_ComponentPath = "File\\Excel\\DataIn\\组件管理二维码信息导入.xlsx";
+ ///
+ /// 排产计划导出模板
+ ///
+ public const string HJGL_ProductionSchedulingPlanPath = "File\\Excel\\DataOut\\排产计划导出模板.xlsx";
+
#region 焊接报表
///
diff --git a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
index 878660bf..ae787f4c 100644
--- a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
+++ b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
@@ -23,22 +23,17 @@ namespace BLL
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProductionSchedulingPlanId == productionSchedulingPlanId);
}
- ///
- /// 根据管线Id获取排产计划
- ///
- ///
- ///
- ///
- 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);
}
- ///
- /// 增加排产计划
- ///
- ///
- public static void AddProductionSchedulingPlan(Model.HJGL_ProductionSchedulingPlan plan)
+ ///
+ /// 增加排产计划
+ ///
+ ///
+ 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();
}
}
+
}
}
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx
new file mode 100644
index 00000000..af9e3643
Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx differ
diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx
index 37679631..c6f83703 100644
--- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx
@@ -53,7 +53,7 @@
+ Icon="TableGo" EnableAjax="false" EnablePostBack="true" >
@@ -103,45 +103,41 @@
DataField="PriorityTotalDyne" SortField="PriorityTotalDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
-
+
-
+
-
+
-
+
-
+
- <%--
-
-
-
- --%>
+
+
+
@@ -166,6 +162,10 @@
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
+
+ function onGridDataLoad(event) {
+ this.mergeColumns(['FlowNum', 'MainItemName', 'Material', 'TotalDyne']);
+ }