20211202 与集团安全信息报表及检查对接接口实现

This commit is contained in:
2021-12-02 10:44:15 +08:00
parent 8932645f54
commit 39cd93e266
43 changed files with 3072 additions and 2026 deletions
@@ -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>
/// 复制上月报表数据