修改五张报表上报接口
This commit is contained in:
parent
3f114efa2f
commit
67c7ce6b0e
|
@ -2,7 +2,9 @@
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using BLL.CNCECHSSEService;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
public static class CNCECHSSEWebService
|
public static class CNCECHSSEWebService
|
||||||
|
@ -76,22 +78,31 @@
|
||||||
LossDayNum = x.LossDayNum,
|
LossDayNum = x.LossDayNum,
|
||||||
};
|
};
|
||||||
|
|
||||||
var getR = hsseC.DataInsertInformation_MillionsMonthlyReportTable(upReport.ToList(), upReportItem.ToList());
|
//老接口Serveice
|
||||||
foreach (var item in getR)
|
//var getR = hsseC.DataInsertInformation_MillionsMonthlyReportTable(upReport.ToList(), upReportItem.ToList());
|
||||||
|
//新接口Api
|
||||||
|
code = UpApiMillionsMonthlyReport(upReport, upReportItem).ToString();
|
||||||
|
if (code == "1")
|
||||||
{
|
{
|
||||||
var report = db.Information_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == item);
|
foreach (var item in upReport.Select(p => p.MillionsMonthlyReportId))
|
||||||
if (report != null)
|
|
||||||
{
|
{
|
||||||
report.UpState = BLL.Const.UpState_3;
|
var report = db.Information_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == item);
|
||||||
db.SubmitChanges();
|
if (report != null)
|
||||||
////更新 当前人要处理的意见
|
{
|
||||||
ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty);
|
report.UpState = BLL.Const.UpState_3;
|
||||||
// //更新催报信息
|
db.SubmitChanges();
|
||||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Month.ToString());
|
////更新 当前人要处理的意见
|
||||||
|
ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty);
|
||||||
|
// //更新催报信息
|
||||||
|
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Month.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);
|
||||||
}
|
}
|
||||||
code = "1";
|
|
||||||
LogService.AddSys_Log(CurrUser, "【百万工时安全统计月报表】上传到服务器" + getR.Count.ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -101,6 +112,23 @@
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// UpApiMillionsMonthlyReportApi调用
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="upReport">主表</param>
|
||||||
|
/// <param name="upReportItem">明细表</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static int UpApiMillionsMonthlyReport(IQueryable<Information_MillionsMonthlyReport> upReport, IQueryable<Information_MillionsMonthlyReportItem> upReportItem)
|
||||||
|
{
|
||||||
|
string baseurl = "/api/InformationData/SaveMillionsMonthlyReport";
|
||||||
|
//合并
|
||||||
|
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||||
|
var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||||
|
var resultJsonReportItem = JsonConvert.SerializeObject(new { MillionsMonthlyReportItem = upReportItem });
|
||||||
|
resultJsonReport = "{\"InformationDataItems\":[" + (resultJsonReport + resultJsonReportItem).Replace("}{", ",") + "]}";
|
||||||
|
var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl);
|
||||||
|
return responeData.code;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 职工伤亡事故原因分析报表上报
|
#region 职工伤亡事故原因分析报表上报
|
||||||
|
@ -189,23 +217,32 @@
|
||||||
Injuries11 = x.Injuries11,
|
Injuries11 = x.Injuries11,
|
||||||
MinorInjuries11 = x.MinorInjuries11,
|
MinorInjuries11 = x.MinorInjuries11,
|
||||||
};
|
};
|
||||||
|
//老接口Serveice
|
||||||
var getR = hsseC.DataInsertInformation_AccidentCauseReportTable(upReport.ToList(), upReportItem.ToList());
|
// var getR = hsseC.DataInsertInformation_AccidentCauseReportTable(upReport.ToList(), upReportItem.ToList());
|
||||||
foreach (var item in getR)
|
//新接口Api
|
||||||
|
code = UpApiAccidentCauseReport(upReport, upReportItem).ToString();
|
||||||
|
if (code == "1")
|
||||||
{
|
{
|
||||||
var report = db.Information_AccidentCauseReport.FirstOrDefault(e => e.AccidentCauseReportId == item);
|
foreach (var item in upReport.Select(p => p.AccidentCauseReportId))
|
||||||
if (report != null)
|
|
||||||
{
|
{
|
||||||
report.UpState = BLL.Const.UpState_3;
|
var report = db.Information_AccidentCauseReport.FirstOrDefault(e => e.AccidentCauseReportId == item);
|
||||||
db.SubmitChanges();
|
if (report != null)
|
||||||
////更新 当前人要处理的意见
|
{
|
||||||
ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty);
|
report.UpState = BLL.Const.UpState_3;
|
||||||
////更新催报信息
|
db.SubmitChanges();
|
||||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_2, report.Year.ToString(), report.Month.ToString());
|
////更新 当前人要处理的意见
|
||||||
|
ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty);
|
||||||
|
////更新催报信息
|
||||||
|
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_2, report.Year.ToString(), report.Month.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);
|
||||||
}
|
}
|
||||||
code = "1";
|
|
||||||
LogService.AddSys_Log(CurrUser, "【职工伤亡事故原因分析报表】上传到服务器" + getR.Count.ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -216,12 +253,27 @@
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// AccidentCauseReportApi调用
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="upReport">主表</param>
|
||||||
|
/// <param name="upReportItem">明细表</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static int UpApiAccidentCauseReport(IQueryable<Information_AccidentCauseReport> upReport, IQueryable<Information_AccidentCauseReportItem> upReportItem)
|
||||||
|
{
|
||||||
|
string baseurl = "/api/InformationData/SaveAccidentCauseReport";
|
||||||
|
//合并
|
||||||
|
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||||
|
var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||||
|
var resultJson1 = JsonConvert.SerializeObject(new { AccidentCauseReportItem = upReportItem });
|
||||||
|
resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}";
|
||||||
|
var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl);
|
||||||
|
|
||||||
|
return responeData.code;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 安全生产数据季报上报
|
#region 安全生产数据季报上报
|
||||||
/// <summary>
|
|
||||||
/// 安全生产数据季报上报
|
|
||||||
/// </summary>
|
|
||||||
public static string UpSafetyQuarterlyReport(string safetyQuarterlyReportId, Model.Sys_User CurrUser)
|
public static string UpSafetyQuarterlyReport(string safetyQuarterlyReportId, Model.Sys_User CurrUser)
|
||||||
{
|
{
|
||||||
string code = "0";
|
string code = "0";
|
||||||
|
@ -248,6 +300,7 @@
|
||||||
WorkHoursAccuracyRemark = x.WorkHoursAccuracyRemark,
|
WorkHoursAccuracyRemark = x.WorkHoursAccuracyRemark,
|
||||||
MainBusinessIncome = x.MainBusinessIncome,
|
MainBusinessIncome = x.MainBusinessIncome,
|
||||||
MainBusinessIncomeRemark = x.MainBusinessIncomeRemark,
|
MainBusinessIncomeRemark = x.MainBusinessIncomeRemark,
|
||||||
|
FillingDate = x.FillingDate,
|
||||||
ConstructionRevenue = x.ConstructionRevenue,
|
ConstructionRevenue = x.ConstructionRevenue,
|
||||||
ConstructionRevenueRemark = x.ConstructionRevenueRemark,
|
ConstructionRevenueRemark = x.ConstructionRevenueRemark,
|
||||||
UnitTimeIncome = x.UnitTimeIncome,
|
UnitTimeIncome = x.UnitTimeIncome,
|
||||||
|
@ -316,33 +369,55 @@
|
||||||
HarmfulMediumCoverRate = x.HarmfulMediumCoverRate,
|
HarmfulMediumCoverRate = x.HarmfulMediumCoverRate,
|
||||||
HarmfulMediumCoverRateRemark = x.HarmfulMediumCoverRateRemark
|
HarmfulMediumCoverRateRemark = x.HarmfulMediumCoverRateRemark
|
||||||
};
|
};
|
||||||
|
//老接口Serveice
|
||||||
var getR = hsseC.DataInsertInformation_SafetyQuarterlyReportTable(upReport.ToList());
|
// var getR = hsseC.DataInsertInformation_SafetyQuarterlyReportTable(upReport.ToList());
|
||||||
foreach (var item in getR)
|
//新接口Api
|
||||||
|
code = UpApiSaveSafetyQuarterlyReport(upReport).ToString();
|
||||||
|
if (code == "1")
|
||||||
{
|
{
|
||||||
var report = db.Information_SafetyQuarterlyReport.FirstOrDefault(e => e.SafetyQuarterlyReportId == item);
|
foreach (var item in upReport.Select(p => p.SafetyQuarterlyReportId))
|
||||||
if (report != null)
|
|
||||||
{
|
{
|
||||||
report.UpState = BLL.Const.UpState_3;
|
var report = db.Information_SafetyQuarterlyReport.FirstOrDefault(e => e.SafetyQuarterlyReportId == item);
|
||||||
db.SubmitChanges();
|
if (report != null)
|
||||||
////更新 当前人要处理的意见
|
{
|
||||||
ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty);
|
report.UpState = BLL.Const.UpState_3;
|
||||||
////更新催报信息
|
db.SubmitChanges();
|
||||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_3, report.YearId.ToString(), report.Quarters.ToString());
|
////更新 当前人要处理的意见
|
||||||
}
|
ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty);
|
||||||
|
////更新催报信息
|
||||||
|
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_3, report.YearId.ToString(), report.Quarters.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);
|
||||||
}
|
}
|
||||||
code = "1";
|
|
||||||
LogService.AddSys_Log(CurrUser, "【安全生产数据季报上报】上传到服务器" + getR.Count.ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ErrLogInfo.WriteLog("【安全生产数据季报上报】上传到服务器", ex);
|
ErrLogInfo.WriteLog("【安全生产数据季报上报】上传到服务器", ex);
|
||||||
LogService.AddSys_Log(CurrUser, "【安全生产数据季报上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
LogService.AddSys_Log(CurrUser, "【安全生产数据季报上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||||
}
|
}
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// DrillConductedQuarterlyReportApi调用
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="upReport">主表</param>
|
||||||
|
/// <param name="upReportItem">明细表</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static int UpApiSaveSafetyQuarterlyReport(IQueryable<Information_SafetyQuarterlyReport> upReport)
|
||||||
|
{
|
||||||
|
string baseurl = "/api/InformationData/SaveSafetyQuarterlyReport";
|
||||||
|
var resultJson = JsonConvert.SerializeObject(new { InformationDataItems = upReport });
|
||||||
|
var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl);
|
||||||
|
|
||||||
|
return responeData.code;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 应急演练开展情况季报表上报
|
#region 应急演练开展情况季报表上报
|
||||||
|
@ -393,23 +468,31 @@
|
||||||
SDDesktop = x.SDDesktop,
|
SDDesktop = x.SDDesktop,
|
||||||
SortIndex = x.SortIndex,
|
SortIndex = x.SortIndex,
|
||||||
};
|
};
|
||||||
|
//老接口Serveice
|
||||||
var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList());
|
//var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList());
|
||||||
foreach (var item in getR)
|
//新接口Api
|
||||||
|
code = UpApiSaveDrillConductedQuarterlyReport(upReport, upReportItem).ToString();
|
||||||
|
if (code == "1")
|
||||||
{
|
{
|
||||||
var report = db.Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.DrillConductedQuarterlyReportId == item);
|
foreach (var item in upReport.Select(p => p.DrillConductedQuarterlyReportId))
|
||||||
if (report != null)
|
|
||||||
{
|
{
|
||||||
report.UpState = BLL.Const.UpState_3;
|
var report = db.Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.DrillConductedQuarterlyReportId == item);
|
||||||
db.SubmitChanges();
|
if (report != null)
|
||||||
////更新 当前人要处理的意见
|
{
|
||||||
ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty);
|
report.UpState = BLL.Const.UpState_3;
|
||||||
////更新催报信息
|
db.SubmitChanges();
|
||||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_4, report.YearId.ToString(), report.Quarter.ToString());
|
////更新 当前人要处理的意见
|
||||||
|
ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty);
|
||||||
|
////更新催报信息
|
||||||
|
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_4, report.YearId.ToString(), report.Quarter.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);
|
||||||
}
|
}
|
||||||
code = "1";
|
|
||||||
LogService.AddSys_Log(CurrUser, "【应急演练开展情况季报表上报】上传到服务器" + getR.Count.ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -420,6 +503,23 @@
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// DrillConductedQuarterlyReportApi调用
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="upReport">主表</param>
|
||||||
|
/// <param name="upReportItem">明细表</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static int UpApiSaveDrillConductedQuarterlyReport(IQueryable<Information_DrillConductedQuarterlyReport> upReport, IQueryable<Information_DrillConductedQuarterlyReportItem> upReportItem)
|
||||||
|
{
|
||||||
|
string baseurl = "/api/InformationData/SaveDrillConductedQuarterlyReport";
|
||||||
|
//合并
|
||||||
|
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||||
|
var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||||
|
var resultJson1 = JsonConvert.SerializeObject(new { drillConductedQuarterlyReportItem = upReportItem });
|
||||||
|
resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}";
|
||||||
|
var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl);
|
||||||
|
return responeData.code;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 应急演练工作计划半年报表
|
#region 应急演练工作计划半年报表
|
||||||
|
@ -460,23 +560,33 @@
|
||||||
ExerciseWay = x.ExerciseWay,
|
ExerciseWay = x.ExerciseWay,
|
||||||
SortIndex = x.SortIndex,
|
SortIndex = x.SortIndex,
|
||||||
};
|
};
|
||||||
|
//老接口Serveice
|
||||||
var getR = hsseC.DataInsertInformation_DrillPlanHalfYearReportTable(upReport.ToList(), upReportItem.ToList());
|
// var getR = hsseC.DataInsertInformation_DrillPlanHalfYearReportTable(upReport.ToList(), upReportItem.ToList());
|
||||||
foreach (var item in getR)
|
//新接口Api
|
||||||
|
code = UpApiDrillPlanHalfYearReport(upReport, upReportItem).ToString();
|
||||||
|
if (code == "1")
|
||||||
{
|
{
|
||||||
var report = db.Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.DrillPlanHalfYearReportId == item);
|
foreach (var item in upReport.Select(p => p.DrillPlanHalfYearReportId))
|
||||||
if (report != null)
|
|
||||||
{
|
{
|
||||||
report.UpState = BLL.Const.UpState_3;
|
var report = db.Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.DrillPlanHalfYearReportId == item);
|
||||||
db.SubmitChanges();
|
if (report != null)
|
||||||
////更新 当前人要处理的意见
|
{
|
||||||
ProjectDataFlowSetService.CloseFlowOperate(Const.DrillPlanHalfYearReportMenuId, item, string.Empty);
|
report.UpState = BLL.Const.UpState_3;
|
||||||
////更新催报信息
|
db.SubmitChanges();
|
||||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_5, report.YearId.ToString(), report.HalfYearId.ToString());
|
////更新 当前人要处理的意见
|
||||||
|
ProjectDataFlowSetService.CloseFlowOperate(Const.DrillPlanHalfYearReportMenuId, item, string.Empty);
|
||||||
|
////更新催报信息
|
||||||
|
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_5, report.YearId.ToString(), report.HalfYearId.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogService.AddSys_Log(CurrUser, "【应急演练工作计划半年报表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnUploadResources);
|
||||||
}
|
}
|
||||||
code = "1";
|
else
|
||||||
LogService.AddSys_Log(CurrUser, "【应急演练工作计划半年报表】上传到服务器" + getR.Count.ToString() + "条数据;", null, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnUploadResources);
|
{
|
||||||
|
LogService.AddSys_Log(CurrUser, "【应急演练工作计划半年报表】上传到服务器失败;", null, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnUploadResources);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -486,6 +596,24 @@
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// DrillPlanHalfYearReportApi调用
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="upReport">主表</param>
|
||||||
|
/// <param name="upReportItem">明细表</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static int UpApiDrillPlanHalfYearReport(IQueryable<Information_DrillPlanHalfYearReport> upReport, IQueryable<Information_DrillPlanHalfYearReportItem> upReportItem)
|
||||||
|
{
|
||||||
|
string baseurl = "/api/InformationData/SaveDrillPlanHalfYearReport";
|
||||||
|
//合并
|
||||||
|
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||||
|
var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||||
|
var resultJson1 = JsonConvert.SerializeObject(new { drillPlanHalfYearReportItem = upReportItem });
|
||||||
|
resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}";
|
||||||
|
|
||||||
|
var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl);
|
||||||
|
return responeData.code;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 企业监督检查报告上报
|
#region 企业监督检查报告上报
|
||||||
|
|
Loading…
Reference in New Issue