提交代码
This commit is contained in:
@@ -889,183 +889,6 @@
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 中央企业环保产业企业基本情况和经营情况汇总表
|
||||
|
||||
public static string UpOperationReport(string businessReportId, Model.Person_Persons CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
var upReport = from x in db.Environmental_OperationReport
|
||||
where x.BusinessReportId == businessReportId
|
||||
select new Model.OperationReportDto
|
||||
{
|
||||
BusinessReportId = x.BusinessReportId,
|
||||
UnitId = x.UnitId,
|
||||
Year = x.Year,
|
||||
Quarters = x.Quarters,
|
||||
Code = x.Code,
|
||||
UnitLevel = x.UnitLevel,
|
||||
CreateDate = x.CreateDate,
|
||||
Place = x.Place,
|
||||
PersonNum = x.PersonNum,
|
||||
TotalAssets = x.TotalAssets,
|
||||
TotalValue = x.TotalValue,
|
||||
NewInvestment = x.NewInvestment,
|
||||
FillingMan = x.FillingMan,
|
||||
FillingDate = x.FillingDate,
|
||||
StatisticsDutyPerson = x.StatisticsDutyPerson,
|
||||
UnitDutyPerson = x.UnitDutyPerson,
|
||||
Remark = x.Remark
|
||||
};
|
||||
|
||||
//新接口Api
|
||||
code = UpApiOperationReport(upReport).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
var report = db.Environmental_OperationReport.FirstOrDefault(e => e.BusinessReportId == businessReportId);
|
||||
if (report != null)
|
||||
{
|
||||
report.UpState = BLL.Const.UpState_3;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器失败;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器失败;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static int UpApiOperationReport(IQueryable<Model.OperationReportDto> upReport)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveOperationReport";
|
||||
var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 中央企业节能环保产业企业生产和服务业务情况报表上报
|
||||
/// <summary>
|
||||
/// 中央企业节能环保产业企业生产和服务业务情况报表上报
|
||||
/// </summary>
|
||||
public static string UpEnergyReport(string energyReportId, Model.Person_Persons CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var upReport = from x in db.Environmental_EnergyReport
|
||||
where x.EnergyReportId == energyReportId
|
||||
select new Model.EnergyReport
|
||||
{
|
||||
EnergyReportId = x.EnergyReportId,
|
||||
UnitId = x.UnitId,
|
||||
Year = x.Year,
|
||||
Quarters = x.Quarters,
|
||||
FillingMan = x.FillingMan,
|
||||
FillingDate = x.FillingDate,
|
||||
DutyPerson = x.DutyPerson,
|
||||
|
||||
};
|
||||
|
||||
var upReportItem = from x in db.Environmental_EnergyReportItem
|
||||
where x.EnergyReportId == energyReportId
|
||||
select new Model.EnergyReportItem
|
||||
{
|
||||
EnergyReportItemId = x.EnergyReportItemId,
|
||||
EnergyReportId = x.EnergyReportId,
|
||||
SortIndex = x.SortIndex,
|
||||
BusinessCategory = x.BusinessCategory,
|
||||
Throughput_BasePeriod = x.Throughput_BasePeriod,
|
||||
Throughput_LastPeriod = x.Throughput_LastPeriod,
|
||||
Throughput_ThisPeriod = x.Throughput_ThisPeriod,
|
||||
Throughput_UnitOfMeasurement = x.Throughput_UnitOfMeasurement,
|
||||
Yield_BasePeriod = x.Yield_BasePeriod,
|
||||
Yield_LastPeriod = x.Yield_LastPeriod,
|
||||
Yield_ThisPeriod = x.Yield_ThisPeriod,
|
||||
Yield_UnitOfMeasurement = x.Yield_UnitOfMeasurement,
|
||||
OutputValue_BasePeriod = x.OutputValue_BasePeriod,
|
||||
OutputValue_LastYear = x.OutputValue_LastYear,
|
||||
OutputValue_ThisYear = x.OutputValue_ThisYear,
|
||||
OperationScale_BasePeriod = x.OperationScale_BasePeriod,
|
||||
OperationScale_LastYear = x.OperationScale_LastYear,
|
||||
OperationScale_ThisYear = x.OperationScale_ThisYear,
|
||||
OperationScale_UnitOfMeasurement = x.OperationScale_UnitOfMeasurement,
|
||||
ServiceOperatingIncome_BasePeriod = x.ServiceOperatingIncome_BasePeriod,
|
||||
ServiceOperatingIncome_LastYear = x.ServiceOperatingIncome_LastYear,
|
||||
ServiceOperatingIncome_ThisYear = x.ServiceOperatingIncome_ThisYear,
|
||||
};
|
||||
|
||||
//老接口Serveice
|
||||
//var getR = hsseC.DataInsertInformation_ChemicalReportTable(upReport.ToList(), upReportItem.ToList());
|
||||
//新接口Api
|
||||
code = UpApiEnergyReport(upReport, upReportItem).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
foreach (var item in upReport.Select(p => p.EnergyReportId))
|
||||
{
|
||||
var report = db.Environmental_EnergyReport.FirstOrDefault(e => e.EnergyReportId == item);
|
||||
if (report != null)
|
||||
{
|
||||
report.UpState = BLL.Const.UpState_3;
|
||||
db.SubmitChanges();
|
||||
////更新 当前人要处理的意见
|
||||
//ProjectDataFlowSetService.CloseFlowOperate(Const.ChemicalReportMenuId, item, string.Empty);
|
||||
// //更新催报信息
|
||||
//UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Quarters.ToString());
|
||||
}
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器失败;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器失败;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// UpApiChemicalReportApi调用
|
||||
/// </summary>
|
||||
/// <param name="upReport">主表</param>
|
||||
/// <param name="upReportItem">明细表</param>
|
||||
/// <returns></returns>
|
||||
private static int UpApiEnergyReport(IQueryable<Model.EnergyReport> upReport, IQueryable<Model.EnergyReportItem> upReportItem)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveEnergyReport";
|
||||
//合并
|
||||
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||
var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var resultJsonReportItem = JsonConvert.SerializeObject(new { EnergyReportItem = upReportItem });
|
||||
resultJsonReport = "{\"InformationDataItems\":[" + (resultJsonReport + resultJsonReportItem).Replace("}{", ",") + "]}";
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 建筑行业能源节约与生态环境保护汇总表上报
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总表上报
|
||||
@@ -1158,8 +981,209 @@
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 中央企业环保产业企业基本情况和经营情况汇总表
|
||||
private static List<Model.reportItemListDto> getreportItemList(string BusinessReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_OperationReportItem.Where(x => x.BusinessReportId == BusinessReportId)
|
||||
.OrderBy(x => x.SortIndex).OrderBy(x => x.SortUnitName).Select(x => new Model.reportItemListDto()
|
||||
{
|
||||
BusinessReportItemId = x.BusinessReportItemId,
|
||||
BusinessReportId = x.BusinessReportId,
|
||||
SortIndex = x.SortIndex,
|
||||
Code = x.Code,
|
||||
UnitLevel = x.UnitLevel,
|
||||
CreateDate = x.CreateDate,
|
||||
Place = x.Place,
|
||||
PersonNum = x.PersonNum,
|
||||
TotalAssets = x.TotalAssets,
|
||||
TotalValue = x.TotalValue,
|
||||
NewInvestment = x.NewInvestment,
|
||||
UnitName = x.UnitName,
|
||||
SortUnitName = x.SortUnitName
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
|
||||
public static string UpOperationReport(string businessReportId, Model.Person_Persons CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
var upReport = from x in db.Environmental_OperationReport
|
||||
where x.BusinessReportId == businessReportId
|
||||
select new Model.Environmental_OperationReportDto
|
||||
{
|
||||
BusinessReportId = x.BusinessReportId,
|
||||
UnitId = x.UnitId,
|
||||
Year = x.Year,
|
||||
Quarters = x.Quarters,
|
||||
FillingMan = x.FillingMan,
|
||||
FillingDate = x.FillingDate,
|
||||
StatisticsDutyPerson = x.StatisticsDutyPerson,
|
||||
UnitDutyPerson = x.UnitDutyPerson,
|
||||
Remark = x.Remark,
|
||||
reportItemList = getreportItemList(x.BusinessReportId)
|
||||
};
|
||||
|
||||
//新接口Api
|
||||
code = UpApiOperationReportNew(upReport).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
var report = db.Environmental_OperationReport.FirstOrDefault(e => e.BusinessReportId == businessReportId);
|
||||
if (report != null)
|
||||
{
|
||||
report.UpState = BLL.Const.UpState_3;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器失败;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器失败;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region 上报中央企业环保产业企业基本情况和经营情况季表
|
||||
private static int UpApiOperationReport(IQueryable<Model.OperationReportDto> upReport)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveOperationReport";
|
||||
var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
|
||||
private static int UpApiOperationReportNew(IQueryable<Model.Environmental_OperationReportDto> upReport)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveOperationReportNew";
|
||||
var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region 中央企业节能环保产业企业生产和服务业务情况报表上报
|
||||
/// <summary>
|
||||
/// 中央企业节能环保产业企业生产和服务业务情况报表上报
|
||||
/// </summary>
|
||||
public static string UpEnergyReport(string energyReportId, Model.Person_Persons CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var upReport = from x in db.Environmental_EnergyReport
|
||||
where x.EnergyReportId == energyReportId
|
||||
select new Model.EnergyReport
|
||||
{
|
||||
EnergyReportId = x.EnergyReportId,
|
||||
UnitId = x.UnitId,
|
||||
Year = x.Year,
|
||||
Quarters = x.Quarters,
|
||||
FillingMan = x.FillingMan,
|
||||
FillingDate = x.FillingDate,
|
||||
DutyPerson = x.DutyPerson,
|
||||
|
||||
};
|
||||
|
||||
var upReportItem = from x in db.Environmental_EnergyReportItem
|
||||
where x.EnergyReportId == energyReportId
|
||||
select new Model.EnergyReportItem
|
||||
{
|
||||
EnergyReportItemId = x.EnergyReportItemId,
|
||||
EnergyReportId = x.EnergyReportId,
|
||||
SortIndex = x.SortIndex,
|
||||
BusinessCategory = x.BusinessCategory,
|
||||
Throughput_BasePeriod = x.Throughput_BasePeriod,
|
||||
Throughput_LastPeriod = x.Throughput_LastPeriod,
|
||||
Throughput_ThisPeriod = x.Throughput_ThisPeriod,
|
||||
Throughput_UnitOfMeasurement = x.Throughput_UnitOfMeasurement,
|
||||
Yield_BasePeriod = x.Yield_BasePeriod,
|
||||
Yield_LastPeriod = x.Yield_LastPeriod,
|
||||
Yield_ThisPeriod = x.Yield_ThisPeriod,
|
||||
Yield_UnitOfMeasurement = x.Yield_UnitOfMeasurement,
|
||||
OutputValue_BasePeriod = x.OutputValue_BasePeriod,
|
||||
OutputValue_LastYear = x.OutputValue_LastYear,
|
||||
OutputValue_ThisYear = x.OutputValue_ThisYear,
|
||||
OperationScale_BasePeriod = x.OperationScale_BasePeriod,
|
||||
OperationScale_LastYear = x.OperationScale_LastYear,
|
||||
OperationScale_ThisYear = x.OperationScale_ThisYear,
|
||||
OperationScale_UnitOfMeasurement = x.OperationScale_UnitOfMeasurement,
|
||||
ServiceOperatingIncome_BasePeriod = x.ServiceOperatingIncome_BasePeriod,
|
||||
ServiceOperatingIncome_LastYear = x.ServiceOperatingIncome_LastYear,
|
||||
ServiceOperatingIncome_ThisYear = x.ServiceOperatingIncome_ThisYear,
|
||||
SortUnit = x.SortUnit
|
||||
};
|
||||
|
||||
//老接口Serveice
|
||||
//var getR = hsseC.DataInsertInformation_ChemicalReportTable(upReport.ToList(), upReportItem.ToList());
|
||||
//新接口Api
|
||||
code = UpApiEnergyReport(upReport, upReportItem).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
foreach (var item in upReport.Select(p => p.EnergyReportId))
|
||||
{
|
||||
var report = db.Environmental_EnergyReport.FirstOrDefault(e => e.EnergyReportId == item);
|
||||
if (report != null)
|
||||
{
|
||||
report.UpState = BLL.Const.UpState_3;
|
||||
db.SubmitChanges();
|
||||
////更新 当前人要处理的意见
|
||||
//ProjectDataFlowSetService.CloseFlowOperate(Const.ChemicalReportMenuId, item, string.Empty);
|
||||
// //更新催报信息
|
||||
//UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Quarters.ToString());
|
||||
}
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器失败;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器失败;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// UpApiChemicalReportApi调用
|
||||
/// </summary>
|
||||
/// <param name="upReport">主表</param>
|
||||
/// <param name="upReportItem">明细表</param>
|
||||
/// <returns></returns>
|
||||
private static int UpApiEnergyReport(IQueryable<Model.EnergyReport> upReport, IQueryable<Model.EnergyReportItem> upReportItem)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveEnergyReport";
|
||||
//合并
|
||||
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||
var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var resultJsonReportItem = JsonConvert.SerializeObject(new { EnergyReportItem = upReportItem });
|
||||
resultJsonReport = "{\"InformationDataItems\":[" + (resultJsonReport + resultJsonReportItem).Replace("}{", ",") + "]}";
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 安全管理工作总结报告
|
||||
/// <summary>
|
||||
/// 安全管理工作总结报告
|
||||
|
||||
Reference in New Issue
Block a user