diff --git a/DataBase/版本日志/SGGLDB_V2022-12-25-001.sql b/DataBase/版本日志/SGGLDB_V2022-12-25-001.sql new file mode 100644 index 00000000..a328bbf2 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2022-12-25-001.sql @@ -0,0 +1,4 @@ + +update WPQ_WPQList set Material1Group=null where Material1Group='-' +update WPQ_WPQList set Material2Group=null where Material2Group='-' +go \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2022-12-26_001.sql b/DataBase/版本日志/SGGLDB_V2022-12-26_001.sql new file mode 100644 index 00000000..42caa9b0 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2022-12-26_001.sql @@ -0,0 +1,51 @@ + +ALTER VIEW [dbo].[View_HJGL_NoWeldJointFind] +AS +--δڲ +SELECT jot.WeldJointId, +jot.WeldJointCode, +(case when charindex('/',jot.WeldJointCode)>0 +then RIGHT(jot.WeldJointCode,CHARINDEX('/',REVERSE(jot.WeldJointCode))-1) +else jot.WeldJointCode end) as WeldJointNum, +jot.PipelineId,jot.WeldingDailyId,jot.JointAttribute,WeldType.WeldTypeCode, + method.WeldingMethodCode,jot.Dia,jot.Thickness, rod.ConsumablesCode AS WeldingRodCode + ,wire.ConsumablesCode AS WeldingWireCode, + mat1.MaterialCode AS Material1Code ,mat2.MaterialCode AS Material2Code +FROM dbo.HJGL_WeldJoint jot +LEFT JOIN dbo.HJGL_PreWeldingDaily pre ON pre.WeldJointId = jot.WeldJointId +LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId +LEFT JOIN Base_WeldingMethod AS method ON method.WeldingMethodId=jot.WeldingMethodId +LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id +LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id +LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire +LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod +WHERE pre.PreWeldingDailyId IS NULL +GO + + +ALTER VIEW [dbo].[View_HJGL_WeldingTask] +AS +SELECT T.WeldTaskId,T.WeldJointId,T.CoverWelderId,T.BackingWelderId, + cov.WelderCode AS CoverWelderCode,back.WelderCode AS BackingWelderCode, + case when jot.JointAttribute is not null then jot.JointAttribute else T.JointAttribute end as JointAttribute, + T.WeldingMode,T.ProjectId,T.UnitWorkId,T.UnitId,T.TaskDate,T.Tabler,T.TableDate, + jot.WeldJointCode,jot.Dia,jot.Thickness,jot.Size,jot.WeldingLocationId, + CASE WHEN jot.WeldingDailyId IS NULL THEN '' ELSE '' END AS IsWelding, + P.PipelineCode,B.WeldTypeCode,M.WeldingMethodCode,L.WeldingLocationCode, + t.CanWelderCode,t.CanWelderId ,rod.ConsumablesName AS WeldingRodCode,T.CanWeldingRodName,T.CanWeldingWireName, + wire.ConsumablesName AS WeldingWireCode,jot.WeldingDailyId,p.PipeArea, + (case when charindex('/',jot.WeldJointCode)>0 +then RIGHT(jot.WeldJointCode,CHARINDEX('/',REVERSE(jot.WeldJointCode))-1) +else jot.WeldJointCode end) as WeldJointNum +from HJGL_WeldTask T +left join HJGL_WeldJoint jot on T.WeldJointId=jot.WeldJointId +LEFT JOIN dbo.SitePerson_Person cov ON cov.PersonId=t.CoverWelderId +LEFT JOIN dbo.SitePerson_Person back ON back.PersonId=t.BackingWelderId +LEFT join HJGL_Pipeline P on jot.PipelineId=P.PipelineId +left join Base_WeldType B on jot.WeldTypeId=B.WeldTypeId +LEFT join Base_WeldingMethod M on jot.WeldingMethodId=M.WeldingMethodId +left join Base_WeldingLocation L on jot.WeldingLocationId=L.WeldingLocationId +LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire +LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod + +GO diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index b9a3e77a..021235c9 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -347,12 +347,6 @@ namespace Model partial void InsertCheck_TechnicalContactListApprove(Check_TechnicalContactListApprove instance); partial void UpdateCheck_TechnicalContactListApprove(Check_TechnicalContactListApprove instance); partial void DeleteCheck_TechnicalContactListApprove(Check_TechnicalContactListApprove instance); - partial void InsertCommon_FileManage(Common_FileManage instance); - partial void UpdateCommon_FileManage(Common_FileManage instance); - partial void DeleteCommon_FileManage(Common_FileManage instance); - partial void InsertCommon_FileManageType(Common_FileManageType instance); - partial void UpdateCommon_FileManageType(Common_FileManageType instance); - partial void DeleteCommon_FileManageType(Common_FileManageType instance); partial void InsertCostGoods_CostManage(CostGoods_CostManage instance); partial void UpdateCostGoods_CostManage(CostGoods_CostManage instance); partial void DeleteCostGoods_CostManage(CostGoods_CostManage instance); @@ -2292,22 +2286,6 @@ namespace Model } } - public System.Data.Linq.Table Common_FileManage - { - get - { - return this.GetTable(); - } - } - - public System.Data.Linq.Table Common_FileManageType - { - get - { - return this.GetTable(); - } - } - public System.Data.Linq.Table CostGoods_CostManage { get @@ -19117,7 +19095,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] public string ProjectName { get @@ -50022,394 +50000,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Common_FileManage")] - public partial class Common_FileManage : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private int _FileId; - - private string _FileCode; - - private string _FileName; - - private string _FileSize; - - private string _FileType; - - private System.Data.Linq.Binary _FileContent; - - private string _BigType; - - private string _SmallType; - - private string _FileCreate; - - private System.Nullable _FileDate; - - #region 可扩展性方法定义 - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnFileIdChanging(int value); - partial void OnFileIdChanged(); - partial void OnFileCodeChanging(string value); - partial void OnFileCodeChanged(); - partial void OnFileNameChanging(string value); - partial void OnFileNameChanged(); - partial void OnFileSizeChanging(string value); - partial void OnFileSizeChanged(); - partial void OnFileTypeChanging(string value); - partial void OnFileTypeChanged(); - partial void OnFileContentChanging(System.Data.Linq.Binary value); - partial void OnFileContentChanged(); - partial void OnBigTypeChanging(string value); - partial void OnBigTypeChanged(); - partial void OnSmallTypeChanging(string value); - partial void OnSmallTypeChanged(); - partial void OnFileCreateChanging(string value); - partial void OnFileCreateChanged(); - partial void OnFileDateChanging(System.Nullable value); - partial void OnFileDateChanged(); - #endregion - - public Common_FileManage() - { - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] - public int FileId - { - get - { - return this._FileId; - } - set - { - if ((this._FileId != value)) - { - this.OnFileIdChanging(value); - this.SendPropertyChanging(); - this._FileId = value; - this.SendPropertyChanged("FileId"); - this.OnFileIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileCode", DbType="NVarChar(50)")] - public string FileCode - { - get - { - return this._FileCode; - } - set - { - if ((this._FileCode != value)) - { - this.OnFileCodeChanging(value); - this.SendPropertyChanging(); - this._FileCode = value; - this.SendPropertyChanged("FileCode"); - this.OnFileCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="NVarChar(100)")] - public string FileName - { - get - { - return this._FileName; - } - set - { - if ((this._FileName != value)) - { - this.OnFileNameChanging(value); - this.SendPropertyChanging(); - this._FileName = value; - this.SendPropertyChanged("FileName"); - this.OnFileNameChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileSize", DbType="NVarChar(50)")] - public string FileSize - { - get - { - return this._FileSize; - } - set - { - if ((this._FileSize != value)) - { - this.OnFileSizeChanging(value); - this.SendPropertyChanging(); - this._FileSize = value; - this.SendPropertyChanged("FileSize"); - this.OnFileSizeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileType", DbType="NVarChar(50)")] - public string FileType - { - get - { - return this._FileType; - } - set - { - if ((this._FileType != value)) - { - this.OnFileTypeChanging(value); - this.SendPropertyChanging(); - this._FileType = value; - this.SendPropertyChanged("FileType"); - this.OnFileTypeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileContent", DbType="Image", CanBeNull=true, UpdateCheck=UpdateCheck.Never)] - public System.Data.Linq.Binary FileContent - { - get - { - return this._FileContent; - } - set - { - if ((this._FileContent != value)) - { - this.OnFileContentChanging(value); - this.SendPropertyChanging(); - this._FileContent = value; - this.SendPropertyChanged("FileContent"); - this.OnFileContentChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BigType", DbType="NVarChar(50)")] - public string BigType - { - get - { - return this._BigType; - } - set - { - if ((this._BigType != value)) - { - this.OnBigTypeChanging(value); - this.SendPropertyChanging(); - this._BigType = value; - this.SendPropertyChanged("BigType"); - this.OnBigTypeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SmallType", DbType="NVarChar(50)")] - public string SmallType - { - get - { - return this._SmallType; - } - set - { - if ((this._SmallType != value)) - { - this.OnSmallTypeChanging(value); - this.SendPropertyChanging(); - this._SmallType = value; - this.SendPropertyChanged("SmallType"); - this.OnSmallTypeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileCreate", DbType="NVarChar(50)")] - public string FileCreate - { - get - { - return this._FileCreate; - } - set - { - if ((this._FileCreate != value)) - { - this.OnFileCreateChanging(value); - this.SendPropertyChanging(); - this._FileCreate = value; - this.SendPropertyChanged("FileCreate"); - this.OnFileCreateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileDate", DbType="DateTime")] - public System.Nullable FileDate - { - get - { - return this._FileDate; - } - set - { - if ((this._FileDate != value)) - { - this.OnFileDateChanging(value); - this.SendPropertyChanging(); - this._FileDate = value; - this.SendPropertyChanged("FileDate"); - this.OnFileDateChanged(); - } - } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) - { - this.PropertyChanging(this, emptyChangingEventArgs); - } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } - } - - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Common_FileManageType")] - public partial class Common_FileManageType : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private string _FileCode; - - private string _FileType; - - private System.Nullable _SortIndex; - - #region 可扩展性方法定义 - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnFileCodeChanging(string value); - partial void OnFileCodeChanged(); - partial void OnFileTypeChanging(string value); - partial void OnFileTypeChanged(); - partial void OnSortIndexChanging(System.Nullable value); - partial void OnSortIndexChanged(); - #endregion - - public Common_FileManageType() - { - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] - public string FileCode - { - get - { - return this._FileCode; - } - set - { - if ((this._FileCode != value)) - { - this.OnFileCodeChanging(value); - this.SendPropertyChanging(); - this._FileCode = value; - this.SendPropertyChanged("FileCode"); - this.OnFileCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileType", DbType="NVarChar(50)")] - public string FileType - { - get - { - return this._FileType; - } - set - { - if ((this._FileType != value)) - { - this.OnFileTypeChanging(value); - this.SendPropertyChanging(); - this._FileType = value; - this.SendPropertyChanged("FileType"); - this.OnFileTypeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] - public System.Nullable SortIndex - { - get - { - return this._SortIndex; - } - set - { - if ((this._SortIndex != value)) - { - this.OnSortIndexChanging(value); - this.SendPropertyChanging(); - this._SortIndex = value; - this.SendPropertyChanged("SortIndex"); - this.OnSortIndexChanged(); - } - } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) - { - this.PropertyChanging(this, emptyChangingEventArgs); - } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } - } - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CostGoods_CostManage")] public partial class CostGoods_CostManage : INotifyPropertyChanging, INotifyPropertyChanged { @@ -75301,7 +74891,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QRCode", DbType="VarChar(2000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QRCode", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string QRCode { get @@ -209174,7 +208764,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] public string ProjectName { get @@ -209727,7 +209317,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] public string ProjectName { get @@ -212765,6 +212355,8 @@ namespace Model private string _WeldJointCode; + private string _WeldJointNum; + private string _PipelineId; private string _WeldingDailyId; @@ -212823,6 +212415,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointNum", DbType="NVarChar(50)")] + public string WeldJointNum + { + get + { + return this._WeldJointNum; + } + set + { + if ((this._WeldJointNum != value)) + { + this._WeldJointNum = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineId", DbType="NVarChar(50)")] public string PipelineId { @@ -213815,6 +213423,8 @@ namespace Model private string _PipeArea; + private string _WeldJointNum; + public View_HJGL_WeldingTask() { } @@ -214330,6 +213940,22 @@ namespace Model } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointNum", DbType="NVarChar(50)")] + public string WeldJointNum + { + get + { + return this._WeldJointNum; + } + set + { + if ((this._WeldJointNum != value)) + { + this._WeldJointNum = value; + } + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_WeldJoint")] @@ -220892,7 +220518,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] public string ProjectName { get @@ -223930,7 +223556,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] public string ProjectName { get @@ -225594,7 +225220,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] public string ProjectName { get