提交代码
This commit is contained in:
@@ -0,0 +1,172 @@
|
|||||||
|
|
||||||
|
ALTER VIEW [dbo].[View_HJGL_WeldJoint]
|
||||||
|
AS
|
||||||
|
SELECT jot.[ProjectId] --项目Id
|
||||||
|
,pipe.[UnitWorkId] --单位工程Id
|
||||||
|
,uw.UnitWorkName --单位工程
|
||||||
|
,pipe.[UnitId] --单位Id
|
||||||
|
,unit.UnitName --单位
|
||||||
|
,jot.[PipelineCode] --管线号
|
||||||
|
,pipe.[SingleNumber] --单线图号
|
||||||
|
,pipe.[SingleName] --图纸名称
|
||||||
|
,pipe.[MediumId] --介质Id
|
||||||
|
,medium.MediumCode
|
||||||
|
,medium.MediumName --介质名称
|
||||||
|
,pipe.[PipingClassId] --管道等级Id
|
||||||
|
,pipingClass.PipingClassCode --管道等级
|
||||||
|
,pipe.[DetectionRateId] --探伤比例Id
|
||||||
|
,dr.DetectionRateCode --探伤比例(例如5,10,20)
|
||||||
|
,pipe.DetectionType --探伤类型Id(可能多个,中间用|分隔)
|
||||||
|
,STUFF((SELECT ',' + DetectionTypeCode FROM Base_DetectionType
|
||||||
|
WHERE CHARINDEX('|'+LTRIM(DetectionTypeId)+'|','|'+ pipe.DetectionType + '|') > 0 FOR XML PATH('') ), 1, 1, '') AS DetectionTypeStr --探伤类型(可能多个,中间用,分隔)
|
||||||
|
,pipe.DesignTemperature --设计温度℃
|
||||||
|
,pipe.DesignPress --设计压力Mpa(g)
|
||||||
|
,pipe.TestMedium --压力试验介质Id
|
||||||
|
,tm.MediumName AS TestMediumName --压力试验介质
|
||||||
|
,pipe.TestPressure --压力试验压力Mpa(g)
|
||||||
|
,pipe.PressurePipingClassId --压力管道级别Id
|
||||||
|
,ppc.PressurePipingClassCode --压力管道级别
|
||||||
|
,pipe.PipeLenth --管线长度(m)
|
||||||
|
,pipe.LeakMedium --泄露性试验介质Id
|
||||||
|
,tm2.MediumName AS LeakMediumName --泄露性试验介质
|
||||||
|
,pipe.LeakPressure --泄露性试验压力Mpa(g)
|
||||||
|
,pipe.PCMedium --吹洗要求Id
|
||||||
|
,pm.PurgeMethodCode --吹洗要求
|
||||||
|
,pipe.VacuumPressure --真空试验压力Kpa(a)
|
||||||
|
,pipe.MaterialId --材质Id
|
||||||
|
,mat.MaterialCode AS PipeMaterialCode --材质
|
||||||
|
,pipe.Remark AS PipeRemark --备注
|
||||||
|
,pipe.FlowingSection as FlowingSection --流水段
|
||||||
|
,jot.[WeldJointId] --焊口Id
|
||||||
|
,jot.[WeldJointCode] --焊口号
|
||||||
|
,jot.[Material1Id] --材质1Id
|
||||||
|
,mat1.MaterialCode AS Material1Code --材质1
|
||||||
|
,jot.[Material2Id] --材质2Id
|
||||||
|
,mat2.MaterialCode AS Material2Code --材质2
|
||||||
|
,jot.[Dia] --外径
|
||||||
|
,jot.DNDia --DN公称直径
|
||||||
|
,jot.[Size] --达因
|
||||||
|
,jot.[Thickness] --壁厚
|
||||||
|
,jot.[Specification] --规格
|
||||||
|
,jot.[WeldTypeId] --焊缝类型Id
|
||||||
|
,WeldType.WeldTypeCode --焊缝类型
|
||||||
|
,jot.[DetectionTypeId] --检测类型Id
|
||||||
|
,ndt.DetectionTypeCode --检测类型
|
||||||
|
,jot.[Components1Id] --组件1号Id
|
||||||
|
,com1.ComponentsCode AS ComponentsCode1 --组件1号
|
||||||
|
,jot.[Components2Id] --组件2号Id
|
||||||
|
,com2.ComponentsCode AS ComponentsCode2 --组件2号
|
||||||
|
,jot.DesignIsHotProess --是否热处理
|
||||||
|
,CASE jot.DesignIsHotProess WHEN 1 THEN '是' ELSE '否' END AS DesignIsHotProessStr --是否热处理
|
||||||
|
,jot.[WeldingMethodId] --焊接方法Id
|
||||||
|
,WeldingMethod.WeldingMethodCode --焊接方法
|
||||||
|
,jot.WPQId --WPS的Id
|
||||||
|
,wps.WPQCode --WPS编号
|
||||||
|
,jot.[GrooveTypeId] --坡口类型Id
|
||||||
|
,GrooveType.GrooveTypeCode --坡口类型
|
||||||
|
,jot.[WeldingRod] --焊条Id
|
||||||
|
,rod.ConsumablesCode AS WeldingRodCode --焊条
|
||||||
|
,jot.[WeldingWire] --焊丝Id
|
||||||
|
,wire.ConsumablesCode AS WeldingWireCode --焊丝
|
||||||
|
,jot.PreTemperature --预热温度
|
||||||
|
,jot.[JointAttribute] --焊口属性
|
||||||
|
,jot.TwoJointType --二次焊口新增类型
|
||||||
|
,pipe.PipeArea --工厂预制/现场安装
|
||||||
|
,daily.WeldingDate as WeldingDateD
|
||||||
|
,CONVERT(VARCHAR(100), daily.WeldingDate, 23) AS WeldingDate --焊接日期
|
||||||
|
,BackingWelder.WelderCode AS BackingWelderCode --打底焊工
|
||||||
|
,CoverWelder.WelderCode AS CoverWelderCode --盖面焊工
|
||||||
|
,(CASE (SELECT COUNT(*) FROM [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||||
|
WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(ReportNo,'') FROM [dbo].[HJGL_HotProess_Trust] hpt
|
||||||
|
LEFT JOIN [dbo].[HJGL_HotProess_TrustItem] hpti ON hpti.HotProessTrustId=hpt.HotProessTrustId
|
||||||
|
WHERE hpti.WeldJointId=jot.WeldJointId) END) AS HotProessReportNo --热处理报告编号
|
||||||
|
,(CASE (SELECT TOP 1 IsCompleted FROM [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||||
|
WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '完成' WHEN 0 THEN '未完成' ELSE '未热处理' END) AS HotProessResult --热处理检测结果
|
||||||
|
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Hard_TrustItem hti
|
||||||
|
WHERE hti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(InspectionNum,'') FROM [dbo].HJGL_Hard_Trust ht
|
||||||
|
LEFT JOIN [dbo].HJGL_Hard_TrustItem hti ON hti.HardTrustID=ht.HardTrustID
|
||||||
|
WHERE hti.WeldJointId=jot.WeldJointId) END) AS HardReportNo --硬度报告编号
|
||||||
|
,(CASE (SELECT TOP 1 IsPass FROM [dbo].HJGL_Hard_TrustItem hti
|
||||||
|
WHERE hti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '合格' WHEN 0 THEN '不合格' ELSE '待检测' END) AS HardResult --硬度检测结果
|
||||||
|
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_BatchTrustItem bti
|
||||||
|
WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 TrustBatchCode FROM [dbo].HJGL_Batch_BatchTrust bt
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchId=bt.TrustBatchId
|
||||||
|
WHERE bti.WeldJointId=jot.WeldJointId) END) AS TrustBatchCode --委托单编号
|
||||||
|
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_NDEItem ndei
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||||
|
WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(NDECode,'') FROM [dbo].HJGL_Batch_NDE nde
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_NDEItem ndei ON ndei.NDEID=nde.NDEID
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||||
|
WHERE bti.WeldJointId=jot.WeldJointId) END) AS NDECode --检测单编号
|
||||||
|
,(CASE (SELECT TOP 1 CheckResult FROM [dbo].HJGL_Batch_NDEItem ndei
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||||
|
WHERE bti.WeldJointId=jot.WeldJointId) WHEN '1' THEN '合格' WHEN '2' THEN '不合格' ELSE '' END) AS CheckResult --检测结果
|
||||||
|
,jot.PipelineId
|
||||||
|
,jot.[JointArea]
|
||||||
|
,jot.[WeldingLocationId]
|
||||||
|
,jot.[HeartNo1]
|
||||||
|
,jot.[HeartNo2]
|
||||||
|
,jot.[IsHotProess]
|
||||||
|
,jot.[WeldingDailyId]
|
||||||
|
,jot.[BackingWelderId]
|
||||||
|
,jot.[CoverWelderId]
|
||||||
|
,jot.WeldingMode
|
||||||
|
,jot.Remark
|
||||||
|
,jot.IsTwoJoint
|
||||||
|
,jot.SubmitMan
|
||||||
|
,jot.AuditMan
|
||||||
|
,jot.AuditMan2
|
||||||
|
,jot.AuditDate
|
||||||
|
,jot.AuditDate2
|
||||||
|
,WeldingLocation.WeldingLocationCode
|
||||||
|
,CASE WHEN jot.WeldingDailyId IS NULL THEN '否' ELSE '是' END AS IsWelding
|
||||||
|
,CASE WHEN jot.IsHotProess=1 THEN '是' ELSE '否' END AS IsHotProessStr,
|
||||||
|
BackingWelder.PersonName AS BackingWelderName,
|
||||||
|
CoverWelder.PersonName AS CoverWelderName,
|
||||||
|
(CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL
|
||||||
|
THEN CoverWelder.WelderCode + '/' + BackingWelder.WelderCode
|
||||||
|
ELSE (ISNULL(CoverWelder.WelderCode,'') + ISNULL(BackingWelder.WelderCode,'')) END) AS WelderCode, --焊工
|
||||||
|
(CASE WHEN mat1.MaterialCode IS NOT NULL AND mat2.MaterialCode IS NOT NULL
|
||||||
|
THEN mat1.MaterialCode + '/' + mat2.MaterialCode
|
||||||
|
ELSE (ISNULL(mat1.MaterialCode,'') + ISNULL(mat2.MaterialCode,'')) END) AS MaterialCode, --材质
|
||||||
|
|
||||||
|
daily.WeldingDailyCode,
|
||||||
|
pointItem.PointBatchId,
|
||||||
|
point.PointBatchCode,
|
||||||
|
(CASE WHEN pointItem.PointState='1' THEN '已点口' WHEN pointItem.PointState='2' THEN '已扩透' ELSE '' END) AS IsPoint
|
||||||
|
FROM [dbo].[HJGL_WeldJoint] jot
|
||||||
|
LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId=jot.PipelineId
|
||||||
|
LEFT JOIN dbo.WBS_UnitWork uw ON uw.UnitWorkId=pipe.UnitWorkId
|
||||||
|
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId=pipe.UnitId
|
||||||
|
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId
|
||||||
|
LEFT JOIN dbo.Base_DetectionRate dr ON dr.DetectionRateId = pipe.DetectionRateId
|
||||||
|
LEFT JOIN Base_TestMedium tm ON tm.TestMediumId=pipe.TestMedium
|
||||||
|
LEFT JOIN Base_TestMedium tm2 ON tm2.TestMediumId=pipe.LeakMedium
|
||||||
|
LEFT JOIN Base_PurgeMethod pm ON pm.PurgeMethodId=pipe.PCMedium
|
||||||
|
LEFT JOIN Base_PressurePipingClass ppc ON ppc.PressurePipingClassId=pipe.PressurePipingClassId
|
||||||
|
LEFT JOIN Base_Material AS mat ON mat.MaterialId = pipe.MaterialId
|
||||||
|
LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id
|
||||||
|
LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id
|
||||||
|
LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=jot.WeldingMethodId
|
||||||
|
LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=jot.WeldingLocationId
|
||||||
|
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire
|
||||||
|
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod
|
||||||
|
LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=jot.GrooveTypeId
|
||||||
|
LEFT JOIN Base_Components AS com1 ON com1.ComponentsId = jot.Components1Id
|
||||||
|
LEFT JOIN Base_Components AS com2 ON com2.ComponentsId = jot.Components2Id
|
||||||
|
LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=jot.BackingWelderId and BackingWelder.ProjectId=jot.ProjectId
|
||||||
|
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=jot.CoverWelderId and CoverWelder.ProjectId=jot.ProjectId
|
||||||
|
LEFT JOIN dbo.HJGL_WeldingDaily AS daily ON daily.WeldingDailyId=jot.WeldingDailyId
|
||||||
|
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipe.PipingClassId
|
||||||
|
LEFT JOIN dbo.Base_Medium medium ON medium.MediumId = pipe.MediumId
|
||||||
|
LEFT JOIN dbo.Base_DetectionType ndt ON ndt.DetectionTypeId = jot.DetectionTypeId
|
||||||
|
LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = jot.WPQId
|
||||||
|
LEFT JOIN dbo.HJGL_Batch_PointBatchItem pointItem ON pointItem.WeldJointId = jot.WeldJointId
|
||||||
|
LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.PointBatchId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
@@ -20,24 +20,24 @@ namespace BLL
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工厂预制
|
/// 工厂预制
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string PipeArea_SHOP="1";
|
public const string PipeArea_SHOP = "1";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 现场安装
|
/// 现场安装
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string PipeArea_FIELD = "2";
|
public const string PipeArea_FIELD = "2";
|
||||||
|
|
||||||
public const int pageSize = 20;
|
public const int pageSize = 20;
|
||||||
public static List<Model.HJGL_Pipeline> hJGL_Pipelines
|
public static List<Model.HJGL_Pipeline> hJGL_Pipelines
|
||||||
{
|
{
|
||||||
|
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实际日期类型
|
/// 实际日期类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum ActDateType
|
public enum ActDateType
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实际开始日期(预制)
|
/// 实际开始日期(预制)
|
||||||
@@ -46,16 +46,16 @@ namespace BLL
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实际完成日期(预制)
|
/// 实际完成日期(预制)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ActDateEnd_Shop ,
|
ActDateEnd_Shop,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实际开始日期(安装)
|
/// 实际开始日期(安装)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ActDateStart_FIELD ,
|
ActDateStart_FIELD,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实际完成日期(安装)
|
/// 实际完成日期(安装)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ActDateEnd_FIELD ,
|
ActDateEnd_FIELD,
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 管线划分
|
/// 管线划分
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -67,7 +67,7 @@ namespace BLL
|
|||||||
list[1] = new ListItem("现场安装", PipeArea_FIELD);
|
list[1] = new ListItem("现场安装", PipeArea_FIELD);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
public static void RestPipelineAndJoints(string projectid )
|
public static void RestPipelineAndJoints(string projectid)
|
||||||
{
|
{
|
||||||
PipelineService.hJGL_Pipelines = PipelineService.GetPipelinesByProjectId(projectid);
|
PipelineService.hJGL_Pipelines = PipelineService.GetPipelinesByProjectId(projectid);
|
||||||
WeldJointService.hJGL_WeldJoints = WeldJointService.GetWeldJointByProjectid(projectid);
|
WeldJointService.hJGL_WeldJoints = WeldJointService.GetWeldJointByProjectid(projectid);
|
||||||
@@ -92,7 +92,7 @@ namespace BLL
|
|||||||
var PlanEndDate = mdoel.PlanEndDate;
|
var PlanEndDate = mdoel.PlanEndDate;
|
||||||
var ActStartDate = new DateTime?();
|
var ActStartDate = new DateTime?();
|
||||||
var ActEndDate = new DateTime?();
|
var ActEndDate = new DateTime?();
|
||||||
if (!string .IsNullOrEmpty(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD)))
|
if (!string.IsNullOrEmpty(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD)))
|
||||||
{
|
{
|
||||||
ActStartDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD));
|
ActStartDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD));
|
||||||
}
|
}
|
||||||
@@ -100,22 +100,22 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
ActEndDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateEnd_FIELD));
|
ActEndDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateEnd_FIELD));
|
||||||
}
|
}
|
||||||
if (PlanStartDate==null|| PlanEndDate==null)
|
if (PlanStartDate == null || PlanEndDate == null)
|
||||||
{
|
{
|
||||||
mdoel.State = 0;
|
mdoel.State = 0;
|
||||||
|
|
||||||
UpdatePipeline(mdoel);
|
UpdatePipeline(mdoel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ActStartDate==null&&DateTime.Compare(DateTime.Now,PlanStartDate.Value)<0)
|
if (ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) < 0)
|
||||||
{
|
{
|
||||||
mdoel.State = 0;
|
mdoel.State = 0;
|
||||||
}
|
}
|
||||||
else if(ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) > 0)
|
else if (ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) > 0)
|
||||||
{
|
{
|
||||||
mdoel.State = 1;
|
mdoel.State = 1;
|
||||||
}
|
}
|
||||||
else if (ActStartDate!=null && DateTime.Compare(ActStartDate.Value, PlanStartDate.Value)<0 && ActEndDate==null)
|
else if (ActStartDate != null && DateTime.Compare(ActStartDate.Value, PlanStartDate.Value) < 0 && ActEndDate == null)
|
||||||
{
|
{
|
||||||
mdoel.State = 2;
|
mdoel.State = 2;
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ namespace BLL
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetDateByPipelineId(object pipelineId, ActDateType actDateType)
|
public static string GetDateByPipelineId(object pipelineId, ActDateType actDateType)
|
||||||
{
|
{
|
||||||
string result ="";
|
string result = "";
|
||||||
string _pipelineId = pipelineId.ToString();
|
string _pipelineId = pipelineId.ToString();
|
||||||
string ActDateStart_Shop = "";
|
string ActDateStart_Shop = "";
|
||||||
string ActDateEnd_Shop = "";
|
string ActDateEnd_Shop = "";
|
||||||
@@ -149,15 +149,16 @@ namespace BLL
|
|||||||
var joints = BLL.WeldJointService.GetWeldJointsByPipelineId(_pipelineId);
|
var joints = BLL.WeldJointService.GetWeldJointsByPipelineId(_pipelineId);
|
||||||
int joint_Shop_count = joints.Where(x => x.JointAttribute == "预制口").Count();
|
int joint_Shop_count = joints.Where(x => x.JointAttribute == "预制口").Count();
|
||||||
int joint_Field_count = joints.Where(x => x.JointAttribute == "安装口").Count();
|
int joint_Field_count = joints.Where(x => x.JointAttribute == "安装口").Count();
|
||||||
var TaskJoints = (from x in Funs.DB.View_HJGL_WeldingTask where x.ProjectId == pipemodel.ProjectId && x.PipelineCode == pipemodel.PipelineCode && x.WeldingDailyId!=null
|
var TaskJoints = (from x in Funs.DB.View_HJGL_WeldingTask
|
||||||
select x).ToList();
|
where x.ProjectId == pipemodel.ProjectId && x.PipelineCode == pipemodel.PipelineCode && x.WeldingDailyId != null
|
||||||
|
select x).ToList();
|
||||||
var TaskJoints_Shop = TaskJoints.Where(x => x.JointAttribute == "预制口").ToList();
|
var TaskJoints_Shop = TaskJoints.Where(x => x.JointAttribute == "预制口").ToList();
|
||||||
var TaskJoints_Field= TaskJoints.Where(x => x.JointAttribute == "安装口").ToList();
|
var TaskJoints_Field = TaskJoints.Where(x => x.JointAttribute == "安装口").ToList();
|
||||||
if (TaskJoints_Shop.Count>0)
|
if (TaskJoints_Shop.Count > 0)
|
||||||
{
|
{
|
||||||
ActDateStart_Shop = TaskJoints_Shop.OrderBy(x => x.TaskDate).First().TaskDate.Value.ToShortDateString();
|
ActDateStart_Shop = TaskJoints_Shop.OrderBy(x => x.TaskDate).First().TaskDate.Value.ToShortDateString();
|
||||||
}
|
}
|
||||||
if (joint_Shop_count== TaskJoints_Shop.Count&& joint_Shop_count>0)
|
if (joint_Shop_count == TaskJoints_Shop.Count && joint_Shop_count > 0)
|
||||||
{
|
{
|
||||||
ActDateEnd_Shop = TaskJoints_Shop.OrderByDescending(x => x.TaskDate).First().TaskDate.Value.Date.ToShortDateString();
|
ActDateEnd_Shop = TaskJoints_Shop.OrderByDescending(x => x.TaskDate).First().TaskDate.Value.Date.ToShortDateString();
|
||||||
}
|
}
|
||||||
@@ -195,13 +196,13 @@ namespace BLL
|
|||||||
public static void UpdataDateByWeldJointId(string WeldJointId)
|
public static void UpdataDateByWeldJointId(string WeldJointId)
|
||||||
{
|
{
|
||||||
|
|
||||||
DateTime ? ActDateStart_FIELD = new DateTime();
|
DateTime? ActDateStart_FIELD = new DateTime();
|
||||||
DateTime ? ActDateEnd_FIELD = new DateTime();
|
DateTime? ActDateEnd_FIELD = new DateTime();
|
||||||
|
|
||||||
string JointAttribute = "";
|
string JointAttribute = "";
|
||||||
|
|
||||||
var model_joint=BLL.WeldJointService.GetWeldJointByWeldJointId(WeldJointId);
|
var model_joint = BLL.WeldJointService.GetWeldJointByWeldJointId(WeldJointId);
|
||||||
if (model_joint!=null)
|
if (model_joint != null)
|
||||||
{
|
{
|
||||||
JointAttribute = model_joint.JointAttribute;
|
JointAttribute = model_joint.JointAttribute;
|
||||||
var model_pipeline = GetPipelineByPipelineId(model_joint.PipelineId);
|
var model_pipeline = GetPipelineByPipelineId(model_joint.PipelineId);
|
||||||
@@ -251,7 +252,7 @@ namespace BLL
|
|||||||
public static List<HJGL_Pipeline> GetHJGL_PipelineList(HJGL_Pipeline model)
|
public static List<HJGL_Pipeline> GetHJGL_PipelineList(HJGL_Pipeline model)
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
var db = Funs.DB;
|
||||||
var pipelineList =( from x in Funs.DB.HJGL_Pipeline
|
var pipelineList = (from x in Funs.DB.HJGL_Pipeline
|
||||||
where
|
where
|
||||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
||||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
||||||
@@ -260,15 +261,15 @@ namespace BLL
|
|||||||
&& (string.IsNullOrEmpty(model.DesignPress) || x.DesignPress.Contains(model.DesignPress))
|
&& (string.IsNullOrEmpty(model.DesignPress) || x.DesignPress.Contains(model.DesignPress))
|
||||||
/* && (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))*/
|
/* && (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))*/
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
if (model.IsFinished!=null)
|
if (model.IsFinished != null)
|
||||||
{
|
{
|
||||||
if (model.IsFinished==true)
|
if (model.IsFinished == true)
|
||||||
{
|
{
|
||||||
pipelineList= pipelineList.Where(x => x.IsFinished == true).ToList();
|
pipelineList = pipelineList.Where(x => x.IsFinished == true).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pipelineList = pipelineList.Where(x => x.IsFinished == false||x.IsFinished==null).ToList();
|
pipelineList = pipelineList.Where(x => x.IsFinished == false || x.IsFinished == null).ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,16 +339,17 @@ namespace BLL
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="unitworkId"></param>
|
/// <param name="unitworkId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<string> GetNoComPipelinesByUnitWordId(string unitworkId)
|
public static List<string> GetNoComPipelinesByUnitWordId(string unitworkId)
|
||||||
{
|
{
|
||||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||||
where x.UnitWorkId == unitworkId
|
where x.UnitWorkId == unitworkId
|
||||||
select new {
|
select new
|
||||||
PipelineId=x.PipelineId,
|
{
|
||||||
WeldingDate=x.WeldingDate,
|
PipelineId = x.PipelineId,
|
||||||
PipelineCode=x.PipelineCode
|
WeldingDate = x.WeldingDate,
|
||||||
|
PipelineCode = x.PipelineCode
|
||||||
}).Distinct();
|
}).Distinct();
|
||||||
if (q.Count()==0)
|
if (q.Count() == 0)
|
||||||
{
|
{
|
||||||
return new List<string>();
|
return new List<string>();
|
||||||
}
|
}
|
||||||
@@ -359,10 +361,10 @@ namespace BLL
|
|||||||
Count = (from x2 in g where x2.WeldingDate != null && x2.WeldingDate != "" select x2).Count(),
|
Count = (from x2 in g where x2.WeldingDate != null && x2.WeldingDate != "" select x2).Count(),
|
||||||
};
|
};
|
||||||
var NowComPipelineCode = (from x in q
|
var NowComPipelineCode = (from x in q
|
||||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||||
where y.Count == 0
|
where y.Count == 0
|
||||||
select x.PipelineCode
|
select x.PipelineCode
|
||||||
).Distinct(). ToList();
|
).Distinct().ToList();
|
||||||
return NowComPipelineCode;
|
return NowComPipelineCode;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -370,7 +372,7 @@ namespace BLL
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="projectid"></param>
|
/// <param name="projectid"></param>
|
||||||
/// <param name="unitworkid"></param>
|
/// <param name="unitworkid"></param>
|
||||||
public static void DownPipeArea_SHOPFile(string projectid,string unitworkid)
|
public static void DownPipeArea_SHOPFile(string projectid, string unitworkid)
|
||||||
{
|
{
|
||||||
string templatePath = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut_SHOP.xlsx";
|
string templatePath = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut_SHOP.xlsx";
|
||||||
string path = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut_SHOP.xlsx";
|
string path = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut_SHOP.xlsx";
|
||||||
@@ -442,7 +444,7 @@ namespace BLL
|
|||||||
["Data"] = tb,
|
["Data"] = tb,
|
||||||
};
|
};
|
||||||
MiniExcel.SaveAsByTemplate(path, templatePath, value);
|
MiniExcel.SaveAsByTemplate(path, templatePath, value);
|
||||||
HJGL_DataImportService.DownFile(path.Replace(Funs.RootPath,"") , "焊接施工计划(预制).xlsx");
|
HJGL_DataImportService.DownFile(path.Replace(Funs.RootPath, ""), "焊接施工计划(预制).xlsx");
|
||||||
File.Delete(path);
|
File.Delete(path);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -555,10 +557,10 @@ namespace BLL
|
|||||||
q = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == pipelineCode && x.UnitWorkId == unitWorkId);
|
q = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == pipelineCode && x.UnitWorkId == unitWorkId);
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加管线信息
|
/// 添加管线信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pipeline"></param>
|
/// <param name="pipeline"></param>
|
||||||
public static void AddPipeline(Model.HJGL_Pipeline pipeline)
|
public static void AddPipeline(Model.HJGL_Pipeline pipeline)
|
||||||
{
|
{
|
||||||
Model.SGGLDB db = Funs.DB;
|
Model.SGGLDB db = Funs.DB;
|
||||||
@@ -589,7 +591,7 @@ namespace BLL
|
|||||||
newPipeline.PCtype = pipeline.PCtype;
|
newPipeline.PCtype = pipeline.PCtype;
|
||||||
newPipeline.MaterialId = pipeline.MaterialId;
|
newPipeline.MaterialId = pipeline.MaterialId;
|
||||||
newPipeline.State = pipeline.State;
|
newPipeline.State = pipeline.State;
|
||||||
newPipeline.FlowingSection=pipeline.FlowingSection;
|
newPipeline.FlowingSection = pipeline.FlowingSection;
|
||||||
db.HJGL_Pipeline.InsertOnSubmit(newPipeline);
|
db.HJGL_Pipeline.InsertOnSubmit(newPipeline);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
@@ -755,7 +757,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void BindTreeNodes(FineUIPro.TreeNode node,string pipecode,string ProjectId,int pageSize)
|
public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode, string ProjectId, int pageSize)
|
||||||
{
|
{
|
||||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||||
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
|
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
|
||||||
@@ -798,7 +800,7 @@ namespace BLL
|
|||||||
/// <param name="MaterialCode"></param>
|
/// <param name="MaterialCode"></param>
|
||||||
/// <param name="ProjectId"></param>
|
/// <param name="ProjectId"></param>
|
||||||
/// <param name="pageSize"></param>
|
/// <param name="pageSize"></param>
|
||||||
public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode,string MaterialCode, string ProjectId, int pageSize)
|
public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode, string MaterialCode, string ProjectId, int pageSize)
|
||||||
{
|
{
|
||||||
//var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
//var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||||
// where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
|
// where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
|
||||||
@@ -806,8 +808,8 @@ namespace BLL
|
|||||||
// orderby x.PipelineCode
|
// orderby x.PipelineCode
|
||||||
// select x).ToList();
|
// select x).ToList();
|
||||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||||
join y in Funs.DB.HJGL_PipeLineMat.Where(m => m.MaterialCode.Contains(MaterialCode)) on x.PipelineId equals y.PipelineId
|
join y in Funs.DB.HJGL_PipeLineMat.Where(m => m.MaterialCode.Contains(MaterialCode)) on x.PipelineId equals y.PipelineId
|
||||||
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(pipecode)
|
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(pipecode)
|
||||||
select x).Distinct().ToList();
|
select x).Distinct().ToList();
|
||||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList();
|
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList();
|
||||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||||
@@ -837,17 +839,22 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void BindTreeNodes(FineUIPro.TreeNode node,bool isExitWPQId, string pipecode, string ProjectId, int pageSize)
|
public static void BindTreeNodes(FineUIPro.TreeNode node, bool isExitWPQId, string pipecode, string ProjectId, int pageSize, string pipeArea)
|
||||||
{
|
{
|
||||||
|
string pipeAreasql = string.Empty;
|
||||||
|
if (pipeArea != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
pipeAreasql += " AND PipeArea='" + pipeArea + "'";
|
||||||
|
}
|
||||||
if (isExitWPQId)
|
if (isExitWPQId)
|
||||||
{
|
{
|
||||||
string strSql = "SELECT distinct PipelineId, PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL order by PipelineCode";
|
string strSql = "SELECT distinct PipelineId, PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql + " order by PipelineCode";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
listStr.Add(new SqlParameter("@UnitWorkId", node.NodeID));
|
listStr.Add(new SqlParameter("@UnitWorkId", node.NodeID));
|
||||||
if (!string .IsNullOrEmpty(pipecode))
|
if (!string.IsNullOrEmpty(pipecode))
|
||||||
{
|
{
|
||||||
strSql += " and PipelineCode=@PipelineCode ";
|
strSql += " and PipelineCode=@PipelineCode ";
|
||||||
listStr.Add(new SqlParameter("@PipelineCode", ""+ pipecode + ""));
|
listStr.Add(new SqlParameter("@PipelineCode", "" + pipecode + ""));
|
||||||
|
|
||||||
}
|
}
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
@@ -890,6 +897,10 @@ namespace BLL
|
|||||||
&& x.PipelineCode.Contains(pipecode)
|
&& x.PipelineCode.Contains(pipecode)
|
||||||
orderby x.PipelineCode
|
orderby x.PipelineCode
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
|
if (pipeArea != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
pipeline = pipeline.Where(x => x.PipeArea == pipeArea).ToList();
|
||||||
|
}
|
||||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList();
|
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList();
|
||||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||||
|
|||||||
@@ -37,6 +37,10 @@
|
|||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
<f:Toolbar runat="server" ToolbarAlign="Left">
|
<f:Toolbar runat="server" ToolbarAlign="Left">
|
||||||
<Items>
|
<Items>
|
||||||
|
<f:DropDownList ID="drpPipeArea" Label="管线划分"
|
||||||
|
runat="server" LabelWidth="100px"
|
||||||
|
Width="200px" LabelAlign="Right">
|
||||||
|
</f:DropDownList>
|
||||||
<f:HiddenField runat="server" ID="hdUnitWorkId"></f:HiddenField>
|
<f:HiddenField runat="server" ID="hdUnitWorkId"></f:HiddenField>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
this.drpJointAttribute.DataValueField = "Value";
|
this.drpJointAttribute.DataValueField = "Value";
|
||||||
this.drpJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttribute();
|
this.drpJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttribute();
|
||||||
this.drpJointAttribute.DataBind();
|
this.drpJointAttribute.DataBind();
|
||||||
|
///管线划分
|
||||||
|
this.drpPipeArea.DataTextField = "Text";
|
||||||
|
this.drpPipeArea.DataValueField = "Value";
|
||||||
|
this.drpPipeArea.DataSource = BLL.PipelineService.GetPipeArea();
|
||||||
|
this.drpPipeArea.DataBind();
|
||||||
|
Funs.FineUIPleaseSelect(this.drpPipeArea);
|
||||||
this.InitTreeMenu();
|
this.InitTreeMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,10 +78,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||||
//}
|
//}
|
||||||
|
string pipeAreasql = string.Empty;
|
||||||
|
if (this.drpPipeArea.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
pipeAreasql += " AND PipeArea='" + this.drpPipeArea.SelectedValue + "'";
|
||||||
|
}
|
||||||
if (unitWork1.Count() > 0)
|
if (unitWork1.Count() > 0)
|
||||||
{
|
{
|
||||||
foreach (var q in unitWork1)
|
foreach (var q in unitWork1)
|
||||||
@@ -83,7 +93,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
int a = 0;
|
int a = 0;
|
||||||
if (ckNOEdit.Checked)
|
if (ckNOEdit.Checked)
|
||||||
{
|
{
|
||||||
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL";
|
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql;
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
|
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
@@ -93,7 +103,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
if (this.drpPipeArea.SelectedValue == BLL.Const._Null)
|
||||||
|
{
|
||||||
|
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == this.drpPipeArea.SelectedValue select x).Count();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||||
@@ -122,7 +139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
int a = 0;
|
int a = 0;
|
||||||
if (ckNOEdit.Checked)
|
if (ckNOEdit.Checked)
|
||||||
{
|
{
|
||||||
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL";
|
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql;
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
|
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
@@ -132,11 +149,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
a = (from x in Funs.DB.HJGL_Pipeline
|
if (this.drpPipeArea.SelectedValue == BLL.Const._Null)
|
||||||
|
{
|
||||||
|
a = (from x in Funs.DB.HJGL_Pipeline
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||||
select x).Count();
|
select x).Count();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
a = (from x in Funs.DB.HJGL_Pipeline
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||||
|
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) && x.PipeArea == this.drpPipeArea.SelectedValue
|
||||||
|
select x).Count();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||||
TreeNode tn2 = new TreeNode();
|
TreeNode tn2 = new TreeNode();
|
||||||
@@ -174,7 +200,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
private void BindNodes(TreeNode node)
|
private void BindNodes(TreeNode node)
|
||||||
{
|
{
|
||||||
BLL.PipelineService.BindTreeNodes(node, ckNOEdit.Checked, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
BLL.PipelineService.BindTreeNodes(node, ckNOEdit.Checked, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize, this.drpPipeArea.SelectedValue);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -375,12 +401,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||||
{
|
{
|
||||||
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID &&x.JointAttribute==drpJointAttribute.SelectedValue select x;
|
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.JointAttribute == drpJointAttribute.SelectedValue select x;
|
||||||
if (jotList.Count() > 0)
|
if (jotList.Count() > 0)
|
||||||
{
|
{
|
||||||
foreach (var jot in jotList)
|
foreach (var jot in jotList)
|
||||||
{
|
{
|
||||||
List<Model.View_HJGL_WPQ> wpqList =BLL.WPQListServiceService.GetMatchWPQ(jot,this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
|
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
|
||||||
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
|
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
|
||||||
if (wpqList != null)
|
if (wpqList != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,12 +7,10 @@
|
|||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class WeldingConDate
|
public partial class WeldingConDate {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
@@ -77,6 +75,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.CheckBox ckNOEdit;
|
protected global::FineUIPro.CheckBox ckNOEdit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpPipeArea 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpPipeArea;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// hdUnitWorkId 控件。
|
/// hdUnitWorkId 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
+22
-4
@@ -273628,6 +273628,8 @@ namespace Model
|
|||||||
|
|
||||||
private string _TwoJointType;
|
private string _TwoJointType;
|
||||||
|
|
||||||
|
private string _PipeArea;
|
||||||
|
|
||||||
private System.Nullable<System.DateTime> _WeldingDateD;
|
private System.Nullable<System.DateTime> _WeldingDateD;
|
||||||
|
|
||||||
private string _WeldingDate;
|
private string _WeldingDate;
|
||||||
@@ -274814,6 +274816,22 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeArea", DbType="NChar(1)")]
|
||||||
|
public string PipeArea
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._PipeArea;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._PipeArea != value))
|
||||||
|
{
|
||||||
|
this._PipeArea = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDateD", DbType="DateTime")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDateD", DbType="DateTime")]
|
||||||
public System.Nullable<System.DateTime> WeldingDateD
|
public System.Nullable<System.DateTime> WeldingDateD
|
||||||
{
|
{
|
||||||
@@ -293173,7 +293191,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")]
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -293734,7 +293752,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
|
||||||
public string PackageContent
|
public string PackageContent
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -293925,7 +293943,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
|
||||||
public string PackageContent
|
public string PackageContent
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -299184,7 +299202,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
|
||||||
public string PackageContent
|
public string PackageContent
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
Reference in New Issue
Block a user