Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
commit
9cc1ef7faa
|
@ -0,0 +1,42 @@
|
||||||
|
alter table Environmental_OperationReport drop column Code
|
||||||
|
alter table Environmental_OperationReport drop column UnitLevel
|
||||||
|
alter table Environmental_OperationReport drop column CreateDate
|
||||||
|
alter table Environmental_OperationReport drop column Place
|
||||||
|
alter table Environmental_OperationReport drop column PersonNum
|
||||||
|
alter table Environmental_OperationReport drop column TotalAssets
|
||||||
|
alter table Environmental_OperationReport drop column TotalValue
|
||||||
|
alter table Environmental_OperationReport drop column NewInvestment
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE TABLE [dbo].[Environmental_OperationReportItem](
|
||||||
|
[BusinessReportItemId] [nvarchar](50) NOT NULL,
|
||||||
|
[BusinessReportId] [nvarchar](50) NULL,
|
||||||
|
[SortIndex] [int] NULL,
|
||||||
|
[Code] [nvarchar](50) NULL,
|
||||||
|
[UnitLevel] [nvarchar](50) NULL,
|
||||||
|
[CreateDate] [datetime] NULL,
|
||||||
|
[Place] [nvarchar](200) NULL,
|
||||||
|
[PersonNum] [int] NULL,
|
||||||
|
[TotalAssets] [decimal](18, 4) NULL,
|
||||||
|
[TotalValue] [decimal](18, 4) NULL,
|
||||||
|
[NewInvestment] [decimal](18, 4) NULL,
|
||||||
|
[UnitName] [nvarchar](200) NULL,
|
||||||
|
[SortUnitName] [nvarchar](200) NULL,
|
||||||
|
CONSTRAINT [PK_Environmental_OperationReportItem] PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[BusinessReportItemId] ASC
|
||||||
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[Environmental_OperationReportItem] WITH CHECK ADD CONSTRAINT [FK_Environmental_OperationReportItem_Environmental_OperationReport] FOREIGN KEY([BusinessReportId])
|
||||||
|
REFERENCES [dbo].[Environmental_OperationReport] ([BusinessReportId])
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[Environmental_OperationReportItem] CHECK CONSTRAINT [FK_Environmental_OperationReportItem_Environmental_OperationReport]
|
||||||
|
GO
|
||||||
|
|
||||||
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'中央企业节能环保产业企业基本情况和经营情况报表明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_OperationReportItem'
|
||||||
|
GO
|
||||||
|
|
||||||
|
update sys_menu set IsUsed=0 where menuid='EFA6E45F-1267-4804-BEE7-41E0C5461204';
|
|
@ -0,0 +1,7 @@
|
||||||
|
--增加为了单位排序
|
||||||
|
alter table Environmental_EnergyReportItem
|
||||||
|
add SortUnit int NULL
|
||||||
|
GO
|
||||||
|
|
||||||
|
update Environmental_EnergyReportItem set SortUnit=1 where EnergyReportId='template';
|
||||||
|
|
|
@ -893,6 +893,27 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 中央企业环保产业企业基本情况和经营情况汇总表
|
#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.Sys_User CurrUser)
|
public static string UpOperationReport(string businessReportId, Model.Sys_User CurrUser)
|
||||||
{
|
{
|
||||||
|
@ -903,29 +924,22 @@
|
||||||
{
|
{
|
||||||
var upReport = from x in db.Environmental_OperationReport
|
var upReport = from x in db.Environmental_OperationReport
|
||||||
where x.BusinessReportId == businessReportId
|
where x.BusinessReportId == businessReportId
|
||||||
select new Model.OperationReportDto
|
select new Model.Environmental_OperationReportDto
|
||||||
{
|
{
|
||||||
BusinessReportId = x.BusinessReportId,
|
BusinessReportId = x.BusinessReportId,
|
||||||
UnitId = x.UnitId,
|
UnitId = x.UnitId,
|
||||||
Year = x.Year,
|
Year = x.Year,
|
||||||
Quarters = x.Quarters,
|
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,
|
FillingMan = x.FillingMan,
|
||||||
FillingDate = x.FillingDate,
|
FillingDate = x.FillingDate,
|
||||||
StatisticsDutyPerson = x.StatisticsDutyPerson,
|
StatisticsDutyPerson = x.StatisticsDutyPerson,
|
||||||
UnitDutyPerson = x.UnitDutyPerson,
|
UnitDutyPerson = x.UnitDutyPerson,
|
||||||
Remark = x.Remark
|
Remark = x.Remark,
|
||||||
|
reportItemList = getreportItemList(x.BusinessReportId)
|
||||||
};
|
};
|
||||||
|
|
||||||
//新接口Api
|
//新接口Api
|
||||||
code = UpApiOperationReport(upReport).ToString();
|
code = UpApiOperationReportNew(upReport).ToString();
|
||||||
if (code == "1")
|
if (code == "1")
|
||||||
{
|
{
|
||||||
var report = db.Environmental_OperationReport.FirstOrDefault(e => e.BusinessReportId == businessReportId);
|
var report = db.Environmental_OperationReport.FirstOrDefault(e => e.BusinessReportId == businessReportId);
|
||||||
|
@ -951,6 +965,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 上报中央企业环保产业企业基本情况和经营情况季表
|
||||||
private static int UpApiOperationReport(IQueryable<Model.OperationReportDto> upReport)
|
private static int UpApiOperationReport(IQueryable<Model.OperationReportDto> upReport)
|
||||||
{
|
{
|
||||||
string baseurl = "/api/InformationData/SaveOperationReport";
|
string baseurl = "/api/InformationData/SaveOperationReport";
|
||||||
|
@ -959,6 +974,16 @@
|
||||||
return responeData.code;
|
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
|
#endregion
|
||||||
|
|
||||||
|
@ -973,7 +998,7 @@
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
|
||||||
var upReport = from x in db.Environmental_EnergyReport
|
var upReport = from x in db.Environmental_EnergyReport
|
||||||
where x.EnergyReportId == energyReportId
|
where x.EnergyReportId == energyReportId
|
||||||
select new Model.EnergyReport
|
select new Model.EnergyReport
|
||||||
|
@ -1014,6 +1039,7 @@
|
||||||
ServiceOperatingIncome_BasePeriod = x.ServiceOperatingIncome_BasePeriod,
|
ServiceOperatingIncome_BasePeriod = x.ServiceOperatingIncome_BasePeriod,
|
||||||
ServiceOperatingIncome_LastYear = x.ServiceOperatingIncome_LastYear,
|
ServiceOperatingIncome_LastYear = x.ServiceOperatingIncome_LastYear,
|
||||||
ServiceOperatingIncome_ThisYear = x.ServiceOperatingIncome_ThisYear,
|
ServiceOperatingIncome_ThisYear = x.ServiceOperatingIncome_ThisYear,
|
||||||
|
SortUnit = x.SortUnit
|
||||||
};
|
};
|
||||||
|
|
||||||
//老接口Serveice
|
//老接口Serveice
|
||||||
|
|
|
@ -43,8 +43,13 @@ namespace BLL
|
||||||
}
|
}
|
||||||
public static Model.ReturnData PushCNCEC(string JsonBody, string apiurl)
|
public static Model.ReturnData PushCNCEC(string JsonBody, string apiurl)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
Model.ReturnData responeData = new Model.ReturnData();
|
Model.ReturnData responeData = new Model.ReturnData();
|
||||||
string CNCECPath = SysConstSetService.CNCECPath;
|
string CNCECPath = SysConstSetService.CNCECPath;
|
||||||
|
//string CNCECPath = "http://localhost:7143";
|
||||||
if (string.IsNullOrEmpty(CNCECPath))
|
if (string.IsNullOrEmpty(CNCECPath))
|
||||||
{
|
{
|
||||||
responeData.code = 0;
|
responeData.code = 0;
|
||||||
|
@ -63,14 +68,15 @@ namespace BLL
|
||||||
IRestResponse response = client.Execute(request);
|
IRestResponse response = client.Execute(request);
|
||||||
APICommonService.SaveSysHttpLog("api_Out", baseurl, response.Content);
|
APICommonService.SaveSysHttpLog("api_Out", baseurl, response.Content);
|
||||||
var returnData = JsonConvert.DeserializeObject<Model.ResponeData>(response.Content.ToString());
|
var returnData = JsonConvert.DeserializeObject<Model.ResponeData>(response.Content.ToString());
|
||||||
if (returnData.code == 0)
|
responeData.code = returnData.code;
|
||||||
{
|
|
||||||
responeData.code = 0;
|
|
||||||
responeData.message = returnData.message;
|
responeData.message = returnData.message;
|
||||||
return responeData;
|
return responeData;
|
||||||
|
|
||||||
}
|
}
|
||||||
return responeData;
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static Model.TokenItem GetToken()
|
public static Model.TokenItem GetToken()
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,7 +99,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
return (from x in Funs.DB.Environmental_EnergyReportItem
|
return (from x in Funs.DB.Environmental_EnergyReportItem
|
||||||
where x.EnergyReportId == EnergyReportId
|
where x.EnergyReportId == EnergyReportId
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex,x.SortUnit
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,38 +141,39 @@ namespace BLL
|
||||||
{
|
{
|
||||||
var q = (from x in Funs.DB.Environmental_EnergyReportItem
|
var q = (from x in Funs.DB.Environmental_EnergyReportItem
|
||||||
where x.EnergyReportId == EnergyReportId
|
where x.EnergyReportId == EnergyReportId
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex,x.SortUnit
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
List<Model.Environmental_EnergyReportItem> newItems = new List<Model.Environmental_EnergyReportItem>();
|
//List<Model.Environmental_EnergyReportItem> newItems = new List<Model.Environmental_EnergyReportItem>();
|
||||||
foreach (var item in q)
|
//foreach (var item in q)
|
||||||
{
|
//{
|
||||||
Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem();
|
// Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem();
|
||||||
|
|
||||||
newItem.EnergyReportItemId = item.EnergyReportItemId;
|
// newItem.EnergyReportItemId = item.EnergyReportItemId;
|
||||||
newItem.EnergyReportId = item.EnergyReportId;
|
// newItem.EnergyReportId = item.EnergyReportId;
|
||||||
newItem.SortIndex = item.SortIndex;
|
// newItem.SortIndex = item.SortIndex;
|
||||||
newItem.BusinessCategory = item.BusinessCategory;
|
// newItem.BusinessCategory = item.BusinessCategory;
|
||||||
newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
// newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
||||||
newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
// newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
||||||
newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
// newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
||||||
newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
// newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
||||||
newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
// newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
||||||
newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
// newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
||||||
newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
// newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
||||||
newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
// newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
||||||
newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
// newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
||||||
newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
// newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
||||||
newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
// newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
||||||
newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
// newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
||||||
newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
// newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
||||||
newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
// newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
||||||
newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
// newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
||||||
newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
// newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
||||||
newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
// newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
||||||
newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
// newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
||||||
newItems.Add(newItem);
|
|
||||||
}
|
// newItems.Add(newItem);
|
||||||
return newItems;
|
//}
|
||||||
|
return q;
|
||||||
}
|
}
|
||||||
public static void AddEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable)
|
public static void AddEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1787,6 +1787,11 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 2 人力投入情况
|
#region 2 人力投入情况
|
||||||
|
public class spckDtp {
|
||||||
|
public string IdentityCard { get; set; }
|
||||||
|
public string UnitId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示月报告人员投入情况
|
/// 显示月报告人员投入情况
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1800,8 +1805,13 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||||
int totalSumPersonNum = 0;//总部
|
int totalSumPersonNum = 0;//总部
|
||||||
int totalSumOutPersonNum = 0;//外聘
|
int totalSumOutPersonNum = 0;//外聘
|
||||||
int totalHSEPersonNum = 0;
|
int totalHSEPersonNum = 0;
|
||||||
|
var unitlist = db.SitePerson_Person.Where(x => x.ProjectId == ProjectId);
|
||||||
var spckList = db.SitePerson_Checking.Where(x => x.IntoOutTime >= startTime
|
var spckList = db.SitePerson_Checking.Where(x => x.IntoOutTime >= startTime
|
||||||
&& x.IntoOutTime <= endTime && x.ProjectId == ProjectId && x.IntoOut == "1");
|
&& x.IntoOutTime <= endTime && x.ProjectId == ProjectId && x.IntoOut == "1").Select(x=>new spckDtp{
|
||||||
|
IdentityCard=x.IdentityCard,
|
||||||
|
UnitId= unitlist.FirstOrDefault(y=>y.IdentityCard==x.IdentityCard).UnitId
|
||||||
|
});
|
||||||
|
|
||||||
if (units.Count() > 0)
|
if (units.Count() > 0)
|
||||||
{
|
{
|
||||||
foreach (Model.Project_ProjectUnit u in units)
|
foreach (Model.Project_ProjectUnit u in units)
|
||||||
|
@ -1815,12 +1825,11 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||||
};
|
};
|
||||||
//本部本月人数,本年考勤人数除当前月份,取平均数
|
//本部本月人数,本年考勤人数除当前月份,取平均数
|
||||||
//年度
|
//年度
|
||||||
var yearList = spckList.Where(x => x.UnitId == u.UnitId).ToList().Select(x => new hseDayItem()
|
var yearList = spckList.Where(x => x.UnitId == u.UnitId).Select(x => new hseDayItem()
|
||||||
{
|
{
|
||||||
IdentityCard = x.IdentityCard,
|
IdentityCard = x.IdentityCard,
|
||||||
IntoOutTime = getShortTime(x.IntoOutTime)
|
//IntoOutTime = getShortTime(x.IntoOutTime)
|
||||||
}).GroupBy(x => new { x.IdentityCard})
|
}).GroupBy(x => new { x.IdentityCard});
|
||||||
.ToList();
|
|
||||||
|
|
||||||
personSort.SumPersonNum = yearList.Count();
|
personSort.SumPersonNum = yearList.Count();
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!--连接字符串-->
|
<!--连接字符串-->
|
||||||
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
||||||
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||||
<!--系统名称-->
|
<!--系统名称-->
|
||||||
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||||
|
|
|
@ -1093,11 +1093,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[0].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()), 2).ToString() + "%";
|
this.Grid1.Rows[0].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()), 2).ToString() + "%";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E20 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E20 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[14].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E20, 4);
|
this.Grid1.Rows[14].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E20, 4);
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F20 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F20 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[14].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F20, 4);
|
this.Grid1.Rows[14].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F20, 4);
|
||||||
}
|
}
|
||||||
|
@ -1105,11 +1105,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[14].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString()), 2).ToString() + "%";
|
this.Grid1.Rows[14].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString()), 2).ToString() + "%";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[16].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E22, 4);
|
this.Grid1.Rows[16].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E22, 4);
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[16].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F22, 4);
|
this.Grid1.Rows[16].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F22, 4);
|
||||||
}
|
}
|
||||||
|
@ -1117,11 +1117,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[16].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString()), 2).ToString() + "%";
|
this.Grid1.Rows[16].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString()), 2).ToString() + "%";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[18].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E24, 4);
|
this.Grid1.Rows[18].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E24, 4);
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F24 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F24 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[18].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F24, 4);
|
this.Grid1.Rows[18].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F24, 4);
|
||||||
}
|
}
|
||||||
|
@ -1129,11 +1129,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[18].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString()), 2).ToString() + "%";
|
this.Grid1.Rows[18].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString()), 2).ToString() + "%";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[20].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E26, 4);
|
this.Grid1.Rows[20].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E26, 4);
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[20].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F26, 4);
|
this.Grid1.Rows[20].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F26, 4);
|
||||||
}
|
}
|
||||||
|
@ -1141,11 +1141,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[20].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString()), 2).ToString() + "%";
|
this.Grid1.Rows[20].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString()), 2).ToString() + "%";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E28 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E28 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E28, 4);
|
this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E28, 4);
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F28 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F28 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F28, 4);
|
this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F28, 4);
|
||||||
}
|
}
|
||||||
|
@ -1153,11 +1153,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[22].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString()), 2).ToString() + "%";
|
this.Grid1.Rows[22].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString()), 2).ToString() + "%";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E42 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E42 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[36].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E42, 4);
|
this.Grid1.Rows[36].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E42, 4);
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F42 > 0)
|
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F42 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[36].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F42, 4);
|
this.Grid1.Rows[36].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F42, 4);
|
||||||
}
|
}
|
||||||
|
@ -1165,11 +1165,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[36].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString()), 2).ToString() + "%";
|
this.Grid1.Rows[36].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString()), 2).ToString() + "%";
|
||||||
}
|
}
|
||||||
if (E64 > 0 && E65 > 0 && E20 > 0)
|
if (E64 != 0 && E65 != 0 && E20 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[58].Values[4] = decimal.Round((E64 + E65) / E20, 4);
|
this.Grid1.Rows[58].Values[4] = decimal.Round((E64 + E65) / E20, 4);
|
||||||
}
|
}
|
||||||
if (F64 > 0 && F65 > 0 && F20 > 0)
|
if (F64 != 0 && F65 != 0 && F20 != 0)
|
||||||
{
|
{
|
||||||
this.Grid1.Rows[58].Values[5] = decimal.Round((F64 + F65) / F20, 4);
|
this.Grid1.Rows[58].Values[5] = decimal.Round((F64 + F65) / F20, 4);
|
||||||
}
|
}
|
||||||
|
@ -1265,6 +1265,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (code=="3")
|
||||||
|
{
|
||||||
|
Alert.ShowInParent("集团当前季度数据已锁定,无法上传!", MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||||
|
@ -1280,7 +1284,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
|
|
||||||
protected void btnSave_Click(object sender, EventArgs e)
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bool isEmpty = false;
|
/* bool isEmpty = false;
|
||||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||||
{
|
{
|
||||||
JObject values = mergedRow.Value<JObject>("values");
|
JObject values = mergedRow.Value<JObject>("values");
|
||||||
|
@ -1299,7 +1303,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
Save("add");
|
Save("add");
|
||||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
|
|
|
@ -1887,6 +1887,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (code == "3")
|
||||||
|
{
|
||||||
|
Alert.ShowInParent("集团当前季度数据已锁定,无法上传!", MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||||
|
|
|
@ -161,6 +161,8 @@
|
||||||
<script type="text/jscript">
|
<script type="text/jscript">
|
||||||
function renderIndexName(value) {
|
function renderIndexName(value) {
|
||||||
return value.replace("\t", " ").replace("\t\t", "  ")
|
return value.replace("\t", " ").replace("\t\t", "  ")
|
||||||
|
.replace("A", " ")
|
||||||
|
.replace("B", " ")
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -86,35 +86,35 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
var businessCategorys = EnergyreportItemService.GetItems("Template");
|
var businessCategorys = EnergyreportItemService.GetItems("Template");
|
||||||
//之前月度合计值集合
|
//之前月度合计值集合
|
||||||
List<Model.Environmental_EnergyReportItem> reportItems = BLL.EnergyreportItemService.GetItems(report.EnergyReportId);
|
List<Model.Environmental_EnergyReportItem> reportItems = BLL.EnergyreportItemService.GetItems(report.EnergyReportId);
|
||||||
List<Model.Environmental_EnergyReportItem> newItemList = new List<Model.Environmental_EnergyReportItem>();
|
//List<Model.Environmental_EnergyReportItem> newItemList = new List<Model.Environmental_EnergyReportItem>();
|
||||||
foreach (var item in reportItems)
|
//foreach (var item in reportItems)
|
||||||
{
|
//{
|
||||||
Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem();
|
// Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem();
|
||||||
newItem.EnergyReportItemId = item.EnergyReportItemId;
|
// newItem.EnergyReportItemId = item.EnergyReportItemId;
|
||||||
newItem.EnergyReportId = item.EnergyReportId;
|
// newItem.EnergyReportId = item.EnergyReportId;
|
||||||
newItem.SortIndex = item.SortIndex;
|
// newItem.SortIndex = item.SortIndex;
|
||||||
newItem.BusinessCategory = item.BusinessCategory;
|
// newItem.BusinessCategory = item.BusinessCategory;
|
||||||
newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
// newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
||||||
newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
// newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
||||||
newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
// newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
||||||
newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
// newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
||||||
newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
// newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
||||||
newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
// newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
||||||
newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
// newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
||||||
newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
// newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
||||||
newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
// newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
||||||
newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
// newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
||||||
newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
// newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
||||||
newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
// newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
||||||
newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
// newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
||||||
newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
// newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
||||||
newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
// newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
||||||
newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
// newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
||||||
newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
// newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
||||||
newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
// newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
||||||
newItemList.Add(item);
|
// newItemList.Add(item);
|
||||||
}
|
//}
|
||||||
Grid1.DataSource = newItemList;
|
Grid1.DataSource = reportItems;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -48,8 +48,9 @@
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||||
BoxFlex="1" DataKeyNames="EnergyReportItemId" AllowCellEditing="true" ForceFit="false"
|
BoxFlex="1" DataKeyNames="EnergyReportItemId" AllowCellEditing="true" ForceFit="false"
|
||||||
ClicksToEdit="1" DataIDField="EnergyReportItemId" EnableColumnLines="true" OnRowDataBound="Grid1_RowDataBound"
|
ClicksToEdit="1" DataIDField="EnergyReportItemId" EnableColumnLines="true" OnRowDataBound="Grid1_RowDataBound"
|
||||||
EnableHeaderMenu="false" Height="380px">
|
EnableHeaderMenu="false" Height="700px">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<f:RenderField Width="400px" ColumnID="BusinessCategory" DataField="BusinessCategory" FieldType="String"
|
<f:RenderField Width="400px" ColumnID="BusinessCategory" DataField="BusinessCategory" FieldType="String"
|
||||||
HeaderText="业务类别" HeaderTextAlign="Center" TextAlign="Left" RendererFunction="renderIndexName">
|
HeaderText="业务类别" HeaderTextAlign="Center" TextAlign="Left" RendererFunction="renderIndexName">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
@ -191,6 +192,12 @@
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</f:GroupField>
|
</f:GroupField>
|
||||||
|
|
||||||
|
<f:RenderField Width="100px" ColumnID="SortUnit" DataField="SortUnit" FieldType="String" Hidden="true"
|
||||||
|
HeaderText="排序" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</f:GroupField>
|
</f:GroupField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
@ -209,7 +216,7 @@
|
||||||
ValidateForms="SimpleForm1" OnClick="btnCopy_Click" Hidden="true">
|
ValidateForms="SimpleForm1" OnClick="btnCopy_Click" Hidden="true">
|
||||||
</f:Button>--%>
|
</f:Button>--%>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Hidden="true" Text="保存"
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Hidden="true" Text="计算合计并保存"
|
||||||
ValidateForms="SimpleForm1" OnClick="btnSave_Click">
|
ValidateForms="SimpleForm1" OnClick="btnSave_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnUpdata" Icon="PageSave" runat="server" ConfirmText="确定上报?" Text="上报" Hidden="true"
|
<f:Button ID="btnUpdata" Icon="PageSave" runat="server" ConfirmText="确定上报?" Text="上报" Hidden="true"
|
||||||
|
@ -227,6 +234,8 @@
|
||||||
<script type="text/jscript">
|
<script type="text/jscript">
|
||||||
function renderIndexName(value) {
|
function renderIndexName(value) {
|
||||||
return value.replace("\t", " ").replace("\t\t", "  ")
|
return value.replace("\t", " ").replace("\t\t", "  ")
|
||||||
|
.replace("A", " ")
|
||||||
|
.replace("B", " ")
|
||||||
}
|
}
|
||||||
|
|
||||||
function onGridAfterEdit(event, value, params) {
|
function onGridAfterEdit(event, value, params) {
|
||||||
|
|
|
@ -5,6 +5,7 @@ using Org.BouncyCastle.Asn1.Ocsp;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
@ -114,11 +115,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string arg = GetRequestEventArgument(); // 此函数所在文件:PageBase.cs
|
//string arg = GetRequestEventArgument(); // 此函数所在文件:PageBase.cs
|
||||||
if (arg == "UPDATE_SUMMARY")
|
//if (arg == "UPDATE_SUMMARY")
|
||||||
{
|
//{
|
||||||
SaveData();
|
// SaveData();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -130,7 +131,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
JObject values = mergedRow.Value<JObject>("values");
|
JObject values = mergedRow.Value<JObject>("values");
|
||||||
string sortIndex = values.Value<string>("SortIndex");
|
string sortIndex = values.Value<string>("SortIndex");
|
||||||
var newItem = items.FirstOrDefault(x => x.SortIndex == sortIndex);
|
var SortUnit = values.Value<int>("SortUnit");
|
||||||
|
var newItem = items.FirstOrDefault(x => x.SortIndex == sortIndex && x.SortUnit == SortUnit);
|
||||||
if (newItem != null)
|
if (newItem != null)
|
||||||
{
|
{
|
||||||
newItem.EnergyReportItemId = SQLHelper.GetNewID();
|
newItem.EnergyReportItemId = SQLHelper.GetNewID();
|
||||||
|
@ -217,6 +219,15 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//合计行全部禁止输入
|
||||||
|
if (a.SortUnit == 1)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < e.CellCssClasses.Count(); i++)
|
||||||
|
{
|
||||||
|
e.CellCssClasses[i] = "f-grid-cell-uneditable";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -282,35 +293,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
EnergyReportId = report.EnergyReportId;
|
EnergyReportId = report.EnergyReportId;
|
||||||
BLL.EnergyreportItemService.DeleteEnergyReportItemByChemicalReportId(report.EnergyReportId);
|
BLL.EnergyreportItemService.DeleteEnergyReportItemByChemicalReportId(report.EnergyReportId);
|
||||||
GetItems(report.EnergyReportId);
|
GetItems(report.EnergyReportId);
|
||||||
List<Model.Environmental_EnergyReportItem> mReportItemList = new List<Environmental_EnergyReportItem>();
|
if (items.Count > 0)
|
||||||
foreach (var item in items)
|
|
||||||
{
|
{
|
||||||
Model.Environmental_EnergyReportItem newItem = new Environmental_EnergyReportItem();
|
Funs.DB.Environmental_EnergyReportItem.InsertAllOnSubmit(items);
|
||||||
newItem.EnergyReportItemId = item.EnergyReportItemId;
|
Funs.DB.SubmitChanges();
|
||||||
newItem.EnergyReportId = item.EnergyReportId;
|
////计算合计
|
||||||
newItem.SortIndex = item.SortIndex;
|
//UpdateEnvironmental_EnergyReportItem(EnergyReportId);
|
||||||
newItem.BusinessCategory = item.BusinessCategory;
|
|
||||||
newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
|
||||||
newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
|
||||||
newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
|
||||||
newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
|
||||||
newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
|
||||||
newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
|
||||||
newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
|
||||||
newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
|
||||||
newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
|
||||||
newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
|
||||||
newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
|
||||||
newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
|
||||||
newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
|
||||||
newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
|
||||||
newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
|
||||||
newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
|
||||||
newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
|
||||||
newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
|
||||||
EnergyreportItemService.AddEnvironmental_EnergyReportItem(newItem);
|
|
||||||
mReportItemList.Add(newItem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == "updata") //数据同步
|
if (type == "updata") //数据同步
|
||||||
{
|
{
|
||||||
if (report.UpState == BLL.Const.UpState_2)
|
if (report.UpState == BLL.Const.UpState_2)
|
||||||
|
@ -322,6 +312,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (code == "3")
|
||||||
|
{
|
||||||
|
Alert.ShowInParent("集团当前季度数据已锁定,无法上传!", MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||||
|
@ -362,7 +356,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
JObject values = mergedRow.Value<JObject>("values");
|
JObject values = mergedRow.Value<JObject>("values");
|
||||||
string sortIndex = values.Value<string>("SortIndex");
|
string sortIndex = values.Value<string>("SortIndex");
|
||||||
var newItem = items.FirstOrDefault(x => x.SortIndex == sortIndex);
|
var SortUnit = values.Value<int>("SortUnit");
|
||||||
|
var newItem = items.FirstOrDefault(x => x.SortIndex == sortIndex && x.SortUnit == SortUnit);
|
||||||
if (newItem != null)
|
if (newItem != null)
|
||||||
{
|
{
|
||||||
newItem.EnergyReportItemId = SQLHelper.GetNewID();
|
newItem.EnergyReportItemId = SQLHelper.GetNewID();
|
||||||
|
@ -391,6 +386,58 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
items = newItemLists;
|
items = newItemLists;
|
||||||
|
//计算合计
|
||||||
|
getAllSum();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存明细之前计算合计
|
||||||
|
private void getAllSum()
|
||||||
|
{
|
||||||
|
items.ForEach(x =>
|
||||||
|
{
|
||||||
|
//需要合计的时候
|
||||||
|
if (x.SortUnit == 1)
|
||||||
|
{
|
||||||
|
if (x.BusinessCategory == "合计")
|
||||||
|
{
|
||||||
|
x.Throughput_BasePeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.Throughput_BasePeriod)).ToString();
|
||||||
|
x.Throughput_LastPeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.Throughput_LastPeriod)).ToString();
|
||||||
|
x.Throughput_ThisPeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.Throughput_ThisPeriod)).ToString();
|
||||||
|
x.Yield_BasePeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.Yield_BasePeriod)).ToString();
|
||||||
|
x.Yield_LastPeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.Yield_LastPeriod)).ToString();
|
||||||
|
x.Yield_ThisPeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.Yield_ThisPeriod)).ToString();
|
||||||
|
x.OutputValue_BasePeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.OutputValue_BasePeriod)).ToString();
|
||||||
|
x.OutputValue_LastYear = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.OutputValue_LastYear)).ToString();
|
||||||
|
x.OutputValue_ThisYear = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.OutputValue_ThisYear)).ToString();
|
||||||
|
x.OperationScale_BasePeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.OperationScale_BasePeriod)).ToString();
|
||||||
|
x.OperationScale_LastYear = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.OperationScale_LastYear)).ToString();
|
||||||
|
x.OperationScale_ThisYear = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.OperationScale_ThisYear)).ToString();
|
||||||
|
x.ServiceOperatingIncome_BasePeriod = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.ServiceOperatingIncome_BasePeriod)).ToString();
|
||||||
|
x.ServiceOperatingIncome_LastYear = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.ServiceOperatingIncome_LastYear)).ToString();
|
||||||
|
x.ServiceOperatingIncome_ThisYear = items.Where(y => y.SortUnit != 1).Sum(y => Funs.GetNewDecimalOrZero(y.ServiceOperatingIncome_ThisYear)).ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x.Throughput_BasePeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.Throughput_BasePeriod)).ToString();
|
||||||
|
x.Throughput_LastPeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.Throughput_LastPeriod)).ToString();
|
||||||
|
x.Throughput_ThisPeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.Throughput_ThisPeriod)).ToString();
|
||||||
|
x.Yield_BasePeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.Yield_BasePeriod)).ToString();
|
||||||
|
x.Yield_LastPeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.Yield_LastPeriod)).ToString();
|
||||||
|
x.Yield_ThisPeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.Yield_ThisPeriod)).ToString();
|
||||||
|
x.OutputValue_BasePeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.OutputValue_BasePeriod)).ToString();
|
||||||
|
x.OutputValue_LastYear = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.OutputValue_LastYear)).ToString();
|
||||||
|
x.OutputValue_ThisYear = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.OutputValue_ThisYear)).ToString();
|
||||||
|
x.OperationScale_BasePeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.OperationScale_BasePeriod)).ToString();
|
||||||
|
x.OperationScale_LastYear = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.OperationScale_LastYear)).ToString();
|
||||||
|
x.OperationScale_ThisYear = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.OperationScale_ThisYear)).ToString();
|
||||||
|
x.ServiceOperatingIncome_BasePeriod = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.ServiceOperatingIncome_BasePeriod)).ToString();
|
||||||
|
x.ServiceOperatingIncome_LastYear = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.ServiceOperatingIncome_LastYear)).ToString();
|
||||||
|
x.ServiceOperatingIncome_ThisYear = items.Where(y => y.SortUnit != 1 && y.SortIndex == x.SortIndex).Sum(y => Funs.GetNewDecimalOrZero(y.ServiceOperatingIncome_ThisYear)).ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -406,10 +453,47 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
EnergyReportItemId = SQLHelper.GetNewID(typeof(Model.Environmental_EnergyReportItem)),
|
EnergyReportItemId = SQLHelper.GetNewID(typeof(Model.Environmental_EnergyReportItem)),
|
||||||
BusinessCategory = indexName.BusinessCategory,
|
BusinessCategory = indexName.BusinessCategory,
|
||||||
SortIndex = indexName.SortIndex,
|
SortIndex = indexName.SortIndex,
|
||||||
|
SortUnit = indexName.SortUnit
|
||||||
};
|
};
|
||||||
|
|
||||||
items.Add(item);
|
items.Add(item);
|
||||||
|
|
||||||
|
//修改2024-10-23 14:15:06
|
||||||
|
#region 循环再次增加各分单位
|
||||||
|
if (item.BusinessCategory != "合计")
|
||||||
|
{
|
||||||
|
//第一个本单位
|
||||||
|
var isthisUnit = CommonService.GetIsThisUnit();
|
||||||
|
|
||||||
|
var model = new Environmental_EnergyReportItem
|
||||||
|
{
|
||||||
|
EnergyReportItemId = SQLHelper.GetNewID(typeof(Model.Environmental_EnergyReportItem)),
|
||||||
|
BusinessCategory = getLenthSpace(indexName.SortIndex) +isthisUnit.UnitName,
|
||||||
|
SortIndex = item.SortIndex,
|
||||||
|
SortUnit = 2,
|
||||||
|
};
|
||||||
|
items.Add(model);
|
||||||
|
//加载分单位
|
||||||
|
var unitList = Funs.DB.Base_Unit.Where(x => x.IsBranch == true).ToList();
|
||||||
|
var j = 3;
|
||||||
|
foreach (var unitItem in unitList)
|
||||||
|
{
|
||||||
|
model = new Environmental_EnergyReportItem
|
||||||
|
{
|
||||||
|
EnergyReportItemId = SQLHelper.GetNewID(typeof(Model.Environmental_EnergyReportItem)),
|
||||||
|
BusinessCategory = getLenthSpace(indexName.SortIndex) +unitItem.UnitName,
|
||||||
|
SortIndex = item.SortIndex,
|
||||||
|
SortUnit = j,
|
||||||
|
};
|
||||||
|
items.Add(model);
|
||||||
|
j++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var ListProjectEnergyItemReport = ProjectEnergyreportItemService.GetItemsByDate(year, Quarters);
|
var ListProjectEnergyItemReport = ProjectEnergyreportItemService.GetItemsByDate(year, Quarters);
|
||||||
var q = from x in ListProjectEnergyItemReport
|
var q = from x in ListProjectEnergyItemReport
|
||||||
group x by x.SortIndex into g
|
group x by x.SortIndex into g
|
||||||
|
@ -568,5 +652,20 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 取具体数量的空格
|
||||||
|
private string getLenthSpace(string SortIndex) {
|
||||||
|
string returnVal = "";
|
||||||
|
if (SortIndex == "02" || SortIndex == "16" || SortIndex == "44")
|
||||||
|
{
|
||||||
|
returnVal += "A";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
returnVal += "B";
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnVal;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,8 +21,7 @@
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="中央企业节能环保和经营状况季报" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="中央企业节能环保和经营状况季报" EnableCollapse="true"
|
||||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="BusinessReportId"
|
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="BusinessReportId"
|
||||||
DataIDField="BusinessReportId" AllowSorting="true" ForceFit="true"
|
DataIDField="BusinessReportId" AllowSorting="true" ForceFit="true"
|
||||||
SortField="FillingDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
SortField="FillingDate" AllowPaging="true"
|
||||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
|
||||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
|
@ -49,7 +48,10 @@
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RenderField Width="60px" ColumnID="Code" DataField="Code" SortField="Code"
|
<f:RenderField Width="120px" ColumnID="UnitName" DataField="UnitName"
|
||||||
|
FieldType="String" HeaderText="企业名称" HeaderTextAlign="Center" TextAlign="Left" />
|
||||||
|
|
||||||
|
<f:RenderField Width="60px" ColumnID="Code" DataField="Code"
|
||||||
FieldType="String" HeaderText="代码" HeaderTextAlign="Center" TextAlign="Center" />
|
FieldType="String" HeaderText="代码" HeaderTextAlign="Center" TextAlign="Center" />
|
||||||
|
|
||||||
<f:GroupField EnableLock="true" HeaderText="企业基本情况" TextAlign="Center">
|
<f:GroupField EnableLock="true" HeaderText="企业基本情况" TextAlign="Center">
|
||||||
|
@ -86,7 +88,7 @@
|
||||||
<Listeners>
|
<Listeners>
|
||||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
</Listeners>
|
</Listeners>
|
||||||
<PageItems>
|
<%-- <PageItems>
|
||||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
</f:ToolbarSeparator>
|
</f:ToolbarSeparator>
|
||||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||||
|
@ -94,14 +96,14 @@
|
||||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
</PageItems>
|
</PageItems>--%>
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="编辑安全生产数据季报" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="编辑中央企业节能环保企业基本情况和经营状况" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1000px" Height="560px">
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" PercentWidth="100%" PercentHeight="100%">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
<f:Window ID="Window2" Title="打印安全生产数据季报" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window2" Title="打印中央企业节能环保企业基本情况和经营状况" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1000px" Height="560px">
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1000px" Height="560px">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
<f:Menu ID="Menu1" runat="server">
|
<f:Menu ID="Menu1" runat="server">
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
Funs.DropDownPageSize(this.ddlPageSize);
|
//Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
//权限按钮方法
|
//权限按钮方法
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||||
}
|
}
|
||||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
//this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
string strSql = "select * from Environmental_OperationReport where 1=1 ";
|
string strSql = "select * from Environmental_OperationReport where 1=1 ";
|
||||||
|
|
||||||
strSql += " AND UnitId = '" + BLL.Const.UnitId_CWCEC + "'";
|
strSql += " AND UnitId = '" + CommonService.GetThisUnitId() + "'";
|
||||||
|
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
|
||||||
|
@ -67,18 +67,25 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
listStr.Add(new SqlParameter("@Quarters", Funs.GetNewInt(this.drpQuarters.SelectedValue)));
|
listStr.Add(new SqlParameter("@Quarters", Funs.GetNewInt(this.drpQuarters.SelectedValue)));
|
||||||
}
|
}
|
||||||
|
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
//SqlParameter[] parameter = listStr.ToArray();
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
//DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
|
||||||
Grid1.RecordCount = tb.Rows.Count;
|
//Grid1.RecordCount = tb.Rows.Count;
|
||||||
|
|
||||||
var table = this.GetPagedDataTable(Grid1, tb);
|
//var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
Grid1.DataSource = table;
|
//Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
//Grid1.DataBind();
|
||||||
|
|
||||||
Model.Environmental_OperationReport report = Funs.DB.Environmental_OperationReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == Funs.GetNewInt(this.drpQuarters.SelectedValue) && e.Year == Funs.GetNewInt(this.drpYear.SelectedValue));
|
Model.Environmental_OperationReport report = Funs.DB.Environmental_OperationReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == Funs.GetNewInt(this.drpQuarters.SelectedValue) && e.Year == Funs.GetNewInt(this.drpYear.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
|
//根据主表id加载子表
|
||||||
|
var reportItem = Funs.DB.Environmental_OperationReportItem.Where(x => x.BusinessReportId == report.BusinessReportId)
|
||||||
|
.OrderBy(x => x.SortIndex).ToList();
|
||||||
|
|
||||||
|
Grid1.DataSource = reportItem;
|
||||||
|
Grid1.DataBind();
|
||||||
|
|
||||||
string upState = string.Empty;
|
string upState = string.Empty;
|
||||||
if (report.UpState == BLL.Const.UpState_3)
|
if (report.UpState == BLL.Const.UpState_3)
|
||||||
{
|
{
|
||||||
|
@ -90,6 +97,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
this.Grid1.Title = "中央企业节能环保和经营状况季报" + this.drpQuarters.SelectedItem.Text + this.drpYear.SelectedItem.Text + upState;
|
this.Grid1.Title = "中央企业节能环保和经营状况季报" + this.drpQuarters.SelectedItem.Text + this.drpYear.SelectedItem.Text + upState;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
var upState = "(未上报)";
|
||||||
|
|
||||||
|
this.Grid1.Title = "中央企业节能环保和经营状况季报" + this.drpQuarters.SelectedItem.Text + this.drpYear.SelectedItem.Text + upState;
|
||||||
|
this.Grid1.DataSource = null;
|
||||||
|
this.Grid1.DataBind();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -123,8 +138,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
//this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||||
BindGrid();
|
//BindGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -163,7 +178,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnNew_Click(object sender, EventArgs e)
|
protected void btnNew_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OperationReportEdit.aspx?UnitId={0}&&Year={1}&&Quarter={2}", BLL.Const.UnitId_CWCEC, this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OperationReportEdit.aspx?UnitId={0}&&Year={1}&&Quarter={2}", CommonService.GetThisUnitId(), this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, "编辑 - ")));
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 双击事件
|
/// 双击事件
|
||||||
|
@ -199,7 +214,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
var operationReport = Funs.DB.Environmental_OperationReport.FirstOrDefault(s => s.BusinessReportId == id);
|
var operationReport = Funs.DB.Environmental_OperationReport.FirstOrDefault(s => s.BusinessReportId == id);
|
||||||
if (operationReport != null)
|
if (operationReport != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OperationReportEdit.aspx?UnitId={0}&&Year={1}&&Quarter={2}&&BusinessReportId={3}", BLL.Const.UnitId_CWCEC, this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, id, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OperationReportEdit.aspx?UnitId={0}&&Year={1}&&Quarter={2}&&BusinessReportId={3}", CommonService.GetThisUnitId(), this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, id, "编辑 - ")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,14 +225,19 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnUpdata_Click(object sender, EventArgs e)
|
protected void btnUpdata_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var currUnitId = BLL.Const.UnitId_CWCEC;
|
var currUnitId = CommonService.GetThisUnitId();
|
||||||
var year = this.drpYear.SelectedValue;
|
var year = this.drpYear.SelectedValue;
|
||||||
var quarter = this.drpQuarters.SelectedValue;
|
var quarter = this.drpQuarters.SelectedValue;
|
||||||
|
|
||||||
Model.Environmental_OperationReport report = Funs.DB.Environmental_OperationReport.Where(s => s.UnitId == currUnitId && s.Year.ToString() == year && s.Quarters.ToString() == quarter).FirstOrDefault();
|
Model.Environmental_OperationReport report = Funs.DB.Environmental_OperationReport.Where(s => s.UnitId == currUnitId && s.Year.ToString() == year && s.Quarters.ToString() == quarter).FirstOrDefault();
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OperationReportEdit.aspx?UnitId={0}&&Year={1}&&Quarter={2}&&BusinessReportId={3}&type=Update", BLL.Const.UnitId_CWCEC, this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, report.BusinessReportId, "编辑 - ")));
|
if (report.UpState=="3")
|
||||||
|
{
|
||||||
|
ShowNotify("当前报表已经上报!不能重复上报。", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OperationReportEdit.aspx?UnitId={0}&&Year={1}&&Quarter={2}&&BusinessReportId={3}&type=Update", CommonService.GetThisUnitId(), this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, report.BusinessReportId, "编辑 - ")));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -264,15 +284,22 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
var getD = Funs.DB.Environmental_OperationReport.FirstOrDefault(s => s.BusinessReportId == rowID);
|
var getD = Funs.DB.Environmental_OperationReport.FirstOrDefault(s => s.BusinessReportId == rowID);
|
||||||
if (getD != null)
|
if (getD != null)
|
||||||
{
|
{
|
||||||
|
//先删子表
|
||||||
|
var list = Funs.DB.Environmental_OperationReportItem.Where(x => x.BusinessReportId == getD.BusinessReportId).ToList();
|
||||||
|
if (list.Count > 0)
|
||||||
|
{
|
||||||
|
Funs.DB.Environmental_OperationReportItem.DeleteAllOnSubmit(list);
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, null, getD.BusinessReportId, BLL.Const.OperationReportMenuId, BLL.Const.BtnDelete);
|
BLL.LogService.AddSys_Log(this.CurrUser, null, getD.BusinessReportId, BLL.Const.OperationReportMenuId, BLL.Const.BtnDelete);
|
||||||
|
|
||||||
Funs.DB.Environmental_OperationReport.DeleteOnSubmit(getD);
|
Funs.DB.Environmental_OperationReport.DeleteOnSubmit(getD);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.BindGrid();
|
|
||||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||||
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -322,7 +349,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var unitId = BLL.Const.UnitId_CWCEC;
|
var unitId = CommonService.GetThisUnitId();
|
||||||
var year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
var year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
||||||
var quarter = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
|
var quarter = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
|
||||||
|
|
||||||
|
|
|
@ -113,33 +113,6 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnUpdata;
|
protected global::FineUIPro.Button btnUpdata;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ToolbarSeparator1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ToolbarText1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ddlPageSize 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Window1 控件。
|
/// Window1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
|
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
|
||||||
<f:Panel ID="Panel1" BodyPadding="5px" runat="server" ShowHeader="false" EnableCollapse="True"
|
<f:Panel ID="Panel1" BodyPadding="5px" runat="server" ShowHeader="false" EnableCollapse="True"
|
||||||
Title="编辑环保与经营状况数据季报" AutoScroll="true">
|
Title="编辑中央企业节能环保企业基本情况和经营状况" AutoScroll="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Form ID="Form2" runat="server" ShowHeader="false" BodyPadding="5px" RedStarPosition="BeforeText">
|
<f:Form ID="Form2" runat="server" ShowHeader="false" BodyPadding="5px" RedStarPosition="BeforeText">
|
||||||
<Items>
|
<Items>
|
||||||
|
@ -35,7 +35,132 @@
|
||||||
</Items>
|
</Items>
|
||||||
</f:Form>
|
</f:Form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<f:Form ID="Form11" runat="server" ShowHeader="false" BodyPadding="5px">
|
||||||
|
<Items>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtCompileMan" runat="server" Label="填报人" LabelAlign="Right" LabelWidth="140px">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:TextBox ID="txtStatisticsDutyPerson" runat="server" Label="统计负责人" LabelAlign="Right" LabelWidth="140px">
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtUnitDutyPerson" runat="server" Label="单位负责人" LabelAlign="Right" LabelWidth="140px">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:DatePicker ID="txtFillingDate" runat="server" Label="填报日期" LabelAlign="Right" LabelWidth="140px"
|
||||||
|
EnableEdit="true">
|
||||||
|
</f:DatePicker>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Items>
|
||||||
|
</f:Form>
|
||||||
|
|
||||||
|
<f:Form ID="Form6" runat="server" ShowHeader="false" BodyPadding="5px">
|
||||||
|
<Items>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" LabelWidth="140px">
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Items>
|
||||||
|
</f:Form>
|
||||||
|
|
||||||
<f:Form ID="Form4" runat="server" ShowHeader="false" BodyPadding="5px">
|
<f:Form ID="Form4" runat="server" ShowHeader="false" BodyPadding="5px">
|
||||||
|
<Items>
|
||||||
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" DataIDField="BusinessReportItemId"
|
||||||
|
DataKeyNames="BusinessReportItemId" ShowGridHeader="true" SortField="SortIndex" SortDirection="ASC"
|
||||||
|
AllowCellEditing="true" ClicksToEdit="1" AllowSorting="true" EnableColumnLines="true"
|
||||||
|
EnableTextSelection="True">
|
||||||
|
<Columns>
|
||||||
|
<f:RenderField minWidth="300px" ColumnID="UnitName" DataField="UnitName"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="单位名称">
|
||||||
|
<Editor>
|
||||||
|
<f:TextBox ID="TextBox1" runat="server">
|
||||||
|
</f:TextBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
<f:RenderField minWidth="100px" ColumnID="Code" DataField="Code"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="代码">
|
||||||
|
<Editor>
|
||||||
|
<f:TextBox ID="TextBox2" runat="server">
|
||||||
|
</f:TextBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
<f:RenderField minWidth="100px" ColumnID="UnitLevel" DataField="UnitLevel"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="企业层级">
|
||||||
|
<Editor>
|
||||||
|
<f:TextBox ID="TextBox3" runat="server">
|
||||||
|
</f:TextBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
<f:RenderField minWidth="120px" ColumnID="CreateDate" DataField="CreateDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||||
|
HeaderTextAlign="Center" TextAlign="Left" HeaderText="成立时间">
|
||||||
|
<Editor>
|
||||||
|
<f:DatePicker ID="DatePicker1" DateFormatString="yyyy-MM-dd" runat="server">
|
||||||
|
</f:DatePicker>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
<f:RenderField minWidth="160px" ColumnID="Place" DataField="Place"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="所在地">
|
||||||
|
<Editor>
|
||||||
|
<f:TextBox ID="TextBox4" runat="server">
|
||||||
|
</f:TextBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
<f:RenderField minWidth="120px" ColumnID="PersonNum" DataField="PersonNum"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="职工人数">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox ID="txtPersonNum" runat="server" NoDecimal="false"
|
||||||
|
NoNegative="false" EmptyText="0">
|
||||||
|
</f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
<f:RenderField minWidth="160px" ColumnID="TotalAssets" DataField="TotalAssets"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="资产总额(万元)">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox ID="txtTotalAssets" runat="server"
|
||||||
|
NoDecimal="false" NoNegative="false" EmptyText="0" DecimalPrecision="4">
|
||||||
|
</f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
<f:RenderField minWidth="160px" ColumnID="TotalValue" DataField="TotalValue"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="总产值(万元)">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox ID="NumberBox1" runat="server"
|
||||||
|
NoDecimal="false" NoNegative="false" EmptyText="0" DecimalPrecision="4">
|
||||||
|
</f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
|
<f:RenderField minWidth="160px" ColumnID="NewInvestment" DataField="NewInvestment"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="新增投资(万元)">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox ID="NumberBox2" runat="server"
|
||||||
|
NoDecimal="false" NoNegative="false" EmptyText="0" DecimalPrecision="4">
|
||||||
|
</f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
</Columns>
|
||||||
|
</f:Grid>
|
||||||
|
</Items>
|
||||||
|
</f:Form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%--<f:Form ID="Form4" runat="server" ShowHeader="false" BodyPadding="5px">
|
||||||
<Items>
|
<Items>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
|
@ -90,41 +215,7 @@
|
||||||
</Rows>
|
</Rows>
|
||||||
</f:Form>
|
</f:Form>
|
||||||
</Items>
|
</Items>
|
||||||
</f:GroupPanel>
|
</f:GroupPanel>--%>
|
||||||
|
|
||||||
<f:Form ID="Form6" runat="server" ShowHeader="false" BodyPadding="5px">
|
|
||||||
<Items>
|
|
||||||
<f:FormRow>
|
|
||||||
<Items>
|
|
||||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" LabelWidth="140px">
|
|
||||||
</f:TextBox>
|
|
||||||
</Items>
|
|
||||||
</f:FormRow>
|
|
||||||
</Items>
|
|
||||||
</f:Form>
|
|
||||||
|
|
||||||
<f:Form ID="Form11" runat="server" ShowHeader="false" BodyPadding="5px">
|
|
||||||
<Items>
|
|
||||||
<f:FormRow>
|
|
||||||
<Items>
|
|
||||||
<f:TextBox ID="txtCompileMan" runat="server" Label="填报人" LabelAlign="Right" LabelWidth="140px">
|
|
||||||
</f:TextBox>
|
|
||||||
<f:TextBox ID="txtStatisticsDutyPerson" runat="server" Label="统计负责人" LabelAlign="Right" LabelWidth="140px">
|
|
||||||
</f:TextBox>
|
|
||||||
</Items>
|
|
||||||
</f:FormRow>
|
|
||||||
<f:FormRow>
|
|
||||||
<Items>
|
|
||||||
<f:TextBox ID="txtUnitDutyPerson" runat="server" Label="单位负责人" LabelAlign="Right" LabelWidth="140px">
|
|
||||||
</f:TextBox>
|
|
||||||
<f:DatePicker ID="txtFillingDate" runat="server" Label="填报日期" LabelAlign="Right" LabelWidth="140px"
|
|
||||||
EnableEdit="true">
|
|
||||||
</f:DatePicker>
|
|
||||||
</Items>
|
|
||||||
</f:FormRow>
|
|
||||||
</Items>
|
|
||||||
</f:Form>
|
|
||||||
|
|
||||||
</Items>
|
</Items>
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar2" Position="Bottom" ToolbarAlign="Right" runat="server">
|
<f:Toolbar ID="Toolbar2" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
@ -61,8 +63,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
this.btnSave.Hidden = false;
|
this.btnSave.Hidden = false;
|
||||||
this.btnUpdata.Hidden = true;
|
this.btnUpdata.Hidden = true;
|
||||||
}
|
}
|
||||||
|
ddlUnitId.SelectedValue = CommonService.GetThisUnitId();
|
||||||
BindGrid(year, quarter, unitId);
|
BindGrid(year, quarter, unitId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,53 +92,59 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.txtCompileMan.Text = operationReport.FillingMan.ToString();
|
this.txtCompileMan.Text = operationReport.FillingMan.ToString();
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrWhiteSpace(operationReport.UnitLevel))
|
//if (!string.IsNullOrWhiteSpace(operationReport.UnitLevel))
|
||||||
{
|
//{
|
||||||
this.txtUnitLevel.Text = operationReport.UnitLevel;
|
// this.txtUnitLevel.Text = operationReport.UnitLevel;
|
||||||
}
|
//}
|
||||||
if (!string.IsNullOrWhiteSpace(operationReport.Place))
|
//if (!string.IsNullOrWhiteSpace(operationReport.Place))
|
||||||
{
|
//{
|
||||||
this.txtPlace.Text = operationReport.Place;
|
// this.txtPlace.Text = operationReport.Place;
|
||||||
}
|
//}
|
||||||
if (operationReport.FillingDate != null)
|
if (operationReport.FillingDate != null)
|
||||||
{
|
{
|
||||||
this.txtFillingDate.Text = operationReport.FillingDate.Value.ToString("yyyy-MM-dd");
|
this.txtFillingDate.Text = operationReport.FillingDate.Value.ToString("yyyy-MM-dd");
|
||||||
}
|
}
|
||||||
if (operationReport.CreateDate != null)
|
//if (operationReport.CreateDate != null)
|
||||||
{
|
//{
|
||||||
this.txtCreateDate.Text = operationReport.CreateDate.Value.ToString("yyyy-MM-dd");
|
// this.txtCreateDate.Text = operationReport.CreateDate.Value.ToString("yyyy-MM-dd");
|
||||||
}
|
//}
|
||||||
if (!string.IsNullOrWhiteSpace(operationReport.Code))
|
//if (!string.IsNullOrWhiteSpace(operationReport.Code))
|
||||||
{
|
//{
|
||||||
this.txtCode.Text = operationReport.Code;
|
// this.txtCode.Text = operationReport.Code;
|
||||||
}
|
//}
|
||||||
if (operationReport.PersonNum != null)
|
//if (operationReport.PersonNum != null)
|
||||||
{
|
//{
|
||||||
this.txtPersonNum.Text = operationReport.PersonNum.ToString();
|
// this.txtPersonNum.Text = operationReport.PersonNum.ToString();
|
||||||
}
|
//}
|
||||||
if (operationReport.TotalAssets != null)
|
//if (operationReport.TotalAssets != null)
|
||||||
{
|
//{
|
||||||
this.txtTotalAssets.Text = operationReport.TotalAssets.ToString();
|
// this.txtTotalAssets.Text = operationReport.TotalAssets.ToString();
|
||||||
}
|
//}
|
||||||
if (operationReport.TotalValue != null)
|
//if (operationReport.TotalValue != null)
|
||||||
{
|
//{
|
||||||
this.txtTotalValue.Text = operationReport.TotalValue.ToString();
|
// this.txtTotalValue.Text = operationReport.TotalValue.ToString();
|
||||||
}
|
//}
|
||||||
if (operationReport.NewInvestment != null)
|
//if (operationReport.NewInvestment != null)
|
||||||
{
|
//{
|
||||||
this.txtNewInvestment.Text = operationReport.NewInvestment.ToString();
|
// this.txtNewInvestment.Text = operationReport.NewInvestment.ToString();
|
||||||
}
|
//}
|
||||||
this.txtStatisticsDutyPerson.Text = operationReport.StatisticsDutyPerson;
|
this.txtStatisticsDutyPerson.Text = operationReport.StatisticsDutyPerson;
|
||||||
this.txtUnitDutyPerson.Text = operationReport.UnitDutyPerson;
|
this.txtUnitDutyPerson.Text = operationReport.UnitDutyPerson;
|
||||||
this.txtRemark.Text = operationReport.Remark;
|
this.txtRemark.Text = operationReport.Remark;
|
||||||
|
|
||||||
|
//根据主表id加载子表
|
||||||
|
var reportItem = Funs.DB.Environmental_OperationReportItem.Where(x => x.BusinessReportId == operationReport.BusinessReportId)
|
||||||
|
.OrderBy(x => x.SortIndex).ToList();
|
||||||
|
|
||||||
|
Grid1.DataSource = reportItem;
|
||||||
|
Grid1.DataBind();
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#region 不存在则根据项目统计生成
|
#region 不存在则根据项目统计生成
|
||||||
this.ddlUnitId.SelectedValue = unitId;
|
//this.ddlUnitId.SelectedValue = unitId;
|
||||||
this.drpYear.SelectedValue = year;
|
this.drpYear.SelectedValue = year;
|
||||||
this.ddlQuarter.SelectedValue = quarter;
|
this.ddlQuarter.SelectedValue = quarter;
|
||||||
this.txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
this.txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||||
|
@ -147,15 +157,57 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
|
|
||||||
if (items.Any())
|
if (items.Any())
|
||||||
{
|
{
|
||||||
this.txtPersonNum.Text = items.Sum(s => s.PersonNum ?? 0).ToString();
|
//this.txtPersonNum.Text = items.Sum(s => s.PersonNum ?? 0).ToString();
|
||||||
this.txtTotalAssets.Text = items.Sum(s => s.TotalAssets ?? 0).ToString();
|
//this.txtTotalAssets.Text = items.Sum(s => s.TotalAssets ?? 0).ToString();
|
||||||
this.txtTotalValue.Text = items.Sum(s => s.TotalValue ?? 0).ToString();
|
//this.txtTotalValue.Text = items.Sum(s => s.TotalValue ?? 0).ToString();
|
||||||
this.txtNewInvestment.Text = items.Sum(s => s.NewInvestment ?? 0).ToString();
|
//this.txtNewInvestment.Text = items.Sum(s => s.NewInvestment ?? 0).ToString();
|
||||||
}
|
}
|
||||||
this.txtCompileMan.Text = this.CurrUser.UserName;
|
this.txtCompileMan.Text = this.CurrUser.UserName;
|
||||||
this.txtStatisticsDutyPerson.Text = this.CurrUser.UserName;
|
this.txtStatisticsDutyPerson.Text = this.CurrUser.UserName;
|
||||||
this.txtUnitDutyPerson.Text = this.CurrUser.UserName;
|
this.txtUnitDutyPerson.Text = this.CurrUser.UserName;
|
||||||
|
|
||||||
|
//加载子表
|
||||||
|
var reportItemlist = new List<Model.Environmental_OperationReportItem>();
|
||||||
|
//第一个本单位
|
||||||
|
var isthisUnit = CommonService.GetIsThisUnit();
|
||||||
|
var reportItemModel = new Model.Environmental_OperationReportItem() {
|
||||||
|
BusinessReportItemId = Guid.NewGuid().ToString(),
|
||||||
|
SortIndex = 1,
|
||||||
|
UnitName = isthisUnit.UnitName,
|
||||||
|
SortUnitName= isthisUnit.UnitName,
|
||||||
|
Code = isthisUnit.UnitCode,
|
||||||
|
UnitLevel = "",
|
||||||
|
CreateDate=null,
|
||||||
|
Place= isthisUnit.Address,
|
||||||
|
PersonNum=0,
|
||||||
|
TotalAssets=0,
|
||||||
|
TotalValue=0,
|
||||||
|
NewInvestment=0,
|
||||||
|
};
|
||||||
|
reportItemlist.Add(reportItemModel);
|
||||||
|
//加载分单位
|
||||||
|
var unitList = Funs.DB.Base_Unit.Where(x => x.IsBranch == true).ToList();
|
||||||
|
foreach (var item in unitList)
|
||||||
|
{
|
||||||
|
var reportItemModelb = new Model.Environmental_OperationReportItem()
|
||||||
|
{
|
||||||
|
BusinessReportItemId = Guid.NewGuid().ToString(),
|
||||||
|
SortIndex = 1,
|
||||||
|
UnitName = item.UnitName,
|
||||||
|
SortUnitName = isthisUnit.UnitName,
|
||||||
|
Code = item.UnitCode,
|
||||||
|
UnitLevel = "",
|
||||||
|
CreateDate = null,
|
||||||
|
Place = item.Address,
|
||||||
|
PersonNum = 0,
|
||||||
|
TotalAssets = 0,
|
||||||
|
TotalValue = 0,
|
||||||
|
NewInvestment = 0,
|
||||||
|
};
|
||||||
|
reportItemlist.Add(reportItemModelb);
|
||||||
|
}
|
||||||
|
Grid1.DataSource = reportItemlist;
|
||||||
|
Grid1.DataBind();
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -216,14 +268,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
operationReport.StatisticsDutyPerson = this.txtStatisticsDutyPerson.Text.Trim();
|
operationReport.StatisticsDutyPerson = this.txtStatisticsDutyPerson.Text.Trim();
|
||||||
operationReport.UnitDutyPerson = this.txtUnitDutyPerson.Text.Trim();
|
operationReport.UnitDutyPerson = this.txtUnitDutyPerson.Text.Trim();
|
||||||
operationReport.FillingDate = Funs.GetNewDateTime(this.txtFillingDate.Text);
|
operationReport.FillingDate = Funs.GetNewDateTime(this.txtFillingDate.Text);
|
||||||
operationReport.Code = this.txtCode.Text.Trim();
|
//operationReport.Code = this.txtCode.Text.Trim();
|
||||||
operationReport.PersonNum = Funs.GetNewInt(this.txtPersonNum.Text.Trim());
|
//operationReport.PersonNum = Funs.GetNewInt(this.txtPersonNum.Text.Trim());
|
||||||
operationReport.TotalAssets = Funs.GetNewDecimalOrZero(this.txtTotalAssets.Text.Trim());
|
//operationReport.TotalAssets = Funs.GetNewDecimalOrZero(this.txtTotalAssets.Text.Trim());
|
||||||
operationReport.TotalValue = Funs.GetNewDecimalOrZero(this.txtTotalValue.Text.Trim());
|
//operationReport.TotalValue = Funs.GetNewDecimalOrZero(this.txtTotalValue.Text.Trim());
|
||||||
operationReport.NewInvestment = Funs.GetNewDecimalOrZero(this.txtNewInvestment.Text.Trim());
|
//operationReport.NewInvestment = Funs.GetNewDecimalOrZero(this.txtNewInvestment.Text.Trim());
|
||||||
operationReport.UnitLevel = this.txtUnitLevel.Text.Trim();
|
//operationReport.UnitLevel = this.txtUnitLevel.Text.Trim();
|
||||||
operationReport.CreateDate = Funs.GetNewDateTime(this.txtCreateDate.Text);
|
//operationReport.CreateDate = Funs.GetNewDateTime(this.txtCreateDate.Text);
|
||||||
operationReport.Place = this.txtPlace.Text.Trim();
|
//operationReport.Place = this.txtPlace.Text.Trim();
|
||||||
operationReport.Remark = this.txtRemark.Text.Trim();
|
operationReport.Remark = this.txtRemark.Text.Trim();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(this.BusinessReportId))
|
if (!string.IsNullOrEmpty(this.BusinessReportId))
|
||||||
|
@ -231,17 +283,17 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
var model = Funs.DB.Environmental_OperationReport.FirstOrDefault(s => s.BusinessReportId == this.BusinessReportId);
|
var model = Funs.DB.Environmental_OperationReport.FirstOrDefault(s => s.BusinessReportId == this.BusinessReportId);
|
||||||
if (model != null)
|
if (model != null)
|
||||||
{
|
{
|
||||||
model.Code = operationReport.Code;
|
//model.Code = operationReport.Code;
|
||||||
model.PersonNum = operationReport.PersonNum;
|
//model.PersonNum = operationReport.PersonNum;
|
||||||
model.TotalAssets = operationReport.TotalAssets;
|
//model.TotalAssets = operationReport.TotalAssets;
|
||||||
model.TotalValue = operationReport.TotalValue;
|
//model.TotalValue = operationReport.TotalValue;
|
||||||
model.NewInvestment = operationReport.NewInvestment;
|
//model.NewInvestment = operationReport.NewInvestment;
|
||||||
model.Quarters = operationReport.Quarters;
|
model.Quarters = operationReport.Quarters;
|
||||||
model.Year = operationReport.Year;
|
model.Year = operationReport.Year;
|
||||||
model.FillingMan = operationReport.FillingMan;
|
model.FillingMan = operationReport.FillingMan;
|
||||||
model.FillingDate = operationReport.FillingDate;
|
model.FillingDate = operationReport.FillingDate;
|
||||||
model.CreateDate = operationReport.CreateDate;
|
//model.CreateDate = operationReport.CreateDate;
|
||||||
model.Place = operationReport.Place;
|
//model.Place = operationReport.Place;
|
||||||
model.Remark = operationReport.Remark;
|
model.Remark = operationReport.Remark;
|
||||||
model.StatisticsDutyPerson = operationReport.StatisticsDutyPerson;
|
model.StatisticsDutyPerson = operationReport.StatisticsDutyPerson;
|
||||||
model.UnitDutyPerson = operationReport.UnitDutyPerson;
|
model.UnitDutyPerson = operationReport.UnitDutyPerson;
|
||||||
|
@ -251,6 +303,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
|
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, operationReport.Year.ToString() + "-" + operationReport.Quarters.ToString(), operationReport.BusinessReportId, BLL.Const.OperationReportMenuId, BLL.Const.BtnModify);
|
BLL.LogService.AddSys_Log(this.CurrUser, operationReport.Year.ToString() + "-" + operationReport.Quarters.ToString(), operationReport.BusinessReportId, BLL.Const.OperationReportMenuId, BLL.Const.BtnModify);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
|
saveReportItem(operationReport.BusinessReportId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -270,6 +323,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
BLL.Const.OperationReportMenuId, BLL.Const.BtnAdd);
|
BLL.Const.OperationReportMenuId, BLL.Const.BtnAdd);
|
||||||
|
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
|
saveReportItem(operationReport.BusinessReportId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -289,6 +343,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (code == "3")
|
||||||
|
{
|
||||||
|
Alert.ShowInParent("集团当前季度数据已锁定,无法上传!", MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||||
|
@ -304,6 +362,49 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 保存子表
|
||||||
|
private void saveReportItem(string BusinessReportId) {
|
||||||
|
var list = Funs.DB.Environmental_OperationReportItem.Where(x => x.BusinessReportId == BusinessReportId).ToList();
|
||||||
|
//先删除
|
||||||
|
if (list.Count>0)
|
||||||
|
{
|
||||||
|
Funs.DB.Environmental_OperationReportItem.DeleteAllOnSubmit(list);
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
//再保存
|
||||||
|
JArray mergedData = Grid1.GetMergedData();
|
||||||
|
var reportItemlist = new List<Model.Environmental_OperationReportItem>();
|
||||||
|
var isthisUnit = CommonService.GetIsThisUnit();
|
||||||
|
foreach (var item in mergedData)
|
||||||
|
{
|
||||||
|
JObject values = item.Value<JObject>("values");
|
||||||
|
int i = item.Value<int>("index");
|
||||||
|
var model = new Model.Environmental_OperationReportItem() {
|
||||||
|
BusinessReportItemId= Grid1.Rows[i].DataKeys[0].ToString(),
|
||||||
|
BusinessReportId= BusinessReportId,
|
||||||
|
SortIndex= i+1,
|
||||||
|
UnitName = values.Value<string>("UnitName").ToString(),
|
||||||
|
SortUnitName= isthisUnit.UnitName,
|
||||||
|
Code= values.Value<string>("Code").ToString(),
|
||||||
|
UnitLevel= values.Value<string>("UnitLevel").ToString(),
|
||||||
|
Place= values.Value<string>("Place").ToString(),
|
||||||
|
PersonNum= values.Value<int>("PersonNum"),
|
||||||
|
TotalAssets= values.Value<decimal>("TotalAssets"),
|
||||||
|
TotalValue = values.Value<decimal>("TotalValue"),
|
||||||
|
NewInvestment = values.Value<decimal>("NewInvestment"),
|
||||||
|
|
||||||
|
};
|
||||||
|
if (!string.IsNullOrEmpty(values.Value<string>("CreateDate").ToString()))
|
||||||
|
{
|
||||||
|
model.CreateDate = Convert.ToDateTime(values.Value<string>("CreateDate").ToString());
|
||||||
|
}
|
||||||
|
reportItemlist.Add(model);
|
||||||
|
}
|
||||||
|
Funs.DB.Environmental_OperationReportItem.InsertAllOnSubmit(reportItemlist);
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 年季度变化事件
|
#region 年季度变化事件
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 年季度变化事件
|
/// 年季度变化事件
|
||||||
|
|
|
@ -77,141 +77,6 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList ddlQuarter;
|
protected global::FineUIPro.DropDownList ddlQuarter;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Form4 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Form Form4;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtCode 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.TextBox txtCode;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// GroupPanel1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.GroupPanel GroupPanel1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Form3 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Form Form3;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtUnitLevel 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.TextBox txtUnitLevel;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtCreateDate 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DatePicker txtCreateDate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtPlace 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.TextBox txtPlace;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtPersonNum 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.NumberBox txtPersonNum;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// GroupPanel2 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.GroupPanel GroupPanel2;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Form5 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Form Form5;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtTotalAssets 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.NumberBox txtTotalAssets;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtTotalValue 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.NumberBox txtTotalValue;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtNewInvestment 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.NumberBox txtNewInvestment;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Form6 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Form Form6;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtRemark 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.TextBox txtRemark;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Form11 控件。
|
/// Form11 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -257,6 +122,123 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DatePicker txtFillingDate;
|
protected global::FineUIPro.DatePicker txtFillingDate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Form6 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Form Form6;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtRemark 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtRemark;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Form4 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Form Form4;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox TextBox1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox TextBox2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox TextBox3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DatePicker1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DatePicker DatePicker1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox4 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox TextBox4;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtPersonNum 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtPersonNum;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtTotalAssets 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtTotalAssets;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NumberBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox NumberBox1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NumberBox2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox NumberBox2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Toolbar2 控件。
|
/// Toolbar2 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -38,15 +38,6 @@ namespace Model
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 季度
|
|
||||||
/// </summary>
|
|
||||||
public int? Quarter
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -125,5 +116,13 @@ namespace Model
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 季度
|
||||||
|
/// </summary>
|
||||||
|
public int? Quarter
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,7 @@ namespace Model
|
||||||
/// 服务营业收入-本年
|
/// 服务营业收入-本年
|
||||||
///</summary>
|
///</summary>
|
||||||
public string ServiceOperatingIncome_ThisYear { get; set; }
|
public string ServiceOperatingIncome_ThisYear { get; set; }
|
||||||
|
public int? SortUnit { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class Environmental_OperationReportDto
|
||||||
|
{
|
||||||
|
public string BusinessReportId { get; set; }
|
||||||
|
|
||||||
|
public string UnitId { get; set; }
|
||||||
|
|
||||||
|
public int? Year { get; set; }
|
||||||
|
|
||||||
|
public int? Quarters { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public string FillingMan { get; set; }
|
||||||
|
|
||||||
|
public DateTime? FillingDate { get; set; }
|
||||||
|
|
||||||
|
public string StatisticsDutyPerson { get; set; }
|
||||||
|
|
||||||
|
public string UnitDutyPerson { get; set; }
|
||||||
|
|
||||||
|
public string Remark { get; set; }
|
||||||
|
|
||||||
|
public string UpState { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子表数据
|
||||||
|
/// </summary>
|
||||||
|
public List<reportItemListDto> reportItemList
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class reportItemListDto
|
||||||
|
{
|
||||||
|
public string BusinessReportItemId { get; set; }
|
||||||
|
public string BusinessReportId { get; set; }
|
||||||
|
public int? SortIndex { get; set; }
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
public string UnitLevel { get; set; }
|
||||||
|
|
||||||
|
public DateTime? CreateDate { get; set; }
|
||||||
|
|
||||||
|
public string Place { get; set; }
|
||||||
|
|
||||||
|
public int? PersonNum { get; set; }
|
||||||
|
|
||||||
|
public decimal? TotalAssets { get; set; }
|
||||||
|
|
||||||
|
public decimal? TotalValue { get; set; }
|
||||||
|
|
||||||
|
public decimal? NewInvestment { get; set; }
|
||||||
|
|
||||||
|
public string UnitName { get; set; }
|
||||||
|
|
||||||
|
public string SortUnitName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
2881
SGGL/Model/Model.cs
2881
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
|
@ -81,6 +81,7 @@
|
||||||
<Compile Include="APIItem\DropDownItem.cs" />
|
<Compile Include="APIItem\DropDownItem.cs" />
|
||||||
<Compile Include="APIItem\EnergyReport.cs" />
|
<Compile Include="APIItem\EnergyReport.cs" />
|
||||||
<Compile Include="APIItem\EnergyReportItem.cs" />
|
<Compile Include="APIItem\EnergyReportItem.cs" />
|
||||||
|
<Compile Include="APIItem\Environmental_OperationReportDto.cs" />
|
||||||
<Compile Include="APIItem\EPSummaryReport.cs" />
|
<Compile Include="APIItem\EPSummaryReport.cs" />
|
||||||
<Compile Include="APIItem\HJGL\JointCompreInfoItem.cs" />
|
<Compile Include="APIItem\HJGL\JointCompreInfoItem.cs" />
|
||||||
<Compile Include="APIItem\HJGL\ReportQueryItem.cs" />
|
<Compile Include="APIItem\HJGL\ReportQueryItem.cs" />
|
||||||
|
|
Loading…
Reference in New Issue