From 6e6f3d42fde58c98cb921cab87e84193e1fbd042 Mon Sep 17 00:00:00 2001
From: wendy <408182087@qq.com>
Date: Wed, 24 Sep 2025 15:27:48 +0800
Subject: [PATCH] =?UTF-8?q?20250924=20=E4=BF=AE=E6=94=B9=E6=8E=92=E4=BA=A7?=
=?UTF-8?q?=E8=AE=A1=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ProductionSchedulingPlanService.cs | 2 +
.../HJGL/WeldingManage/WeldJointService.cs | 130 ++++++++++++++----
.../PreDesign/ProductionSchedulingPlan.aspx | 30 ++--
.../ProductionSchedulingPlan.aspx.cs | 112 +++++++++++----
.../ProductionSchedulingPlan.aspx.designer.cs | 18 ---
5 files changed, 215 insertions(+), 77 deletions(-)
diff --git a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
index ab72d20e..7e5d5131 100644
--- a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
+++ b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs
@@ -55,6 +55,8 @@ namespace BLL
newPlan.CompletedCount = plan.CompletedCount;
newPlan.CompletedRate = plan.CompletedRate;
newPlan.TotalCompletedRate = plan.TotalCompletedRate;
+ newPlan.OnDayCompleteDyne = plan.OnDayCompleteDyne;
+ newPlan.NextDayCompleteDyne = plan.NextDayCompleteDyne;
db.HJGL_ProductionSchedulingPlan.InsertOnSubmit(newPlan);
db.SubmitChanges();
}
diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs
index 230f8d1e..e9c4010f 100644
--- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs
@@ -640,9 +640,9 @@ namespace BLL
/// 流水段
/// 材质
/// 口径
- /// 1-总达因,2-完成总达因
+ /// 1-达因,2-完成达因
///
- public static decimal? GetSizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber,string type)
+ public static decimal? GetSizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber, string type)
{
Model.SGGLDB db = Funs.DB;
decimal? sizeSum = 0;
@@ -655,38 +655,40 @@ namespace BLL
join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection && z.SteelType == steelType
&& y.PipeArea == "1" && x.JointAttribute == "预制口"
- //&& Convert.ToInt32(x.DNDia.Substring(2, x.DNDia.Length - 2)) < c
select x);
foreach (var item in weldjoints)
{
- int s = Convert.ToInt32(item.DNDia.Substring(2, item.DNDia.Length - 2));
- if (caliber.Substring(0, 1) == "<" && s < c)
+ if (!string.IsNullOrEmpty(item.DNDia) && item.DNDia != null)
{
- if (type == "1")
+ int s = Convert.ToInt32(item.DNDia.Substring(2, item.DNDia.Length - 2));
+ if (caliber.Substring(0, 1) == "<" && s < c)
{
- sizeSum += item.Size;
- }
- else
- {
- if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ if (type == "1")
{
sizeSum += item.Size;
}
+ else
+ {
+ if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ {
+ sizeSum += item.Size;
+ }
+ }
}
- }
- else if (caliber.Substring(0, 1) == "≥" && s >= c)
- {
- if (type == "1")
+ else if (caliber.Substring(0, 1) == "≥" && s >= c)
{
- sizeSum += item.Size;
- }
- else
- {
- if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ if (type == "1")
{
sizeSum += item.Size;
}
+ else
+ {
+ if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ {
+ sizeSum += item.Size;
+ }
+ }
}
}
}
@@ -695,14 +697,14 @@ namespace BLL
}
///
- /// 根据单位工程、流水段获取总达因
+ /// 根据单位工程、流水段获取优先级总达因、完成总达因
///
/// 项目id
/// 单位工程
/// 流水段
/// 1-总达因,2-完成总达因
///
- public static decimal? GetSizeSumByUnitWorkIdAndFlowingSection(string projectId, string unitWorkId, string flowingSection,string type)
+ public static decimal? GetSizeSumByUnitWorkIdAndFlowingSection(string projectId, string unitWorkId, string flowingSection, string type)
{
Model.SGGLDB db = Funs.DB;
decimal? sizeSum = 0;
@@ -710,7 +712,7 @@ namespace BLL
{
sizeSum = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
- join z in db.Base_Material on y.MaterialId equals z.MaterialId
+ //join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection
&& y.PipeArea == "1" && x.JointAttribute == "预制口"
select x.Size).Sum();
@@ -719,7 +721,7 @@ namespace BLL
{
sizeSum = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
- join z in db.Base_Material on y.MaterialId equals z.MaterialId
+ //join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection
&& y.PipeArea == "1" && x.JointAttribute == "预制口"
&& x.WeldingDailyId != "" && x.WeldingDailyId != null
@@ -727,5 +729,85 @@ namespace BLL
}
return sizeSum;
}
+
+ ///
+ /// 根据单位工程、流水段、材质获取总达因(按材质)
+ ///
+ /// 项目id
+ /// 单位工程id
+ /// 流水号
+ /// 材质
+ ///
+ public static decimal? GetSizeSumByUnitWorkIdAndFlowingSectionAndMaterial(string projectId, string unitWorkId, string flowingSection, string steelType)
+ {
+ Model.SGGLDB db = Funs.DB;
+ decimal? sizeSum = 0;
+ sizeSum = (from x in db.HJGL_WeldJoint
+ join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
+ join z in db.Base_Material on y.MaterialId equals z.MaterialId
+ where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection
+ && y.PipeArea == "1" && x.JointAttribute == "预制口"
+ && z.SteelType == steelType
+ select x.Size).Sum();
+ return sizeSum;
+ }
+
+
+ ///
+ /// 获取当日已完成量
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static decimal? GetCurrentDaySizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber)
+ {
+ Model.SGGLDB db = Funs.DB;
+ decimal? sizeSum = 0;
+ int c = 0;
+ if (!string.IsNullOrEmpty(caliber))
+ {
+ c = Convert.ToInt32(caliber.Substring(1, caliber.Length - 1));
+ var weldjoints = (from x in db.HJGL_WeldJoint
+ join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
+ join z in db.Base_Material on y.MaterialId equals z.MaterialId
+ where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection && z.SteelType == steelType
+ && y.PipeArea == "1" && x.JointAttribute == "预制口"
+ select x);
+
+ foreach (var item in weldjoints)
+ {
+ if (!string.IsNullOrEmpty(item.DNDia) && item.DNDia != null)
+ {
+ int s = Convert.ToInt32(item.DNDia.Substring(2, item.DNDia.Length - 2));
+ if (caliber.Substring(0, 1) == "<" && s < c)
+ {
+ if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ {
+ var weldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(item.WeldingDailyId);
+ if (weldingDaily != null && weldingDaily.WeldingDate.HasValue && weldingDaily.WeldingDate.Value.ToShortDateString() == DateTime.Now.ToShortDateString())
+ {
+ sizeSum += item.Size;
+ }
+ }
+ }
+ else if (caliber.Substring(0, 1) == "≥" && s >= c)
+ {
+ if (!string.IsNullOrEmpty(item.WeldingDailyId))
+ {
+ var weldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(item.WeldingDailyId);
+ if (weldingDaily != null && weldingDaily.WeldingDate.HasValue && weldingDaily.WeldingDate.Value.ToShortDateString() == DateTime.Now.ToShortDateString())
+ {
+ sizeSum += item.Size;
+ }
+ }
+ }
+ }
+ }
+ }
+ return sizeSum;
+ }
}
}
diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx
index adee1de5..fcbc9628 100644
--- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx
@@ -7,6 +7,12 @@
排产计划
+