集团主数据在建项目数据分析

This commit is contained in:
2026-06-10 21:07:27 +08:00
parent 855eec9965
commit ea1acf5f93
27 changed files with 2917 additions and 78 deletions
@@ -49,6 +49,9 @@
<f:Button ID="btnDelete" Icon="Delete" ConfirmText="确定删除当前数据?"
OnClick="btnDelete_Click" Text="删除" Hidden="true" runat="server">
</f:Button>
<f:Button ID="btnReject" Icon="ArrowUndo" ConfirmText="确定驳回当前整改?"
OnClick="btnReject_Click" Text="驳回" Hidden="true" runat="server">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
@@ -1,7 +1,9 @@
using BLL;
using FineUIPro.Web.SysManage;
using Model;
using System;
using System.Linq;
using Model;
using static BLL.UnitHazardRegisterService;
namespace FineUIPro.Web.ZHGL.Supervise
{
@@ -113,11 +115,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (UnitHazardRegisterService.CanDeleteRegister(rowID) || (this.CurrUser.UserId ==Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId))
if (UnitHazardRegisterService.CanDeleteRegister(rowID) || (this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId))
{
BLL.UnitHazardRegisterItemService.DeleteItemsByRegisterId(rowID);
BLL.UnitHazardRegisterService.DeleteUnitHazardRegisterById(rowID);
}
else
{
@@ -131,6 +132,44 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
}
protected void btnReject_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
int succ = 0;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var register = UnitHazardRegisterService.GetUnitHazardRegisterById(rowID);
if (register != null)
{
if (register.CompileMan == this.CurrUser.UserId || (this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId))
{
if (register.States == (int)StateInt. || register.States == (int)StateInt.)
{
BLL.UnitHazardRegisterItemService.RejectItemsByRegisterId(rowID);
BLL.UnitHazardRegisterService.RejectUnitHazardRegisterById(rowID);
succ++;
}
else
{
ShowNotify($"检查({register.UnitHazardRegisterCode})暂未整改,无需驳回!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify($"非管理员和编制人,检查({register.UnitHazardRegisterCode})无法驳回!", MessageBoxIcon.Warning);
}
}
}
BindGrid();
if (succ > 0)
{
ShowNotify("操作成功!", MessageBoxIcon.Success);
}
}
}
protected void btnOut_Click(object sender, EventArgs e)
{
string type = Request["type"] ?? "0";
@@ -160,7 +199,11 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
if (buttonList.Contains(BLL.Const.BtnAdd)) btnNew.Hidden = false;
if (buttonList.Contains(BLL.Const.BtnModify)) btnEdit.Hidden = false;
if (buttonList.Contains(BLL.Const.BtnDelete)) btnDelete.Hidden = false;
if (buttonList.Contains(BLL.Const.BtnDelete))
{
btnDelete.Hidden = false;
btnReject.Hidden = false;
}
}
}
}
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// btnReject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnReject;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -62,6 +62,9 @@
<f:TextBox runat="server" Label="问题描述" ID="txtProblem" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" LabelAlign="right" Width="300px" LabelWidth="90px">
</f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnReject" Icon="ArrowUndo" ConfirmText="确定驳回当前整改?" OnClick="btnReject_Click" Text="驳回" Hidden="true" runat="server">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@@ -85,11 +88,11 @@
<f:DropDownList ID="drpProblemStates" runat="server" Label="问题整改状态" AutoPostBack="true" EmptyText="-请选择-" AutoSelectFirstItem="false"
OnSelectedIndexChanged="TextBox_TextChanged" LabelWidth="120px" LabelAlign="Right" Width="220px">
<f:ListItem Text="待整改" Value="0" />
<f:ListItem Text="已整改" Value="1" />
<f:ListItem Text="已整改" Value="1" />
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnEdit" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Text="编辑" Hidden="true">
<f:Button ID="btnEdit" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Text="编辑" Hidden="true">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
@@ -146,7 +149,7 @@
<asp:Label ID="lbImageUrl2" runat="server" Text='<%# BLL.UploadAttachmentService.ConvertImageUrlByImage(Eval("UnitHazardRegisterItemId")+"-R") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%-- <f:RenderField Width="80px" ColumnID="StatesName" DataField="StatesName"
<%-- <f:RenderField Width="80px" ColumnID="StatesName" DataField="StatesName"
SortField="StatesName" FieldType="String" HeaderText="检查单状态" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>--%>
@@ -3,6 +3,7 @@ using Model;
using System;
using System.Linq;
using System.Text;
using static BLL.UnitHazardRegisterService;
using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.ZHGL.Supervise
@@ -19,6 +20,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
Grid1.PageSize = this.CurrUser.PageSize.Value;
}
if (this.CurrUser != null && (this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId))
{//管理员有权限驳回
this.btnReject.Hidden = false;
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
@@ -97,7 +102,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <summary>
/// 排序
/// </summary>
protected void Grid1_Sort(object sender,GridSortEventArgs e)
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
@@ -135,6 +140,34 @@ namespace FineUIPro.Web.ZHGL.Supervise
BindGrid();
}
protected void btnReject_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
int succ = 0;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string itemId = Grid1.DataKeys[rowIndex][0].ToString();
var item = BLL.UnitHazardRegisterItemService.GetUnitHazardRegisterItemById(itemId);
if (item != null)
{
BLL.UnitHazardRegisterItemService.RejectItemByRegisterItemId(itemId);
succ++;
}
}
BindGrid();
if (succ > 0)
{
ShowNotify("操作成功!", MessageBoxIcon.Success);
}
}
else
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
}
/// <summary>
/// Grid行双击事件
/// </summary>
@@ -86,6 +86,15 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// </remarks>
protected global::FineUIPro.TextBox txtProblem;
/// <summary>
/// btnReject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnReject;
/// <summary>
/// Toolbar2 控件。
/// </summary>