督查台账上报

This commit is contained in:
2026-01-13 17:49:28 +08:00
parent e8f73350eb
commit dfe154dd56
16 changed files with 5599 additions and 5 deletions
+74 -4
View File
@@ -3,19 +3,19 @@
using Apache.NMS.ActiveMQ.Commands;
using BLL.CNCECHSSEService;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NPOI.POIFS.Crypt.Dsig;
using RestSharp;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Net;
//using System.Net.Http.Headers;
//using System.Net.Http;
using System.Web;
using RestSharp;
using System.Net;
using System.Collections;
using Newtonsoft.Json.Linq;
public static class CNCECHSSEWebService
{
@@ -81,6 +81,76 @@
}
#region
#region
/// <summary>
/// 督查大队:重点工程项目质量专项整治行动开展情况台账上报
/// </summary>
/// <param name="Id"></param>
/// <param name="CurrUser"></param>
/// <returns></returns>
public static string UpKeyProjectRectificationSituationLedger(string Id, Model.Sys_User CurrUser)
{
string code = "0";
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
try
{
var upReport = from x in db.DCGL_Report_KeyProjectRectificationSituationLedger
where x.Id == Id
select x;
code = UpApiKeyProjectRectificationSituationLedger(upReport).ToString();
if (code == "1")
{
foreach (var item in upReport.Select(p => p.Id))
{
var report = db.DCGL_Report_KeyProjectRectificationSituationLedger.FirstOrDefault(e => e.Id == item);
if (report != null)
{
report.UpState = BLL.Const.UpState_3;
report.ReportDate = DateTime.Now;
db.SubmitChanges();
////更新 当前人要处理的意见
ProjectDataFlowSetService.CloseFlowOperate(Const.DCGLKeyProjectRectificationSituationLedgerMenuId, item, string.Empty);
// //更新催报信息
//UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString());
}
}
LogService.AddSys_Log(CurrUser, "【重点工程项目质量专项整治行动开展情况台账】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
}
else
{
LogService.AddSys_Log(CurrUser, "【重点工程项目质量专项整治行动开展情况台账】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
}
}
catch (Exception ex)
{
ErrLogInfo.WriteLog("【重点工程项目质量专项整治行动开展情况台账】上传到服务器", ex);
LogService.AddSys_Log(CurrUser, "【重点工程项目质量专项整治行动开展情况台账】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
}
return code;
}
}
/// <summary>
/// 重点工程项目质量专项整治行动开展情况台账
/// </summary>
/// <param name="upReport">主表</param>
/// <param name="upReportItem">明细表</param>
/// <returns></returns>
private static int UpApiKeyProjectRectificationSituationLedger(IQueryable<Model.DCGL_Report_KeyProjectRectificationSituationLedger> upReport)
{
string baseurl = "/api/InformationData/SaveKeyProjectRectificationSituationLedger";
var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault());
resultJsonReport = "{\"InformationDataItems\":[" + (resultJsonReport).Replace("}{", ",") + "]}";
var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl);
return responeData.code;
}
#endregion
#region
/// <summary>
/// 百万工时上报