20211202 与集团安全信息报表及检查对接接口实现
This commit is contained in:
@@ -511,10 +511,9 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="250px"
|
||||
Width="500px">
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="520px" Width="800px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -428,7 +428,25 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
AddItems(accidentCauseReport.AccidentCauseReportId);
|
||||
if (type == "updata") //保存并上报
|
||||
{
|
||||
Update(accidentCauseReport.AccidentCauseReportId);
|
||||
if (accidentCauseReport.UpState == BLL.Const.UpState_2)
|
||||
{
|
||||
string code = CNCECHSSEWebService.UpAccidentCauseReport(accidentCauseReport.AccidentCauseReportId, this.CurrUser);
|
||||
if (code == "1")
|
||||
{
|
||||
ShowNotify("同步成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == "submit")
|
||||
{
|
||||
@@ -777,137 +795,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据同步
|
||||
private void Update(string accidentCauseReportId)
|
||||
{
|
||||
// /////创建客户端服务
|
||||
// var poxy = Web.ServiceProxy.CreateServiceClient();
|
||||
// poxy.DataInsertInformation_AccidentCauseReportTableCompleted += new EventHandler<HSSEService.DataInsertInformation_AccidentCauseReportTableCompletedEventArgs>(poxy_DataInsertInformation_AccidentCauseReportTableCompleted);
|
||||
// var report = from x in Funs.DB.Information_AccidentCauseReport
|
||||
// where x.AccidentCauseReportId == accidentCauseReportId
|
||||
// && x.UpState == BLL.Const.UpState_2
|
||||
// select new HSSEService.Information_AccidentCauseReport
|
||||
// {
|
||||
// AccidentCauseReportId = x.AccidentCauseReportId,
|
||||
// UnitId = x.UnitId,
|
||||
// AccidentCauseReportCode = x.AccidentCauseReportCode,
|
||||
// Year = x.Year,
|
||||
// Month = x.Month,
|
||||
// DeathAccident = x.DeathAccident,
|
||||
// DeathToll = x.DeathToll,
|
||||
// InjuredAccident = x.InjuredAccident,
|
||||
// InjuredToll = x.InjuredToll,
|
||||
// MinorWoundAccident = x.MinorWoundAccident,
|
||||
// MinorWoundToll = x.MinorWoundToll,
|
||||
// AverageTotalHours = x.AverageTotalHours,
|
||||
// AverageManHours = x.AverageManHours,
|
||||
// TotalLossMan = x.TotalLossMan,
|
||||
// LastMonthLossHoursTotal = x.LastMonthLossHoursTotal,
|
||||
// KnockOffTotal = x.KnockOffTotal,
|
||||
// DirectLoss = x.DirectLoss,
|
||||
// IndirectLosses = x.IndirectLosses,
|
||||
// TotalLoss = x.TotalLoss,
|
||||
// TotalLossTime = x.TotalLossTime,
|
||||
// FillCompanyPersonCharge = x.FillCompanyPersonCharge,
|
||||
// TabPeople = x.TabPeople,
|
||||
// AuditPerson = x.AuditPerson,
|
||||
// FillingDate = x.FillingDate,
|
||||
// };
|
||||
|
||||
// var reportItem = from x in Funs.DB.Information_AccidentCauseReportItem
|
||||
// where x.AccidentCauseReportId == accidentCauseReportId
|
||||
// select new HSSEService.Information_AccidentCauseReportItem
|
||||
// {
|
||||
// AccidentCauseReportItemId = x.AccidentCauseReportItemId,
|
||||
// AccidentCauseReportId = x.AccidentCauseReportId,
|
||||
// AccidentType = x.AccidentType,
|
||||
// TotalDeath = x.TotalDeath,
|
||||
// TotalInjuries = x.TotalInjuries,
|
||||
// TotalMinorInjuries = x.TotalMinorInjuries,
|
||||
// Death1 = x.Death1,
|
||||
// Injuries1 = x.Injuries1,
|
||||
// MinorInjuries1 = x.MinorInjuries1,
|
||||
// Death2 = x.Death2,
|
||||
// Injuries2 = x.Injuries2,
|
||||
// MinorInjuries2 = x.MinorInjuries2,
|
||||
// Death3 = x.Death3,
|
||||
// Injuries3 = x.Injuries3,
|
||||
// MinorInjuries3 = x.MinorInjuries3,
|
||||
// Death4 = x.Death4,
|
||||
// Injuries4 = x.Injuries4,
|
||||
// MinorInjuries4 = x.MinorInjuries4,
|
||||
// Death5 = x.Death5,
|
||||
// Injuries5 = x.Injuries5,
|
||||
// MinorInjuries5 = x.MinorInjuries5,
|
||||
// Death6 = x.Death6,
|
||||
// Injuries6 = x.Injuries6,
|
||||
// MinorInjuries6 = x.MinorInjuries6,
|
||||
// Death7 = x.Death7,
|
||||
// Injuries7 = x.Injuries7,
|
||||
// MinorInjuries7 = x.MinorInjuries7,
|
||||
// Death8 = x.Death8,
|
||||
// Injuries8 = x.Injuries8,
|
||||
// MinorInjuries8 = x.MinorInjuries8,
|
||||
// Death9 = x.Death9,
|
||||
// Injuries9 = x.Injuries9,
|
||||
// MinorInjuries9 = x.MinorInjuries9,
|
||||
// Death10 = x.Death10,
|
||||
// Injuries10 = x.Injuries10,
|
||||
// MinorInjuries10 = x.MinorInjuries10,
|
||||
// Death11 = x.Death11,
|
||||
// Injuries11 = x.Injuries11,
|
||||
// MinorInjuries11 = x.MinorInjuries11,
|
||||
// };
|
||||
// poxy.DataInsertInformation_AccidentCauseReportTableAsync(report.ToList(), reportItem.ToList());
|
||||
//}
|
||||
|
||||
#region 职工伤亡事故原因分析报表
|
||||
/// <summary>
|
||||
/// 职工伤亡事故原因分析报表
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
//private void poxy_DataInsertInformation_AccidentCauseReportTableCompleted(object sender, HSSEService.DataInsertInformation_AccidentCauseReportTableCompletedEventArgs e)
|
||||
//{
|
||||
// if (e.Error == null)
|
||||
// {
|
||||
// var idList = e.Result;
|
||||
// foreach (var item in idList)
|
||||
// {
|
||||
// var report = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(item);
|
||||
// if (report != null)
|
||||
// {
|
||||
// report.UpState = BLL.Const.UpState_3;
|
||||
// BLL.AccidentCauseReportService.UpdateAccidentCauseReport(report);
|
||||
// ////更新 当前人要处理的意见
|
||||
// Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.AccidentCauseReportMenuId, item);
|
||||
// if (updateUnFlowOperate != null)
|
||||
// {
|
||||
// updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
// updateUnFlowOperate.IsClosed = true;
|
||||
// BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
// }
|
||||
// ////更新催报信息
|
||||
// var urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == report.UnitId && x.ReprotType == BLL.Const.ReportType_2 && x.YearId == report.Year.ToString() && x.MonthId == report.Month.ToString());
|
||||
// if (urgeReport != null)
|
||||
// {
|
||||
// urgeReport.IsComplete = true;
|
||||
// Funs.DB.SubmitChanges();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【职工伤亡事故原因分析报表】上传到服务器" + idList.Count.ToString() + "条数据;", null, BLL.Const.AccidentCauseReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【职工伤亡事故原因分析报表】上传到服务器失败;", null, BLL.Const.AccidentCauseReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 复制上月数据
|
||||
/// <summary>
|
||||
/// 复制上月报表数据
|
||||
|
||||
@@ -219,9 +219,9 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="350px" Width="600px">
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="520px" Width="800px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
return;
|
||||
}
|
||||
|
||||
Model.Information_DrillConductedQuarterlyReport drillConductedQuarterlyReport = new Model.Information_DrillConductedQuarterlyReport();
|
||||
var drillConductedQuarterlyReport = new Model.Information_DrillConductedQuarterlyReport();
|
||||
if (this.ddlUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
drillConductedQuarterlyReport.UnitId = this.ddlUnitId.SelectedValue;
|
||||
@@ -285,7 +285,25 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
}
|
||||
if (type == "updata") //保存并上报
|
||||
{
|
||||
Update(drillConductedQuarterlyReport.DrillConductedQuarterlyReportId);
|
||||
if (drillConductedQuarterlyReport.UpState == BLL.Const.UpState_2)
|
||||
{
|
||||
string code = CNCECHSSEWebService.UpDrillConductedQuarterlyReport(drillConductedQuarterlyReport.DrillConductedQuarterlyReportId, this.CurrUser);
|
||||
if (code == "1")
|
||||
{
|
||||
ShowNotify("同步成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == "submit")
|
||||
{
|
||||
@@ -387,98 +405,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 同步数据
|
||||
private void Update(string drillConductedQuarterlyReportId)
|
||||
{
|
||||
/////创建客户端服务
|
||||
//var poxy = Web.ServiceProxy.CreateServiceClient();
|
||||
//poxy.DataInsertInformation_DrillConductedQuarterlyReportTableCompleted += new EventHandler<HSSEService.DataInsertInformation_DrillConductedQuarterlyReportTableCompletedEventArgs>(poxy_DataInsertInformation_DrillConductedQuarterlyReportTableCompleted);
|
||||
//var report = from x in Funs.DB.Information_DrillConductedQuarterlyReport
|
||||
// where x.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId && x.UpState == BLL.Const.UpState_2
|
||||
// select new HSSEService.Information_DrillConductedQuarterlyReport
|
||||
// {
|
||||
// DrillConductedQuarterlyReportId = x.DrillConductedQuarterlyReportId,
|
||||
// UnitId = x.UnitId,
|
||||
// ReportDate = x.ReportDate,
|
||||
// Quarter = x.Quarter,
|
||||
// YearId = x.YearId,
|
||||
// CompileMan = x.CompileMan,
|
||||
// };
|
||||
|
||||
//var reportItem = from x in Funs.DB.Information_DrillConductedQuarterlyReportItem
|
||||
// where x.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId
|
||||
// select new HSSEService.Information_DrillConductedQuarterlyReportItem
|
||||
// {
|
||||
// DrillConductedQuarterlyReportItemId = x.DrillConductedQuarterlyReportItemId,
|
||||
// DrillConductedQuarterlyReportId = x.DrillConductedQuarterlyReportId,
|
||||
// IndustryType = x.IndustryType,
|
||||
// TotalConductCount = x.TotalConductCount,
|
||||
// TotalPeopleCount = x.TotalPeopleCount,
|
||||
// TotalInvestment = x.TotalInvestment,
|
||||
// HQConductCount = x.HQConductCount,
|
||||
// HQPeopleCount = x.HQPeopleCount,
|
||||
// HQInvestment = x.HQInvestment,
|
||||
// BasicConductCount = x.BasicConductCount,
|
||||
// BasicPeopleCount = x.BasicPeopleCount,
|
||||
// BasicInvestment = x.BasicInvestment,
|
||||
// ComprehensivePractice = x.ComprehensivePractice,
|
||||
// CPScene = x.CPScene,
|
||||
// CPDesktop = x.CPDesktop,
|
||||
// SpecialDrill = x.SpecialDrill,
|
||||
// SDScene = x.SDScene,
|
||||
// SDDesktop = x.SDDesktop,
|
||||
// SortIndex = x.SortIndex,
|
||||
// };
|
||||
//poxy.DataInsertInformation_DrillConductedQuarterlyReportTableAsync(report.ToList(), reportItem.ToList());
|
||||
}
|
||||
|
||||
#region 应急演练开展情况季报表
|
||||
/// <summary>
|
||||
/// 应急演练开展情况季报表
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
//private void poxy_DataInsertInformation_DrillConductedQuarterlyReportTableCompleted(object sender, HSSEService.DataInsertInformation_DrillConductedQuarterlyReportTableCompletedEventArgs e)
|
||||
//{
|
||||
// if (e.Error == null)
|
||||
// {
|
||||
// var idList = e.Result;
|
||||
// foreach (var item in idList)
|
||||
// {
|
||||
// var report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportById(item);
|
||||
// if (report != null)
|
||||
// {
|
||||
// report.UpState = BLL.Const.UpState_3;
|
||||
// BLL.DrillConductedQuarterlyReportService.UpdateDrillConductedQuarterlyReport(report);
|
||||
// ////更新 当前人要处理的意见
|
||||
// Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.DrillConductedQuarterlyReportMenuId, item);
|
||||
// if (updateUnFlowOperate != null)
|
||||
// {
|
||||
// updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
// updateUnFlowOperate.IsClosed = true;
|
||||
// BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
// }
|
||||
// ////更新催报信息
|
||||
// var urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == report.UnitId && x.ReprotType == BLL.Const.ReportType_4 && x.YearId == report.YearId.ToString() && x.QuarterId == report.Quarter.ToString());
|
||||
// if (urgeReport != null)
|
||||
// {
|
||||
// urgeReport.IsComplete = true;
|
||||
// Funs.DB.SubmitChanges();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【应急演练开展情况季报表】上传到服务器" + idList.Count.ToString() + "条数据;", null, BLL.Const.DrillConductedQuarterlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【应急演练开展情况季报表】上传到服务器失败;", null, BLL.Const.DrillConductedQuarterlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region 关闭办理流程窗口
|
||||
/// <summary>
|
||||
/// 关闭办理流程窗口
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="250px" Width="500px">
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="520px" Width="800px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -244,7 +244,25 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
}
|
||||
if (type == "updata") //保存并上报
|
||||
{
|
||||
Update(drillPlanHalfYearReport.DrillPlanHalfYearReportId);
|
||||
if (drillPlanHalfYearReport.UpState == BLL.Const.UpState_2)
|
||||
{
|
||||
string code = CNCECHSSEWebService.UpDrillPlanHalfYearReport(drillPlanHalfYearReport.DrillPlanHalfYearReportId, this.CurrUser);
|
||||
if (code == "1")
|
||||
{
|
||||
ShowNotify("同步成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == "submit")
|
||||
{
|
||||
@@ -324,89 +342,8 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
Save("submit");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 同步数据
|
||||
private void Update(string drillPlanHalfYearReportId)
|
||||
{
|
||||
/////创建客户端服务
|
||||
//var poxy = Web.ServiceProxy.CreateServiceClient();
|
||||
//poxy.DataInsertInformation_DrillPlanHalfYearReportTableCompleted += new EventHandler<HSSEService.DataInsertInformation_DrillPlanHalfYearReportTableCompletedEventArgs>(poxy_DataInsertInformation_DrillPlanHalfYearReportTableCompleted);
|
||||
//var report = from x in Funs.DB.Information_DrillPlanHalfYearReport
|
||||
// where x.DrillPlanHalfYearReportId == drillPlanHalfYearReportId && x.UpState == BLL.Const.UpState_2
|
||||
// select new HSSEService.Information_DrillPlanHalfYearReport
|
||||
// {
|
||||
// DrillPlanHalfYearReportId = x.DrillPlanHalfYearReportId,
|
||||
// UnitId = x.UnitId,
|
||||
// CompileMan = x.CompileMan,
|
||||
// CompileDate = x.CompileDate,
|
||||
// YearId = x.YearId,
|
||||
// HalfYearId = x.HalfYearId,
|
||||
// Telephone = x.Telephone,
|
||||
// };
|
||||
|
||||
//var reportItem = from x in Funs.DB.Information_DrillPlanHalfYearReportItem
|
||||
// where x.DrillPlanHalfYearReportId == drillPlanHalfYearReportId
|
||||
// select new HSSEService.Information_DrillPlanHalfYearReportItem
|
||||
// {
|
||||
// DrillPlanHalfYearReportItemId = x.DrillPlanHalfYearReportItemId,
|
||||
// DrillPlanHalfYearReportId = x.DrillPlanHalfYearReportId,
|
||||
// DrillPlanName = x.DrillPlanName,
|
||||
// OrganizationUnit = x.OrganizationUnit,
|
||||
// DrillPlanDate = x.DrillPlanDate,
|
||||
// AccidentScene = x.AccidentScene,
|
||||
// ExerciseWay = x.ExerciseWay,
|
||||
// SortIndex = x.SortIndex,
|
||||
// };
|
||||
//poxy.DataInsertInformation_DrillPlanHalfYearReportTableAsync(report.ToList(), reportItem.ToList());
|
||||
}
|
||||
|
||||
#region 应急演练工作计划半年报表
|
||||
/// <summary>
|
||||
/// 应急演练工作计划半年报表
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
//private void poxy_DataInsertInformation_DrillPlanHalfYearReportTableCompleted(object sender, HSSEService.DataInsertInformation_DrillPlanHalfYearReportTableCompletedEventArgs e)
|
||||
//{
|
||||
// if (e.Error == null)
|
||||
// {
|
||||
// var idList = e.Result;
|
||||
// foreach (var item in idList)
|
||||
// {
|
||||
// var report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportById(item);
|
||||
// if (report != null)
|
||||
// {
|
||||
// report.UpState = BLL.Const.UpState_3;
|
||||
// BLL.DrillPlanHalfYearReportService.UpdateDrillPlanHalfYearReport(report);
|
||||
// ////更新 当前人要处理的意见
|
||||
// Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.DrillPlanHalfYearReportMenuId, item);
|
||||
// if (updateUnFlowOperate != null)
|
||||
// {
|
||||
// updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
// updateUnFlowOperate.IsClosed = true;
|
||||
// BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
// }
|
||||
// ////更新催报信息
|
||||
// var urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == report.UnitId && x.ReprotType == BLL.Const.ReportType_5 && x.YearId == report.YearId.ToString() && x.HalfYearId == report.HalfYearId.ToString());
|
||||
// if (urgeReport != null)
|
||||
// {
|
||||
// urgeReport.IsComplete = true;
|
||||
// Funs.DB.SubmitChanges();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【应急演练工作计划半年报表】上传到服务器" + idList.Count.ToString() + "条数据;", null, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【应急演练工作计划半年报表】上传到服务器失败;", null, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region Grid1行点击事件
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
/// <param name="e"></param>
|
||||
protected void Window4_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
GetValue();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -225,27 +225,31 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
this.btnPrint.Hidden = false;
|
||||
}
|
||||
Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||
this.btnAudit1.Hidden = true;
|
||||
this.btnAudit2.Hidden = true;
|
||||
this.btnUpdata.Hidden = true;
|
||||
if (report != null)
|
||||
}
|
||||
|
||||
var getReport = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||
this.btnAudit1.Hidden = true;
|
||||
this.btnAudit2.Hidden = true;
|
||||
this.btnUpdata.Hidden = true;
|
||||
if (getReport != null)
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
if (getReport.HandleMan == this.CurrUser.UserId) //当前人是下一步办理入
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
if (report.HandleMan == this.CurrUser.UserId) //当前人是下一步办理入
|
||||
if (getReport.HandleState == BLL.Const.HandleState_2)
|
||||
{
|
||||
if (report.HandleState == BLL.Const.HandleState_2)
|
||||
{
|
||||
this.btnAudit1.Hidden = false;
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_3)
|
||||
{
|
||||
this.btnAudit2.Hidden = false;
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_4)
|
||||
{
|
||||
this.btnUpdata.Hidden = false;
|
||||
}
|
||||
this.btnAudit1.Hidden = false;
|
||||
this.btnEdit.Hidden = true;
|
||||
}
|
||||
else if (getReport.HandleState == BLL.Const.HandleState_3)
|
||||
{
|
||||
this.btnAudit2.Hidden = false;
|
||||
this.btnEdit.Hidden = true;
|
||||
}
|
||||
else if (getReport.HandleState == BLL.Const.HandleState_4)
|
||||
{
|
||||
this.btnUpdata.Hidden = false;
|
||||
this.btnEdit.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,26 +59,9 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
if (!String.IsNullOrEmpty(MillionsMonthlyReportId))
|
||||
{
|
||||
items = BLL.MillionsMonthlyReportItemService.GetItemsNoSum(MillionsMonthlyReportId);
|
||||
//int i = items.Count * 10;
|
||||
//int count = items.Count;
|
||||
//if (items.Count < 10)
|
||||
//{
|
||||
// for (int j = 0; j < (10 - count); j++)
|
||||
// {
|
||||
// i += 10;
|
||||
// Model.Information_MillionsMonthlyReportItem newItem = new Information_MillionsMonthlyReportItem
|
||||
// {
|
||||
// MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)),
|
||||
// Affiliation = string.Empty,
|
||||
// Name = string.Empty,
|
||||
// SortIndex = i
|
||||
// };
|
||||
// items.Add(newItem);
|
||||
// }
|
||||
//}
|
||||
this.Grid1.DataSource = items;
|
||||
this.Grid1.DataBind();
|
||||
Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId);
|
||||
var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId);
|
||||
if (report != null)
|
||||
{
|
||||
this.btnSave.Hidden = true;
|
||||
@@ -216,7 +199,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
|
||||
if (String.IsNullOrEmpty(MillionsMonthlyReportId))
|
||||
{
|
||||
Model.Information_MillionsMonthlyReport old = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||
Information_MillionsMonthlyReport old = MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||
if (old == null)
|
||||
{
|
||||
report.MillionsMonthlyReportId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReport));
|
||||
@@ -248,6 +231,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
}
|
||||
MillionsMonthlyReportId = report.MillionsMonthlyReportId;
|
||||
BLL.MillionsMonthlyReportItemService.DeleteMillionsMonthlyReportItemByMillionsMonthlyReportId(report.MillionsMonthlyReportId);
|
||||
List<Model.Information_MillionsMonthlyReportItem> mReportItemList = new List<Information_MillionsMonthlyReportItem>();
|
||||
GetItems(report.MillionsMonthlyReportId);
|
||||
foreach (var item in items)
|
||||
{
|
||||
@@ -255,25 +239,36 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
item.Affiliation = System.Web.HttpUtility.HtmlDecode(item.Affiliation);
|
||||
item.Name = System.Web.HttpUtility.HtmlDecode(item.Name);
|
||||
BLL.MillionsMonthlyReportItemService.AddMillionsMonthlyReportItem(item);
|
||||
MillionsMonthlyReportItemService.AddMillionsMonthlyReportItem(item);
|
||||
mReportItemList.Add(item);
|
||||
}
|
||||
}
|
||||
if (type == "updata") //保存并上报
|
||||
if (type == "updata") //数据同步
|
||||
{
|
||||
Update(report.MillionsMonthlyReportId);
|
||||
if (report.UpState == BLL.Const.UpState_2)
|
||||
{
|
||||
string code = CNCECHSSEWebService.UpMillionsMonthlyReport(report.MillionsMonthlyReportId, this.CurrUser);
|
||||
if (code == "1")
|
||||
{
|
||||
ShowNotify("同步成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == "submit")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=MillionsMonthlyReport&Id={0}", report.MillionsMonthlyReportId, "编辑 - ")));
|
||||
}
|
||||
// 2. 关闭本窗体,然后刷新父窗体
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
// 2. 关闭本窗体,然后回发父窗体
|
||||
//if (type != "submit")
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(wedId) + ActiveWindow.GetHideReference());
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
@@ -291,120 +286,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
Save("submit");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据同步
|
||||
/// <summary>
|
||||
/// 同步数据
|
||||
/// </summary>
|
||||
/// <param name="millionsMonthlyReportId"></param>
|
||||
private void Update(string millionsMonthlyReportId)
|
||||
{
|
||||
/////创建客户端服务
|
||||
//var poxy = Web.ServiceProxy.CreateServiceClient();
|
||||
//poxy.DataInsertInformation_MillionsMonthlyReportTableCompleted += new EventHandler<HSSEService.DataInsertInformation_MillionsMonthlyReportTableCompletedEventArgs>(poxy_DataInsertInformation_MillionsMonthlyReportTableCompleted);
|
||||
//var report = from x in Funs.DB.Information_MillionsMonthlyReport
|
||||
// where x.MillionsMonthlyReportId == millionsMonthlyReportId && x.UpState == BLL.Const.UpState_2
|
||||
// select new HSSEService.Information_MillionsMonthlyReport
|
||||
// {
|
||||
// MillionsMonthlyReportId = x.MillionsMonthlyReportId,
|
||||
// UnitId = x.UnitId,
|
||||
// Year = x.Year,
|
||||
// Month = x.Month,
|
||||
// FillingMan = x.FillingMan,
|
||||
// FillingDate = x.FillingDate,
|
||||
// DutyPerson = x.DutyPerson,
|
||||
// RecordableIncidentRate = x.RecordableIncidentRate,
|
||||
// LostTimeRate = x.LostTimeRate,
|
||||
// LostTimeInjuryRate = x.LostTimeInjuryRate,
|
||||
// DeathAccidentFrequency = x.DeathAccidentFrequency,
|
||||
// AccidentMortality = x.AccidentMortality,
|
||||
// };
|
||||
|
||||
//var reportItem = from x in Funs.DB.Information_MillionsMonthlyReportItem
|
||||
// where x.MillionsMonthlyReportId == millionsMonthlyReportId
|
||||
// select new HSSEService.Information_MillionsMonthlyReportItem
|
||||
// {
|
||||
// MillionsMonthlyReportItemId = x.MillionsMonthlyReportItemId,
|
||||
// MillionsMonthlyReportId = x.MillionsMonthlyReportId,
|
||||
// SortIndex = x.SortIndex,
|
||||
// Affiliation = x.Affiliation,
|
||||
// Name = x.Name,
|
||||
// PostPersonNum = x.PostPersonNum,
|
||||
// SnapPersonNum = x.SnapPersonNum,
|
||||
// ContractorNum = x.ContractorNum,
|
||||
// SumPersonNum = x.SumPersonNum,
|
||||
// TotalWorkNum = x.TotalWorkNum,
|
||||
// SeriousInjuriesNum = x.SeriousInjuriesNum,
|
||||
// SeriousInjuriesPersonNum = x.SeriousInjuriesPersonNum,
|
||||
// SeriousInjuriesLossHour = x.SeriousInjuriesLossHour,
|
||||
// MinorAccidentNum = x.MinorAccidentNum,
|
||||
// MinorAccidentPersonNum = x.MinorAccidentPersonNum,
|
||||
// MinorAccidentLossHour = x.MinorAccidentLossHour,
|
||||
// OtherAccidentNum = x.OtherAccidentNum,
|
||||
// OtherAccidentPersonNum = x.OtherAccidentPersonNum,
|
||||
// OtherAccidentLossHour = x.OtherAccidentLossHour,
|
||||
// RestrictedWorkPersonNum = x.RestrictedWorkPersonNum,
|
||||
// RestrictedWorkLossHour = x.RestrictedWorkLossHour,
|
||||
// MedicalTreatmentPersonNum = x.MedicalTreatmentPersonNum,
|
||||
// MedicalTreatmentLossHour = x.MedicalTreatmentLossHour,
|
||||
// FireNum = x.FireNum,
|
||||
// ExplosionNum = x.ExplosionNum,
|
||||
// TrafficNum = x.TrafficNum,
|
||||
// EquipmentNum = x.EquipmentNum,
|
||||
// QualityNum = x.QualityNum,
|
||||
// OtherNum = x.OtherNum,
|
||||
// FirstAidDressingsNum = x.FirstAidDressingsNum,
|
||||
// AttemptedEventNum = x.AttemptedEventNum,
|
||||
// LossDayNum = x.LossDayNum,
|
||||
// };
|
||||
//poxy.DataInsertInformation_MillionsMonthlyReportTableAsync(report.ToList(), reportItem.ToList());
|
||||
}
|
||||
|
||||
#region 百万工时安全统计月报表
|
||||
/// <summary>
|
||||
/// 百万工时安全统计月报表
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
//private void poxy_DataInsertInformation_MillionsMonthlyReportTableCompleted(object sender, HSSEService.DataInsertInformation_MillionsMonthlyReportTableCompletedEventArgs e)
|
||||
//{
|
||||
// if (e.Error == null)
|
||||
// {
|
||||
// var idList = e.Result;
|
||||
// foreach (var item in idList)
|
||||
// {
|
||||
// var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(item);
|
||||
// if (report != null)
|
||||
// {
|
||||
// report.UpState = BLL.Const.UpState_3;
|
||||
// BLL.MillionsMonthlyReportService.UpdateMillionsMonthlyReport(report);
|
||||
// ////更新 当前人要处理的意见
|
||||
// Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.MillionsMonthlyReportMenuId, item);
|
||||
// if (updateUnFlowOperate != null)
|
||||
// {
|
||||
// updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
// updateUnFlowOperate.IsClosed = true;
|
||||
// BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
// }
|
||||
// ////更新催报信息
|
||||
// var urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == report.UnitId && x.ReprotType == BLL.Const.ReportType_1 && x.YearId == report.Year.ToString() && x.MonthId == report.Month.ToString());
|
||||
// if (urgeReport != null)
|
||||
// {
|
||||
// urgeReport.IsComplete = true;
|
||||
// Funs.DB.SubmitChanges();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【百万工时安全统计月报表】上传到服务器" + idList.Count.ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【百万工时安全统计月报表】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region 增加本月明细
|
||||
private void GetItems(string millionsMonthlyReportId)
|
||||
{
|
||||
@@ -673,7 +555,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
i += 10;
|
||||
}
|
||||
|
||||
Model.Information_MillionsMonthlyReportItem totalItem = new Information_MillionsMonthlyReportItem
|
||||
Information_MillionsMonthlyReportItem totalItem = new Information_MillionsMonthlyReportItem
|
||||
{
|
||||
MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)),
|
||||
MillionsMonthlyReportId = millionsMonthlyReportId,
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportAuditSee.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ReportAuditSee" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>查看审核信息</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
@@ -24,23 +23,21 @@
|
||||
runat="server" BoxFlex="1" DataKeyNames="FlowOperateId"
|
||||
EnableColumnLines="true" DataIDField="FlowOperateId" AllowSorting="true"
|
||||
SortField="SortIndex" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="100"
|
||||
AllowFilters="true"
|
||||
OnFilterChange="Grid1_FilterChange">
|
||||
IsDatabasePaging="true" PageSize="100" >
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center"/>
|
||||
<f:RenderField Width="90px" ColumnID="OperaterName" DataField="OperaterName" SortField="OperaterName"
|
||||
<f:RenderField Width="120px" ColumnID="OperaterName" DataField="OperaterName" SortField="OperaterName"
|
||||
FieldType="String" HeaderText="办理人" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="OperaterTime" DataField="OperaterTime" SortField="OperaterTime"
|
||||
<f:RenderField Width="110px" ColumnID="OperaterTime" DataField="OperaterTime" SortField="OperaterTime"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="办理时间"
|
||||
HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="StateName" DataField="StateName" FieldType="String"
|
||||
<f:RenderField Width="130px" ColumnID="StateName" DataField="StateName" FieldType="String"
|
||||
HeaderText="操作步骤" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="670px" ColumnID="Opinion" DataField="Opinion" FieldType="String"
|
||||
HeaderText="意见" TextAlign="Center">
|
||||
<f:RenderField Width="400px" ColumnID="Opinion" DataField="Opinion" FieldType="String"
|
||||
HeaderText="意见" TextAlign="Center" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// 表头过滤
|
||||
FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// 绑定表格
|
||||
@@ -25,7 +24,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = "select * from View_ProjectData_FlowOperate where DataId=@DataId order by SortIndex desc";
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@DataId",Request.Params["Id"]),
|
||||
};
|
||||
@@ -34,59 +33,13 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据表头信息过滤列表数据
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据表头信息过滤列表数据
|
||||
/// </summary>
|
||||
/// <param name="sourceObj"></param>
|
||||
/// <param name="fillteredOperator"></param>
|
||||
/// <param name="fillteredObj"></param>
|
||||
/// <param name="column"></param>
|
||||
/// <returns></returns>
|
||||
private bool FilterDataRowItemImplement(object sourceObj, string fillteredOperator, object fillteredObj, string column)
|
||||
{
|
||||
bool valid = false;
|
||||
if (column == "UnitName")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal")
|
||||
{
|
||||
if (sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
else if (fillteredOperator == "contain")
|
||||
{
|
||||
if (sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
@@ -94,8 +47,6 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +1,32 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportSubmit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ReportSubmit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<head id="Head1" runat="server">
|
||||
<title>办理流程</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="90px">
|
||||
<Rows>
|
||||
<f:FormRow ColumnWidths="8% 92%">
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="cbNext" runat="server" Checked="true" AutoPostBack="true"
|
||||
OnCheckedChanged="cbNext_CheckedChanged">
|
||||
</f:CheckBox>
|
||||
<f:DropDownBox runat="server" ID="drpHandleMan" Label="下一步办理人" EmptyText="请从下拉表格中选择"
|
||||
MatchFieldWidth="false" LabelAlign="Left" LabelWidth="110px"
|
||||
EnableMultiSelect="false">
|
||||
<f:RadioButtonList ID="cbNext" runat="server" AutoPostBack="true" Width="100px"
|
||||
OnSelectedIndexChanged="cbNext_SelectedIndexChanged">
|
||||
<f:RadioItem Selected="true" Text="下一步办理人" Value="1" />
|
||||
<f:RadioItem Text="完成返回上报人" Value="0" />
|
||||
</f:RadioButtonList>
|
||||
<f:Label runat="server" ID-="lb"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpHandleMan" EmptyText="请从下拉表格中选择" Label="办理人"
|
||||
MatchFieldWidth="false" EnableMultiSelect="false">
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" DataIDField="UserId" DataTextField="UserName"
|
||||
DataKeyNames="UserId" AllowSorting="true" SortField="UserName" SortDirection="ASC" EnableColumnLines="true"
|
||||
@@ -42,72 +47,23 @@
|
||||
FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="UserName" DataField="UserName"
|
||||
<f:RenderField Width="100px" ColumnID="UserName" DataField="UserName"
|
||||
SortField="UserName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="RoleName" DataField="RoleName"
|
||||
<f:RenderField Width="120px" ColumnID="RoleName" DataField="RoleName" ExpandUnusedSpace="true"
|
||||
SortField="RoleName" FieldType="String" HeaderText="角色" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="160px" ColumnID="IdentityCard" DataField="IdentityCard" SortField="IdentityCard" FieldType="String"
|
||||
HeaderText="身份证号码" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="8% 92%">
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="cbEnd" runat="server" AutoPostBack="true"
|
||||
OnCheckedChanged="cbEnd_CheckedChanged">
|
||||
</f:CheckBox>
|
||||
<f:DropDownBox runat="server" ID="drpHandleMan2" Label="完成返回上报人" EmptyText="请从下拉表格中选择"
|
||||
MatchFieldWidth="false" LabelAlign="Left" LabelWidth="110px"
|
||||
EnableMultiSelect="false">
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" runat="server" DataIDField="UserId" DataTextField="UserName"
|
||||
DataKeyNames="UserId" AllowSorting="true" SortField="UserName" SortDirection="ASC" EnableColumnLines="true"
|
||||
Hidden="true" Width="600px" Height="420px" EnableMultiSelect="false" KeepCurrentSelection="true" PageSize="10000">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox runat="server" Label="查询" ID="TextBox1" EmptyText="输入查询条件" FocusOnPageLoad="true"
|
||||
AutoPostBack="true" OnTextChanged="TextBox1_TextChanged" Width="250px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px"
|
||||
HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="90px" ColumnID="UserCode" DataField="UserCode" SortField="UserCode"
|
||||
FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="UserName" DataField="UserName"
|
||||
SortField="UserName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="RoleName" DataField="RoleName"
|
||||
SortField="RoleName" FieldType="String" HeaderText="角色" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="160px" ColumnID="IdentityCard" DataField="IdentityCard" SortField="IdentityCard" FieldType="String"
|
||||
HeaderText="身份证号码" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="8% 92%">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="办理意见"></f:Label>
|
||||
<f:TextArea ID="txtOpinion" runat="server" Height="70px" MaxLength="1000">
|
||||
<f:TextArea ID="txtOpinion" runat="server" Height="70px" MaxLength="1000" Label="意见">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
@@ -115,7 +71,7 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="确认" ValidateForms="SimpleForm1"
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="确认" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
@@ -45,13 +46,9 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.BindGrid();
|
||||
this.BindGrid1();
|
||||
//BLL.UserService.InitFlowOperateControlUserDropDownList(this.drpHandleMan, this.CurrUser.LoginProjectId,this.CurrUser.UnitId, true);
|
||||
//BLL.UserService.InitFlowOperateControlUserDropDownList(this.drpHandleMan2, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
|
||||
this.drpHandleMan2.Enabled = false;
|
||||
this.Type = Request.Params["Type"];
|
||||
this.Id = Request.Params["Id"];
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -62,24 +59,22 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string unitId = BLL.Const.UnitId_CWCEC;
|
||||
string unitId = Const.UnitId_CWCEC;
|
||||
|
||||
string strSql = @"SELECT UserId,UserName,IdentityCard,UserCode,role.RoleName"
|
||||
string strSql = @"SELECT UserId,UserName,UserCode,role.RoleName"
|
||||
+ @" FROM Sys_User AS users"
|
||||
+ @" LEFT JOIN Sys_Role AS role ON users.RoleId= role.RoleId"
|
||||
+ @" WHERE users.IsPost=1 AND role.IsAuditFlow=1 AND UnitId ='" + unitId + "'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND (UserName LIKE @Name OR IdentityCard LIKE @Name OR UserCode LIKE @Name OR role.RoleName LIKE @Name)";
|
||||
strSql += " AND (UserName LIKE @Name OR UserCode LIKE @Name OR role.RoleName LIKE @Name)";
|
||||
listStr.Add(new SqlParameter("@Name", "%" + this.txtUserName.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
@@ -99,49 +94,6 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 人员下拉框绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid1()
|
||||
{
|
||||
string unitId = BLL.Const.UnitId_CWCEC;
|
||||
|
||||
string strSql = @"SELECT UserId,UserName,IdentityCard,UserCode,role.RoleName"
|
||||
+ @" FROM Sys_User AS users"
|
||||
+ @" LEFT JOIN Sys_Role AS role ON users.RoleId= role.RoleId"
|
||||
+ @" WHERE users.IsPost=1 AND role.IsAuditFlow=1 AND UnitId ='" + unitId + "'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND (UserName LIKE @Name OR IdentityCard LIKE @Name OR UserCode LIKE @Name OR role.RoleName LIKE @Name)";
|
||||
listStr.Add(new SqlParameter("@Name", "%" + this.txtUserName.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid2.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid2.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid2, tb);
|
||||
Grid2.DataSource = table;
|
||||
Grid2.DataBind();
|
||||
}
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 下拉框查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpHandleMan2.Values = null;
|
||||
this.BindGrid1();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
@@ -150,515 +102,158 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!this.cbNext.Checked && !this.cbEnd.Checked)
|
||||
{
|
||||
ShowNotify("请选择办理步骤!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string handleMan = this.drpHandleMan.Value;
|
||||
string handleMan2 = this.drpHandleMan2.Value;
|
||||
#region 百万工时安全统计月报
|
||||
if (Type == "MillionsMonthlyReport")//百万工时安全统计月报
|
||||
string handleStates = (this.cbNext.SelectedValue == "0") ? BLL.Const.HandleState_4 : BLL.Const.HandleState_3;
|
||||
if (!string.IsNullOrEmpty(handleMan) && handleMan != Const._Null)
|
||||
{
|
||||
Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(Id);
|
||||
if (report != null)
|
||||
|
||||
#region 百万工时安全统计月报
|
||||
if (Type == "MillionsMonthlyReport")//百万工时安全统计月报
|
||||
{
|
||||
if (this.cbNext.Checked) //提交下一步办理人
|
||||
var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(Id);
|
||||
if (report != null)
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.MillionsMonthlyReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.MillionsMonthlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = this.txtOpinion.Text
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.MillionsMonthlyReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
|
||||
////增加 下一步办理信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.MillionsMonthlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_3;
|
||||
SetFlowData(Const.MillionsMonthlyReportMenuId, this.Id, handleMan);
|
||||
report.HandleState = handleStates;
|
||||
report.HandleMan = handleMan;
|
||||
BLL.MillionsMonthlyReportService.UpdateMillionsMonthlyReport(report);
|
||||
}
|
||||
else //完成返回上报人
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.MillionsMonthlyReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.MillionsMonthlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.MillionsMonthlyReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加完成返回上报人信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.MillionsMonthlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan2,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_4;
|
||||
report.HandleMan = handleMan2;
|
||||
BLL.MillionsMonthlyReportService.UpdateMillionsMonthlyReport(report);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 职工伤亡事故原因分析
|
||||
if (Type == "AccidentCauseReport")//职工伤亡事故原因分析
|
||||
{
|
||||
Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(Id);
|
||||
if (report != null)
|
||||
#region 职工伤亡事故原因分析
|
||||
if (Type == "AccidentCauseReport")//职工伤亡事故原因分析
|
||||
{
|
||||
if (this.cbNext.Checked) //提交下一步办理人
|
||||
var report = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(Id);
|
||||
if (report != null)
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.AccidentCauseReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.AccidentCauseReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = this.txtOpinion.Text
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.AccidentCauseReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加 下一步办理信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.AccidentCauseReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_3;
|
||||
SetFlowData(Const.AccidentCauseReportMenuId, this.Id, handleMan);
|
||||
report.HandleState = handleStates;
|
||||
report.HandleMan = handleMan;
|
||||
BLL.AccidentCauseReportService.UpdateAccidentCauseReport(report);
|
||||
}
|
||||
else //完成返回上报人
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.AccidentCauseReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.AccidentCauseReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.AccidentCauseReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加完成返回上报人信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.AccidentCauseReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan2,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_4;
|
||||
report.HandleMan = handleMan2;
|
||||
BLL.AccidentCauseReportService.UpdateAccidentCauseReport(report);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 安全生产数据季报
|
||||
if (Type == "SafetyQuarterlyReport")//安全生产数据季报
|
||||
{
|
||||
Model.Information_SafetyQuarterlyReport report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(Id);
|
||||
if (report != null)
|
||||
#region 安全生产数据季报
|
||||
if (Type == "SafetyQuarterlyReport")//安全生产数据季报
|
||||
{
|
||||
if (this.cbNext.Checked) //提交下一步办理人
|
||||
var report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(Id);
|
||||
if (report != null)
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.SafetyQuarterlyReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.SafetyQuarterlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = this.txtOpinion.Text
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.SafetyQuarterlyReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加 下一步办理信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.SafetyQuarterlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_3;
|
||||
SetFlowData(Const.SafetyQuarterlyReportMenuId, this.Id, handleMan);
|
||||
report.HandleState = handleStates;
|
||||
report.HandleMan = handleMan;
|
||||
BLL.SafetyQuarterlyReportService.UpdateSafetyQuarterlyReport(report);
|
||||
}
|
||||
else //完成返回上报人
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.SafetyQuarterlyReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.SafetyQuarterlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.SafetyQuarterlyReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加完成返回上报人信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.SafetyQuarterlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan2,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_4;
|
||||
report.HandleMan = handleMan2;
|
||||
BLL.SafetyQuarterlyReportService.UpdateSafetyQuarterlyReport(report);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 应急演练开展情况季报表
|
||||
if (Type == "DrillConductedQuarterlyReport")//应急演练开展情况季报表
|
||||
{
|
||||
Model.Information_DrillConductedQuarterlyReport report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportById(Id);
|
||||
if (report != null)
|
||||
#region 应急演练开展情况季报表
|
||||
if (Type == "DrillConductedQuarterlyReport")//应急演练开展情况季报表
|
||||
{
|
||||
if (this.cbNext.Checked) //提交下一步办理人
|
||||
var report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportById(Id);
|
||||
if (report != null)
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.DrillConductedQuarterlyReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.DrillConductedQuarterlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = this.txtOpinion.Text
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.DrillConductedQuarterlyReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加 下一步办理信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.DrillConductedQuarterlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_3;
|
||||
SetFlowData(Const.DrillConductedQuarterlyReportMenuId, this.Id, handleMan);
|
||||
report.HandleState = handleStates;
|
||||
report.HandleMan = handleMan;
|
||||
BLL.DrillConductedQuarterlyReportService.UpdateDrillConductedQuarterlyReport(report);
|
||||
}
|
||||
else //完成返回上报人
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.DrillConductedQuarterlyReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.DrillConductedQuarterlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.DrillConductedQuarterlyReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加完成返回上报人信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.DrillConductedQuarterlyReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan2,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_4;
|
||||
report.HandleMan = handleMan2;
|
||||
BLL.DrillConductedQuarterlyReportService.UpdateDrillConductedQuarterlyReport(report);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 应急演练工作计划半年报
|
||||
if (Type == "DrillPlanHalfYearReport")//应急演练工作计划半年报
|
||||
{
|
||||
Model.Information_DrillPlanHalfYearReport report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportById(this.Id);
|
||||
if (report != null)
|
||||
#region 应急演练工作计划半年报
|
||||
if (Type == "DrillPlanHalfYearReport")//应急演练工作计划半年报
|
||||
{
|
||||
if (this.cbNext.Checked) //提交下一步办理人
|
||||
var report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportById(this.Id);
|
||||
if (report != null)
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.DrillPlanHalfYearReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.DrillPlanHalfYearReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = this.txtOpinion.Text
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.DrillPlanHalfYearReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加 下一步办理信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.DrillPlanHalfYearReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_3;
|
||||
SetFlowData(Const.DrillPlanHalfYearReportMenuId, this.Id, handleMan);
|
||||
report.HandleState = handleStates;
|
||||
report.HandleMan = handleMan;
|
||||
BLL.DrillPlanHalfYearReportService.UpdateDrillPlanHalfYearReport(report);
|
||||
}
|
||||
else //完成返回上报人
|
||||
{
|
||||
if (!BLL.ProjectDataFlowSetService.IsExitOperate(BLL.Const.DrillPlanHalfYearReportMenuId, this.Id)) //首次生成审批记录
|
||||
{
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.DrillPlanHalfYearReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.DrillPlanHalfYearReportMenuId, this.Id);
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
////增加完成返回上报人信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = BLL.Const.DrillPlanHalfYearReportMenuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan2,
|
||||
IsClosed = false,
|
||||
State = BLL.Const.State_2,
|
||||
Opinion = ""
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
report.HandleState = BLL.Const.HandleState_4;
|
||||
report.HandleMan = handleMan2;
|
||||
BLL.DrillPlanHalfYearReportService.UpdateDrillPlanHalfYearReport(report);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 勾选下一步
|
||||
protected void cbNext_CheckedChanged(object sender, CheckedEventArgs e)
|
||||
{
|
||||
if (this.cbNext.Checked)
|
||||
{
|
||||
this.drpHandleMan.Enabled = true;
|
||||
this.cbEnd.Checked = false;
|
||||
this.drpHandleMan2.Enabled = false;
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpHandleMan.Enabled = false;
|
||||
Alert.ShowInParent("请选择办理人!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 勾选返回上报人
|
||||
protected void cbEnd_CheckedChanged(object sender, CheckedEventArgs e)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="MenuId"></param>
|
||||
/// <param name="dataId"></param>
|
||||
private void SetFlowData(string menuId, string dataId,string handleMan)
|
||||
{
|
||||
if (this.cbEnd.Checked)
|
||||
var getIsExitOperate = Funs.DB.ProjectData_FlowOperate.FirstOrDefault(x => x.DataId == this.Id);
|
||||
if (getIsExitOperate == null) //首次生成审批记录
|
||||
{
|
||||
this.drpHandleMan2.Enabled = true;
|
||||
this.cbNext.Checked = false;
|
||||
this.drpHandleMan.Enabled = false;
|
||||
|
||||
Model.ProjectData_FlowOperate flowOperate = BLL.ProjectDataFlowSetService.getCompileFlowOperate(this.Id);
|
||||
if (flowOperate != null)
|
||||
////编制人添加记录信息
|
||||
Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
this.drpHandleMan2.Value = flowOperate.OperaterId;
|
||||
MenuId = menuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = this.CurrUser.UserId,
|
||||
OperaterTime = DateTime.Now,
|
||||
IsClosed = true,
|
||||
State = BLL.Const.State_1,
|
||||
Opinion = this.txtOpinion.Text
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow);
|
||||
}
|
||||
////更新 当前人要处理的意见
|
||||
var updateUnFlowOperate = Funs.DB.ProjectData_FlowOperate.FirstOrDefault(x => x.MenuId == menuId && x.DataId == dataId && (x.IsClosed == false || !x.IsClosed.HasValue));
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
updateUnFlowOperate.OperaterTime = DateTime.Now;
|
||||
updateUnFlowOperate.Opinion = this.txtOpinion.Text;
|
||||
updateUnFlowOperate.IsClosed = true;
|
||||
BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
}
|
||||
|
||||
string states = (this.cbNext.SelectedValue == "0") ? BLL.Const.State_2: BLL.Const.State_1;
|
||||
////增加 下一步办理信息
|
||||
Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate
|
||||
{
|
||||
MenuId = menuId,
|
||||
DataId = this.Id,
|
||||
OperaterId = handleMan,
|
||||
IsClosed = false,
|
||||
State = states,
|
||||
};
|
||||
BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void cbNext_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.cbNext.SelectedValue == "0")
|
||||
{
|
||||
this.drpHandleMan.Label = "上报人";
|
||||
var getFData = Funs.DB.ProjectData_FlowOperate.FirstOrDefault(x => x.DataId == Id && x.SortIndex == 1);
|
||||
if (getFData != null)
|
||||
{
|
||||
this.drpHandleMan.Value = getFData.OperaterId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpHandleMan2.Enabled = false;
|
||||
this.drpHandleMan.Label = "办理人";
|
||||
this.drpHandleMan.Value = string.Empty;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+10
-46
@@ -12,6 +12,15 @@ namespace FineUIPro.Web.ZHGL.Information {
|
||||
|
||||
public partial class ReportSubmit {
|
||||
|
||||
/// <summary>
|
||||
/// Head1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -46,7 +55,7 @@ namespace FineUIPro.Web.ZHGL.Information {
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox cbNext;
|
||||
protected global::FineUIPro.RadioButtonList cbNext;
|
||||
|
||||
/// <summary>
|
||||
/// drpHandleMan 控件。
|
||||
@@ -84,51 +93,6 @@ namespace FineUIPro.Web.ZHGL.Information {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUserName;
|
||||
|
||||
/// <summary>
|
||||
/// cbEnd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox cbEnd;
|
||||
|
||||
/// <summary>
|
||||
/// drpHandleMan2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox drpHandleMan2;
|
||||
|
||||
/// <summary>
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// TextBox1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox TextBox1;
|
||||
|
||||
/// <summary>
|
||||
/// txtOpinion 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -410,10 +410,9 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="250px"
|
||||
Width="500px">
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="520px" Width="800px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -918,7 +918,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Information_SafetyQuarterlyReport oldReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(this.SafetyQuarterlyReportId);
|
||||
var oldReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(this.SafetyQuarterlyReportId);
|
||||
if (oldReport != null)
|
||||
{
|
||||
safetyQuarterlyReport.HandleMan = oldReport.HandleMan;
|
||||
@@ -931,7 +931,25 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
}
|
||||
if (type == "updata") //保存并上报
|
||||
{
|
||||
Update(safetyQuarterlyReport.SafetyQuarterlyReportId);
|
||||
if (safetyQuarterlyReport.UpState == BLL.Const.UpState_2)
|
||||
{
|
||||
string code = CNCECHSSEWebService.UpSafetyQuarterlyReport(safetyQuarterlyReport.SafetyQuarterlyReportId, this.CurrUser);
|
||||
if (code == "1")
|
||||
{
|
||||
ShowNotify("同步成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == "submit")
|
||||
{
|
||||
@@ -968,150 +986,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
Save("submit");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 上传到集团公司
|
||||
private void Update(string safetyQuarterlyReportId)
|
||||
{
|
||||
/////创建客户端服务
|
||||
//var poxy = Web.ServiceProxy.CreateServiceClient();
|
||||
//poxy.DataInsertInformation_SafetyQuarterlyReportTableCompleted += new EventHandler<HSSEService.DataInsertInformation_SafetyQuarterlyReportTableCompletedEventArgs>(poxy_DataInsertInformation_SafetyQuarterlyReportTableCompleted);
|
||||
//var report = from x in Funs.DB.Information_SafetyQuarterlyReport
|
||||
// where x.SafetyQuarterlyReportId == safetyQuarterlyReportId && x.UpState == BLL.Const.UpState_2
|
||||
// select new HSSEService.Information_SafetyQuarterlyReport
|
||||
// {
|
||||
// SafetyQuarterlyReportId = x.SafetyQuarterlyReportId,
|
||||
// UnitId = x.UnitId,
|
||||
// YearId = x.YearId,
|
||||
// Quarters = x.Quarters,
|
||||
// TotalInWorkHours = x.TotalInWorkHours,
|
||||
// TotalInWorkHoursRemark = x.TotalInWorkHoursRemark,
|
||||
// TotalOutWorkHours = x.TotalOutWorkHours,
|
||||
// TotalOutWorkHoursRemark = x.TotalOutWorkHoursRemark,
|
||||
// WorkHoursLossRate = x.WorkHoursLossRate,
|
||||
// WorkHoursLossRateRemark = x.WorkHoursLossRateRemark,
|
||||
// WorkHoursAccuracy = x.WorkHoursAccuracy,
|
||||
// WorkHoursAccuracyRemark = x.WorkHoursAccuracyRemark,
|
||||
// MainBusinessIncome = x.MainBusinessIncome,
|
||||
// MainBusinessIncomeRemark = x.MainBusinessIncomeRemark,
|
||||
// ConstructionRevenue = x.ConstructionRevenue,
|
||||
// ConstructionRevenueRemark = x.ConstructionRevenueRemark,
|
||||
// UnitTimeIncome = x.UnitTimeIncome,
|
||||
// UnitTimeIncomeRemark = x.UnitTimeIncomeRemark,
|
||||
// BillionsOutputMortality = x.BillionsOutputMortality,
|
||||
// BillionsOutputMortalityRemark = x.BillionsOutputMortalityRemark,
|
||||
// MajorFireAccident = x.MajorFireAccident,
|
||||
// MajorFireAccidentRemark = x.MajorFireAccidentRemark,
|
||||
// MajorEquipAccident = x.MajorEquipAccident,
|
||||
// MajorEquipAccidentRemark = x.MajorEquipAccidentRemark,
|
||||
// AccidentFrequency = x.AccidentFrequency,
|
||||
// AccidentFrequencyRemark = x.AccidentFrequencyRemark,
|
||||
// SeriousInjuryAccident = x.SeriousInjuryAccident,
|
||||
// SeriousInjuryAccidentRemark = x.SeriousInjuryAccidentRemark,
|
||||
// FireAccident = x.FireAccident,
|
||||
// FireAccidentRemark = x.FireAccidentRemark,
|
||||
// EquipmentAccident = x.EquipmentAccident,
|
||||
// EquipmentAccidentRemark = x.EquipmentAccidentRemark,
|
||||
// PoisoningAndInjuries = x.PoisoningAndInjuries,
|
||||
// PoisoningAndInjuriesRemark = x.PoisoningAndInjuriesRemark,
|
||||
// ProductionSafetyInTotal = x.ProductionSafetyInTotal,
|
||||
// ProductionSafetyInTotalRemark = x.ProductionSafetyInTotalRemark,
|
||||
// ProtectionInput = x.ProtectionInput,
|
||||
// ProtectionInputRemark = x.ProtectionInputRemark,
|
||||
// LaboAndHealthIn = x.LaboAndHealthIn,
|
||||
// LaborAndHealthInRemark = x.LaborAndHealthInRemark,
|
||||
// TechnologyProgressIn = x.TechnologyProgressIn,
|
||||
// TechnologyProgressInRemark = x.TechnologyProgressInRemark,
|
||||
// EducationTrainIn = x.EducationTrainIn,
|
||||
// EducationTrainInRemark = x.EducationTrainInRemark,
|
||||
// ProjectCostRate = x.ProjectCostRate,
|
||||
// ProjectCostRateRemark = x.ProjectCostRateRemark,
|
||||
// ProductionInput = x.ProductionInput,
|
||||
// ProductionInputRemark = x.ProductionInputRemark,
|
||||
// Revenue = x.Revenue,
|
||||
// RevenueRemark = x.RevenueRemark,
|
||||
// FullTimeMan = x.FullTimeMan,
|
||||
// FullTimeManRemark = x.FullTimeManRemark,
|
||||
// FullTimeManAttachUrl = x.FullTimeManAttachUrl,
|
||||
// PMMan = x.PMMan,
|
||||
// PMManRemark = x.PMManRemark,
|
||||
// PMManAttachUrl = x.PMManAttachUrl,
|
||||
// CorporateDirectorEdu = x.CorporateDirectorEdu,
|
||||
// CorporateDirectorEduRemark = x.CorporateDirectorEduRemark,
|
||||
// ProjectLeaderEdu = x.ProjectLeaderEdu,
|
||||
// ProjectLeaderEduRemark = x.ProjectLeaderEduRemark,
|
||||
// FullTimeEdu = x.FullTimeEdu,
|
||||
// FullTimeEduRemark = x.FullTimeEduRemark,
|
||||
// ThreeKidsEduRate = x.ThreeKidsEduRate,
|
||||
// ThreeKidsEduRateRemark = x.ThreeKidsEduRateRemark,
|
||||
// UplinReportRate = x.UplinReportRate,
|
||||
// UplinReportRateRemark = x.UplinReportRateRemark,
|
||||
// Remarks = x.Remarks,
|
||||
// CompileMan = x.CompileMan,
|
||||
// ////附件转为字节传送
|
||||
// FullTimeManAttachUrlFileContext = FileStructService.GetFileStructByAttachUrl(x.FullTimeManAttachUrl),
|
||||
// PMManAttachUrlFileContext = FileStructService.GetFileStructByAttachUrl(x.PMManAttachUrl),
|
||||
// KeyEquipmentTotal = x.KeyEquipmentTotal,
|
||||
// KeyEquipmentTotalRemark = x.KeyEquipmentTotalRemark,
|
||||
// KeyEquipmentReportCount = x.KeyEquipmentReportCount,
|
||||
// KeyEquipmentReportCountRemark = x.KeyEquipmentReportCountRemark,
|
||||
// ChemicalAreaProjectCount = x.ChemicalAreaProjectCount,
|
||||
// ChemicalAreaProjectCountRemark = x.ChemicalAreaProjectCountRemark,
|
||||
// HarmfulMediumCoverCount = x.HarmfulMediumCoverCount,
|
||||
// HarmfulMediumCoverCountRemark = x.HarmfulMediumCoverCountRemark,
|
||||
// HarmfulMediumCoverRate = x.HarmfulMediumCoverRate,
|
||||
// HarmfulMediumCoverRateRemark = x.HarmfulMediumCoverRateRemark
|
||||
// };
|
||||
|
||||
|
||||
//poxy.DataInsertInformation_SafetyQuarterlyReportTableAsync(report.ToList());
|
||||
}
|
||||
|
||||
#region 安全生产数据季报
|
||||
/// <summary>
|
||||
/// 安全生产数据季报
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
//private void poxy_DataInsertInformation_SafetyQuarterlyReportTableCompleted(object sender, HSSEService.DataInsertInformation_SafetyQuarterlyReportTableCompletedEventArgs e)
|
||||
//{
|
||||
// if (e.Error == null)
|
||||
// {
|
||||
// var idList = e.Result;
|
||||
// foreach (var item in idList)
|
||||
// {
|
||||
// var report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(item);
|
||||
// if (report != null)
|
||||
// {
|
||||
// report.UpState = BLL.Const.UpState_3;
|
||||
// BLL.SafetyQuarterlyReportService.UpdateSafetyQuarterlyReport(report);
|
||||
// ////更新 当前人要处理的意见
|
||||
// Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.SafetyQuarterlyReportMenuId, item);
|
||||
// if (updateUnFlowOperate != null)
|
||||
// {
|
||||
// updateUnFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
// updateUnFlowOperate.IsClosed = true;
|
||||
// BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
|
||||
// }
|
||||
// ////更新催报信息
|
||||
// var urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == report.UnitId && x.ReprotType == BLL.Const.ReportType_3 && x.YearId == report.YearId.ToString() && x.QuarterId == report.Quarters.ToString());
|
||||
// if (urgeReport != null)
|
||||
// {
|
||||
// urgeReport.IsComplete = true;
|
||||
// Funs.DB.SubmitChanges();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【安全生产数据季报】上传到服务器" + idList.Count.ToString() + "条数据;", null, BLL.Const.SafetyQuarterlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BLL.LogService.AddSys_Log(this.CurrUser, "【安全生产数据季报】上传到服务器失败;", null, BLL.Const.SafetyQuarterlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region 上传附件
|
||||
/// <summary>
|
||||
/// 上传安全专职人员名单附件
|
||||
|
||||
Reference in New Issue
Block a user