diff --git a/DataBase/版本日志/SUBQHSE_V2026-05-21-xiaj(集团主数据在建项目使用情况).sql b/DataBase/版本日志/SUBQHSE_V2026-05-21-xiaj(集团主数据在建项目使用情况).sql new file mode 100644 index 00000000..991f169a --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2026-05-21-xiaj(集团主数据在建项目使用情况).sql @@ -0,0 +1,17 @@ + + + +--˾ڽĿʹ +--ע˵Ŀ˵棻ݶƵλ봦 +SELECT SuperMenu,MenuType,* FROM Sys_Menu WHERE MenuName='Ŀ' + +IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '204ACA82-15B4-4C80-AE9F-ACF25CE79999') +BEGIN +INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'204ACA82-15B4-4C80-AE9F-ACF25CE79999', N'ڽĿʹ', N'ProjectData/MasterProjectData.aspx', 20, N'75AA6177-8AAD-4AA4-BC4E-3883FB095A65', N'Menu_SysSet', 1,1, 1); +END +GO + + + + diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index 0c66a4a4..56df2dda 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -798,6 +798,36 @@ } #endregion + #region 获取集团主数据项目 + + /// + /// 获取主数据项目【新的主数据表】 + /// + /// + public static List GetMasterProjectDataInfos() + { + var thisUnit = CommonService.GetIsThisUnit(); + Dictionary dic = new Dictionary() + { + {"collCropCode", thisUnit.CollCropCode} + }; + //var cacheKey = "MasterDataProjects"; + //if (CacheHelper.Exists(cacheKey)) + //{ + // return CacheHelper.Get>(cacheKey); + //} + List projectlist = new List(); + var returnData = ServerService.GerDataFromCncec("/api/Common/GetMasterProjectDataByCollCropCode", dic, null); + if (returnData != null && returnData.code == 1) + { + projectlist = JsonConvert.DeserializeObject>(returnData.data.ToString()); + //CacheHelper.Add(cacheKey, projectlist, DateTimeOffset.Now.AddDays(2)); + } + + return projectlist; + } + + /// /// 获取主数据项目 /// @@ -851,5 +881,8 @@ Funs.FineUIPleaseSelect(dropName); } } + + #endregion + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index d5c45da5..bd60f767 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1719,6 +1719,7 @@ + @@ -16233,6 +16234,13 @@ MainItemView.aspx + + MasterProjectData.aspx + ASPXCodeBehind + + + MasterProjectData.aspx + ProjectInformation.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx b/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx new file mode 100644 index 00000000..5c802f14 --- /dev/null +++ b/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx @@ -0,0 +1,144 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MasterProjectData.aspx.cs" Inherits="FineUIPro.Web.ProjectData.MasterProjectData" %> + + + + + + 集团在建项目清单 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + <%----%> + + + + diff --git a/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs new file mode 100644 index 00000000..eec1ffb9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs @@ -0,0 +1,147 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Runtime.InteropServices.ComTypes; + +namespace FineUIPro.Web.ProjectData +{ + public partial class MasterProjectData : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + #endregion + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + var db = Funs.DB; + var masterProDatas = ProjectService.GetMasterProjectDataInfos(); + var query = from x in masterProDatas + join pro in db.Base_Project on x.Pro_id equals pro.MasterSysId into proGroup + from pro in proGroup.DefaultIfEmpty() + select new + { + Pid= x.Pro_id+(pro != null ? $"-{pro.ProjectId}":""), + x.Pro_id, + x.Pro_name, + x.Pro_code, + x.Start_date, + x.Pro_status, + ProjectName = pro != null ? pro.ProjectName : "", + ProjectCode = pro != null ? pro.ProjectCode : "", + StartDate = pro != null ? pro.StartDate : null, + ProjectState = pro != null ? pro.ProjectState : "", + relate = pro != null && pro.MasterSysId != null ? "已关联" : "" + }; + + string proName = this.txtProjectName.Text.Trim(); + string proCode = this.txtProjectCode.Text.Trim(); + if (!string.IsNullOrEmpty(proName)) + { + query = query.Where(x => x.Pro_name.Contains(proName)); + } + if (!string.IsNullOrEmpty(proCode)) + { + query = query.Where(x => x.Pro_code.Contains(proCode)); + } + DataTable tb = Funs.LINQToDataTable(query); + Grid1.RecordCount = tb.Rows.Count; + Grid1.DataSource = this.GetPagedDataTable(Grid1, tb); + Grid1.DataBind(); + } + + /// + /// 项目状态 + /// + /// + /// + protected string ConvertProjectState(object state) + { + string result = string.Empty; + string stateStr = state.ToString(); + if (state != null && !string.IsNullOrWhiteSpace(stateStr)) + { + result = stateStr == "2" ? "暂停中" : stateStr == "3" ? "已完工" : "施工中"; + } + return result; + } + #endregion + + #region Grid + + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + + /// + /// + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("集团主数据在建项目使用情况" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridMultiHeaderTableHtml(Grid1)); + //Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs new file mode 100644 index 00000000..d8db173e --- /dev/null +++ b/SGGL/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs @@ -0,0 +1,134 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ProjectData +{ + + + public partial class MasterProjectData + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProjectCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectCode; + + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// lblState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblState; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx index 74a1e744..9c8f268e 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx @@ -5,88 +5,90 @@ 项目设置 - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> - <%-- --%> - - - - - - - <%-- + + + + + + + <%-- @@ -104,49 +106,49 @@ ToolTip='<%# ConvertHSSEManager(Eval("ProjectId")) %>'> --%> - <%-- - --%> - - - - - - - - - - - - - - - - - - - - - --%> + + + + + + + + + + + + + + + + + + + + + - - + - - + - - + +