This commit is contained in:
commit
923b3a1513
|
@ -5732,3 +5732,4 @@ HJGLPackFile/版本日志/HJGLDB_2024.05.02.sql
|
||||||
/HJGLPackFile/PackFile
|
/HJGLPackFile/PackFile
|
||||||
/HJGL/.vs/HJGL/v17/.suo
|
/HJGL/.vs/HJGL/v17/.suo
|
||||||
/CreateModel2017.bat
|
/CreateModel2017.bat
|
||||||
|
/DataBase/版本日志/HJGLDB_2024.05.12.sql
|
||||||
|
|
|
@ -1,289 +0,0 @@
|
||||||
-- 管线焊工 增加是否 PMI处理
|
|
||||||
alter table Pipeline_WeldJoint add isPMI bit NULL
|
|
||||||
GO
|
|
||||||
update Pipeline_WeldJoint set isPMI=0
|
|
||||||
GO
|
|
||||||
|
|
||||||
ALTER VIEW [dbo].[View_Pipeline_WeldJoint]
|
|
||||||
AS
|
|
||||||
/************焊口信息视图*****************/
|
|
||||||
SELECT WeldJoint.WeldJointId,
|
|
||||||
WeldJoint.ProjectId,
|
|
||||||
WeldJoint.PipelineId,
|
|
||||||
WeldJoint.WeldJointCode,
|
|
||||||
dbo.Fun_GetParseInt(WeldJoint.WeldJointCode) AS ConvertWeldJoint,
|
|
||||||
WeldJoint.WeldTypeId,
|
|
||||||
WeldJoint.Material1Id,
|
|
||||||
WeldJoint.Material2Id,
|
|
||||||
WeldJoint.ANSISCH,
|
|
||||||
WeldJoint.Thickness,
|
|
||||||
WeldJoint.Dia,
|
|
||||||
WeldJoint.Size,
|
|
||||||
WeldJoint.JointAttribute,
|
|
||||||
WeldJoint.JointArea,
|
|
||||||
WeldJoint.WeldingMethodId,
|
|
||||||
WeldJoint.IsHotProess,
|
|
||||||
WeldJoint.WeldingLocationId,
|
|
||||||
WeldJoint.WeldMatId,
|
|
||||||
WeldJoint.WeldSilkId,
|
|
||||||
WeldJoint.GrooveTypeId,
|
|
||||||
WeldJoint.PipeSegment,
|
|
||||||
WeldJoint.PipeAssembly1Id,
|
|
||||||
WeldJoint.PipeAssembly2Id,
|
|
||||||
WeldJoint.PipeAssemblyCount,
|
|
||||||
WeldJoint.HeartNo1,
|
|
||||||
WeldJoint.HeartNo2,
|
|
||||||
WeldJoint.LastTemp,
|
|
||||||
WeldJoint.CellTemp,
|
|
||||||
WeldJoint.PrepareTemp,
|
|
||||||
WeldJoint.Electricity,
|
|
||||||
WeldJoint.SystemNumber,
|
|
||||||
WeldJoint.Remark,
|
|
||||||
WeldJoint.DoneDin,
|
|
||||||
WeldJoint.Voltage,
|
|
||||||
WeldJoint.TestPackageNo,
|
|
||||||
WeldJoint.WeldingDailyCode,
|
|
||||||
WeldJoint.WeldingDailyId,
|
|
||||||
WeldJoint.BackingWelderId,
|
|
||||||
WeldJoint.CoverWelderId,
|
|
||||||
WeldJoint.PipingClassId,
|
|
||||||
WeldJoint.Specification,
|
|
||||||
WeldJoint.CancelResult,
|
|
||||||
Project.ProjectCode,
|
|
||||||
Project.ProjectName,
|
|
||||||
Pipeline.PipelineCode,
|
|
||||||
Pipeline.InstallationId,
|
|
||||||
Pipeline.UnitId,
|
|
||||||
Pipeline.SingleNumber,
|
|
||||||
Pipeline.WorkAreaId,
|
|
||||||
WeldType.WeldTypeCode,
|
|
||||||
Material1.MaterialCode AS Material1Code,
|
|
||||||
Material2.MaterialCode AS Material2Code,
|
|
||||||
WeldingMethod.WeldingMethodCode,
|
|
||||||
WeldingLocation.WeldingLocationCode,
|
|
||||||
WeldMat.ConsumablesCode AS WeldMatCode,
|
|
||||||
--WeldSilk.ConsumablesCode AS WeldSilkCode,
|
|
||||||
'' AS WeldSilkCode,
|
|
||||||
GrooveType.GrooveTypeCode,
|
|
||||||
CASE WHEN WeldJoint.WeldingDailyId IS NULL THEN '否' ELSE '是' END AS Is_hjName,
|
|
||||||
CASE WHEN WeldJoint.IsHotProess=1 THEN '是' ELSE '否' END AS IsHotProessStr,
|
|
||||||
Components1.ComponentsCode AS ComponentsCode1,
|
|
||||||
Components2.ComponentsCode AS ComponentsCode2,
|
|
||||||
BackingWelder.WelderCode AS BackingWelderCode,
|
|
||||||
BackingWelder.WelderName AS BackingWelderName,
|
|
||||||
CoverWelder.WelderCode AS CoverWelderCode,
|
|
||||||
CoverWelder.WelderName 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 Material1.MaterialCode IS NOT NULL AND Material2.MaterialCode IS NOT NULL
|
|
||||||
THEN Material1.MaterialCode + '/' + Material2.MaterialCode
|
|
||||||
ELSE (ISNULL(Material1.MaterialCode,'') + ISNULL(Material2.MaterialCode,'')) END) AS MaterialCode, --材质
|
|
||||||
pipingClass.PipingClassCode,pip.PIPClassCode,
|
|
||||||
CONVERT(VARCHAR(100), WeldingDaily.WeldingDate, 23) AS WeldingDate,
|
|
||||||
WeldJoint.IsCancel,
|
|
||||||
WeldJoint.IsPMI,
|
|
||||||
WeldJoint.IsGoldJoint,
|
|
||||||
WeldJoint.WPQId,wps.WPQCode,
|
|
||||||
WeldJoint.DetectionType,
|
|
||||||
WeldJoint.PageNum
|
|
||||||
FROM Pipeline_WeldJoint AS WeldJoint
|
|
||||||
LEFT JOIN Base_Project AS Project ON Project.ProjectId=WeldJoint.ProjectId
|
|
||||||
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId = WeldJoint.PipelineId
|
|
||||||
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId
|
|
||||||
LEFT JOIN Base_Material AS Material1 ON Material1.MaterialId = WeldJoint.Material1Id
|
|
||||||
LEFT JOIN Base_Material AS Material2 ON Material2.MaterialId = WeldJoint.Material2Id
|
|
||||||
LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=WeldJoint.WeldingMethodId
|
|
||||||
LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=WeldJoint.WeldingLocationId
|
|
||||||
LEFT JOIN Base_Consumables AS WeldMat ON WeldMat.ConsumablesId=WeldJoint.WeldMatId
|
|
||||||
--LEFT JOIN Base_Consumables AS WeldSilk ON WeldSilk.ConsumablesId=WeldJoint.WeldSilkId
|
|
||||||
LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=WeldJoint.GrooveTypeId
|
|
||||||
LEFT JOIN Base_Components AS Components1 ON Components1.ComponentsId = WeldJoint.PipeAssembly1Id
|
|
||||||
LEFT JOIN Base_Components AS Components2 ON Components2.ComponentsId = WeldJoint.PipeAssembly2Id
|
|
||||||
LEFT JOIN Welder_Welder AS BackingWelder ON BackingWelder.WelderId=WeldJoint.BackingWelderId
|
|
||||||
LEFT JOIN Welder_Welder AS CoverWelder ON CoverWelder.WelderId=WeldJoint.CoverWelderId
|
|
||||||
LEFT JOIN Pipeline_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId
|
|
||||||
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=WeldJoint.PipingClassId
|
|
||||||
LEFT JOIN dbo.Base_PIPClass pip ON pip.PIPClassId = Pipeline.PIPClassId
|
|
||||||
LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId=WeldJoint.WPQId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GO
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ALTER PROC [dbo].[sp_rpt_JointComprehensive]
|
|
||||||
@projectId NVARCHAR(50),
|
|
||||||
@workAreaId NVARCHAR(50)=NULL,
|
|
||||||
@pipelineIds NVARCHAR(MAX) = NULL
|
|
||||||
|
|
||||||
AS
|
|
||||||
/**********焊口综合信息**********/
|
|
||||||
SELECT
|
|
||||||
weldJoint.WeldJointId,
|
|
||||||
weldJoint.ProjectId,
|
|
||||||
WorkArea.WorkAreaId,
|
|
||||||
WorkArea.WorkAreaCode,
|
|
||||||
weldJoint.SystemNumber,
|
|
||||||
weldJoint.TestPackageNo,
|
|
||||||
pipeline.SingleNumber,
|
|
||||||
pipeline.PipelineCode,
|
|
||||||
pipeline.DrawingsNum,
|
|
||||||
pipingClass.PipingClassCode,pip.PIPClassCode,
|
|
||||||
weldJoint.PageNum,
|
|
||||||
weldJoint.PipeSegment,--所属管段
|
|
||||||
weldJoint.WeldJointCode,
|
|
||||||
weldType.WeldTypeCode,
|
|
||||||
weldJoint.JointAttribute,
|
|
||||||
wl.WeldingLocationCode,
|
|
||||||
weldJoint.Dia,
|
|
||||||
weldJoint.Thickness,--壁厚
|
|
||||||
weldJoint.HeartNo1,
|
|
||||||
weldJoint.HeartNo2,
|
|
||||||
com1.ComponentsName AS PipeAssembly1,
|
|
||||||
com2.ComponentsName AS PipeAssembly2,
|
|
||||||
--material.MaterialCode,
|
|
||||||
mat1.MaterialCode AS MaterialCode1,
|
|
||||||
mat2.MaterialCode AS MaterialCode2,
|
|
||||||
cw.WelderCode AS CoverWelderCode,
|
|
||||||
fw.WelderCode AS BackingWelderCode,
|
|
||||||
WeldMethod.WeldingMethodName,
|
|
||||||
medium.MediumName,
|
|
||||||
weldingDaily.WeldingDate,
|
|
||||||
weldingDaily.WeldingDailyCode,
|
|
||||||
trust.TrustBatchCode,
|
|
||||||
--TrustBatchCode.DetectionRateCode,
|
|
||||||
--TrustBatchCode.AcceptLevel,
|
|
||||||
(CASE WHEN weldJoint.IsHotProess=1 THEN '是' ELSE '否' END) AS IsHotProess,
|
|
||||||
null as TrustBatchCode,
|
|
||||||
null as DetectionRateCode,
|
|
||||||
null as AcceptLevel,
|
|
||||||
nde.NDEDate AS CHT_CHECKDATE,
|
|
||||||
ndeItem.NDEReportNo,
|
|
||||||
CAST(CAST(ISNULL(weldJoint.Size,0) AS REAL) AS NVARCHAR(8)) AS JOT_Size,
|
|
||||||
WeldMaterialMat.ConsumablesCode AS WMT_MatCode,
|
|
||||||
WeldMaterialMat.ConsumablesName AS WMT_Matname,
|
|
||||||
weldJoint.WeldSilkId,
|
|
||||||
--WeldMaterialSilk.ConsumablesCode AS hsCode,
|
|
||||||
--WeldMaterialSilk.ConsumablesName AS hsname,
|
|
||||||
--WeldMaterialSilk.UserFlux,
|
|
||||||
weldJoint.Specification,
|
|
||||||
wps.WPQCode,ndttype.DetectionTypeCode,NULL AS HotReportCode,
|
|
||||||
(CASE WHEN (PointBatchItem.PointState='1' OR PointBatchItem.PointState='2')
|
|
||||||
THEN (CASE WHEN PointBatchItem.IsWelderFirst=1 THEN '是首三口' ELSE '是' END) ELSE '否' END) AS if_dk
|
|
||||||
FROM Pipeline_WeldJoint AS weldJoint
|
|
||||||
LEFT JOIN Pipeline_Pipeline AS pipeline ON pipeline.PipelineId = weldJoint.PipelineId
|
|
||||||
LEFT JOIN Project_WorkArea AS WorkArea ON WorkArea.WorkAreaId = pipeline.WorkAreaId
|
|
||||||
LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = weldJoint.Material1Id
|
|
||||||
LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = weldJoint.Material2Id
|
|
||||||
LEFT JOIN Base_WeldingMethod AS WeldMethod ON WeldMethod.WeldingMethodId = weldJoint.WeldingMethodId
|
|
||||||
LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = weldJoint.WeldTypeId
|
|
||||||
LEFT JOIN dbo.Base_WeldingLocation wl ON wl.WeldingLocationId = weldJoint.WeldingLocationId
|
|
||||||
LEFT JOIN Base_Medium AS medium ON medium.MediumId = pipeline.MediumId
|
|
||||||
LEFT JOIN Base_Components com1 ON com1.ComponentsId=weldJoint.PipeAssembly1Id
|
|
||||||
LEFT JOIN Base_Components com2 ON com2.ComponentsId=weldJoint.PipeAssembly2Id
|
|
||||||
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=WeldJoint.PipingClassId
|
|
||||||
LEFT JOIN dbo.Base_PIPClass pip ON pip.PIPClassId = Pipeline.PIPClassId
|
|
||||||
LEFT JOIN Pipeline_WeldingDaily AS weldingDaily ON weldingDaily.WeldingDailyId = weldJoint.WeldingDailyId
|
|
||||||
LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = weldJoint.WPQId
|
|
||||||
left join Welder_Welder AS fw on weldJoint.BackingWelderId = fw.WelderId
|
|
||||||
left join Welder_Welder AS cw on weldJoint.CoverWelderId = cw.WelderId
|
|
||||||
LEFT JOIN Base_Consumables AS WeldMaterialMat ON WeldMaterialMat.ConsumablesId =weldJoint.WeldMatId
|
|
||||||
--LEFT JOIN Base_Consumables AS WeldMaterialSilk ON WeldMaterialSilk.ConsumablesId =weldJoint.WeldSilkId
|
|
||||||
LEFT JOIN Batch_PointBatchItem AS PointBatchItem ON PointBatchItem.WeldJointId =weldJoint.WeldJointId
|
|
||||||
LEFT JOIN dbo.Batch_PointBatch point ON point.PointBatchId = PointBatchItem.PointBatchId
|
|
||||||
LEFT JOIN dbo.Base_DetectionType ndttype ON ndttype.DetectionTypeId = point.DetectionTypeId
|
|
||||||
LEFT JOIN dbo.Batch_BatchTrustItem trustItem ON trustItem.PointBatchItemId = PointBatchItem.PointBatchItemId
|
|
||||||
LEFT JOIN dbo.Batch_BatchTrust trust ON trust.TrustBatchId = trustItem.TrustBatchId
|
|
||||||
LEFT JOIN dbo.Batch_NDEItem ndeItem ON ndeItem.TrustBatchItemId = trustItem.TrustBatchItemId
|
|
||||||
LEFT JOIN dbo.Batch_NDE nde ON nde.NDEID = ndeItem.NDEID
|
|
||||||
|
|
||||||
WHERE weldJoint.ProjectId=@projectId
|
|
||||||
AND(pipeline.WorkAreaId=@workAreaId OR @workAreaId IS NULL)
|
|
||||||
AND (CHARINDEX(weldJoint.PipelineId,@pipelineIds)>0 or @pipelineIds IS NULl)
|
|
||||||
--AND(pipeline.PipelineCode=@pipelineCode OR @pipelineCode IS NULl)
|
|
||||||
|
|
||||||
GO
|
|
||||||
|
|
||||||
UPDATE dbo.Template_Files SET title=REPLACE(title,cast(sortindex as nvarchar(50))+'-','')
|
|
||||||
GO
|
|
||||||
|
|
||||||
UPDATE dbo.Template_Files SET SortIndex=SortIndex+1 where SortIndex>24
|
|
||||||
GO
|
|
||||||
|
|
||||||
INSERT INTO [dbo].[Template_Files]([id],[title],[filePath],[SortIndex])
|
|
||||||
VALUES('95125974-3DD4-4E16-B4F0-A9D9C9A1406D','管道焊接接头PMI检测比例确认表','',25)
|
|
||||||
GO
|
|
||||||
|
|
||||||
-- PMI处理委托
|
|
||||||
create table PMI_Delegation
|
|
||||||
(
|
|
||||||
Id nvarchar(50) not null primary key,
|
|
||||||
DelegationNo nvarchar(50) not null,
|
|
||||||
DelegationDate datetime,
|
|
||||||
ProjectId nvarchar(50) not null,
|
|
||||||
InstallationId nvarchar(50),
|
|
||||||
UnitId nvarchar(50),
|
|
||||||
DetectionStandard nvarchar(50),
|
|
||||||
Tabler nvarchar(50),
|
|
||||||
Remark nvarchar(255),
|
|
||||||
CreatedTime datetime default getdate()
|
|
||||||
)
|
|
||||||
go
|
|
||||||
---- PMI处理委托 明细
|
|
||||||
create table PMI_DelegationDetails
|
|
||||||
(
|
|
||||||
Id nvarchar(50) not null primary key,
|
|
||||||
PMIId nvarchar(50) not null,
|
|
||||||
JointId nvarchar(50) not null,
|
|
||||||
QualityNo nvarchar(255),
|
|
||||||
Acceptance nvarchar(255),
|
|
||||||
Status int not null,
|
|
||||||
CreatedTime datetime default getdate()
|
|
||||||
)
|
|
||||||
go
|
|
||||||
|
|
||||||
|
|
||||||
-- 插入PMI委托菜单
|
|
||||||
insert into Sys_Menu values('A6FB44C3-0920-4F77-862F-D814FD5E5D23','PMI检测管理','PMI detection management','',21,0,3,NUll,1)
|
|
||||||
insert into Sys_Menu values(NEWID(),'PMI委托','PMI delegation','/WeldingProcess/PMI/PMIDelegation.aspx',1,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
|
|
||||||
insert into Sys_Menu values(NEWID(),'PMI检测录入','PMI detection entry','/WeldingProcess/PMI/PMIDetectionEntry.aspx',2,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
|
|
||||||
GO
|
|
||||||
|
|
||||||
|
|
||||||
/*******PMI委托明细视图***********/
|
|
||||||
|
|
||||||
ALTER VIEW [dbo].[View_PMI_DelegationDetails]
|
|
||||||
AS
|
|
||||||
/********热处理明细********/
|
|
||||||
SELECT
|
|
||||||
TrustItem.Id,
|
|
||||||
TrustItem.Acceptance,
|
|
||||||
TrustItem.CreatedTime,
|
|
||||||
TrustItem.JointId as WeldJointId,
|
|
||||||
TrustItem.status,
|
|
||||||
TrustItem.QualityNo,
|
|
||||||
TrustItem.PMIId,
|
|
||||||
Trust.ProjectId,
|
|
||||||
Trust.DelegationNo,
|
|
||||||
Trust.DelegationDate,
|
|
||||||
WeldJoint.WeldJointCode,
|
|
||||||
Pipeline.PipelineCode,
|
|
||||||
WeldJoint.Specification,
|
|
||||||
Material.MaterialCode,
|
|
||||||
Pipeline.WorkAreaId
|
|
||||||
FROM PMI_DelegationDetails AS TrustItem
|
|
||||||
LEFT JOIN PMI_Delegation AS Trust ON Trust.Id=TrustItem.PMIId
|
|
||||||
LEFT JOIN Pipeline_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=TrustItem.JointId
|
|
||||||
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
|
|
||||||
LEFT JOIN Base_Material AS Material ON Material.MaterialId=WeldJoint.Material1Id
|
|
||||||
GO
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
</site>
|
</site>
|
||||||
<site name="WebApi" id="2">
|
<site name="WebApi" id="2">
|
||||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||||
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
|
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
|
||||||
</application>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:3862:localhost" />
|
<binding protocol="http" bindingInformation="*:3862:localhost" />
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
</site>
|
</site>
|
||||||
<site name="FineUIPro.Web(10)" id="13">
|
<site name="FineUIPro.Web(10)" id="13">
|
||||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||||
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\FineUIPro.Web" />
|
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\FineUIPro.Web" />
|
||||||
</application>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:13960:localhost" />
|
<binding protocol="http" bindingInformation="*:13960:localhost" />
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false"/>
|
<section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false"/>
|
||||||
</configSections>
|
</configSections>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="HJGLDBConnectionString" connectionString="Data Source=.\sql2016;Initial Catalog=HJGLDB_ZJBSF;uid=sa;pwd=1111;"/>
|
<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB_ZJBSF;uid=sa;pwd=Sh@nghai9;"/>
|
||||||
<!--<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB;Integrated Security=True"
|
<!--<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB;Integrated Security=True"
|
||||||
providerName="System.Data.SqlClient" />-->
|
providerName="System.Data.SqlClient" />-->
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
|
|
|
@ -145,17 +145,11 @@
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
||||||
FieldType="String" TextAlign="Left" Width="150px">
|
FieldType="String" TextAlign="Left" Width="150px">
|
||||||
<Editor>
|
|
||||||
<f:TextBox ID="tbxEditorQualityNo" Required="true" runat="server">
|
|
||||||
</f:TextBox>
|
|
||||||
</Editor>
|
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
||||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
||||||
<Editor>
|
|
||||||
<f:TextBox ID="txtEditorAcceptance" Required="true" runat="server">
|
|
||||||
</f:TextBox>
|
|
||||||
</Editor>
|
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<Listeners>
|
<Listeners>
|
||||||
|
|
|
@ -309,7 +309,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowNotify(Resources.Lan.PleaseSelectModifyHotProessTrust, MessageBoxIcon.Warning);
|
ShowNotify("请选择要处理的PMI委托", MessageBoxIcon.Warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -335,7 +335,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
//删除主表数据
|
//删除主表数据
|
||||||
Funs.DB.PMI_Delegation.DeleteOnSubmit(trustManage);
|
Funs.DB.PMI_Delegation.DeleteOnSubmit(trustManage);
|
||||||
//删除 明细表
|
//删除 明细表
|
||||||
|
var details = Funs.DB.PMI_DelegationDetails.Where(t => t.PMIId == trustManage.Id).ToList();
|
||||||
|
Funs.DB.PMI_DelegationDetails.DeleteAllOnSubmit(details);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
Alert.ShowInTop(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
Alert.ShowInTop(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
||||||
this.InitTreeMenu();
|
this.InitTreeMenu();
|
||||||
|
|
|
@ -257,24 +257,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// tbxEditorQualityNo 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.TextBox tbxEditorQualityNo;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtEditorAcceptance 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.TextBox txtEditorAcceptance;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using FineUIPro.Web.common.BaseInfo;
|
||||||
using Model;
|
using Model;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using NPOI.SS.Formula.PTG;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
@ -159,8 +162,10 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
{
|
{
|
||||||
weldJointIds = hdItemsString.Text.Substring(0, hdItemsString.Text.LastIndexOf('|'));
|
weldJointIds = hdItemsString.Text.Substring(0, hdItemsString.Text.LastIndexOf('|'));
|
||||||
|
|
||||||
List<Model.View_PMI_DelegationDetails> lists = BLL.PMIDelegation_Service.GetPMI_DelegationAddItem(weldJointIds);
|
var lists = GetGridDataTable(weldJointIds);
|
||||||
this.BindGrid(lists);
|
this.BindGrid(lists);
|
||||||
|
if (string.IsNullOrEmpty(this.txtDelegationNo.Text))
|
||||||
|
{
|
||||||
//获取单位
|
//获取单位
|
||||||
string unitCode = Funs.DB.Base_Unit.FirstOrDefault(t => t.UnitId == drpUnitId.SelectedValue)?.UnitCode;
|
string unitCode = Funs.DB.Base_Unit.FirstOrDefault(t => t.UnitId == drpUnitId.SelectedValue)?.UnitCode;
|
||||||
//获取区域code
|
//获取区域code
|
||||||
|
@ -168,7 +173,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
|
|
||||||
var workAreaCode = Funs.DB.Project_WorkArea.AsQueryable().Where(t => workdAreaIdList.Contains(t.WorkAreaId)).Distinct().FirstOrDefault()?.WorkAreaCode;
|
var workAreaCode = Funs.DB.Project_WorkArea.AsQueryable().Where(t => workdAreaIdList.Contains(t.WorkAreaId)).Distinct().FirstOrDefault()?.WorkAreaCode;
|
||||||
|
|
||||||
this.txtDelegationNo.Text = $"PMI-{unitCode}-{workAreaCode}-PI-";
|
string perfix = string.Empty;
|
||||||
|
perfix = $"PMI-{unitCode}-{workAreaCode}-PI-";
|
||||||
|
this.txtDelegationNo.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.PMI_Delegation", "DelegationNo", this.CurrUser.LoginProjectId, perfix);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -270,7 +280,59 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 获取Grid里面的数据返回集合
|
||||||
|
private List<View_PMI_DelegationDetails> GetGridDataTable(string weldJointIds)
|
||||||
|
{
|
||||||
|
string[] arr = weldJointIds.Split('|');
|
||||||
|
JArray mergedData = Grid1.GetMergedData();
|
||||||
|
var result = Funs.DB.View_Pipeline_WeldJoint.Select(t => new View_PMI_DelegationDetails {
|
||||||
|
WeldJointId= t.WeldJointId,
|
||||||
|
PipelineCode= t.PipelineCode,
|
||||||
|
ProjectId= t.ProjectId,
|
||||||
|
Acceptance="",
|
||||||
|
QualityNo="",
|
||||||
|
WeldJointCode=t.WeldJointCode,
|
||||||
|
Specification=t.Specification,
|
||||||
|
MaterialCode=t.MaterialCode,
|
||||||
|
WorkAreaId=t.WorkAreaId,
|
||||||
|
Status=0,
|
||||||
|
PMIId=this.PMIDelegationId
|
||||||
|
}).Where(t => arr.Contains(t.WeldJointId)).ToList();
|
||||||
|
result.ForEach(item =>
|
||||||
|
{
|
||||||
|
item.Id = SQLHelper.GetNewID(typeof(PMI_DelegationDetails));
|
||||||
|
});
|
||||||
|
if (mergedData.Count == 0)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (JObject mergedRow in mergedData)
|
||||||
|
{
|
||||||
|
JObject values = mergedRow.Value<JObject>("values");
|
||||||
|
Model.View_PMI_DelegationDetails newTrustItem = new Model.View_PMI_DelegationDetails();
|
||||||
|
newTrustItem.Id = values.Value<string>("Id").ToString();
|
||||||
|
newTrustItem.PipelineCode = values.Value<string>("PipelineCode").ToString();
|
||||||
|
newTrustItem.WeldJointId = values.Value<string>("WeldJointId").ToString();
|
||||||
|
newTrustItem.Acceptance = values.Value<string>("Acceptance").ToString();
|
||||||
|
newTrustItem.QualityNo = values.Value<string>("QualityNo").ToString();
|
||||||
|
newTrustItem.WeldJointCode = values.Value<string>("WeldJointCode").ToString();
|
||||||
|
newTrustItem.Specification =HttpUtility.HtmlDecode(values.Value<string>("Specification").ToString());
|
||||||
|
newTrustItem.MaterialCode = values.Value<string>("MaterialCode").ToString();
|
||||||
|
newTrustItem.Status = 0;
|
||||||
|
newTrustItem.PMIId = this.PMIDelegationId;
|
||||||
|
result.Add(newTrustItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 收集Grid页面信息,提交明细
|
#region 收集Grid页面信息,提交明细
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 收集Grid页面信息,提交明细
|
/// 收集Grid页面信息,提交明细
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -309,28 +371,19 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
{
|
{
|
||||||
this.hdItemsString.Text = this.hdItemsString.Text.Substring(0, this.hdItemsString.Text.LastIndexOf('|'));
|
this.hdItemsString.Text = this.hdItemsString.Text.Substring(0, this.hdItemsString.Text.LastIndexOf('|'));
|
||||||
}
|
}
|
||||||
var trust = Funs.DB.PMI_Delegation.FirstOrDefault(t=>t.Id==this.PMIDelegationId);
|
|
||||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||||
{
|
{
|
||||||
List<Model.View_PMI_DelegationDetails> GetHotProessTrustItem = new List<Model.View_PMI_DelegationDetails>();
|
var listData = GetGridDataTable("");
|
||||||
if (!string.IsNullOrEmpty(this.hdItemsString.Text))
|
|
||||||
{
|
|
||||||
GetHotProessTrustItem = BLL.PMIDelegation_Service.GetPMI_DelegationAddItem(this.hdItemsString.Text);
|
|
||||||
}
|
|
||||||
else if (string.IsNullOrEmpty(this.hdItemsString.Text) && this.PMIDelegationId != null)
|
|
||||||
{
|
|
||||||
GetHotProessTrustItem = BLL.PMIDelegation_Service.GetPMI_DelegationItem(this.CurrUser.LoginProjectId, this.PMIDelegationId);
|
|
||||||
}
|
|
||||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||||
{
|
{
|
||||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||||
var item = GetHotProessTrustItem.FirstOrDefault(x => x.WeldJointId == rowID);
|
var item = listData.FirstOrDefault(x => x.WeldJointId == rowID);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
GetHotProessTrustItem.Remove(item);
|
listData.Remove(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BindGrid(GetHotProessTrustItem);
|
BindGrid(listData);
|
||||||
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
</f:Form>
|
</f:Form>
|
||||||
</Items>
|
</Items>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,HotProessTrust %>"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false"
|
||||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ID"
|
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ID"
|
||||||
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
|
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
|
||||||
DataIDField="ID" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
|
DataIDField="ID" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
|
||||||
|
@ -121,6 +121,8 @@
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||||
</f:ToolbarFill>
|
</f:ToolbarFill>
|
||||||
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" OnClick="btnSave_Click">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
@ -129,7 +131,7 @@
|
||||||
Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,PipelineCode %>" ColumnID="PipelineCode"
|
<f:RenderField HeaderText="<%$ Resources:Lan,PipelineCode %>" ColumnID="PipelineCode"
|
||||||
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
|
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Left" Width="220px" Locked="true">
|
TextAlign="Left" Width="200px" Locked="true">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointNumber %>" ColumnID="WeldJointCode"
|
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointNumber %>" ColumnID="WeldJointCode"
|
||||||
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
||||||
|
@ -137,34 +139,55 @@
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,Specifications %>" ColumnID="Specification"
|
<f:RenderField HeaderText="<%$ Resources:Lan,Specifications %>" ColumnID="Specification"
|
||||||
DataField="Specification" SortField="Specification" FieldType="String" HeaderTextAlign="Center"
|
DataField="Specification" SortField="Specification" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Left" Width="170px">
|
TextAlign="Left" Width="160px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,MaterialSpecificationCode %>" ColumnID="MaterialCode"
|
<f:RenderField HeaderText="<%$ Resources:Lan,MaterialSpecificationCode %>" ColumnID="MaterialCode"
|
||||||
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
|
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="120px">
|
TextAlign="Center" Width="160px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
||||||
FieldType="String" TextAlign="Left" Width="150px">
|
FieldType="String" TextAlign="Left" Width="150px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
||||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="检测日期" ColumnID="CreatedTime"
|
<%-- 检测日期 --%>
|
||||||
|
<f:RenderField HeaderText="<%$ Resources:Lan,FilmDate %>" ColumnID="DelegationDate"
|
||||||
|
DataField="DelegationDate" SortField="DelegationDate" FieldType="Date" Renderer="Date"
|
||||||
|
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||||
|
<Editor>
|
||||||
|
<f:DatePicker ID="tbxTrustDate" DateFormatString="yyyy-MM-dd" Required="true" runat="server">
|
||||||
|
</f:DatePicker>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<%-- 报告日期 --%>
|
||||||
|
<f:RenderField HeaderText="<%$ Resources:Lan,ReportDate %>" ColumnID="CreatedTime"
|
||||||
DataField="CreatedTime" SortField="CreatedTime" FieldType="Date" Renderer="Date"
|
DataField="CreatedTime" SortField="CreatedTime" FieldType="Date" Renderer="Date"
|
||||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||||
|
<Editor>
|
||||||
|
<f:DatePicker ID="tbxCreatedTime" DateFormatString="yyyy-MM-dd" Required="true" runat="server">
|
||||||
|
</f:DatePicker>
|
||||||
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="报告日期" FieldType="String" HeaderTextAlign="Center"
|
<%-- 报告编号 --%>
|
||||||
|
<f:RenderField HeaderText="<%$ Resources:Lan,ReportNo %>" ColumnID="reportNo"
|
||||||
|
DataField="reportNo" SortField="reportNo" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Left" Width="100px">
|
TextAlign="Left" Width="100px">
|
||||||
|
<Editor>
|
||||||
|
<f:TextBox ID="tbxreportNo" Required="true" runat="server">
|
||||||
|
</f:TextBox>
|
||||||
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="报告编号" FieldType="String" HeaderTextAlign="Center"
|
<%-- 是否合格 --%>
|
||||||
TextAlign="Left" Width="100px">
|
|
||||||
</f:RenderField>
|
|
||||||
|
|
||||||
|
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,IsPass %>" ColumnID="StatusText"
|
<f:RenderField HeaderText="<%$ Resources:Lan,IsPass %>" ColumnID="StatusText"
|
||||||
DataField="StatusText" SortField="status" FieldType="String" HeaderTextAlign="Center"
|
DataField="StatusText" SortField="StatusText" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Left" Width="100px">
|
TextAlign="Left" Width="100px">
|
||||||
|
<Editor>
|
||||||
|
<f:DropDownList ID="drpstatus" runat="server" ShowRedStar="true" Required="true" >
|
||||||
|
<f:ListItem Value="合格" Text="合格" />
|
||||||
|
<f:ListItem Value="不合格" Text="不合格" />
|
||||||
|
</f:DropDownList>
|
||||||
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<Listeners>
|
<Listeners>
|
||||||
|
|
|
@ -9,6 +9,7 @@ using System.Collections;
|
||||||
using Model;
|
using Model;
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||||
using FineUIPro.Web.common.ProjectSet;
|
using FineUIPro.Web.common.ProjectSet;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace FineUIPro.Web.WeldingProcess.PMI
|
namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
{
|
{
|
||||||
|
@ -189,13 +190,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string StatusText(int status) {
|
|
||||||
if (status == 0)
|
|
||||||
return "合格";
|
|
||||||
else
|
|
||||||
return "不合格";
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 加载页面输入提交信息
|
#region 加载页面输入提交信息
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载页面输入提交信息
|
/// 加载页面输入提交信息
|
||||||
|
@ -209,7 +203,9 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
join u in Funs.DB.Sys_User on x.DetectionStandard equals u.UserId into u1 //左连接查询
|
join u in Funs.DB.Sys_User on x.DetectionStandard equals u.UserId into u1 //左连接查询
|
||||||
from u in u1.DefaultIfEmpty()
|
from u in u1.DefaultIfEmpty()
|
||||||
where x.Id == hdPMIId.Text
|
where x.Id == hdPMIId.Text
|
||||||
select new { DelegationNo=x.DelegationNo,
|
select new
|
||||||
|
{
|
||||||
|
DelegationNo = x.DelegationNo,
|
||||||
DelegationDate = x.DelegationDate,
|
DelegationDate = x.DelegationDate,
|
||||||
InstallationName = n.InstallationName,
|
InstallationName = n.InstallationName,
|
||||||
UnitName = y.UnitName,
|
UnitName = y.UnitName,
|
||||||
|
@ -221,7 +217,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
if (pageInfo.Count > 0)
|
if (pageInfo.Count > 0)
|
||||||
{
|
{
|
||||||
this.txtDelegationNo.Text = pageInfo[0].DelegationNo;
|
this.txtDelegationNo.Text = pageInfo[0].DelegationNo;
|
||||||
this.txtDelegationDate.Text = pageInfo[0].DelegationDate.ToString();
|
this.txtDelegationDate.Text = pageInfo[0].DelegationDate.Value.ToString("yyyy-MM-dd");
|
||||||
this.txtInstallationName.Text = pageInfo[0].InstallationName;
|
this.txtInstallationName.Text = pageInfo[0].InstallationName;
|
||||||
this.txtUnitName.Text = pageInfo[0].UnitName;
|
this.txtUnitName.Text = pageInfo[0].UnitName;
|
||||||
this.txtDetectionMethod.Text = pageInfo[0].DetectionMethod;
|
this.txtDetectionMethod.Text = pageInfo[0].DetectionMethod;
|
||||||
|
@ -325,5 +321,60 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.BItemEndCheckMenuId, Const.BtnSave))
|
||||||
|
//{
|
||||||
|
// ShowNotify("您没有这个权限,请与管理员联系!");
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
|
if (Grid1.GetModifiedData().Count > 0)
|
||||||
|
{
|
||||||
|
JArray teamGroupData = Grid1.GetMergedData();
|
||||||
|
foreach (JObject teamGroupRow in teamGroupData)
|
||||||
|
{
|
||||||
|
string status = teamGroupRow.Value<string>("status");
|
||||||
|
if (status == "modified")
|
||||||
|
{
|
||||||
|
JObject values = teamGroupRow.Value<JObject>("values");
|
||||||
|
string id = teamGroupRow.Value<string>("id");
|
||||||
|
Model.PMI_DelegationDetails onePMIDelegationDetails = Funs.DB.PMI_DelegationDetails.FirstOrDefault(p => p.Id == id);
|
||||||
|
if (onePMIDelegationDetails == null)
|
||||||
|
continue;
|
||||||
|
//检测日期(缺失)
|
||||||
|
string DelegationDate = values.Value<string>("DelegationDate");
|
||||||
|
if (string.IsNullOrWhiteSpace(DelegationDate))
|
||||||
|
;
|
||||||
|
else
|
||||||
|
;
|
||||||
|
//报告日期
|
||||||
|
string createdTime = values.Value<string>("CreatedTime");
|
||||||
|
if (string.IsNullOrWhiteSpace(createdTime))
|
||||||
|
onePMIDelegationDetails.CreatedTime=null;
|
||||||
|
else
|
||||||
|
onePMIDelegationDetails.CreatedTime=Convert.ToDateTime(createdTime);
|
||||||
|
//报告编号
|
||||||
|
onePMIDelegationDetails.ReportNo = values.Value<string>("reportNo").ToString();
|
||||||
|
//是否合格 0合格 1不合格
|
||||||
|
string statusText = values.Value<string>("StatusText");
|
||||||
|
if (statusText == "合格")
|
||||||
|
onePMIDelegationDetails.Status = 0;
|
||||||
|
else
|
||||||
|
onePMIDelegationDetails.Status = 1;
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -248,6 +248,51 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSave 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxTrustDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DatePicker tbxTrustDate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxCreatedTime 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DatePicker tbxCreatedTime;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxreportNo 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox tbxreportNo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpstatus 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpstatus;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -22,13 +22,13 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
|
||||||
if (!IsPostBack)
|
|
||||||
{
|
{
|
||||||
this.UnitId = Request.Params["unitId"] ?? "";
|
this.UnitId = Request.Params["unitId"] ?? "";
|
||||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
this.PMIId = Request.Params["PMIId"] ?? "";
|
this.PMIId = Request.Params["PMIId"] ?? "";
|
||||||
this.weldJointIds = Request.Params["weldJointIds"] ?? "";
|
this.weldJointIds = Request.Params["weldJointIds"] ?? "";
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
this.InitTreeMenu();//加载树
|
this.InitTreeMenu();//加载树
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
|
@ -127,32 +127,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
select b.JointId
|
select b.JointId
|
||||||
).Distinct().ToList();
|
).Distinct().ToList();
|
||||||
|
|
||||||
// string sql = @"SELECT WeldJointId,ProjectId,PipelineId,WeldJointCode,WPQCode,DetectionType,
|
string[] arr = this.weldJointIds.Split('|');
|
||||||
// convert(int,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJointNo,
|
|
||||||
//dbo.Fun_GetParseString(WeldJointCode) AS PreJotNo,
|
|
||||||
// PipingClassCode,PipeSegment,JointAttribute,PageNum,
|
|
||||||
// ComponentsCode1,ComponentsCode2,Is_hjName,IsHotProessStr,Material1Code,Material2Code,
|
|
||||||
// WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
|
|
||||||
// WeldingMethodCode,WeldSilkId,WeldMatCode,WeldingDate,WeldingDailyCode,DoneDin,
|
|
||||||
// BackingWelderCode,CoverWelderCode,SystemNumber,TestPackageNo,Remark,
|
|
||||||
// MaterialCode,WeldingDate,
|
|
||||||
// (CASE WHEN IsCancel=1 THEN '是' ELSE '否' END) AS IsCancel,isPMI
|
|
||||||
// FROM View_Pipeline_WeldJoint WHERE isPMI=1 ";
|
|
||||||
|
|
||||||
|
|
||||||
// List<SqlParameter> paramsList = new List<SqlParameter>();
|
|
||||||
// if (!string.IsNullOrEmpty(this.txtJointNo.Text))
|
|
||||||
// {
|
|
||||||
// sql += @" and WeldJointCode=@WeldJointCode";
|
|
||||||
// paramsList.Add(new SqlParameter("@WeldJointCode", txtJointNo.Text.Trim()));
|
|
||||||
// }
|
|
||||||
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
|
||||||
// {
|
|
||||||
// sql += @" and PipelineId=@PipelineId ";
|
|
||||||
// paramsList.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
|
||||||
// }
|
|
||||||
// var dt = SQLHelper.GetDataTableRunText(sql, paramsList.ToArray());
|
|
||||||
var query = Funs.DB.View_Pipeline_WeldJoint.Where(t => t.IsPMI == true);
|
var query = Funs.DB.View_Pipeline_WeldJoint.Where(t => t.IsPMI == true);
|
||||||
|
if (arr.Length > 0)
|
||||||
|
{
|
||||||
|
listData.Add(arr[0]);
|
||||||
|
}
|
||||||
if (listData.Count > 0)
|
if (listData.Count > 0)
|
||||||
{
|
{
|
||||||
query = query.Where(t => !listData.Contains(t.WeldJointId));
|
query = query.Where(t => !listData.Contains(t.WeldJointId));
|
||||||
|
@ -165,7 +145,14 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
{
|
{
|
||||||
query = query.Where(t => t.PipelineId == this.tvControlItem.SelectedNodeID);
|
query = query.Where(t => t.PipelineId == this.tvControlItem.SelectedNodeID);
|
||||||
}
|
}
|
||||||
Grid1.DataSource = query.ToList();
|
var data= query.ToList() ;
|
||||||
|
if (!string.IsNullOrEmpty(weldJointIds))
|
||||||
|
{
|
||||||
|
string[] jots = weldJointIds.Split('|');
|
||||||
|
data = data.Where(t => !jots.Contains(t.WeldJointId)).ToList();
|
||||||
|
}
|
||||||
|
data = data.OrderBy(t => t.WeldJointCode).ToList();
|
||||||
|
Grid1.DataSource = data;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -21304,7 +21304,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
|
||||||
public string ProjectId
|
public string ProjectId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -21481,9 +21481,11 @@ namespace Model
|
||||||
|
|
||||||
private string _Acceptance;
|
private string _Acceptance;
|
||||||
|
|
||||||
|
private System.Nullable<System.DateTime> _CreatedTime;
|
||||||
|
|
||||||
private int _Status;
|
private int _Status;
|
||||||
|
|
||||||
private System.Nullable<System.DateTime> _CreatedTime;
|
private string _ReportNo;
|
||||||
|
|
||||||
#region 可扩展性方法定义
|
#region 可扩展性方法定义
|
||||||
partial void OnLoaded();
|
partial void OnLoaded();
|
||||||
|
@ -21499,10 +21501,12 @@ namespace Model
|
||||||
partial void OnQualityNoChanged();
|
partial void OnQualityNoChanged();
|
||||||
partial void OnAcceptanceChanging(string value);
|
partial void OnAcceptanceChanging(string value);
|
||||||
partial void OnAcceptanceChanged();
|
partial void OnAcceptanceChanged();
|
||||||
partial void OnStatusChanging(int value);
|
|
||||||
partial void OnStatusChanged();
|
|
||||||
partial void OnCreatedTimeChanging(System.Nullable<System.DateTime> value);
|
partial void OnCreatedTimeChanging(System.Nullable<System.DateTime> value);
|
||||||
partial void OnCreatedTimeChanged();
|
partial void OnCreatedTimeChanged();
|
||||||
|
partial void OnStatusChanging(int value);
|
||||||
|
partial void OnStatusChanged();
|
||||||
|
partial void OnReportNoChanging(string value);
|
||||||
|
partial void OnReportNoChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public PMI_DelegationDetails()
|
public PMI_DelegationDetails()
|
||||||
|
@ -21610,7 +21614,27 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="Int NOT NULL")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedTime", DbType="DateTime")]
|
||||||
|
public System.Nullable<System.DateTime> CreatedTime
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._CreatedTime;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._CreatedTime != value))
|
||||||
|
{
|
||||||
|
this.OnCreatedTimeChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._CreatedTime = value;
|
||||||
|
this.SendPropertyChanged("CreatedTime");
|
||||||
|
this.OnCreatedTimeChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="status", Storage="_Status", DbType="Int NOT NULL")]
|
||||||
public int Status
|
public int Status
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -21630,22 +21654,22 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedTime", DbType="DateTime")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="reportNo", Storage="_ReportNo", DbType="NVarChar(50)")]
|
||||||
public System.Nullable<System.DateTime> CreatedTime
|
public string ReportNo
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this._CreatedTime;
|
return this._ReportNo;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if ((this._CreatedTime != value))
|
if ((this._ReportNo != value))
|
||||||
{
|
{
|
||||||
this.OnCreatedTimeChanging(value);
|
this.OnReportNoChanging(value);
|
||||||
this.SendPropertyChanging();
|
this.SendPropertyChanging();
|
||||||
this._CreatedTime = value;
|
this._ReportNo = value;
|
||||||
this.SendPropertyChanged("CreatedTime");
|
this.SendPropertyChanged("ReportNo");
|
||||||
this.OnCreatedTimeChanged();
|
this.OnReportNoChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37270,6 +37294,8 @@ namespace Model
|
||||||
|
|
||||||
private string _ProjectId;
|
private string _ProjectId;
|
||||||
|
|
||||||
|
private System.Nullable<bool> _IsPMI;
|
||||||
|
|
||||||
private string _PipelineCode;
|
private string _PipelineCode;
|
||||||
|
|
||||||
private string _PipelineId;
|
private string _PipelineId;
|
||||||
|
@ -37400,6 +37426,22 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="isPMI", Storage="_IsPMI", DbType="Bit")]
|
||||||
|
public System.Nullable<bool> IsPMI
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._IsPMI;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._IsPMI != value))
|
||||||
|
{
|
||||||
|
this._IsPMI = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")]
|
||||||
public string PipelineCode
|
public string PipelineCode
|
||||||
{
|
{
|
||||||
|
@ -39408,8 +39450,6 @@ namespace Model
|
||||||
|
|
||||||
private string _PipingClassCode;
|
private string _PipingClassCode;
|
||||||
|
|
||||||
private string _PIPClassCode;
|
|
||||||
|
|
||||||
private string _WeldingDate;
|
private string _WeldingDate;
|
||||||
|
|
||||||
private System.Nullable<bool> _IsCancel;
|
private System.Nullable<bool> _IsCancel;
|
||||||
|
@ -40518,22 +40558,6 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PIPClassCode", DbType="NVarChar(50)")]
|
|
||||||
public string PIPClassCode
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this._PIPClassCode;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if ((this._PIPClassCode != value))
|
|
||||||
{
|
|
||||||
this._PIPClassCode = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDate", DbType="VarChar(100)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDate", DbType="VarChar(100)")]
|
||||||
public string WeldingDate
|
public string WeldingDate
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue