2023-07-03

This commit is contained in:
2023-07-03 14:46:37 +08:00
parent cba6685973
commit e575463176
26 changed files with 517 additions and 52 deletions
@@ -18,15 +18,20 @@
<Items>
<f:Form ID="Form2" ShowHeader="false" ShowBorder="false" runat="server">
<Rows>
<f:FormRow ColumnWidths="20% 3% 20% 30% 15% 10%">
<f:FormRow ColumnWidths="15% 15% 15% 2% 15% 30% 15% 10%">
<Items>
<f:DatePicker ID="txtStartRectificationTime" runat="server" Label="检查时间" LabelAlign="Right"
<f:DropDownList runat="server" Label="责任单位" ID="drpUnit" LabelWidth="80px" Width="150px"> </f:DropDownList>
<f:DropDownList runat="server" Label="检查项" ID="drpRegisterTypes" LabelWidth="80px" Width="150px"> </f:DropDownList>
<f:DatePicker ID="txtStartRectificationTime" runat="server" Label="检查时间" LabelAlign="Right" Width="100px"
LabelWidth="80px">
</f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至" Width="5px">
</f:Label>
<f:DatePicker ID="txtEndRectificationTime" runat="server">
<f:DatePicker ID="txtEndRectificationTime" runat="server" Width="100px">
</f:DatePicker>
<f:RadioButtonList ID="rblState" runat="server" Label="分析类型" LabelWidth="80px" Width="250px"
AutoPostBack="true" OnSelectedIndexChanged="drpChartType_SelectedIndexChanged">
<f:RadioItem Value="0" Selected="true" Text="按责任单位" />
@@ -17,8 +17,16 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
this.AnalyseData();
if (!IsPostBack)
{
UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);
this.drpRegisterTypes.DataTextField = "RegisterTypesName";
this.drpRegisterTypes.DataValueField = "RegisterTypesId";
this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型
this.drpRegisterTypes.DataBind();
Funs.FineUIPleaseSelect(drpRegisterTypes);
}
this.AnalyseData();
}
#endregion
@@ -63,6 +71,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{
strSql += " and CheckTime <'" + DateTime.Parse( this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql += " group by u.UnitId,u.unitName ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
@@ -152,6 +169,14 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{
strSql += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql += " group by u.UnitId,u.unitName ,r.RegisterTypesId,t.RegisterTypesName ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
@@ -50,6 +50,24 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// drpUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// drpRegisterTypes 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpRegisterTypes;
/// <summary>
/// txtStartRectificationTime 控件。
/// </summary>
@@ -66,6 +66,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
BLL.WorkPostService.InitWorkPostDropDownList(this.drpPost, true);
this.InitTreeMenu();//加载树
BindGrid();
}
}
@@ -169,18 +170,20 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
if (this.tvProjectAndUnit != null && !string.IsNullOrEmpty(this.tvProjectAndUnit.SelectedNodeID))
// if (this.tvProjectAndUnit != null && !string.IsNullOrEmpty(this.tvProjectAndUnit.SelectedNodeID))
{
string id = this.tvProjectAndUnit.SelectedNodeID;
string unitId = string.Empty;
string projectId = string.Empty;
var str = id.Split('|');
if (str.Count() > 1)
if (!string.IsNullOrEmpty(id))
{
unitId = str[0];
projectId = str[1];
var str = id.Split('|');
if (str.Count() > 1)
{
unitId = str[0];
projectId = str[1];
}
}
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
@@ -191,10 +194,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
strSql += " AND UnitId =@UnitId ";
listStr.Add(new SqlParameter("@UnitId", unitId));
}
else
{
strSql += " AND UnitId IS NULL";
}
//else
//{
// strSql += " AND UnitId IS NULL";
//}
if (drpIsUsedName.SelectedValue == "待审核")
{
strSql += " AND IsUsed = @IsUsed";
@@ -5,7 +5,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>危险性较大的工程清单</title>
<title>危大工程施工方案清单</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.labcenter {
@@ -31,7 +31,7 @@
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="危险性较大的工程清单" EnableCollapse="true"
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="危大工程施工方案清单" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="HazardId" DataIDField="HazardId" AllowSorting="true" SortField="RecordTime"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" ForceFit="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
@@ -118,7 +118,7 @@
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="编辑危险性较大的工程清单" Hidden="true" EnableIFrame="true" EnableMaximize="true"
<f:Window ID="Window1" Title="危大工程施工方案清单" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1000px" Height="500px">
</f:Window>