diff --git a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx
index 70b9c3a5..3a1d757b 100644
--- a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx
+++ b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx
@@ -16,7 +16,7 @@
ShowHeader="true" Layout="VBox" BoxConfigAlign="Stretch">
-
-
-
+
+
+
@@ -62,6 +62,10 @@
+
+
listStr = new List();
+ List listStrSum = new List();
+ //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,'')
- 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 TrainRecord.TrainTypeId =@TrainType";
+ //listStr.Add(new SqlParameter("@TrainType", this.rbType.SelectedValue));
- strSql += " AND TrainType.TrainType =@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
+
+ 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
///
protected void TextBox_TextChanged(object sender, EventArgs e)
{
+ Grid1.PageIndex = 0;
this.BindGrid();
}
#endregion
@@ -147,8 +277,11 @@ namespace FineUIPro.Web.DataShow
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
-
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/EduTrain/TrainRecordView.aspx?TrainingId={0}", Grid1.SelectedRowID, "查看 - ")));
+ var tType= Grid1.SelectedRow.DataKeys[1].ToString();
+ if (tType!="博晟")
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/EduTrain/TrainRecordView.aspx?TrainingId={0}", Grid1.SelectedRowID, "查看 - ")));
+ }
}
#endregion
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index d5ff0428..608309ad 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -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
+
diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx
index 36337fc5..8685edd5 100644
--- a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx
@@ -118,7 +118,7 @@
-
+
|
@@ -517,31 +517,31 @@
+ NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
+ NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
+ NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
+ NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
+ NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
+ NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
+ NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
+ NoDecimal="true" NoNegative="true" MinValue="0" runat="server" AutoPostBack="true" OnTextChanged="Zy_TextChanged"/>
@@ -798,6 +798,7 @@
+
@@ -817,6 +818,10 @@
+
+
+
@@ -835,6 +840,11 @@
+
+
+
+
@@ -843,8 +853,12 @@
+
+
+
+
@@ -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));
+ }
+ }
diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx.cs
index 07217b0f..dc9a56b8 100644
--- a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx.cs
@@ -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; }
+ }
+
///
/// 显示月报告HSE培训情况
///
@@ -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 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 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 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 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
+ ///
+ /// 4.4修改数量自动修改本月和累计
+ ///
+ ///
+ ///
+ 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();
+ }}
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCNew.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCNew.aspx.cs
index 75e3ba0e..a11ae058 100644
--- a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCNew.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCNew.aspx.cs
@@ -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))
{