修改培训穿透页面和安全月报

This commit is contained in:
潘鸿锋 2024-09-06 14:03:48 +08:00
parent 3d1e4f6338
commit 9eabdbdac8
6 changed files with 440 additions and 37 deletions

View File

@ -16,7 +16,7 @@
ShowHeader="true" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="教育培训" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TrainingId" DataIDField="TrainingId" AllowSorting="true"
runat="server" BoxFlex="1" DataKeyNames="TrainingId,Ttype" DataIDField="TrainingId" AllowSorting="true"
SortField="ProjectCode,TrainStartDate" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
@ -30,9 +30,9 @@
<f:ToolbarSeparator runat="server"></f:ToolbarSeparator>
<f:RadioButtonList runat="server" ID="rbType" Width="600px" Label="类型" LabelWidth="50px"
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
<f:RadioItem Text="三级教育培训" Value="1" Selected="true" />
<f:RadioItem Text="专项培训" Value="2" />
<f:RadioItem Text="特种作业培训" Value="3" />
<f:RadioItem Text="入场" Value="dfb6a37e-4412-4ba9-ad59-3bc505bc21f7" Selected="true" />
<f:RadioItem Text="其他" Value="c1a513bb-a547-45b0-944d-b0dd88f06f82" />
<f:RadioItem Text="专项" Value="0e7fdf78-eaa0-4d00-a60b-490040bbea18" />
</f:RadioButtonList>
<f:DatePicker ID="txtStartTime" runat="server" Label="时间" LabelAlign="Right"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="80px">
@ -62,6 +62,10 @@
<f:RenderField Width="100px" ColumnID="TrainTitle" DataField="TrainTitle"
FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Ttype" DataField="Ttype"
FieldType="String" HeaderText="来源" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="110px" ColumnID="TrainStartDate" DataField="TrainStartDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"

View File

@ -34,38 +34,167 @@ namespace FineUIPro.Web.DataShow
{
string strSql = string.Empty;
List<SqlParameter> listStr = new List<SqlParameter>();
List<SqlParameter> listStrSum = new List<SqlParameter>();
//strSql = @"select TrainRecord.TrainTypeId,TrainRecord.TrainingId,
// TrainRecord.TrainTitle,
// Project.ProjectId,
// Project.ProjectCode,
// Project.ProjectName,
// TrainRecord.TrainStartDate,
// TrainRecord.TrainEndDate,
// TrainRecord.TrainPersonNum,
// UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +TrainRecord.UnitIds + ',')>0 FOR XML PATH('')), 1, 1,'')
// from EduTrain_TrainRecord AS TrainRecord
// LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId
// LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId
// WHERE 1=1 ";
strSql = @"select TrainRecord.TrainingId,TrainRecord.TrainTitle,TrainType.TrainTypeName,Project.ProjectId,Project.ProjectCode,Project.ProjectName
,TrainRecord.TrainStartDate,TrainRecord.TrainEndDate,TrainRecord.TrainPersonNum,TrainRecord.UnitIds
,UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +TrainRecord.UnitIds + ',')>0 FOR XML PATH('')), 1, 1,'')
//strSql += " AND TrainRecord.TrainTypeId =@TrainType";
//listStr.Add(new SqlParameter("@TrainType", this.rbType.SelectedValue));
//当前页数
int pageIndex = Grid1.PageIndex + 1;
//每页显示条数
int pageSize = Grid1.PageSize;
strSql = @"select*from(
select ROW_NUMBER() OVER(Order by ProjectCode desc) AS RowNumber,
* from (
select
'' as Ttype,
TrainRecord.TrainTypeId,
TrainRecord.TrainingId,
TrainRecord.TrainTitle,
Project.ProjectId,
Project.ProjectCode,
Project.ProjectName,
TrainRecord.TrainStartDate,
TrainRecord.TrainEndDate,
TrainRecord.TrainPersonNum,
UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +TrainRecord.UnitIds + ',')>0 FOR XML PATH('')), 1, 1,'')
from EduTrain_TrainRecord AS TrainRecord
LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId
LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId
WHERE 1=1 ";
strSql += " AND TrainType.TrainType =@TrainType";
listStr.Add(new SqlParameter("@TrainType", this.rbType.SelectedValue));
UNION ALL
select
'' as Ttype,
TrainType as TrainTypeId,
Id as TrainingId,
RecordName as TrainTitle,
Project.ProjectId,
Project.ProjectCode,
Project.ProjectName,
TrainStartDate,
TrainEndDate,
PersonCount as TrainPersonNum,
TrainDepart as UnitName
From Bo_Sheng_Train F
LEFT JOIN Base_Project AS Project ON F.ProjectId=Project.ProjectId
)f WHERE 1=1 ";
#region
var strSqlSum = @"select Count(*)as allCount from(
select ROW_NUMBER() OVER(Order by ProjectCode desc) AS RowNumber,
* from (
select
'1' as Ttype,
TrainRecord.TrainTypeId,
TrainRecord.TrainingId,
TrainRecord.TrainTitle,
Project.ProjectId,
Project.ProjectCode,
Project.ProjectName,
TrainRecord.TrainStartDate,
TrainRecord.TrainEndDate,
TrainRecord.TrainPersonNum,
UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +TrainRecord.UnitIds + ',')>0 FOR XML PATH('')), 1, 1,'')
from EduTrain_TrainRecord AS TrainRecord
LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId
LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId
UNION ALL
select
'' as Ttype,
TrainType as TrainTypeId,
Id as TrainingId,
RecordName as TrainTitle,
Project.ProjectId,
Project.ProjectCode,
Project.ProjectName,
TrainStartDate,
TrainEndDate,
PersonCount as TrainPersonNum,
TrainDepart as UnitName
From Bo_Sheng_Train F
LEFT JOIN Base_Project AS Project ON F.ProjectId=Project.ProjectId
)f WHERE 1=1";
#endregion
if (this.drpProject.SelectedValue != Const._Null)
{
strSql += " AND TrainRecord.ProjectId = @ProjectId";
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
strSqlSum += " AND ProjectId = @ProjectId";
listStrSum.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtStartTime.Text))
{
strSql += " AND TrainRecord.TrainEndDate >=@StartTime";
strSql += " AND TrainStartDate >=@StartTime";
listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text));
strSqlSum += " AND TrainStartDate >=@StartTime";
listStrSum.Add(new SqlParameter("@StartTime", this.txtStartTime.Text));
}
if (!string.IsNullOrEmpty(this.txtEndTime.Text))
{
strSql += " AND TrainRecord.TrainEndDate <=@EndTime";
strSql += " AND TrainStartDate <=@EndTime";
listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text));
strSqlSum += " AND TrainStartDate <=@EndTime";
listStrSum.Add(new SqlParameter("@EndTime", this.txtStartTime.Text));
}
if (!string.IsNullOrEmpty(this.rbType.SelectedValue))
{
strSql += " And ( TrainTypeId='" + rbType.SelectedValue + "' or ";
strSqlSum+= " And ( TrainTypeId='" + rbType.SelectedValue + "' or ";
if (rbType.SelectedValue == "dfb6a37e-4412-4ba9-ad59-3bc505bc21f7")
{
strSql += " TrainTypeId like '%入场%' ) ";
strSqlSum += " TrainTypeId like '%入场%' ) ";
}
else if (rbType.SelectedValue == "c1a513bb-a547-45b0-944d-b0dd88f06f82")
{
strSql += " TrainTypeId like '%其他%' ) ";
strSqlSum += " TrainTypeId like '%其他%' ) ";
}
else {
strSql += " TrainTypeId like '%专项%' ) ";
strSqlSum += " TrainTypeId like '%专项%' ) ";
}
}
strSql += " ) b where b.RowNumber BETWEEN(@pageIndex-1)*@pageSize + 1 and @pageIndex*@pageSize order by RowNumber asc";
strSqlSum+= " ) b ";
listStr.Add(new SqlParameter("@pageIndex", pageIndex));
listStr.Add(new SqlParameter("@pageSize", pageSize));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
#region
DataTable tbSum = SQLHelper.GetDataTableRunText(strSqlSum, listStrSum.ToArray());
Grid1.RecordCount = Convert.ToInt32(tbSum.Rows[0]["allcount"].ToString());
#endregion
Grid1.DataSource = tb;
Grid1.DataBind();
}
#endregion
@ -78,6 +207,7 @@ namespace FineUIPro.Web.DataShow
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
Grid1.PageIndex = 0;
this.BindGrid();
}
#endregion
@ -147,9 +277,12 @@ namespace FineUIPro.Web.DataShow
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
var tType= Grid1.SelectedRow.DataKeys[1].ToString();
if (tType!="博晟")
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/EduTrain/TrainRecordView.aspx?TrainingId={0}", Grid1.SelectedRowID, "查看 - ")));
}
}
#endregion
protected void btnView_Click(object sender, EventArgs e)

View File

@ -280,3 +280,150 @@ IP地址:::1
出错时间:09/03/2024 15:55:36
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 BLL.APIGetHttpService.ControlHttp(String url, String method, String contenttype, Hashtable header, String data) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\API\APIGetHttpService.cs:行号 202
在 FineUIPro.Web.ProjectData.Installation.btnMenuDown_Click(Object sender, EventArgs e) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\ProjectData\Installation.aspx.cs:行号 252
在 FineUIPro.MenuButton.OnClick(EventArgs e)
在 (MenuButton , EventArgs )
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:09/05/2024 09:35:46
出错文件:http://localhost:8579/ProjectData/Installation.aspx
IP地址:::1
操作人员:JT
出错时间:09/05/2024 09:35:46
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetSupervise_SubUnitReportListToSUB() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13827
在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2181
出错时间:09/05/2024 10:57:15
出错时间:09/05/2024 10:57:15
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckInfo_Table8ItemListToSUB(String unitId) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13851
在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2046
出错时间:09/05/2024 10:57:15
出错时间:09/05/2024 10:57:16
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckRectifyListToSUB(String unitId) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13843
在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1942
出错时间:09/05/2024 10:57:16
出错时间:09/05/2024 10:57:16
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetInformation_UrgeReportToSUB(String unitId) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13643
在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1884
出错时间:09/05/2024 10:57:16
出错时间:09/05/2024 10:57:16
错误信息开始=====>
错误类型:ArgumentException
错误信息:另一个 SqlParameterCollection 中已包含 SqlParameter。
错误堆栈:
在 System.Data.SqlClient.SqlParameterCollection.Validate(Int32 index, Object value)
在 System.Data.SqlClient.SqlParameterCollection.AddRange(Array values)
在 System.Data.SqlClient.SqlParameterCollection.AddRange(SqlParameter[] values)
在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 307
在 FineUIPro.Web.DataShow.EduTrain.BindGrid()
在 FineUIPro.Web.DataShow.EduTrain.Page_Load(Object sender, EventArgs e)
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:09/06/2024 11:25:16
出错文件:http://localhost:8579/DataShow/EduTrain.aspx
IP地址:::1
操作人员:JT
出错时间:09/06/2024 11:25:16

View File

@ -118,7 +118,7 @@
</tr>
<tr>
<td align="center" style="width: 46%; height: 50px; vertical-align: middle; font-size: 20pt; font-weight: bold">
<asp:Label ID="lblTital" runat="server" Text="项 目 安 全 月 报"></asp:Label>
<asp:Label ID="lblTital" runat="server" Text="项 目 H S E 月 报"></asp:Label>
</td>
</tr>
</table>
@ -517,31 +517,31 @@
<f:Panel ID="Panel11" Layout="HBox" ShowHeader="false" ShowBorder="false" runat="server">
<Items>
<f:NumberBox ID="nbFireWorkCount" Label="动火作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
<f:NumberBox ID="nbBreakGroundCount" Label="动土作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
<f:NumberBox ID="nbLimitedSpaceCount" Label="受限空间作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
<f:NumberBox ID="nbElectricityCount" Label="临时用电作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
</Items>
</f:Panel>
<f:Panel ID="Panel12" Layout="HBox" ShowHeader="false" ShowBorder="false" runat="server">
<Items>
<f:NumberBox ID="nbHeightWorkCount" Label="高处作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
<f:NumberBox ID="nbRadialWork" Label="射线作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
<f:NumberBox ID="nbLiftingWorkCount" Label="吊装作业许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
<f:NumberBox ID="nbNightWork" Label="夜间施工许可数量" LabelAlign="Right" LabelWidth="170px" Width="300px"
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" />
NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
</Items>
</f:Panel>
<f:Panel ID="Panel13" Layout="HBox" ShowHeader="false" ShowBorder="false" runat="server">
@ -798,6 +798,7 @@
<f:Grid ID="gvFiveExpenseC" ShowBorder="true" ShowHeader="false" Title="本月项目HSE费用投入统计" runat="server"
AllowCellEditing="true" ClicksToEdit="1" DataIDField="FiveExpenseId" DataKeyNames="FiveExpenseId"
EnableMultiSelect="false" ShowGridHeader="true" MinHeight="380px" EnableColumnLines="true" EnableSummary="true" SummaryPosition="Flow">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
@ -817,6 +818,10 @@
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="PlanCostMonth1" DataField="PlanCostMonth" FieldType="String"
HeaderText="本月原始数据" HeaderTextAlign="Center" TextAlign="Left" Hidden="true">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="PlanCostYear" DataField="PlanCostYear" FieldType="String"
HeaderText="项目累计" HeaderTextAlign="Center" TextAlign="Left">
<Editor>
@ -835,6 +840,11 @@
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ActualCostMonth1" DataField="ActualCostMonth" FieldType="String"
HeaderText="本月原始数据" HeaderTextAlign="Center" TextAlign="Left" Hidden="true">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ActualCostYear" DataField="ActualCostYear" FieldType="String"
HeaderText="项目累计" HeaderTextAlign="Center" TextAlign="Left">
<Editor>
@ -843,8 +853,12 @@
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
</Columns>
<Listeners>
<f:Listener Event="afteredit" Handler="ongvFiveExpenseC" />
</Listeners>
</f:Grid>
</Items>
</f:Panel>
@ -1464,4 +1478,33 @@
me.updateCellValue(rowId, 'TotalCheckNum', parseInt(totalCheckNum) + (parseInt(yearCheckNum) - parseInt(yearCheckNum1)));
}
}
//5.1 修改本月费用 更改累计费用
function ongvFiveExpenseC(event, value, params) {
var me = this, columnId = params.columnId, rowId = params.rowId;
//修改本月五环数,累计值变化
if (columnId === 'PlanCostMonth') {
//原始本月
var planCostMonth1 = me.getCellValue(rowId, 'PlanCostMonth1');
//本月
var planCostMonth = me.getCellValue(rowId, 'PlanCostMonth');
//年度
var planCostYear = me.getCellValue(rowId, 'PlanCostYear');
me.updateCellValue(rowId, 'PlanCostMonth1', planCostMonth);
me.updateCellValue(rowId, 'PlanCostYear', Number(planCostYear) - Number(planCostMonth1) + Number(planCostMonth));
} else if (columnId === 'ActualCostMonth') {
//原始本月
var actualCostMonth1 = me.getCellValue(rowId, 'ActualCostMonth1');
//本月
var actualCostMonth = me.getCellValue(rowId, 'ActualCostMonth');
//年度
var actualCostYear = me.getCellValue(rowId, 'ActualCostYear');
me.updateCellValue(rowId, 'ActualCostMonth1', actualCostMonth);
me.updateCellValue(rowId, 'ActualCostYear', Number(actualCostYear) - Number(actualCostMonth1) + Number(actualCostMonth));
}
}
</script>

View File

@ -1985,6 +1985,12 @@ namespace FineUIPro.Web.HSSE.Manager
#endregion
#region HSE培训
public class Bosheng {
public string TrainType { get; set; }
public decimal TrainPeriod { get; set; }
}
/// <summary>
/// 显示月报告HSE培训情况
/// </summary>
@ -2009,7 +2015,8 @@ namespace FineUIPro.Web.HSSE.Manager
trainSort.TrainType = item.TrainTypeName;
if (listTrain.Count > 0)
{
trainSort.TeachHour = listTrain.Where(x => x.TrainTypeId == item.TrainTypeId).Sum(x => x.TeachHour);
trainSort.TeachHour = 0;
//trainSort.TeachHour = listTrain.Where(x => x.TrainTypeId == item.TrainTypeId).Sum(x => x.TeachHour);
trainSort.PersonNum = listTrain.Where(x => x.TrainTypeId == item.TrainTypeId).Sum(x => x.TrainPersonNum);
}
else
@ -2026,7 +2033,21 @@ namespace FineUIPro.Web.HSSE.Manager
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("入场")).Sum(x=>x.PersonCount);
Func<string, decimal, decimal> funDelegate = CustomCount;
decimal numSum = 0;
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("入场")).Sum(x => funDelegate(x.TrainPeriod, numSum));
var listB = listBosheng.Where(x => x.TrainType.Contains("入场")).Select(x => new Bosheng
{
TrainType = x.TrainType,
TrainPeriod = Convert.ToDecimal(x.TrainPeriod)
});
var model = listB.Where(x => x.TrainType.Contains("入场")).OrderByDescending(x => x.TrainPeriod).FirstOrDefault();
if (model != null)
{
trainSort.TeachHour += model.TrainPeriod;
}
else {
trainSort.TeachHour = 0;
}
}
else if (item.TrainTypeId == "c1a513bb-a547-45b0-944d-b0dd88f06f82")
{
@ -2034,14 +2055,41 @@ namespace FineUIPro.Web.HSSE.Manager
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("其他")).Sum(x => x.PersonCount);
Func<string, decimal, decimal> funDelegate = CustomCount;
decimal numSum = 0;
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("其他")).Sum(x => funDelegate(x.TrainPeriod, numSum));
var listB = listBosheng.Where(x => x.TrainType.Contains("其他")).Select(x => new Bosheng {
TrainType = x.TrainType,
TrainPeriod = Convert.ToDecimal(x.TrainPeriod)
});
var model = listB.Where(x => x.TrainType.Contains("其他")).OrderByDescending(x => x.TrainPeriod).FirstOrDefault();
if (model != null)
{
trainSort.TeachHour += model.TrainPeriod;
}
else
{
trainSort.TeachHour = 0;
}
}
else {
//专项
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("专项")).Sum(x => x.PersonCount);
Func<string, decimal, decimal> funDelegate = CustomCount;
decimal numSum = 0;
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("专项")).Sum(x => funDelegate(x.TrainPeriod, numSum));
var listB = listBosheng.Where(x => x.TrainType.Contains("专项")).Select(x => new Bosheng
{
TrainType = x.TrainType,
TrainPeriod = Convert.ToDecimal(x.TrainPeriod)
});
var model = listB.Where(x => x.TrainType.Contains("专项")).OrderByDescending(x => x.TrainPeriod).FirstOrDefault();
if (model != null)
{
trainSort.TeachHour += model.TrainPeriod;
}
else
{
trainSort.TeachHour = 0;
}
//Func<string, decimal, decimal> funDelegate = CustomCount;
//decimal numSum = 0;
//trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("专项")).Max(x => funDelegate(x.TrainPeriod, numSum));
}
}
@ -3226,6 +3274,34 @@ namespace FineUIPro.Web.HSSE.Manager
}
#endregion
/// <summary>
/// 4.4修改数量自动修改本月和累计
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Zy_TextChanged(object sender, EventArgs e) {
if (!string.IsNullOrEmpty(nbFireWorkCount.Text)&&!string.IsNullOrEmpty(nbBreakGroundCount.Text)&&
!string.IsNullOrEmpty(nbLimitedSpaceCount.Text) && !string.IsNullOrEmpty(nbElectricityCount.Text) &&
!string.IsNullOrEmpty(nbHeightWorkCount.Text) && !string.IsNullOrEmpty(nbRadialWork.Text) &&
!string.IsNullOrEmpty(nbLiftingWorkCount.Text) && !string.IsNullOrEmpty(nbNightWork.Text) )
{
var number1 = Convert.ToInt32(nbFireWorkCount.Text);
var number2 = Convert.ToInt32(nbBreakGroundCount.Text);
var number3 = Convert.ToInt32(nbLimitedSpaceCount.Text);
var number4 = Convert.ToInt32(nbElectricityCount.Text);
var number5 = Convert.ToInt32(nbHeightWorkCount.Text);
var number6 = Convert.ToInt32(nbRadialWork.Text);
var number7 = Convert.ToInt32(nbLiftingWorkCount.Text);
var number8 = Convert.ToInt32(nbNightWork.Text);
//作业累计
nbProCount.Text = (Convert.ToInt32(nbProCount.Text) - Convert.ToInt32(nbMonthCount.Text)
+ number1 + number2 + number3 + number4 + number5 + number6 + number7 + number8).ToString();
nbYearCount.Text= (Convert.ToInt32(nbYearCount.Text) - Convert.ToInt32(nbMonthCount.Text)
+ number1 + number2 + number3 + number4 + number5 + number6 + number7 + number8).ToString();
nbMonthCount.Text = ( number1 + number2 + number3 + number4 + number5 + number6 + number7 + number8).ToString();
}}
}
}

View File

@ -537,7 +537,7 @@ namespace FineUIPro.Web.HSSE.Manager
var urlHz = startDate.ToString("yyyyMMdd") + "-"
+ endDate.ToString("yyyyMMdd");
newUrl = uploadfilepath.Replace("项目安全月报", pModel.ShortName + "项目安全月报(" + model.MonthReportCode + "" + urlHz);
newUrl = uploadfilepath.Replace("项目安全月报", pModel.ShortName + "项目HSE月报(" + model.MonthReportCode + "" + urlHz);
if (File.Exists(newUrl))
{