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
@@ -114,10 +114,19 @@ namespace FineUIPro.Web.ZHGL.ServerCheck
newCheckRectify.HandleState = BLL.Const.State_2; //待上报
BLL.CheckRectifyService.UpdateCheckRectify(newCheckRectify);
}
if (type == BLL.Const.BtnSaveUp)
{
this.SynchData();
string code = CNCECHSSEWebService.UpCheck_CheckRectify(newCheckRectify.CheckRectifyId, this.CurrUser);
if (code == "1")
{
ShowNotify("同步成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
return;
}
else
{
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
}
}
BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, string.Empty, BLL.Const.CheckRectifyMenuId, BLL.Const.BtnModify);
@@ -174,85 +183,5 @@ namespace FineUIPro.Web.ZHGL.ServerCheck
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#endregion
#region
/// <summary>
/// 同步方法
/// </summary>
private void SynchData()
{
//string unitId = string.Empty;
//var unit = BLL.CommonService.GetIsThisUnit();
//if (unit != null)
//{
// unitId = unit.UnitId;
//}
///////创建客户端服务
//var poxy = Web.ServiceProxy.CreateServiceClient();
//poxy.DataInsertCheck_CheckRectifyTableCompleted += new EventHandler<HSSEService.DataInsertCheck_CheckRectifyTableCompletedEventArgs>(poxy_DataInsertCheck_CheckRectifyTableCompleted);
//var rectify = from x in Funs.DB.View_CheckRectifyListFromSUB
// where x.RealEndDate.HasValue && x.CheckRectifyId == this.CheckRectifyId
// select new HSSEService.Check_CheckRectify
// {
// CheckRectifyId = x.CheckRectifyId,
// CheckRectifyCode = x.CheckRectifyCode,
// ProjectId = x.ProjectId,
// UnitId = x.UnitId,
// CheckDate = x.CheckDate,
// IssueMan = x.IssueMan,
// IssueDate = x.IssueDate,
// HandleState = x.HandleState,
// CheckRectifyItemId = x.CheckRectifyItemId,
// ConfirmMan = x.ConfirmMan,
// ConfirmDate = x.ConfirmDate,
// OrderEndDate = x.OrderEndDate,
// OrderEndPerson = x.OrderEndPerson,
// RealEndDate = x.RealEndDate,
// Verification = x.Verification,
// AttachFileId = x.AttachFileId2,
// ToKeyId = x.ToKeyId2,
// AttachSource = x.AttachSource2,
// AttachUrl = x.AttachUrl2,
// ////附件转为字节传送
// FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2),
// };
//poxy.DataInsertCheck_CheckRectifyTableAsync(rectify.ToList());
}
/// <summary>
/// 安全监督检查整改
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
//private void poxy_DataInsertCheck_CheckRectifyTableCompleted(object sender, HSSEService.DataInsertCheck_CheckRectifyTableCompletedEventArgs e)
//{
// if (e.Error == null)
// {
// var idList = e.Result;
// foreach (var item in idList)
// {
// var newCheckRectify = BLL.CheckRectifyService.GetCheckRectifyByCheckRectifyId(item);
// if (newCheckRectify != null)
// {
// var itme = Funs.DB.Check_CheckRectifyItem.FirstOrDefault(x => x.CheckRectifyId == item && !x.RealEndDate.HasValue);
// if (itme == null)
// {
// newCheckRectify.HandleState = BLL.Const.State_3; //已完成
// BLL.CheckRectifyService.UpdateCheckRectify(newCheckRectify);
// }
// }
// }
// BLL.LogService.AddSys_Log(this.CurrUser, "【集团检查整改】上传到服务器" + idList.Count.ToString() + "条数据;", string.Empty, BLL.Const.CheckRectifyMenuId, BLL.Const.BtnUploadResources);
// }
// else
// {
// BLL.LogService.AddSys_Log(this.CurrUser, "【集团检查整改】上传到服务器失败;", string.Empty, BLL.Const.CheckRectifyMenuId, BLL.Const.BtnUploadResources);
// }
//}
#endregion
}
}