1
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
alter table HJGL_PackagingManage add CompileMan nvarchar(50)
|
|
||||||
alter table HJGL_PackagingManage add CompileDate datetime
|
|
||||||
go
|
|
||||||
ALTER TABLE [dbo].[PTP_TestPackage] DROP CONSTRAINT [FK_PTP_TestPackage_Base_Unit]
|
|
||||||
GO
|
|
||||||
alter table PTP_TestPackage alter column UnitId nvarchar(500)
|
|
||||||
go
|
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
alter table HJGL_PackagingManage add CompileMan nvarchar(50)
|
||||||
|
alter table HJGL_PackagingManage add CompileDate datetime
|
||||||
|
go
|
||||||
|
ALTER TABLE [dbo].[PTP_TestPackage] DROP CONSTRAINT [FK_PTP_TestPackage_Base_Unit]
|
||||||
|
GO
|
||||||
|
alter table PTP_TestPackage alter column UnitId nvarchar(500)
|
||||||
|
go
|
||||||
|
|
||||||
|
alter table HJGL_ProductionSchedulingPlan alter column CompletedCount decimal(18,2)
|
||||||
|
alter table HJGL_ProductionSchedulingPlan add OnDayCompleteDyne decimal(18,2)
|
||||||
|
alter table HJGL_ProductionSchedulingPlan add NextDayCompleteDyne decimal(18,2)
|
||||||
|
go
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'当日已完成量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'OnDayCompleteDyne'
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'次日应完成量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'NextDayCompleteDyne'
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
ALTER PROCEDURE [dbo].[Sp_ProductionSchedulingPlanStatistics]
|
||||||
|
@projectId nvarchar(50)=null,
|
||||||
|
@unitWorkId nvarchar(50)=null,
|
||||||
|
@flowingSection nvarchar(50)=null,
|
||||||
|
@caliber nvarchar(50)=null
|
||||||
|
AS
|
||||||
|
/************排产计划统计**********/
|
||||||
|
SELECT distinct unitWork.UnitWorkId,
|
||||||
|
unitWork.UnitWorkCode,
|
||||||
|
unitWork.UnitWorkName,
|
||||||
|
unitWork.ProjectId,
|
||||||
|
pipeline.FlowingSection,
|
||||||
|
p.SteelType,
|
||||||
|
(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,
|
||||||
|
'<'+ @caliber as Caliber
|
||||||
|
--isnull(weldJoint.Dia,0) as Dia,
|
||||||
|
--isnull(maxDia.maxTotalDia+weldJoint.Dia,0) as totalDia,
|
||||||
|
--isnull(cTotal.cTotalCount,0) as cTotalCount,
|
||||||
|
--(case when isnull(total.totalCount,0)>0 then
|
||||||
|
--isnull(cTotal.cTotalCount,0) / isnull(cast(total.totalCount as decimal(18,2)),0)*100.0 else 0 end) as rate,
|
||||||
|
--(case when isnull(ScTotal.ScTotalCount,0)>0 then
|
||||||
|
--isnull(Stotal.StotalCount,0)/isnull(cast(ScTotal.ScTotalCount as decimal(18,2)),0)*100.0 else 0 end)as Srate
|
||||||
|
FROM WBS_UnitWork AS unitWork
|
||||||
|
LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1' and FlowingSection is not null and FlowingSection!='') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId
|
||||||
|
--材质
|
||||||
|
left join (select SteelType,UnitWorkId from HJGL_Pipeline
|
||||||
|
left join Base_Material on Base_Material.MaterialId = HJGL_Pipeline.MaterialId
|
||||||
|
where PipeArea='1' and HJGL_Pipeline.MaterialId is not null and HJGL_Pipeline.MaterialId!=''
|
||||||
|
)as p on p.UnitWorkId = unitWork.UnitWorkId
|
||||||
|
----达因
|
||||||
|
--LEFT JOIN (select sum(Size) 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)<@caliber
|
||||||
|
-- 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
|
||||||
|
----大于口径的达因
|
||||||
|
LEFT JOIN (select sum(Size) as maxTotalDia,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)>=@caliber
|
||||||
|
group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as maxDia on maxDia.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
and maxDia.FlowingSection = pipeline.FlowingSection
|
||||||
|
----总焊口数
|
||||||
|
--LEFT JOIN (select count(*) as totalCount,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)<@caliber
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as total on total.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and total.FlowingSection = pipeline.FlowingSection
|
||||||
|
----完成焊口数
|
||||||
|
--LEFT JOIN (select count(*) as cTotalCount,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)<@caliber
|
||||||
|
-- and HJGL_WeldJoint.WeldingDailyId is not null
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as cTotal on cTotal.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and cTotal.FlowingSection = pipeline.FlowingSection
|
||||||
|
----汇总总焊口
|
||||||
|
--LEFT JOIN (select count(*) as StotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint
|
||||||
|
-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId
|
||||||
|
-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='预制口'
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as Stotal on Stotal.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and total.FlowingSection = pipeline.FlowingSection
|
||||||
|
----完成焊口数
|
||||||
|
--LEFT JOIN (select count(*) as ScTotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint
|
||||||
|
-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId
|
||||||
|
-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='预制口'
|
||||||
|
-- and HJGL_WeldJoint.WeldingDailyId is not null
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as ScTotal on ScTotal.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and cTotal.FlowingSection = pipeline.FlowingSection
|
||||||
|
where (unitWork.ProjectId=@projectId or @projectId is null)
|
||||||
|
and (unitWork.UnitWorkId=@unitWorkId or @unitWorkId is null)
|
||||||
|
and (pipeline.FlowingSection=@flowingSection or @flowingSection is null)
|
||||||
|
union
|
||||||
|
|
||||||
|
SELECT distinct unitWork.UnitWorkId,
|
||||||
|
unitWork.UnitWorkCode,
|
||||||
|
unitWork.UnitWorkName,
|
||||||
|
unitWork.ProjectId,
|
||||||
|
pipeline.FlowingSection,
|
||||||
|
p.SteelType,
|
||||||
|
(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,
|
||||||
|
'≥'+@caliber as Caliber
|
||||||
|
--isnull(weldJoint.Dia,0) as Dia,
|
||||||
|
--isnull(weldJoint.Dia+minDia.minTotalDia,0) as TotalDia,
|
||||||
|
--isnull(cTotal.cTotalCount,0) as cTotalCount,
|
||||||
|
--(case when isnull(total.totalCount,0)>0 then
|
||||||
|
--isnull(cTotal.cTotalCount,0) / isnull(cast(total.totalCount as decimal(18,2)),0)*100.0 else 0 end) as rate,
|
||||||
|
--(case when isnull(ScTotal.ScTotalCount,0)>0 then
|
||||||
|
--isnull(Stotal.StotalCount,0)/isnull(cast(ScTotal.ScTotalCount as decimal(18,2)),0)*100.0 else 0 end)as Srate
|
||||||
|
FROM WBS_UnitWork AS unitWork
|
||||||
|
LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1' and FlowingSection is not null and FlowingSection!='') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId
|
||||||
|
|
||||||
|
--材质
|
||||||
|
left join (select SteelType,UnitWorkId from HJGL_Pipeline
|
||||||
|
left join Base_Material on Base_Material.MaterialId = HJGL_Pipeline.MaterialId
|
||||||
|
where PipeArea='1' and HJGL_Pipeline.MaterialId is not null and HJGL_Pipeline.MaterialId!=''
|
||||||
|
)as p on p.UnitWorkId = unitWork.UnitWorkId
|
||||||
|
|
||||||
|
--LEFT JOIN (select sum(Size) 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)>=@caliber
|
||||||
|
-- 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
|
||||||
|
----小于口径的达因
|
||||||
|
--LEFT JOIN (select sum(Size) as minTotalDia,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)<@caliber
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as minDia on minDia.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and minDia.FlowingSection = pipeline.FlowingSection
|
||||||
|
|
||||||
|
----总焊口数
|
||||||
|
--LEFT JOIN (select count(*) as totalCount,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)>=@caliber
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as total on total.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and total.FlowingSection = pipeline.FlowingSection
|
||||||
|
----完成焊口数
|
||||||
|
--LEFT JOIN (select count(*) as cTotalCount,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)>=@caliber
|
||||||
|
-- and HJGL_WeldJoint.WeldingDailyId is not null
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as cTotal on cTotal.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and cTotal.FlowingSection = pipeline.FlowingSection
|
||||||
|
|
||||||
|
--汇总总焊口
|
||||||
|
--LEFT JOIN (select count(*) as StotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint
|
||||||
|
-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId
|
||||||
|
-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='预制口'
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as Stotal on Stotal.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and total.FlowingSection = pipeline.FlowingSection
|
||||||
|
----完成焊口数
|
||||||
|
--LEFT JOIN (select count(*) as ScTotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint
|
||||||
|
-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId
|
||||||
|
-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='预制口'
|
||||||
|
-- and HJGL_WeldJoint.WeldingDailyId is not null
|
||||||
|
-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as ScTotal on ScTotal.UnitWorkId =unitWork.UnitWorkId
|
||||||
|
-- and cTotal.FlowingSection = pipeline.FlowingSection
|
||||||
|
where (unitWork.ProjectId=@projectId or @projectId is null)
|
||||||
|
and (unitWork.UnitWorkId=@unitWorkId or @unitWorkId is null)
|
||||||
|
and (pipeline.FlowingSection=@flowingSection or @flowingSection is null)
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ namespace BLL
|
|||||||
|
|
||||||
public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlan(string loginProjectId, string flowingSection, string unitWorkId, string material, string caliber)
|
public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlan(string loginProjectId, string flowingSection, string unitWorkId, string material, string caliber)
|
||||||
{
|
{
|
||||||
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.PipelineId == unitWorkId && e.Caliber == caliber);
|
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.PipelineId == unitWorkId && e.Material == material && e.Caliber == caliber);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -85,6 +85,8 @@ namespace BLL
|
|||||||
newPlan.CompletedCount = plan.CompletedCount;
|
newPlan.CompletedCount = plan.CompletedCount;
|
||||||
newPlan.CompletedRate = plan.CompletedRate;
|
newPlan.CompletedRate = plan.CompletedRate;
|
||||||
newPlan.TotalCompletedRate = plan.TotalCompletedRate;
|
newPlan.TotalCompletedRate = plan.TotalCompletedRate;
|
||||||
|
newPlan.OnDayCompleteDyne = plan.OnDayCompleteDyne;
|
||||||
|
newPlan.NextDayCompleteDyne = plan.NextDayCompleteDyne;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
db.SubmitChanges(System.Data.Linq.ConflictMode.ContinueOnConflict);
|
db.SubmitChanges(System.Data.Linq.ConflictMode.ContinueOnConflict);
|
||||||
|
|||||||
@@ -485,9 +485,9 @@ namespace BLL
|
|||||||
if (!string.IsNullOrEmpty(model.WeldJointCode))
|
if (!string.IsNullOrEmpty(model.WeldJointCode))
|
||||||
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode));
|
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode));
|
||||||
|
|
||||||
return baseQuery.ToList() ;
|
return baseQuery.ToList();
|
||||||
}
|
}
|
||||||
public static (List<Model.View_HJGL_WeldJoint> Data, int Total)GetDataBymodel(Model.View_HJGL_WeldJoint model, int pageIndex = 0, int pageSize = 20)
|
public static (List<Model.View_HJGL_WeldJoint> Data, int Total) GetDataBymodel(Model.View_HJGL_WeldJoint model, int pageIndex = 0, int pageSize = 20)
|
||||||
{
|
{
|
||||||
// 阶段一:构建基础查询
|
// 阶段一:构建基础查询
|
||||||
var baseQuery = Funs.DB.View_HJGL_WeldJoint.AsQueryable();
|
var baseQuery = Funs.DB.View_HJGL_WeldJoint.AsQueryable();
|
||||||
@@ -500,16 +500,16 @@ namespace BLL
|
|||||||
if (!string.IsNullOrEmpty(model.PipelineId))
|
if (!string.IsNullOrEmpty(model.PipelineId))
|
||||||
baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId);
|
baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId);
|
||||||
if (!string.IsNullOrEmpty(model.PipelineCode))
|
if (!string.IsNullOrEmpty(model.PipelineCode))
|
||||||
baseQuery = baseQuery.Where(x => x.PipelineCode .Contains(model.PipelineCode));
|
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(model.PipelineCode));
|
||||||
if (!string.IsNullOrEmpty(model.WeldJointCode))
|
if (!string.IsNullOrEmpty(model.WeldJointCode))
|
||||||
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains( model.WeldJointCode));
|
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode));
|
||||||
|
|
||||||
// 阶段三:排序与分页控制(索引优化关键)
|
// 阶段三:排序与分页控制(索引优化关键)
|
||||||
var orderedQuery = baseQuery.OrderBy(x=>x.PipelineId).ThenBy(x => x.WeldJointCode);
|
var orderedQuery = baseQuery.OrderBy(x => x.PipelineId).ThenBy(x => x.WeldJointCode);
|
||||||
|
|
||||||
// 阶段四:分页执行(数据库层面分页)
|
// 阶段四:分页执行(数据库层面分页)
|
||||||
var pagedData = orderedQuery
|
var pagedData = orderedQuery
|
||||||
.Skip((pageIndex ) * pageSize)
|
.Skip((pageIndex) * pageSize)
|
||||||
.Take(pageSize)
|
.Take(pageSize)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
@@ -629,5 +629,103 @@ namespace BLL
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据单位工程、流水号、材质、口径获取达因数
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="unitWorkId">单位工程</param>
|
||||||
|
/// <param name="flowingSection">流水段</param>
|
||||||
|
/// <param name="steelType">材质</param>
|
||||||
|
/// <param name="caliber">口径</param>
|
||||||
|
/// <param name="type">1-总达因,2-完成总达因</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static decimal? GetSizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber,string type)
|
||||||
|
{
|
||||||
|
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 == "预制口"
|
||||||
|
//&& 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 (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")
|
||||||
|
{
|
||||||
|
sizeSum += item.Size;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(item.WeldingDailyId))
|
||||||
|
{
|
||||||
|
sizeSum += item.Size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sizeSum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据单位工程、流水段获取总达因
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId">项目id</param>
|
||||||
|
/// <param name="unitWorkId">单位工程</param>
|
||||||
|
/// <param name="flowingSection">流水段</param>
|
||||||
|
/// <param name="type">1-总达因,2-完成总达因</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static decimal? GetSizeSumByUnitWorkIdAndFlowingSection(string projectId, string unitWorkId, string flowingSection,string type)
|
||||||
|
{
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
decimal? sizeSum = 0;
|
||||||
|
if (type == "1")
|
||||||
|
{
|
||||||
|
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 == "预制口"
|
||||||
|
select x.Size).Sum();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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 == "预制口"
|
||||||
|
&& x.WeldingDailyId != "" && x.WeldingDailyId != null
|
||||||
|
select x.Size).Sum();
|
||||||
|
}
|
||||||
|
return sizeSum;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -12,52 +12,52 @@
|
|||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
<items>
|
<Items>
|
||||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
EnableCollapse="true" Width="300px" Title="WBS目录"
|
EnableCollapse="true" Width="300px" Title="WBS目录"
|
||||||
ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
|
ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
|
||||||
IconFont="ArrowCircleLeft">
|
IconFont="ArrowCircleLeft">
|
||||||
<toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar runat="server" ToolbarAlign="Right">
|
<f:Toolbar runat="server" ToolbarAlign="Right">
|
||||||
<items>
|
<Items>
|
||||||
<f:NumberBox ID="txtSize" runat="server" Label="口径" Width="180px" LabelWidth="60px" LabelAlign="Right" NoDecimal="true" NoNegative="true"></f:NumberBox>
|
<f:NumberBox ID="txtSize" runat="server" Label="口径" Width="180px" LabelWidth="60px" LabelAlign="Right" NoDecimal="true" NoNegative="true"></f:NumberBox>
|
||||||
<f:Button ID="btnStatics" runat="server" Text="统计" Icon="ChartPie" OnClick="btnStatics_Click"></f:Button>
|
<f:Button ID="btnStatics" runat="server" Text="统计" Icon="ChartPie" OnClick="btnStatics_Click"></f:Button>
|
||||||
<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>
|
||||||
</items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</toolbars>
|
</Toolbars>
|
||||||
<items>
|
<Items>
|
||||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="单位工程"
|
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="单位工程"
|
||||||
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||||
EnableSingleClickExpand="false" AutoLeafIdentification="true" OnNodeExpand="tvControlItem_TreeNodeExpanded"
|
EnableSingleClickExpand="false" AutoLeafIdentification="true" OnNodeExpand="tvControlItem_TreeNodeExpanded"
|
||||||
EnableTextSelection="true">
|
EnableTextSelection="true">
|
||||||
</f:Tree>
|
</f:Tree>
|
||||||
</items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="排产计划"
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="排产计划"
|
||||||
TitleToolTip="排产计划" AutoScroll="true">
|
TitleToolTip="排产计划" AutoScroll="true">
|
||||||
<toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
<items>
|
<Items>
|
||||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
</f:ToolbarFill>
|
</f:ToolbarFill>
|
||||||
<f:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="保存" Icon="SystemSave"></f:Button>
|
<f:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="保存" Icon="SystemSave"></f:Button>
|
||||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
|
||||||
Icon="TableGo" EnableAjax="false" EnablePostBack="true">
|
Icon="TableGo" EnableAjax="false" EnablePostBack="true">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</toolbars>
|
</Toolbars>
|
||||||
<items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="排产计划" ForceFit="false"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="排产计划" ForceFit="false"
|
||||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ProductionSchedulingPlanId" AllowCellEditing="true"
|
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="ProductionSchedulingPlanId" AllowCellEditing="true"
|
||||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="1" DataIDField="ProductionSchedulingPlanId"
|
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ProductionSchedulingPlanId"
|
||||||
AllowSorting="true" SortField="FlowNum" SortDirection="ASC" OnSort="Grid1_Sort"
|
AllowSorting="true" SortField="FlowNum,Material,Caliber" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||||
EnableTextSelection="True">
|
EnableTextSelection="True">
|
||||||
<columns>
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||||
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||||
<f:RenderField HeaderText="流水段号" ColumnID="FlowNum"
|
<f:RenderField HeaderText="流水段号" ColumnID="FlowNum"
|
||||||
@@ -81,71 +81,84 @@
|
|||||||
Width="90px">
|
Width="90px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="总达因" ColumnID="TotalDyne"
|
<f:RenderField HeaderText="总达因" ColumnID="TotalDyne"
|
||||||
DataField="TotalDyne" SortField="TotalDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="TotalDyne" SortField="TotalDyne" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="90px">
|
Width="90px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="总优先级" ColumnID="TotalPriority"
|
<f:RenderField HeaderText="总优先级" ColumnID="TotalPriority"
|
||||||
DataField="TotalPriority" SortField="TotalPriority" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="TotalPriority" SortField="TotalPriority" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="100px">
|
Width="100px">
|
||||||
<editor>
|
<Editor>
|
||||||
<f:TextBox ID="txtTotalPriority" runat="server"></f:TextBox>
|
<f:TextBox ID="txtTotalPriority" runat="server"></f:TextBox>
|
||||||
</editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="优先级总达因" ColumnID="PriorityTotalDyne"
|
<f:RenderField HeaderText="优先级总达因" ColumnID="PriorityTotalDyne"
|
||||||
DataField="PriorityTotalDyne" SortField="PriorityTotalDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="PriorityTotalDyne" SortField="PriorityTotalDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="120px">
|
||||||
<editor>
|
<Editor>
|
||||||
<f:NumberBox ID="txtPriorityTotalDyne" runat="server"></f:NumberBox>
|
<f:NumberBox ID="txtPriorityTotalDyne" runat="server"></f:NumberBox>
|
||||||
</editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="计划开始时间" ColumnID="PlanStartDate"
|
<f:RenderField HeaderText="计划开始时间" ColumnID="PlanStartDate"
|
||||||
DataField="PlanStartDate" SortField="PlanStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="PlanStartDate" SortField="PlanStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="120px">
|
||||||
<editor>
|
<Editor>
|
||||||
<f:DatePicker ID="txtPlanStartDate" runat="server"></f:DatePicker>
|
<f:DatePicker ID="txtPlanStartDate" runat="server"></f:DatePicker>
|
||||||
</editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="计划结束时间" ColumnID="PlanEndDate"
|
<f:RenderField HeaderText="计划结束时间" ColumnID="PlanEndDate"
|
||||||
DataField="PlanEndDate" SortField="PlanEndDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="PlanEndDate" SortField="PlanEndDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="120px">
|
||||||
<editor>
|
<Editor>
|
||||||
<f:DatePicker ID="txtPlanEndDate" runat="server"></f:DatePicker>
|
<f:DatePicker ID="txtPlanEndDate" runat="server"></f:DatePicker>
|
||||||
</editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="天数" ColumnID="Days"
|
<f:RenderField HeaderText="天数" ColumnID="Days"
|
||||||
DataField="Days" SortField="Days" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="Days" SortField="Days" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="90px">
|
Width="90px">
|
||||||
<editor>
|
<%--<Editor>
|
||||||
<f:NumberBox ID="txtDays" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
|
<f:NumberBox ID="txtDays" runat="server" NoDecimal="true" NoNegative="true" ></f:NumberBox>
|
||||||
</editor>
|
</Editor>--%>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="平均每天工作量" ColumnID="AvgDailyWorkload"
|
<f:RenderField HeaderText="平均每天工作量" ColumnID="AvgDailyWorkload"
|
||||||
DataField="AvgDailyWorkload" SortField="AvgDailyWorkload" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="AvgDailyWorkload" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="140px">
|
||||||
<editor>
|
<Editor>
|
||||||
<f:NumberBox ID="txtAvgDailyWorkload" runat="server" NoNegative="true"></f:NumberBox>
|
<f:NumberBox ID="txtAvgDailyWorkload" runat="server" NoNegative="true"></f:NumberBox>
|
||||||
</editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="已完成量" ColumnID="CompletedCount"
|
<f:RenderField HeaderText="当日已完成量" ColumnID="OnDayCompleteDyne"
|
||||||
DataField="CompletedCount" SortField="CompletedCount" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="OnDayCompleteDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="120px">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox ID="NumberBox1" runat="server" NoNegative="true"></f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="次日应完成量" ColumnID="NextDayCompleteDyne"
|
||||||
|
DataField="NextDayCompleteDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
|
Width="120px">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox ID="NumberBox2" runat="server" NoNegative="true"></f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="累计已完成量" ColumnID="CompletedCount"
|
||||||
|
DataField="CompletedCount" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
|
Width="130px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="已完成百分比" ColumnID="CompletedRate"
|
<f:RenderField HeaderText="已完成百分比" ColumnID="CompletedRate"
|
||||||
DataField="CompletedRate" SortField="CompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="CompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="130px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="已完成百分比汇总" ColumnID="TotalCompletedRate"
|
<f:RenderField HeaderText="已完成百分比汇总" ColumnID="TotalCompletedRate"
|
||||||
DataField="TotalCompletedRate" SortField="TotalCompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="TotalCompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="150px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</columns>
|
</Columns>
|
||||||
<listeners>
|
<Listeners>
|
||||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
</listeners>
|
|
||||||
<listeners>
|
|
||||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||||
</listeners>
|
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||||
<pageitems>
|
</Listeners>
|
||||||
|
<PageItems>
|
||||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
</f:ToolbarSeparator>
|
</f:ToolbarSeparator>
|
||||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||||
@@ -158,11 +171,11 @@
|
|||||||
<f:ListItem Text="25" Value="25" />
|
<f:ListItem Text="25" Value="25" />
|
||||||
<f:ListItem Text="所有行" Value="10000" />
|
<f:ListItem Text="所有行" Value="10000" />
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
</pageitems>
|
</PageItems>
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
</items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Menu ID="Menu1" runat="server">
|
<f:Menu ID="Menu1" runat="server">
|
||||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Icon="Delete"
|
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Icon="Delete"
|
||||||
@@ -183,7 +196,37 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onGridDataLoad(event) {
|
function onGridDataLoad(event) {
|
||||||
this.mergeColumns(['FlowNum', 'MainItemName', 'Material', 'TotalDyne']);
|
this.mergeColumns(['FlowNum', 'Material', 'TotalDyne', 'TotalCompletedRate']);
|
||||||
|
}
|
||||||
|
|
||||||
|
//自动计算天数、平均每天工作量
|
||||||
|
function onGridAfterEdit(event, value, params) {
|
||||||
|
var me = this, columnId = params.columnId, rowId = params.rowId;
|
||||||
|
if (columnId === 'PlanStartDate' || columnId === 'PlanEndDate' || columnId == 'TotalDyne' || columnId == 'OnDayCompleteDyne') {
|
||||||
|
const startDate = Date.parse(me.getCellValue(rowId, 'PlanStartDate'));//计划开始时间
|
||||||
|
const endDate = Date.parse(me.getCellValue(rowId, 'PlanEndDate'));//计划结束时间
|
||||||
|
var totalDia = me.getCellValue(rowId, 'TotalDyne');//总达因
|
||||||
|
var onDayCompleteDyne = me.getCellValue(rowId, 'OnDayCompleteDyne');//当日已完成量
|
||||||
|
|
||||||
|
if (startDate > endDate) {
|
||||||
|
alert("计划开始时间不能大于计划结束时间");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 计算时间差(毫秒)
|
||||||
|
const timeDifference = endDate - startDate;
|
||||||
|
// 将时间差转换为天数
|
||||||
|
const daysDifference = timeDifference / (1000 * 60 * 60 * 24);
|
||||||
|
//平均每天工作量=总达因/天数
|
||||||
|
const avgDailyWorkload = totalDia / (daysDifference + 1);
|
||||||
|
//次日应完成量=平均每天完成量-已完成量+平均每天完成量
|
||||||
|
if (onDayCompleteDyne != "") {
|
||||||
|
var nextDayCompleteDyne = avgDailyWorkload - onDayCompleteDyne + avgDailyWorkload;
|
||||||
|
}
|
||||||
|
|
||||||
|
me.updateCellValue(rowId, 'Days', daysDifference + 1);//天数
|
||||||
|
me.updateCellValue(rowId, 'AvgDailyWorkload', avgDailyWorkload);//平均每天工作量
|
||||||
|
me.updateCellValue(rowId, 'NextDayCompleteDyne', nextDayCompleteDyne);//次日应完成量
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -255,22 +255,43 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWorkIdAndFlowNum(this.CurrUser.LoginProjectId,this.tvControlItem.SelectedNode.ParentNode.Text, this.tvControlItem.SelectedNode.Text);
|
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWorkIdAndFlowNum(this.CurrUser.LoginProjectId,this.tvControlItem.SelectedNode.ParentNode.Text, this.tvControlItem.SelectedNode.Text);
|
||||||
for (int i = 0; i < tb.Rows.Count; i++)
|
for (int i = 0; i < tb.Rows.Count; i++)
|
||||||
{
|
{
|
||||||
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, tb.Rows[i]["FlowingSection"].ToString(), tb.Rows[i]["UnitWorkId"].ToString(), tb.Rows[i]["Material"].ToString(), tb.Rows[i]["Caliber"].ToString());
|
string unitWorkId = tb.Rows[i]["UnitWorkId"].ToString();//单位工程
|
||||||
|
string flowingSection = tb.Rows[i]["FlowingSection"].ToString();//流水号
|
||||||
|
string steelType = tb.Rows[i]["SteelType"].ToString();//材质Value
|
||||||
|
string material = tb.Rows[i]["Material"].ToString();//材质Text
|
||||||
|
string caliber = tb.Rows[i]["Caliber"].ToString();//寸径
|
||||||
|
|
||||||
|
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, flowingSection, unitWorkId, material, caliber);
|
||||||
if (plan == null)
|
if (plan == null)
|
||||||
{
|
{
|
||||||
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
|
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
|
||||||
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
|
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
|
||||||
newPlan.ProjectId = this.CurrUser.LoginProjectId;
|
newPlan.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
newPlan.PipelineId = tb.Rows[i]["UnitWorkId"].ToString();//装置ID
|
newPlan.PipelineId = unitWorkId;
|
||||||
newPlan.FlowNum = tb.Rows[i]["FlowingSection"].ToString();
|
newPlan.FlowNum = flowingSection;
|
||||||
newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString();
|
newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString();
|
||||||
newPlan.Material = tb.Rows[i]["Material"].ToString();
|
newPlan.Material = material;
|
||||||
newPlan.Caliber = tb.Rows[i]["Caliber"].ToString();
|
newPlan.Caliber = caliber;
|
||||||
newPlan.Dain = Funs.GetNewDecimalOrZero(tb.Rows[i]["Dia"].ToString());
|
newPlan.Dain = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber,"1");
|
||||||
newPlan.TotalDyne = Funs.GetNewDecimalOrZero(tb.Rows[i]["TotalDia"].ToString());
|
newPlan.TotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection,"1");
|
||||||
newPlan.CompletedCount = Funs.GetNewIntOrZero(tb.Rows[i]["cTotalCount"].ToString());
|
newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "2");
|
||||||
newPlan.CompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["rate"].ToString());
|
if (newPlan.Dain > 0)
|
||||||
newPlan.TotalCompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["Srate"].ToString());
|
{
|
||||||
|
newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newPlan.CompletedRate = 0;
|
||||||
|
}
|
||||||
|
if (newPlan.TotalDyne > 0)
|
||||||
|
{
|
||||||
|
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "2");
|
||||||
|
newPlan.TotalCompletedRate = (completeDinSum / newPlan.TotalDyne) * 100;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newPlan.TotalCompletedRate = 0;
|
||||||
|
}
|
||||||
BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan);
|
BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -299,22 +320,43 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWork(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNode.Text);
|
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWork(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNode.Text);
|
||||||
for (int i = 0; i < tb.Rows.Count; i++)
|
for (int i = 0; i < tb.Rows.Count; i++)
|
||||||
{
|
{
|
||||||
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, tb.Rows[i]["FlowingSection"].ToString(), tb.Rows[i]["UnitWorkId"].ToString(), tb.Rows[i]["Material"].ToString(), tb.Rows[i]["Caliber"].ToString());
|
string unitWorkId = tb.Rows[i]["UnitWorkId"].ToString();//单位工程
|
||||||
|
string flowingSection = tb.Rows[i]["FlowingSection"].ToString();//流水号
|
||||||
|
string steelType = tb.Rows[i]["SteelType"].ToString();//材质Value
|
||||||
|
string material = tb.Rows[i]["Material"].ToString();//材质Text
|
||||||
|
string caliber = tb.Rows[i]["Caliber"].ToString();//寸径
|
||||||
|
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, flowingSection, unitWorkId, material, caliber);
|
||||||
if (plan == null)
|
if (plan == null)
|
||||||
{
|
{
|
||||||
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
|
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
|
||||||
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
|
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
|
||||||
newPlan.ProjectId = this.CurrUser.LoginProjectId;
|
newPlan.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
newPlan.PipelineId = tb.Rows[i]["UnitWorkId"].ToString();//装置ID
|
newPlan.PipelineId = unitWorkId;
|
||||||
newPlan.FlowNum = tb.Rows[i]["FlowingSection"].ToString();
|
newPlan.FlowNum = flowingSection;
|
||||||
newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString();
|
newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString();
|
||||||
newPlan.Material = tb.Rows[i]["Material"].ToString();
|
newPlan.Material = material;
|
||||||
newPlan.Caliber = tb.Rows[i]["Caliber"].ToString();
|
newPlan.Caliber = caliber;
|
||||||
newPlan.Dain = Funs.GetNewDecimalOrZero(tb.Rows[i]["Dia"].ToString());
|
newPlan.Dain = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "1");
|
||||||
newPlan.TotalDyne = Funs.GetNewDecimalOrZero(tb.Rows[i]["TotalDia"].ToString());
|
newPlan.TotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "1");
|
||||||
newPlan.CompletedCount = Funs.GetNewIntOrZero(tb.Rows[i]["cTotalCount"].ToString());
|
newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "2");
|
||||||
newPlan.CompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["rate"].ToString());
|
if (newPlan.Dain > 0)
|
||||||
newPlan.TotalCompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["Srate"].ToString());
|
{
|
||||||
|
newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newPlan.CompletedRate = 0;
|
||||||
|
}
|
||||||
|
if (newPlan.TotalDyne > 0)
|
||||||
|
{
|
||||||
|
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "2");
|
||||||
|
newPlan.TotalCompletedRate = (completeDinSum / newPlan.TotalDyne) * 100;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newPlan.TotalCompletedRate = 0;
|
||||||
|
}
|
||||||
|
|
||||||
BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan);
|
BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -393,7 +435,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
w.ProjectType,
|
w.ProjectType,
|
||||||
p.CompletedCount,
|
p.CompletedCount,
|
||||||
p.CompletedRate,
|
p.CompletedRate,
|
||||||
p.TotalCompletedRate
|
p.TotalCompletedRate,
|
||||||
|
p.OnDayCompleteDyne,
|
||||||
|
p.NextDayCompleteDyne
|
||||||
FROM HJGL_ProductionSchedulingPlan p
|
FROM HJGL_ProductionSchedulingPlan p
|
||||||
left join WBS_UnitWork w on w.UnitWorkId=p.PipelineId
|
left join WBS_UnitWork w on w.UnitWorkId=p.PipelineId
|
||||||
WHERE 1=1 ";
|
WHERE 1=1 ";
|
||||||
@@ -518,6 +562,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
newPlan.PlanEndDate = Funs.GetNewDateTime(values.Value<string>("PlanEndDate"));
|
newPlan.PlanEndDate = Funs.GetNewDateTime(values.Value<string>("PlanEndDate"));
|
||||||
newPlan.Days = Funs.GetNewInt(values.Value<string>("Days"));
|
newPlan.Days = Funs.GetNewInt(values.Value<string>("Days"));
|
||||||
newPlan.AvgDailyWorkload = Funs.GetNewDecimal(values.Value<string>("AvgDailyWorkload"));
|
newPlan.AvgDailyWorkload = Funs.GetNewDecimal(values.Value<string>("AvgDailyWorkload"));
|
||||||
|
newPlan.OnDayCompleteDyne = Funs.GetNewDecimal(values.Value<string>("OnDayCompleteDyne"));
|
||||||
|
newPlan.NextDayCompleteDyne = Funs.GetNewDecimal(values.Value<string>("NextDayCompleteDyne"));
|
||||||
|
newPlan.CompletedCount = Funs.GetNewInt(values.Value<string>("CompletedCount"));
|
||||||
|
newPlan.CompletedRate = Funs.GetNewDecimal(values.Value<string>("CompletedRate"));
|
||||||
|
newPlan.TotalCompletedRate = Funs.GetNewDecimal(values.Value<string>("TotalCompletedRate"));
|
||||||
BLL.ProductionSchedulingPlanService.UpdateProductionSchedulingPlan(newPlan);
|
BLL.ProductionSchedulingPlanService.UpdateProductionSchedulingPlan(newPlan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -546,9 +595,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
}
|
}
|
||||||
else if (tvControlItem.SelectedNode.CommandName == "流水段")
|
else if (tvControlItem.SelectedNode.CommandName == "流水段")
|
||||||
{
|
{
|
||||||
lists = lists.Where(x => x.FlowNum == this.tvControlItem.SelectedNode.Text);
|
lists = lists.Where(x => x.MainItemName == this.tvControlItem.SelectedNode.ParentNode.Text && x.FlowNum == this.tvControlItem.SelectedNode.Text);
|
||||||
}
|
}
|
||||||
|
lists = lists.OrderBy(x => x.Caliber).OrderBy(x => x.Material).OrderBy(x => x.FlowNum).OrderBy(x => x.MainItemName);
|
||||||
if (lists != null)
|
if (lists != null)
|
||||||
{
|
{
|
||||||
newUrl = uploadfilepath.Replace("排产计划导出模板", "排产计划-" + this.tvControlItem.SelectedNode.Text + "-" + DateTime.Now.ToString("yyyyMMdd"));
|
newUrl = uploadfilepath.Replace("排产计划导出模板", "排产计划-" + this.tvControlItem.SelectedNode.Text + "-" + DateTime.Now.ToString("yyyyMMdd"));
|
||||||
@@ -636,14 +685,22 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
|
|
||||||
cell = row.CreateCell(12);
|
cell = row.CreateCell(12);
|
||||||
cell.CellStyle = cellStyle;
|
cell.CellStyle = cellStyle;
|
||||||
cell.SetCellValue(item.CompletedCount.HasValue ? item.CompletedCount.ToString() : "");//已完成量
|
cell.SetCellValue(item.OnDayCompleteDyne.HasValue ? item.OnDayCompleteDyne.ToString() : "");//当日已完成量
|
||||||
|
|
||||||
cell = row.CreateCell(13);
|
cell = row.CreateCell(13);
|
||||||
cell.CellStyle = cellStyle;
|
cell.CellStyle = cellStyle;
|
||||||
cell.SetCellValue(item.CompletedRate.HasValue ? item.CompletedRate.ToString() : "");//已完成百分比
|
cell.SetCellValue(item.NextDayCompleteDyne.HasValue ? item.NextDayCompleteDyne.ToString() : "");//次日应完成量
|
||||||
|
|
||||||
cell = row.CreateCell(14);
|
cell = row.CreateCell(14);
|
||||||
cell.CellStyle = cellStyle;
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.CompletedCount.HasValue ? item.CompletedCount.ToString() : "");//累计已完成量
|
||||||
|
|
||||||
|
cell = row.CreateCell(15);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
|
cell.SetCellValue(item.CompletedRate.HasValue ? item.CompletedRate.ToString() : "");//已完成百分比
|
||||||
|
|
||||||
|
cell = row.CreateCell(16);
|
||||||
|
cell.CellStyle = cellStyle;
|
||||||
cell.SetCellValue(item.TotalCompletedRate.HasValue ? item.TotalCompletedRate.ToString() : "");//已完成百分比汇总
|
cell.SetCellValue(item.TotalCompletedRate.HasValue ? item.TotalCompletedRate.ToString() : "");//已完成百分比汇总
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
+20
-13
@@ -7,12 +7,10 @@
|
|||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.PreDesign
|
namespace FineUIPro.Web.HJGL.PreDesign {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class ProductionSchedulingPlan
|
public partial class ProductionSchedulingPlan {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
@@ -176,15 +174,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DatePicker txtPlanEndDate;
|
protected global::FineUIPro.DatePicker txtPlanEndDate;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtDays 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.NumberBox txtDays;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtAvgDailyWorkload 控件。
|
/// txtAvgDailyWorkload 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -194,6 +183,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.NumberBox txtAvgDailyWorkload;
|
protected global::FineUIPro.NumberBox txtAvgDailyWorkload;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NumberBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox NumberBox1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NumberBox2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox NumberBox2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
{
|
{
|
||||||
if (this.tvControlItem.SelectedNode.CommandName == "TestPackage")
|
if (this.tvControlItem.SelectedNode.CommandName == "TestPackage")
|
||||||
{
|
{
|
||||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.AItemEndCheckMenuId, Const.BtnAdd))
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.AItemEndCheckMenuId, Const.BtnSave))
|
||||||
{
|
{
|
||||||
string url = "ItemEndCheckEdit.aspx?PTP_ID={0}";
|
string url = "ItemEndCheckEdit.aspx?PTP_ID={0}";
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format(url, tvControlItem.SelectedNodeID, "操作 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format(url, tvControlItem.SelectedNodeID, "操作 - ")));
|
||||||
|
|||||||
@@ -332,7 +332,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
var pipeline = db.HJGL_Pipeline.FirstOrDefault(x => x.PipelineId == pipelineItem.PipelineId);
|
var pipeline = db.HJGL_Pipeline.FirstOrDefault(x => x.PipelineId == pipelineItem.PipelineId);
|
||||||
var totalJoint = from x in db.HJGL_WeldJoint
|
var totalJoint = from x in db.HJGL_WeldJoint
|
||||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||||
where y.UnitWorkId == pipeline.UnitWorkId && y.DetectionRateId == pipeline.DetectionRateId && y.DetectionType.Contains(pipeline.DetectionType)
|
join z in db.PTP_PipelineList on y.PipelineId equals z.PipelineId
|
||||||
|
//where y.UnitWorkId == pipeline.UnitWorkId
|
||||||
|
where z.PTP_ID == this.PTP_ID
|
||||||
|
&& y.DetectionRateId == pipeline.DetectionRateId
|
||||||
|
&& y.DetectionType.Contains(pipeline.DetectionType)
|
||||||
select x;
|
select x;
|
||||||
string rateStr = string.Empty;
|
string rateStr = string.Empty;
|
||||||
var rate = Funs.DB.Base_DetectionRate.FirstOrDefault(x => x.DetectionRateId == pipeline.DetectionRateId);
|
var rate = Funs.DB.Base_DetectionRate.FirstOrDefault(x => x.DetectionRateId == pipeline.DetectionRateId);
|
||||||
@@ -340,7 +344,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
{
|
{
|
||||||
rateStr = rate.DetectionRateValue + "%";
|
rateStr = rate.DetectionRateValue + "%";
|
||||||
}
|
}
|
||||||
this.lab12.Label = "本单位工程检测比例为" + rateStr + "的管线未焊接焊口数";
|
this.lab12.Label = "本试压包检测比例为" + rateStr + "的管线未焊接焊口数";
|
||||||
int totalJointNum = totalJoint.Count(); //总焊口
|
int totalJointNum = totalJoint.Count(); //总焊口
|
||||||
int totalWeldingJointNum = totalJoint.Count(x => x.WeldingDailyId != null); //已焊总焊口
|
int totalWeldingJointNum = totalJoint.Count(x => x.WeldingDailyId != null); //已焊总焊口
|
||||||
int notCloseBatch = (from x in db.HJGL_Batch_PointBatch
|
int notCloseBatch = (from x in db.HJGL_Batch_PointBatch
|
||||||
@@ -534,9 +538,9 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
string isnoHot = BLL.TestPackageEditService.IsExistNoHotHardItem(this.PTP_ID);
|
string isnoHot = BLL.TestPackageEditService.IsExistNoHotHardItem(this.PTP_ID);
|
||||||
if (string.IsNullOrEmpty(isnoHot))
|
if (string.IsNullOrEmpty(isnoHot))
|
||||||
{
|
{
|
||||||
string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID);
|
//string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID);
|
||||||
if (string.IsNullOrEmpty(inspectionIsoRate))
|
//if (string.IsNullOrEmpty(inspectionIsoRate))
|
||||||
{
|
//{
|
||||||
updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue;
|
updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue;
|
||||||
updateTestPackage.Check2 = drpPressureTest.SelectedValue;
|
updateTestPackage.Check2 = drpPressureTest.SelectedValue;
|
||||||
updateTestPackage.Check3 = drpWorkRecord.SelectedValue;
|
updateTestPackage.Check3 = drpWorkRecord.SelectedValue;
|
||||||
@@ -555,12 +559,12 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
this.InitTreeMenu();
|
this.InitTreeMenu();
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
Alert.ShowInTop(inspectionIsoRate, MessageBoxIcon.Warning);
|
// Alert.ShowInTop(inspectionIsoRate, MessageBoxIcon.Warning);
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+53
-74
@@ -34075,8 +34075,6 @@ namespace Model
|
|||||||
|
|
||||||
private EntitySet<ProjectSupervision_CheckTeam> _ProjectSupervision_CheckTeam;
|
private EntitySet<ProjectSupervision_CheckTeam> _ProjectSupervision_CheckTeam;
|
||||||
|
|
||||||
private EntitySet<PTP_TestPackage> _PTP_TestPackage;
|
|
||||||
|
|
||||||
private EntitySet<QualityAudit_EquipmentQuality> _QualityAudit_EquipmentQuality;
|
private EntitySet<QualityAudit_EquipmentQuality> _QualityAudit_EquipmentQuality;
|
||||||
|
|
||||||
private EntitySet<QualityAudit_GeneralEquipmentQuality> _QualityAudit_GeneralEquipmentQuality;
|
private EntitySet<QualityAudit_GeneralEquipmentQuality> _QualityAudit_GeneralEquipmentQuality;
|
||||||
@@ -34283,7 +34281,6 @@ namespace Model
|
|||||||
this._ProjectData_TeamGroup = new EntitySet<ProjectData_TeamGroup>(new Action<ProjectData_TeamGroup>(this.attach_ProjectData_TeamGroup), new Action<ProjectData_TeamGroup>(this.detach_ProjectData_TeamGroup));
|
this._ProjectData_TeamGroup = new EntitySet<ProjectData_TeamGroup>(new Action<ProjectData_TeamGroup>(this.attach_ProjectData_TeamGroup), new Action<ProjectData_TeamGroup>(this.detach_ProjectData_TeamGroup));
|
||||||
this._ProjectSupervision_CheckNotice = new EntitySet<ProjectSupervision_CheckNotice>(new Action<ProjectSupervision_CheckNotice>(this.attach_ProjectSupervision_CheckNotice), new Action<ProjectSupervision_CheckNotice>(this.detach_ProjectSupervision_CheckNotice));
|
this._ProjectSupervision_CheckNotice = new EntitySet<ProjectSupervision_CheckNotice>(new Action<ProjectSupervision_CheckNotice>(this.attach_ProjectSupervision_CheckNotice), new Action<ProjectSupervision_CheckNotice>(this.detach_ProjectSupervision_CheckNotice));
|
||||||
this._ProjectSupervision_CheckTeam = new EntitySet<ProjectSupervision_CheckTeam>(new Action<ProjectSupervision_CheckTeam>(this.attach_ProjectSupervision_CheckTeam), new Action<ProjectSupervision_CheckTeam>(this.detach_ProjectSupervision_CheckTeam));
|
this._ProjectSupervision_CheckTeam = new EntitySet<ProjectSupervision_CheckTeam>(new Action<ProjectSupervision_CheckTeam>(this.attach_ProjectSupervision_CheckTeam), new Action<ProjectSupervision_CheckTeam>(this.detach_ProjectSupervision_CheckTeam));
|
||||||
this._PTP_TestPackage = new EntitySet<PTP_TestPackage>(new Action<PTP_TestPackage>(this.attach_PTP_TestPackage), new Action<PTP_TestPackage>(this.detach_PTP_TestPackage));
|
|
||||||
this._QualityAudit_EquipmentQuality = new EntitySet<QualityAudit_EquipmentQuality>(new Action<QualityAudit_EquipmentQuality>(this.attach_QualityAudit_EquipmentQuality), new Action<QualityAudit_EquipmentQuality>(this.detach_QualityAudit_EquipmentQuality));
|
this._QualityAudit_EquipmentQuality = new EntitySet<QualityAudit_EquipmentQuality>(new Action<QualityAudit_EquipmentQuality>(this.attach_QualityAudit_EquipmentQuality), new Action<QualityAudit_EquipmentQuality>(this.detach_QualityAudit_EquipmentQuality));
|
||||||
this._QualityAudit_GeneralEquipmentQuality = new EntitySet<QualityAudit_GeneralEquipmentQuality>(new Action<QualityAudit_GeneralEquipmentQuality>(this.attach_QualityAudit_GeneralEquipmentQuality), new Action<QualityAudit_GeneralEquipmentQuality>(this.detach_QualityAudit_GeneralEquipmentQuality));
|
this._QualityAudit_GeneralEquipmentQuality = new EntitySet<QualityAudit_GeneralEquipmentQuality>(new Action<QualityAudit_GeneralEquipmentQuality>(this.attach_QualityAudit_GeneralEquipmentQuality), new Action<QualityAudit_GeneralEquipmentQuality>(this.detach_QualityAudit_GeneralEquipmentQuality));
|
||||||
this._QualityAudit_SubUnitQuality = new EntitySet<QualityAudit_SubUnitQuality>(new Action<QualityAudit_SubUnitQuality>(this.attach_QualityAudit_SubUnitQuality), new Action<QualityAudit_SubUnitQuality>(this.detach_QualityAudit_SubUnitQuality));
|
this._QualityAudit_SubUnitQuality = new EntitySet<QualityAudit_SubUnitQuality>(new Action<QualityAudit_SubUnitQuality>(this.attach_QualityAudit_SubUnitQuality), new Action<QualityAudit_SubUnitQuality>(this.detach_QualityAudit_SubUnitQuality));
|
||||||
@@ -36142,19 +36139,6 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PTP_TestPackage_Base_Unit", Storage="_PTP_TestPackage", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
|
|
||||||
public EntitySet<PTP_TestPackage> PTP_TestPackage
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this._PTP_TestPackage;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
this._PTP_TestPackage.Assign(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityAudit_EquipmentQuality_Base_Unit", Storage="_QualityAudit_EquipmentQuality", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityAudit_EquipmentQuality_Base_Unit", Storage="_QualityAudit_EquipmentQuality", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
|
||||||
public EntitySet<QualityAudit_EquipmentQuality> QualityAudit_EquipmentQuality
|
public EntitySet<QualityAudit_EquipmentQuality> QualityAudit_EquipmentQuality
|
||||||
{
|
{
|
||||||
@@ -37722,18 +37706,6 @@ namespace Model
|
|||||||
entity.Base_Unit = null;
|
entity.Base_Unit = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void attach_PTP_TestPackage(PTP_TestPackage entity)
|
|
||||||
{
|
|
||||||
this.SendPropertyChanging();
|
|
||||||
entity.Base_Unit = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void detach_PTP_TestPackage(PTP_TestPackage entity)
|
|
||||||
{
|
|
||||||
this.SendPropertyChanging();
|
|
||||||
entity.Base_Unit = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void attach_QualityAudit_EquipmentQuality(QualityAudit_EquipmentQuality entity)
|
private void attach_QualityAudit_EquipmentQuality(QualityAudit_EquipmentQuality entity)
|
||||||
{
|
{
|
||||||
this.SendPropertyChanging();
|
this.SendPropertyChanging();
|
||||||
@@ -102375,12 +102347,16 @@ namespace Model
|
|||||||
|
|
||||||
private System.Nullable<decimal> _AvgDailyWorkload;
|
private System.Nullable<decimal> _AvgDailyWorkload;
|
||||||
|
|
||||||
private System.Nullable<int> _CompletedCount;
|
private System.Nullable<decimal> _CompletedCount;
|
||||||
|
|
||||||
private System.Nullable<decimal> _CompletedRate;
|
private System.Nullable<decimal> _CompletedRate;
|
||||||
|
|
||||||
private System.Nullable<decimal> _TotalCompletedRate;
|
private System.Nullable<decimal> _TotalCompletedRate;
|
||||||
|
|
||||||
|
private System.Nullable<decimal> _OnDayCompleteDyne;
|
||||||
|
|
||||||
|
private System.Nullable<decimal> _NextDayCompleteDyne;
|
||||||
|
|
||||||
private EntityRef<Base_Project> _Base_Project;
|
private EntityRef<Base_Project> _Base_Project;
|
||||||
|
|
||||||
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
||||||
@@ -102419,12 +102395,16 @@ namespace Model
|
|||||||
partial void OnDaysChanged();
|
partial void OnDaysChanged();
|
||||||
partial void OnAvgDailyWorkloadChanging(System.Nullable<decimal> value);
|
partial void OnAvgDailyWorkloadChanging(System.Nullable<decimal> value);
|
||||||
partial void OnAvgDailyWorkloadChanged();
|
partial void OnAvgDailyWorkloadChanged();
|
||||||
partial void OnCompletedCountChanging(System.Nullable<int> value);
|
partial void OnCompletedCountChanging(System.Nullable<decimal> value);
|
||||||
partial void OnCompletedCountChanged();
|
partial void OnCompletedCountChanged();
|
||||||
partial void OnCompletedRateChanging(System.Nullable<decimal> value);
|
partial void OnCompletedRateChanging(System.Nullable<decimal> value);
|
||||||
partial void OnCompletedRateChanged();
|
partial void OnCompletedRateChanged();
|
||||||
partial void OnTotalCompletedRateChanging(System.Nullable<decimal> value);
|
partial void OnTotalCompletedRateChanging(System.Nullable<decimal> value);
|
||||||
partial void OnTotalCompletedRateChanged();
|
partial void OnTotalCompletedRateChanged();
|
||||||
|
partial void OnOnDayCompleteDyneChanging(System.Nullable<decimal> value);
|
||||||
|
partial void OnOnDayCompleteDyneChanged();
|
||||||
|
partial void OnNextDayCompleteDyneChanging(System.Nullable<decimal> value);
|
||||||
|
partial void OnNextDayCompleteDyneChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public HJGL_ProductionSchedulingPlan()
|
public HJGL_ProductionSchedulingPlan()
|
||||||
@@ -102742,8 +102722,8 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletedCount", DbType="Int")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletedCount", DbType="Decimal(18,2)")]
|
||||||
public System.Nullable<int> CompletedCount
|
public System.Nullable<decimal> CompletedCount
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -102802,6 +102782,46 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OnDayCompleteDyne", DbType="Decimal(18,2)")]
|
||||||
|
public System.Nullable<decimal> OnDayCompleteDyne
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._OnDayCompleteDyne;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._OnDayCompleteDyne != value))
|
||||||
|
{
|
||||||
|
this.OnOnDayCompleteDyneChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._OnDayCompleteDyne = value;
|
||||||
|
this.SendPropertyChanged("OnDayCompleteDyne");
|
||||||
|
this.OnOnDayCompleteDyneChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NextDayCompleteDyne", DbType="Decimal(18,2)")]
|
||||||
|
public System.Nullable<decimal> NextDayCompleteDyne
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._NextDayCompleteDyne;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._NextDayCompleteDyne != value))
|
||||||
|
{
|
||||||
|
this.OnNextDayCompleteDyneChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._NextDayCompleteDyne = value;
|
||||||
|
this.SendPropertyChanged("NextDayCompleteDyne");
|
||||||
|
this.OnNextDayCompleteDyneChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_ProductionSchedulingPlan_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_ProductionSchedulingPlan_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
||||||
public Base_Project Base_Project
|
public Base_Project Base_Project
|
||||||
{
|
{
|
||||||
@@ -218363,8 +218383,6 @@ namespace Model
|
|||||||
|
|
||||||
private EntityRef<Base_Project> _Base_Project;
|
private EntityRef<Base_Project> _Base_Project;
|
||||||
|
|
||||||
private EntityRef<Base_Unit> _Base_Unit;
|
|
||||||
|
|
||||||
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
||||||
|
|
||||||
#region 可扩展性方法定义
|
#region 可扩展性方法定义
|
||||||
@@ -218444,7 +218462,6 @@ namespace Model
|
|||||||
this._PTP_ItemEndCheckList = new EntitySet<PTP_ItemEndCheckList>(new Action<PTP_ItemEndCheckList>(this.attach_PTP_ItemEndCheckList), new Action<PTP_ItemEndCheckList>(this.detach_PTP_ItemEndCheckList));
|
this._PTP_ItemEndCheckList = new EntitySet<PTP_ItemEndCheckList>(new Action<PTP_ItemEndCheckList>(this.attach_PTP_ItemEndCheckList), new Action<PTP_ItemEndCheckList>(this.detach_PTP_ItemEndCheckList));
|
||||||
this._PTP_PipelineList = new EntitySet<PTP_PipelineList>(new Action<PTP_PipelineList>(this.attach_PTP_PipelineList), new Action<PTP_PipelineList>(this.detach_PTP_PipelineList));
|
this._PTP_PipelineList = new EntitySet<PTP_PipelineList>(new Action<PTP_PipelineList>(this.attach_PTP_PipelineList), new Action<PTP_PipelineList>(this.detach_PTP_PipelineList));
|
||||||
this._Base_Project = default(EntityRef<Base_Project>);
|
this._Base_Project = default(EntityRef<Base_Project>);
|
||||||
this._Base_Unit = default(EntityRef<Base_Unit>);
|
|
||||||
this._WBS_UnitWork = default(EntityRef<WBS_UnitWork>);
|
this._WBS_UnitWork = default(EntityRef<WBS_UnitWork>);
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
@@ -218469,7 +218486,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(500)")]
|
||||||
public string UnitId
|
public string UnitId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -218480,10 +218497,6 @@ namespace Model
|
|||||||
{
|
{
|
||||||
if ((this._UnitId != value))
|
if ((this._UnitId != value))
|
||||||
{
|
{
|
||||||
if (this._Base_Unit.HasLoadedOrAssignedValue)
|
|
||||||
{
|
|
||||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
|
||||||
}
|
|
||||||
this.OnUnitIdChanging(value);
|
this.OnUnitIdChanging(value);
|
||||||
this.SendPropertyChanging();
|
this.SendPropertyChanging();
|
||||||
this._UnitId = value;
|
this._UnitId = value;
|
||||||
@@ -219181,40 +219194,6 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PTP_TestPackage_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
|
|
||||||
public Base_Unit Base_Unit
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this._Base_Unit.Entity;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Base_Unit previousValue = this._Base_Unit.Entity;
|
|
||||||
if (((previousValue != value)
|
|
||||||
|| (this._Base_Unit.HasLoadedOrAssignedValue == false)))
|
|
||||||
{
|
|
||||||
this.SendPropertyChanging();
|
|
||||||
if ((previousValue != null))
|
|
||||||
{
|
|
||||||
this._Base_Unit.Entity = null;
|
|
||||||
previousValue.PTP_TestPackage.Remove(this);
|
|
||||||
}
|
|
||||||
this._Base_Unit.Entity = value;
|
|
||||||
if ((value != null))
|
|
||||||
{
|
|
||||||
value.PTP_TestPackage.Add(this);
|
|
||||||
this._UnitId = value.UnitId;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this._UnitId = default(string);
|
|
||||||
}
|
|
||||||
this.SendPropertyChanged("Base_Unit");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PTP_TestPackage_WBS_UnitWork", Storage="_WBS_UnitWork", ThisKey="UnitWorkId", OtherKey="UnitWorkId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PTP_TestPackage_WBS_UnitWork", Storage="_WBS_UnitWork", ThisKey="UnitWorkId", OtherKey="UnitWorkId", IsForeignKey=true)]
|
||||||
public WBS_UnitWork WBS_UnitWork
|
public WBS_UnitWork WBS_UnitWork
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user