20211202 与集团安全信息报表及检查对接接口实现
This commit is contained in:
@@ -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>
|
||||
/// 关闭办理流程窗口
|
||||
|
||||
Reference in New Issue
Block a user