提交代码

This commit is contained in:
2024-03-28 09:47:10 +08:00
parent 464d147d02
commit dee8e38baf
4 changed files with 230 additions and 140 deletions
@@ -0,0 +1,72 @@
ALTER VIEW [dbo].[View_HJGL_Pipeline]
AS
/*************管线视图*****************/
SELECT pipeline.PipelineId,
pipeline.ProjectId,
pipeline.UnitId,
pipeline.UnitWorkId,
pipeline.PipelineCode,
pipeline.SingleName,
pipeline.SingleNumber,
pipeline.PipingClassId,
pipeline.MediumId,
pipingClass.PipingClassCode,
pipeline.DetectionRateId,
rate.DetectionRateCode,
pipeline.DetectionType,
pipeline.TestPressure,
pipeline.TestMedium,
pipeline.PressurePipingClassId,
pc.PressurePipingClassCode,
pipeline.PipeLenth,
pipeline.DesignPress,
pipeline.DesignTemperature,
pipeline.Remark,
pipeline.LeakPressure,
pipeline.LeakMedium,
pipeline.VacuumPressure,
pipeline.PCMedium ,
pipeline.PCtype,
pipeline.MaterialId,
pipeline.PipeArea,
case pipeline.PipeArea when '1' then '工厂预制' when '2' then '现场施工' else '' end as PipeAreaStr,
pipeline.FlowingSection,
mat.MaterialCode,
dType.DetectionTypeCode,
lea.MediumName AS LeakMediumName,
pur.PurgeMethodName AS PCMediumName,
CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint WHERE PipelineId=pipeline.PipelineId) AS DECIMAL(8,3)) AS TotalDin,
CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE jot.PipelineId=pipeline.PipelineId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(8,3)) AS FinishSize,
(SELECT COUNT(WeldJointId) FROM dbo.HJGL_WeldJoint WHERE PipelineId=pipeline.PipelineId and IsTwoJoint is null) AS JointCount,
(SELECT COUNT(WeldJointId) FROM dbo.HJGL_WeldJoint WHERE PipelineId=pipeline.PipelineId and IsTwoJoint is null and WeldingDailyId IS NOT NULL) AS FinishJointCount,
unit.UnitName,
workArea.UnitWorkCode,
medium.MediumCode,
medium.MediumName AS MediumName,
testMedium.MediumCode AS TestMediumCode,
pipeline.ActEndDate AS FinishedDate,
pipeline.IsFinished
FROM dbo.HJGL_Pipeline AS pipeline
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipeline.PipingClassId
LEFT JOIN dbo.Base_Unit AS unit ON unit.UnitId=pipeline.UnitId
LEFT JOIN WBS_UnitWork AS workArea ON workArea.UnitWorkId=pipeline.UnitWorkId
LEFT JOIN Base_Medium AS medium ON medium.MediumId=pipeline.MediumId
LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId=pipeline.TestMedium
LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = pipeline.DetectionRateId
LEFT JOIN dbo.Base_PressurePipingClass pc ON pc.PressurePipingClassId = pipeline.PressurePipingClassId
LEFT JOIN dbo.Base_TestMedium AS lea ON lea.TestMediumId=pipeline.LeakMedium
LEFT JOIN dbo.Base_PurgeMethod AS pur ON pur.PurgeMethodId=pipeline.PCMedium
LEFT JOIN dbo.Base_Material AS mat ON mat.MaterialId=pipeline.MaterialId
LEFT JOIN dbo.Base_DetectionType dType on dType.DetectionTypeId=pipeline.DetectionType
GO
@@ -130,9 +130,9 @@
HeaderText="总焊口量" HeaderTextAlign="Center"
TextAlign="Right">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center"
TextAlign="Left">
<f:RenderField Width="200px" ColumnID="PipeAreaStr" DataField="PipeAreaStr" SortField="PipeAreaStr"
FieldType="String" HeaderText="管线划分" HeaderTextAlign="Center"
TextAlign="Center">
</f:RenderField>
<f:TemplateField Width="130px" HeaderText="无损检测类型" HeaderTextAlign="Center"
TextAlign="Center" SortField="DetectionType">
@@ -317,7 +317,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
=x.FinishJointCount,
=x.TotalDin,
=x.JointCount,
=x.UnitName,
线 = x.PipeAreaStr,
=x.DetectionTypeCode,
=x.DetectionRateCode,
=x.MediumName,
+154 -136
View File
@@ -11823,7 +11823,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")]
public string ApproveIdea
{
get
@@ -151511,7 +151511,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")]
public string AttentPerson
{
get
@@ -182470,7 +182470,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string ProjectDescription
{
get
@@ -182590,7 +182590,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string CalculationRule
{
get
@@ -182650,7 +182650,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")]
public string ConstructionSubcontractor
{
get
@@ -183034,7 +183034,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")]
public System.Nullable<decimal> WorkPackageEstimate
{
get
@@ -183339,6 +183339,16 @@ namespace Model
private string _ProjectId;
private string _ContractId;
private string _OrderCode;
private System.Nullable<System.DateTime> _OrderInDate;
private System.Nullable<System.DateTime> _OrderOutDate;
private string _MaterialRequisitionUnit;
private System.Nullable<int> _State;
private string _InvoiceCode;
@@ -183367,16 +183377,6 @@ namespace Model
private string _CreateUser;
private string _ContractId;
private System.Nullable<System.DateTime> _OrderInDate;
private string _OrderCode;
private System.Nullable<System.DateTime> _OrderOutDate;
private string _MaterialRequisitionUnit;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -183385,6 +183385,16 @@ namespace Model
partial void OnInvoiceIdChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
partial void OnContractIdChanging(string value);
partial void OnContractIdChanged();
partial void OnOrderCodeChanging(string value);
partial void OnOrderCodeChanged();
partial void OnOrderInDateChanging(System.Nullable<System.DateTime> value);
partial void OnOrderInDateChanged();
partial void OnOrderOutDateChanging(System.Nullable<System.DateTime> value);
partial void OnOrderOutDateChanged();
partial void OnMaterialRequisitionUnitChanging(string value);
partial void OnMaterialRequisitionUnitChanged();
partial void OnStateChanging(System.Nullable<int> value);
partial void OnStateChanged();
partial void OnInvoiceCodeChanging(string value);
@@ -183413,16 +183423,6 @@ namespace Model
partial void OnCreateDateChanged();
partial void OnCreateUserChanging(string value);
partial void OnCreateUserChanged();
partial void OnContractIdChanging(string value);
partial void OnContractIdChanged();
partial void OnOrderInDateChanging(System.Nullable<System.DateTime> value);
partial void OnOrderInDateChanged();
partial void OnOrderCodeChanging(string value);
partial void OnOrderCodeChanged();
partial void OnOrderOutDateChanging(System.Nullable<System.DateTime> value);
partial void OnOrderOutDateChanged();
partial void OnMaterialRequisitionUnitChanging(string value);
partial void OnMaterialRequisitionUnitChanged();
#endregion
public PHTGL_Invoice()
@@ -183470,6 +183470,106 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")]
public string ContractId
{
get
{
return this._ContractId;
}
set
{
if ((this._ContractId != value))
{
this.OnContractIdChanging(value);
this.SendPropertyChanging();
this._ContractId = value;
this.SendPropertyChanged("ContractId");
this.OnContractIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")]
public string OrderCode
{
get
{
return this._OrderCode;
}
set
{
if ((this._OrderCode != value))
{
this.OnOrderCodeChanging(value);
this.SendPropertyChanging();
this._OrderCode = value;
this.SendPropertyChanged("OrderCode");
this.OnOrderCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")]
public System.Nullable<System.DateTime> OrderInDate
{
get
{
return this._OrderInDate;
}
set
{
if ((this._OrderInDate != value))
{
this.OnOrderInDateChanging(value);
this.SendPropertyChanging();
this._OrderInDate = value;
this.SendPropertyChanged("OrderInDate");
this.OnOrderInDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")]
public System.Nullable<System.DateTime> OrderOutDate
{
get
{
return this._OrderOutDate;
}
set
{
if ((this._OrderOutDate != value))
{
this.OnOrderOutDateChanging(value);
this.SendPropertyChanging();
this._OrderOutDate = value;
this.SendPropertyChanged("OrderOutDate");
this.OnOrderOutDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")]
public string MaterialRequisitionUnit
{
get
{
return this._MaterialRequisitionUnit;
}
set
{
if ((this._MaterialRequisitionUnit != value))
{
this.OnMaterialRequisitionUnitChanging(value);
this.SendPropertyChanging();
this._MaterialRequisitionUnit = value;
this.SendPropertyChanged("MaterialRequisitionUnit");
this.OnMaterialRequisitionUnitChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")]
public System.Nullable<int> State
{
@@ -183750,106 +183850,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")]
public string ContractId
{
get
{
return this._ContractId;
}
set
{
if ((this._ContractId != value))
{
this.OnContractIdChanging(value);
this.SendPropertyChanging();
this._ContractId = value;
this.SendPropertyChanged("ContractId");
this.OnContractIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")]
public System.Nullable<System.DateTime> OrderInDate
{
get
{
return this._OrderInDate;
}
set
{
if ((this._OrderInDate != value))
{
this.OnOrderInDateChanging(value);
this.SendPropertyChanging();
this._OrderInDate = value;
this.SendPropertyChanged("OrderInDate");
this.OnOrderInDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")]
public string OrderCode
{
get
{
return this._OrderCode;
}
set
{
if ((this._OrderCode != value))
{
this.OnOrderCodeChanging(value);
this.SendPropertyChanging();
this._OrderCode = value;
this.SendPropertyChanged("OrderCode");
this.OnOrderCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")]
public System.Nullable<System.DateTime> OrderOutDate
{
get
{
return this._OrderOutDate;
}
set
{
if ((this._OrderOutDate != value))
{
this.OnOrderOutDateChanging(value);
this.SendPropertyChanging();
this._OrderOutDate = value;
this.SendPropertyChanged("OrderOutDate");
this.OnOrderOutDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")]
public string MaterialRequisitionUnit
{
get
{
return this._MaterialRequisitionUnit;
}
set
{
if ((this._MaterialRequisitionUnit != value))
{
this.OnMaterialRequisitionUnitChanging(value);
this.SendPropertyChanging();
this._MaterialRequisitionUnit = value;
this.SendPropertyChanged("MaterialRequisitionUnit");
this.OnMaterialRequisitionUnitChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -205073,7 +205073,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WrongContent", DbType="NChar(10)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WrongContent", DbType="NVarChar(500)")]
public string WrongContent
{
get
@@ -205093,7 +205093,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirement", DbType="NChar(10)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirement", DbType="NVarChar(500)")]
public string Requirement
{
get
@@ -205133,7 +205133,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyResults", DbType="NChar(10)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyResults", DbType="NVarChar(500)")]
public string RectifyResults
{
get
@@ -274903,6 +274903,8 @@ namespace Model
private string _PipeArea;
private string _PipeAreaStr;
private string _FlowingSection;
private string _MaterialCode;
@@ -275387,6 +275389,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeAreaStr", DbType="VarChar(8) NOT NULL", CanBeNull=false)]
public string PipeAreaStr
{
get
{
return this._PipeAreaStr;
}
set
{
if ((this._PipeAreaStr != value))
{
this._PipeAreaStr = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FlowingSection", DbType="NVarChar(200)")]
public string FlowingSection
{
@@ -296026,7 +296044,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")]
public string Name
{
get
@@ -296603,7 +296621,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@@ -296794,7 +296812,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@@ -302081,7 +302099,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@@ -303553,7 +303571,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@@ -313104,7 +313122,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")]
public string ContractNo
{
get
@@ -313124,7 +313142,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")]
public string UnitWorks
{
get