diff --git a/.gitignore b/.gitignore index 90d55f55..8ba938c0 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /SGGLPackFile /SGGL/FineUIPro.Web/FileUpload/TestRun/TestRunMonthSummary/2024-06 /SGGL/FineUIPro.Web/FileUpload/ProjectAttachUrl/2024-06 +/SGGLPackFile_20240730.rar diff --git a/DataBase/版本日志/SGGLDB_WH_2024-07-29-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-07-29-bwj.sql new file mode 100644 index 00000000..012b7ff5 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-07-29-bwj.sql @@ -0,0 +1,4 @@ +ALTER TABLE WBS_UnitWork ALTER COLUMN SuperUnitWork NVARCHAR(50) +GO +update WBS_UnitWork set SuperUnitWork='0' +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-07-30-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_V2024-07-30-gaofei.sql new file mode 100644 index 00000000..df4f5fe6 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-07-30-gaofei.sql @@ -0,0 +1,2 @@ +alter table WBS_UnitWork alter column SuperUnitWork nvarchar(50) null +GO \ No newline at end of file diff --git a/SGGL/BLL/OpenService/GetDataService.cs b/SGGL/BLL/OpenService/GetDataService.cs index 6f33075f..73fb9210 100644 --- a/SGGL/BLL/OpenService/GetDataService.cs +++ b/SGGL/BLL/OpenService/GetDataService.cs @@ -395,7 +395,7 @@ namespace BLL using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { try - { + { string miniprogram_state = ConfigurationManager.AppSettings["miniprogram_state"]; if (!string.IsNullOrEmpty(miniprogram_state) && miniprogram_state == "formal") { diff --git a/SGGL/BLL/ProjectData/UnitWorkService.cs b/SGGL/BLL/ProjectData/UnitWorkService.cs index 524d22ad..5eafa6e3 100644 --- a/SGGL/BLL/ProjectData/UnitWorkService.cs +++ b/SGGL/BLL/ProjectData/UnitWorkService.cs @@ -636,5 +636,41 @@ namespace BLL return string.Empty; } } + + /// + /// 是否可增加子级 + /// + /// + /// true-可以,false-不可以 + public static bool IsCanAddUnitWork(string unitWorkId) + { + var unitWork = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == unitWorkId); + if (unitWork != null) + { + if (unitWork.IsChild == true) + { + return false; + } + else + { + return true; + } + } + else + { + return true; + } + } + + /// + /// 是否存在子级单位工程 + /// + /// + /// + public static bool IsExitsUnitWorkBySuperUnitWork(string superUnitWork) + { + return (from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == superUnitWork select x).Count() > 0; + } + } } diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 25f9e42e..b2870513 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -19128,7 +19128,7 @@ - + - + @@ -77,7 +77,7 @@ - + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 808ca089..98f584cb 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -62038,6 +62038,8 @@ namespace Model private EntityRef _Base_Project; + private EntityRef _Technique_CheckItemSet; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -62089,6 +62091,7 @@ namespace Model public Check_CheckSpecial() { this._Base_Project = default(EntityRef); + this._Technique_CheckItemSet = default(EntityRef); OnCreated(); } @@ -62407,6 +62410,10 @@ namespace Model { if ((this._CheckItemSetId != value)) { + if (this._Technique_CheckItemSet.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnCheckItemSetIdChanging(value); this.SendPropertyChanging(); this._CheckItemSetId = value; @@ -62550,6 +62557,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Technique_CheckItemSet", Storage="_Technique_CheckItemSet", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", IsForeignKey=true)] + public Technique_CheckItemSet Technique_CheckItemSet + { + get + { + return this._Technique_CheckItemSet.Entity; + } + set + { + Technique_CheckItemSet previousValue = this._Technique_CheckItemSet.Entity; + if (((previousValue != value) + || (this._Technique_CheckItemSet.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Technique_CheckItemSet.Entity = null; + previousValue.Check_CheckSpecial.Remove(this); + } + this._Technique_CheckItemSet.Entity = value; + if ((value != null)) + { + value.Check_CheckSpecial.Add(this); + this._CheckItemSetId = value.CheckItemSetId; + } + else + { + this._CheckItemSetId = default(string); + } + this.SendPropertyChanged("Technique_CheckItemSet"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -370510,6 +370551,8 @@ namespace Model private System.Nullable _IsBuiltIn; + private EntitySet _Check_CheckSpecial; + private EntitySet _Technique_CheckItemDetail; #region 可扩展性方法定义 @@ -370536,6 +370579,7 @@ namespace Model public Technique_CheckItemSet() { + this._Check_CheckSpecial = new EntitySet(new Action(this.attach_Check_CheckSpecial), new Action(this.detach_Check_CheckSpecial)); this._Technique_CheckItemDetail = new EntitySet(new Action(this.attach_Technique_CheckItemDetail), new Action(this.detach_Technique_CheckItemDetail)); OnCreated(); } @@ -370700,6 +370744,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Technique_CheckItemSet", Storage="_Check_CheckSpecial", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", DeleteRule="NO ACTION")] + public EntitySet Check_CheckSpecial + { + get + { + return this._Check_CheckSpecial; + } + set + { + this._Check_CheckSpecial.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Technique_CheckItemDetail_Technique_CheckItemSet", Storage="_Technique_CheckItemDetail", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", DeleteRule="NO ACTION")] public EntitySet Technique_CheckItemDetail { @@ -370733,6 +370790,18 @@ namespace Model } } + private void attach_Check_CheckSpecial(Check_CheckSpecial entity) + { + this.SendPropertyChanging(); + entity.Technique_CheckItemSet = this; + } + + private void detach_Check_CheckSpecial(Check_CheckSpecial entity) + { + this.SendPropertyChanging(); + entity.Technique_CheckItemSet = null; + } + private void attach_Technique_CheckItemDetail(Technique_CheckItemDetail entity) { this.SendPropertyChanging(); @@ -394342,8 +394411,12 @@ namespace Model private string _Comments; + private string _Num_NO; + private string _System_No; + private string _Sub_Sys_No; + private string _Cat; private string _Raised_By; @@ -394364,6 +394437,8 @@ namespace Model private string _PIC_WUH; + private string _Correction_Action; + private System.Nullable _Actual_Date; private string _Cleared_By; @@ -394382,12 +394457,6 @@ namespace Model private string _Remark; - private string _Sub_Sys_No; - - private string _Num_NO; - - private string _Correction_Action; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -394424,8 +394493,12 @@ namespace Model partial void OnPUNCH_ITEM_STATUSChanged(); partial void OnCommentsChanging(string value); partial void OnCommentsChanged(); + partial void OnNum_NOChanging(string value); + partial void OnNum_NOChanged(); partial void OnSystem_NoChanging(string value); partial void OnSystem_NoChanged(); + partial void OnSub_Sys_NoChanging(string value); + partial void OnSub_Sys_NoChanged(); partial void OnCatChanging(string value); partial void OnCatChanged(); partial void OnRaised_ByChanging(string value); @@ -394446,6 +394519,8 @@ namespace Model partial void OnPICChanged(); partial void OnPIC_WUHChanging(string value); partial void OnPIC_WUHChanged(); + partial void OnCorrection_ActionChanging(string value); + partial void OnCorrection_ActionChanged(); partial void OnActual_DateChanging(System.Nullable value); partial void OnActual_DateChanged(); partial void OnCleared_ByChanging(string value); @@ -394464,12 +394539,6 @@ namespace Model partial void OnStatusChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); - partial void OnSub_Sys_NoChanging(string value); - partial void OnSub_Sys_NoChanged(); - partial void OnNum_NOChanging(string value); - partial void OnNum_NOChanged(); - partial void OnCorrection_ActionChanging(string value); - partial void OnCorrection_ActionChanged(); #endregion public Transfer_PunchlistFrom() @@ -394797,6 +394866,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Num_NO", DbType="NVarChar(50)")] + public string Num_NO + { + get + { + return this._Num_NO; + } + set + { + if ((this._Num_NO != value)) + { + this.OnNum_NOChanging(value); + this.SendPropertyChanging(); + this._Num_NO = value; + this.SendPropertyChanged("Num_NO"); + this.OnNum_NOChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_System_No", DbType="NVarChar(50)")] public string System_No { @@ -394817,6 +394906,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sub_Sys_No", DbType="NVarChar(50)")] + public string Sub_Sys_No + { + get + { + return this._Sub_Sys_No; + } + set + { + if ((this._Sub_Sys_No != value)) + { + this.OnSub_Sys_NoChanging(value); + this.SendPropertyChanging(); + this._Sub_Sys_No = value; + this.SendPropertyChanged("Sub_Sys_No"); + this.OnSub_Sys_NoChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Cat", DbType="NVarChar(50)")] public string Cat { @@ -395017,6 +395126,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Correction_Action", DbType="NVarChar(500)")] + public string Correction_Action + { + get + { + return this._Correction_Action; + } + set + { + if ((this._Correction_Action != value)) + { + this.OnCorrection_ActionChanging(value); + this.SendPropertyChanging(); + this._Correction_Action = value; + this.SendPropertyChanged("Correction_Action"); + this.OnCorrection_ActionChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Actual_Date", DbType="DateTime")] public System.Nullable Actual_Date { @@ -395197,66 +395326,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sub_Sys_No", DbType="NVarChar(50)")] - public string Sub_Sys_No - { - get - { - return this._Sub_Sys_No; - } - set - { - if ((this._Sub_Sys_No != value)) - { - this.OnSub_Sys_NoChanging(value); - this.SendPropertyChanging(); - this._Sub_Sys_No = value; - this.SendPropertyChanged("Sub_Sys_No"); - this.OnSub_Sys_NoChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Num_NO", DbType="NVarChar(50)")] - public string Num_NO - { - get - { - return this._Num_NO; - } - set - { - if ((this._Num_NO != value)) - { - this.OnNum_NOChanging(value); - this.SendPropertyChanging(); - this._Num_NO = value; - this.SendPropertyChanged("Num_NO"); - this.OnNum_NOChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Correction_Action", DbType="NVarChar(500)")] - public string Correction_Action - { - get - { - return this._Correction_Action; - } - set - { - if ((this._Correction_Action != value)) - { - this.OnCorrection_ActionChanging(value); - this.SendPropertyChanging(); - this._Correction_Action = value; - this.SendPropertyChanged("Correction_Action"); - this.OnCorrection_ActionChanged(); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -451549,7 +451618,7 @@ namespace Model private string _NDEUnit; - private System.Nullable _SuperUnitWork; + private string _SuperUnitWork; private System.Nullable _IsChild; @@ -451671,7 +451740,7 @@ namespace Model partial void OnSupervisorUnitIdChanged(); partial void OnNDEUnitChanging(string value); partial void OnNDEUnitChanged(); - partial void OnSuperUnitWorkChanging(System.Nullable value); + partial void OnSuperUnitWorkChanging(string value); partial void OnSuperUnitWorkChanged(); partial void OnIsChildChanging(System.Nullable value); partial void OnIsChildChanged(); @@ -451888,8 +451957,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperUnitWork", DbType="Int")] - public System.Nullable SuperUnitWork + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperUnitWork", DbType="NVarChar(50)")] + public string SuperUnitWork { get { diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index 5fe155da..bd497c6b 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU true