20211202 与集团安全信息报表及检查对接接口实现
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user