diff --git a/DataBase/版本日志/SGGLDB_V2023-04-25_lpf.sql b/DataBase/版本日志/SGGLDB_V2023-04-25_lpf.sql new file mode 100644 index 00000000..f0a99c7c --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-04-25_lpf.sql @@ -0,0 +1,7 @@ +alter table PHTGL_ContractStandingBook add UnitId varchar(50) + +alter table PHTGL_BidDocumentsStandingBook add UnitId varchar(50) +alter table PHTGL_BidDocumentsStandingBook add DepartId varchar(50) +update Sys_Role set IsSystemBuilt=1 where RoleName like '%ͬ%' +update [Sys_Menu] set IsEnd=1 where MenuId='0A5DF9F5-B6B5-41B8-8951-C203C5749495' +update [Sys_Menu] set IsEnd=1 where MenuId='C18B4A2E-7BE7-43E6-A969-8A6292D19987' \ No newline at end of file diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 34d49b00..87ffe3aa 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -351,6 +351,7 @@ /// 无损检测工岗位Id /// public static string WorkPost_Checker = "595999E9-75A8-4064-9BD1-9EE02F236297"; + #endregion #region 系统环境设置常量 @@ -413,6 +414,19 @@ /// 系统管理员 /// public const string SystemManager = "4001f8c8-7f55-4660-822a-6b129ecf0342"; + /// + /// 赛鼎施工管理部合同管理(能看到所有信息) + /// + public const string SedinHTGLManager = "58994640-5469-4cb0-b725-b6bec4e710ae"; + /// + /// 赛鼎其他部门合同管理(只能看见本部门) + /// + public const string SedinHTGLDepartManager = "46e1ec69-4bae-4972-b278-a40185986876"; + /// + /// 分子公司合同管理(只能看见要公司信息) + /// + public const string OtherHTGLManager = "65073269-0a14-4655-8f9e-981104b37de9"; + #endregion #region 内置项目角色定义 diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidDocStandingBookService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidDocStandingBookService.cs index cb5e848a..7f594001 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/BidDocStandingBookService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/BidDocStandingBookService.cs @@ -28,6 +28,8 @@ namespace BLL { var q = from x in db.PHTGL_BidDocumentsStandingBook where + (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && + (string.IsNullOrEmpty(table.DepartId) || x.DepartId.Contains(table.DepartId)) && (string.IsNullOrEmpty(table.BidDocumentsStandingBookId) || x.BidDocumentsStandingBookId.Contains(table.BidDocumentsStandingBookId)) && (string.IsNullOrEmpty(table.EPCCode) || x.EPCCode.Contains(table.EPCCode)) && (string.IsNullOrEmpty(table.ProjectShortName) || x.ProjectShortName.Contains(table.ProjectShortName)) && @@ -70,6 +72,8 @@ namespace BLL select new { x.BidDocumentsStandingBookId, + x.UnitId, + x.DepartId, x.EPCCode, x.ProjectShortName, x.ProjectCode, @@ -106,6 +110,8 @@ namespace BLL Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook { BidDocumentsStandingBookId = newtable.BidDocumentsStandingBookId, + UnitId= newtable.UnitId, + DepartId= newtable.DepartId, EPCCode = newtable.EPCCode, ProjectShortName = newtable.ProjectShortName, ProjectCode = newtable.ProjectCode, @@ -145,6 +151,8 @@ namespace BLL if (table != null) { table.BidDocumentsStandingBookId = newtable.BidDocumentsStandingBookId; + table.UnitId= newtable.UnitId; + table.DepartId= newtable.DepartId; table.EPCCode = newtable.EPCCode; table.ProjectShortName = newtable.ProjectShortName; table.ProjectCode = newtable.ProjectCode; diff --git a/SGGL/BLL/PHTGL/ContractCompile/ContractStandingBookService.cs b/SGGL/BLL/PHTGL/ContractCompile/ContractStandingBookService.cs index e503b166..44a40c24 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/ContractStandingBookService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/ContractStandingBookService.cs @@ -27,6 +27,7 @@ namespace BLL where (string.IsNullOrEmpty(table.ContractId) || x.ContractId.Contains(table.ContractId)) && (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && + (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && (string.IsNullOrEmpty(table.ContractName) || x.ContractName.Contains(table.ContractName)) && (string.IsNullOrEmpty(table.ContractNum) || x.ContractNum.Contains(table.ContractNum)) && (string.IsNullOrEmpty(table.Parties) || x.Parties.Contains(table.Parties)) && @@ -98,6 +99,7 @@ namespace BLL { x.ContractId, x.ProjectId, + x.UnitId, x.ContractName, x.ContractNum, x.Parties, @@ -216,6 +218,7 @@ namespace BLL { ContractId = newtable.ContractId, ProjectId = newtable.ProjectId, + UnitId=newtable.UnitId, ProjectName= newtable.ProjectName, ProjectCode= newtable.ProjectCode, ContractName = newtable.ContractName, @@ -283,6 +286,7 @@ namespace BLL if (newContract != null) { newContract.ProjectId = contract.ProjectId; + newContract.UnitId= contract.UnitId; newContract.ProjectName=contract.ProjectName; newContract.ProjectCode=contract.ProjectCode; newContract.ContractCode = contract.ContractCode; diff --git a/SGGL/BLL/SysManage/DepartService.cs b/SGGL/BLL/SysManage/DepartService.cs index a79995b9..600aff5d 100644 --- a/SGGL/BLL/SysManage/DepartService.cs +++ b/SGGL/BLL/SysManage/DepartService.cs @@ -92,7 +92,20 @@ namespace BLL } return name; } - + public static string getDepartNameById(object departId) + { + string name = string.Empty; + if (departId!=null&& !string.IsNullOrEmpty(departId.ToString())) + { + var dep = Funs.DB.Base_Depart.FirstOrDefault(e => e.DepartId == departId.ToString()); + if (dep != null) + { + name = dep.DepartName; + } + } + + return name; + } #region 表下拉框 /// /// 表下拉框 diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBook.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBook.aspx.cs index 471ffc55..c4c7691b 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBook.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBook.aspx.cs @@ -88,11 +88,26 @@ namespace FineUIPro.Web.PHTGL.Filing _BidDocumentsStandingBook.ProjectId = this.CurrUser.LoginProjectId; } } - - if (!string.IsNullOrEmpty(drpDepartId.SelectedValue) ) - { - + var RoleIds = this.CurrUser.RoleIds; + + if (RoleIds.Contains(Const.SedinHTGLManager)) + { + //model.UnitId=this.CurrUser.UnitId; + } + else if (RoleIds.Contains(Const.OtherHTGLManager)) + { + _BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId; + } + else if (RoleIds.Contains(Const.SedinHTGLDepartManager)) + { + _BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId; + _BidDocumentsStandingBook.DepartId = this.CurrUser.DepartId; + + } + else + { + _BidDocumentsStandingBook.UnitId = "normal"; } if (dropState.SelectedValue!=Const._Null) { diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEdit.aspx.cs index 7f3de96a..d1b6d90a 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEdit.aspx.cs @@ -88,6 +88,8 @@ namespace FineUIPro.Web.PHTGL.Filing protected void btnSave_Click(object sender, EventArgs e) { Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook(); + table.UnitId = this.CurrUser.UnitId; + table.DepartId=this.CurrUser.DepartId; table.EPCCode = this.txtEPCCode.Text; table.ProjectShortName = this.txtProjectShortName.Text; table.ProjectCode = this.txtProjectCode.Text; @@ -177,6 +179,8 @@ namespace FineUIPro.Web.PHTGL.Filing return; } Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook(); + table.UnitId = this.CurrUser.UnitId; + table.DepartId = this.CurrUser.DepartId; table.EPCCode = this.txtEPCCode.Text; table.ProjectShortName = this.txtProjectShortName.Text; table.ProjectCode = this.txtProjectCode.Text; diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEditProject.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEditProject.aspx.cs index d34a7f0e..bba7bd75 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEditProject.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEditProject.aspx.cs @@ -73,6 +73,8 @@ namespace FineUIPro.Web.PHTGL.Filing protected void btnSave_Click(object sender, EventArgs e) { Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook(); + table.UnitId = this.CurrUser.UnitId; + table.DepartId = this.CurrUser.DepartId; table.EPCCode = this.txtEPCCode.Text; table.ProjectShortName = this.txtProjectShortName.Text; table.ProjectCode = this.txtProjectCode.Text; @@ -158,6 +160,8 @@ namespace FineUIPro.Web.PHTGL.Filing return; } Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook(); + table.UnitId = this.CurrUser.UnitId; + table.DepartId = this.CurrUser.DepartId; table.EPCCode = this.txtEPCCode.Text; table.ProjectShortName = this.txtProjectShortName.Text; table.ProjectCode = this.txtProjectCode.Text; diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookIn.aspx.cs index d1d5181c..4072ea4d 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookIn.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookIn.aspx.cs @@ -200,6 +200,8 @@ namespace FineUIPro.Web.PHTGL.Filing Model.PHTGL_BidDocumentsStandingBook _BidDocumentsStandingBook = new PHTGL_BidDocumentsStandingBook(); _BidDocumentsStandingBook.BidDocumentsStandingBookId = SQLHelper.GetNewID(); _BidDocumentsStandingBook.State = 0; + _BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId; + _BidDocumentsStandingBook.DepartId = this.CurrUser.DepartId; if (Type=="1") { _BidDocumentsStandingBook.ProjectId = this.CurrUser.LoginProjectId; diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx index 798da78a..605e9d0f 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx @@ -61,24 +61,24 @@ + > - - - - - - - + + + + + diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.cs index 9da3b692..e8511c7c 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.cs @@ -38,10 +38,27 @@ namespace FineUIPro.Web.PHTGL.Filing private void BindGrid() { var model = new Model.PHTGL_ContractStandingBook(); - if (drpDepartId.SelectedValue!=Const._Null) + var RoleIds = this.CurrUser.RoleIds; + + if (RoleIds.Contains(Const.SedinHTGLManager)) { - model.DepartId = drpDepartId.SelectedValue; + //model.UnitId=this.CurrUser.UnitId; } + else if (RoleIds.Contains(Const.OtherHTGLManager)) + { + model.UnitId = this.CurrUser.UnitId; + } + else if (RoleIds.Contains(Const.SedinHTGLDepartManager)) + { + model.UnitId = this.CurrUser.UnitId; + model.DepartId= this.CurrUser.DepartId; + + } + else + { + model.UnitId = "normal"; + } + if (!string.IsNullOrEmpty(txtContractName.Text.Trim())) { model.ContractName = txtContractName.Text.Trim(); @@ -52,7 +69,10 @@ namespace FineUIPro.Web.PHTGL.Filing } var list= BLL.ContractStandingBookService.GetPHTGL_ContractStandingBookByModle( model); //var list= BLL.ContractStandingBookService.getListData( model, Grid1); - + if (drpDepartId.SelectedValue != Const._Null) + { + list=list.Where(d => d.DepartId==drpDepartId.SelectedValue). ToList(); + } Grid1.RecordCount = list.Count; var table = this.GetPagedDataTable(Grid1, list); Grid1.DataSource = table; diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.designer.cs index 7b398e73..b143d65b 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.designer.cs @@ -176,6 +176,15 @@ namespace FineUIPro.Web.PHTGL.Filing /// protected global::System.Web.UI.WebControls.Label lbImageUrl; + /// + /// txtDepartId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtDepartId; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookEdit.aspx.cs index 92135f59..f4e65242 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookEdit.aspx.cs @@ -74,9 +74,6 @@ namespace FineUIPro.Web.PHTGL.Filing this.GetButtonPower(); BindingTab1(); - - - } } @@ -115,27 +112,28 @@ namespace FineUIPro.Web.PHTGL.Filing txtContactPersonOfPartyB.Text = contract.ContactPersonOfPartyB; txtContactPersonPhoneOfPartyB.Text = contract.ContactPersonPhoneOfPartyB; txtContactPersonEmailOfPartyB.Text = contract.ContactPersonEmailOfPartyB; - txtContractAmountExcludingTax.Text = contract.ContractAmountExcludingTax.ToString(); + txtContractAmountExcludingTax.Text = contract.ContractAmountExcludingTax; txtPriceMethod.Text = contract.PriceMethod; - txtSignedOnDate.Text = contract.SignedOnDate.ToString(); - txtContractStartDate.Text = contract.ContractStartDate.ToString(); - txtContractEndDate.Text = contract.ContractEndDate.ToString(); + txtSignedOnDate.Text = contract.SignedOnDate; + txtContractStartDate.Text = contract.ContractStartDate; + txtContractEndDate.Text = contract.ContractEndDate; txtPricingBasis.Text = contract.PricingBasis; txtStatus.Text = contract.Status; txtSubcontractingMethod.Text = contract.SubcontractingMethod; - txtIsItACentralizedPurchaseSupplier.Text = contract.IsItACentralizedPurchaseSupplier.ToString(); + txtIsItACentralizedPurchaseSupplier.Text = contract.IsItACentralizedPurchaseSupplier; this.txtAgent.Text = contract.Agent; this.txtContractType.Text = contract.ContractType; this.txtConfirmWay.Text= contract.ConfirmWay; this.txtDepart.Text=BLL.DepartService.getDepartNameById(contract.DepartId); - this.txtContractAmount.Text = contract.ContractAmount.ToString(); + this.txtContractAmount.Text = contract.ContractAmount; } - else - { - this.txtAgent.Text = this.CurrUser.PersonName; - this.txtDepart.Text = BLL.DepartService.getDepartNameById(CurrUser.DepartId); - } + + } + else + { + this.txtAgent.Text = this.CurrUser.PersonName; + this.txtDepart.Text = BLL.DepartService.getDepartNameById(this.CurrUser.DepartId); } } @@ -173,7 +171,7 @@ namespace FineUIPro.Web.PHTGL.Filing void Save(string Type) { Model.PHTGL_ContractStandingBook contract = new Model.PHTGL_ContractStandingBook(); - + contract.UnitId = this.CurrUser.UnitId; contract.EPCCode = this.txtEPCCode.Text; contract.ContractAttribute = this.txtContractAttribute.Text; contract.ContractName = this.txtContractName.Text; @@ -207,6 +205,7 @@ namespace FineUIPro.Web.PHTGL.Filing contract.ContractType = this.txtContractType.Text; contract.ConfirmWay = this.txtConfirmWay.Text; contract.DepartId = this.CurrUser.DepartId; + contract.ContractAmount = this.txtContractAmount.Text; if (Type==Const.BtnSubmit) { diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookIn.aspx.cs index 32712cda..ace2a014 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookIn.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookIn.aspx.cs @@ -198,6 +198,7 @@ namespace FineUIPro.Web.PHTGL.Filing { Model.PHTGL_ContractStandingBook _ContractStandingBook = new PHTGL_ContractStandingBook(); _ContractStandingBook.ContractId = SQLHelper.GetNewID(); + _ContractStandingBook.UnitId = this.CurrUser.UnitId; _ContractStandingBook.States = 0; _ContractStandingBook.DepartId = this.CurrUser.DepartId; _ContractStandingBook.Agent = this.CurrUser.PersonName; diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 1cea3fb2..3019216a 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -170628,6 +170628,10 @@ namespace Model private string _BidUnitFileCode; + private string _UnitId; + + private string _DepartId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -170672,6 +170676,10 @@ namespace Model partial void OnBidNoticeCodeChanged(); partial void OnBidUnitFileCodeChanging(string value); partial void OnBidUnitFileCodeChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnDepartIdChanging(string value); + partial void OnDepartIdChanged(); #endregion public PHTGL_BidDocumentsStandingBook() @@ -170879,7 +170887,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposedInviter", DbType="VarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposedInviter", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string ProposedInviter { get @@ -171079,6 +171087,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="VarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartId", DbType="VarChar(50)")] + public string DepartId + { + get + { + return this._DepartId; + } + set + { + if ((this._DepartId != value)) + { + this.OnDepartIdChanging(value); + this.SendPropertyChanging(); + this._DepartId = value; + this.SendPropertyChanged("DepartId"); + this.OnDepartIdChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -173263,6 +173311,8 @@ namespace Model private string _MainContent; + private string _UnitId; + private EntityRef _Base_Project; #region 可扩展性方法定义 @@ -173375,6 +173425,8 @@ namespace Model partial void OnClauseChanged(); partial void OnMainContentChanging(string value); partial void OnMainContentChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); #endregion public PHTGL_ContractStandingBook() @@ -174447,6 +174499,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="VarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HTGL_ContractStandingBook_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project {