1
This commit is contained in:
@@ -2050,6 +2050,76 @@
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 督查大队:重点工程项目质量专项整治行动开展情况台账上报
|
||||
|
||||
/// <summary>
|
||||
/// 督查大队:重点工程项目质量专项整治行动开展情况台账上报
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <param name="CurrUser"></param>
|
||||
/// <returns></returns>
|
||||
public static string UpKeyProjectRectificationSituationLedger(string Id, Model.Person_Persons 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
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user