建筑行业报表
This commit is contained in:
parent
1cce9ee9e2
commit
5c2ca7b809
|
|
@ -0,0 +1,69 @@
|
||||||
|
alter table [dbo].[Environmental_ArchitectureReport] drop column Quarters
|
||||||
|
GO
|
||||||
|
alter table [dbo].[Environmental_ArchitectureReport] add Month int null
|
||||||
|
GO
|
||||||
|
alter table [dbo].[Environmental_ProjectArchitectureReport] drop column Quarters
|
||||||
|
GO
|
||||||
|
alter table [dbo].[Environmental_ProjectArchitectureReport] add Month int null
|
||||||
|
GO
|
||||||
|
|
||||||
|
/*************建筑行业能源节约与生态环境保护汇总表**************/
|
||||||
|
ALTER VIEW [dbo].[View_Environmental_ArchitectureReport]
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
Report.ArchitectureReportId,
|
||||||
|
Report.UnitId,
|
||||||
|
Report.FillingDate,
|
||||||
|
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate,
|
||||||
|
Group_0008.ConstText as YearStr,
|
||||||
|
Group_0009.ConstText as MonthStr,
|
||||||
|
U.UnitName,
|
||||||
|
Report.Year,
|
||||||
|
Report.Month,
|
||||||
|
Report.UpState,
|
||||||
|
Report.DutyPerson
|
||||||
|
FROM dbo.Environmental_ArchitectureReport AS Report
|
||||||
|
LEFT JOIN Base_Unit AS U ON U.UnitId=Report.UnitId
|
||||||
|
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.[Year]
|
||||||
|
LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =Report.[Month]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*************建筑行业能源节约与生态环境保护汇总表**************/
|
||||||
|
ALTER VIEW [dbo].[View_Environmental_ProjectArchitectureReport]
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
Report.ArchitectureReportId,
|
||||||
|
Report.ProjectId,
|
||||||
|
Report.FillingDate,
|
||||||
|
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate,
|
||||||
|
Group_0008.ConstText as YearStr,
|
||||||
|
Group_0009.ConstText as MonthStr,
|
||||||
|
U.ProjectName,
|
||||||
|
Report.Year,
|
||||||
|
Report.Month,
|
||||||
|
Report.UpState,
|
||||||
|
Report.DutyPerson
|
||||||
|
FROM dbo.Environmental_ProjectArchitectureReport AS Report
|
||||||
|
LEFT JOIN Base_Project AS U ON U.ProjectId=Report.ProjectId
|
||||||
|
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.[Year]
|
||||||
|
LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =Report.[Month]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6740,15 +6740,15 @@ namespace BLL
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 施工技术交底管理
|
/// 施工技术交底管理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string ConTechnologyDisclosureMenuId = "A16CFA9D-2783-4573-95F9-EBA2B682B7EA";
|
public const string ConTechnologyDisclosureMenuId = "C2BBE0BC-C75A-4EEB-A893-8CDBD2DE2A74";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 特设质保体系
|
/// 特设质保体系
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string CQMS_QualityAssuranceMenuId = "2C49EC5E-BF6F-4C44-BA02-9BD183CF68C6";
|
public const string CQMS_QualityAssuranceMenuId = "D9BE2C06-E757-4611-A73D-91D2A8FD0DEA";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图纸会审管理
|
/// 图纸会审管理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string ReviewDrawingsMenuId = "856D53B3-C5FB-443F-917B-39E83BE685DB";
|
public const string ReviewDrawingsMenuId = "C2BBE0BC-C75A-4EEB-A893-8CDBD2DE2A74";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图纸会审记录导入模板文件原始虚拟路径
|
/// 图纸会审记录导入模板文件原始虚拟路径
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,14 @@ namespace BLL
|
||||||
/// <param name="projectId"></param>
|
/// <param name="projectId"></param>
|
||||||
/// <param name="states"></param>
|
/// <param name="states"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.HazardRegisterItem> getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex)
|
public static List<Model.HazardRegisterItem> getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex ,int pageSize ,string ProblemTypes)
|
||||||
{
|
{
|
||||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var hazardRegisters = (from x in db.View_Hazard_HazardRegister_Unit
|
var hazardRegisters = (from x in db.View_Hazard_HazardRegister_Unit
|
||||||
where (x.ProjectId == projectId || projectId == null) && (x.States == states || states == null)
|
where (x.ProjectId == projectId || projectId == null) && (x.States == states || states == null) && (x.ProblemTypes == ProblemTypes)
|
||||||
orderby x.CheckTime descending
|
orderby x.CheckTime descending
|
||||||
select x).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
select x).Skip(pageSize * (pageIndex - 1)).Take(pageSize).ToList();
|
||||||
return ObjectMapperManager.DefaultInstance.GetMapper<List<Model.View_Hazard_HazardRegister_Unit>, List<Model.HazardRegisterItem>>().Map(hazardRegisters.ToList());
|
return ObjectMapperManager.DefaultInstance.GetMapper<List<Model.View_Hazard_HazardRegister_Unit>, List<Model.HazardRegisterItem>>().Map(hazardRegisters.ToList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1103,7 +1103,7 @@
|
||||||
ArchitectureReportId = x.ArchitectureReportId,
|
ArchitectureReportId = x.ArchitectureReportId,
|
||||||
UnitId = x.UnitId,
|
UnitId = x.UnitId,
|
||||||
Year = x.Year,
|
Year = x.Year,
|
||||||
Quarters = x.Quarters,
|
Month = x.Month,
|
||||||
FillingMan = x.FillingMan,
|
FillingMan = x.FillingMan,
|
||||||
FillingDate = x.FillingDate,
|
FillingDate = x.FillingDate,
|
||||||
DutyPerson = x.DutyPerson,
|
DutyPerson = x.DutyPerson,
|
||||||
|
|
@ -1139,7 +1139,7 @@
|
||||||
////更新 当前人要处理的意见
|
////更新 当前人要处理的意见
|
||||||
ProjectDataFlowSetService.CloseFlowOperate(Const.ArchitectureReportMenuId, item, string.Empty);
|
ProjectDataFlowSetService.CloseFlowOperate(Const.ArchitectureReportMenuId, item, string.Empty);
|
||||||
// //更新催报信息
|
// //更新催报信息
|
||||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Quarters.ToString());
|
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Month.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LogService.AddSys_Log(CurrUser, "【建筑行业能源节约与生态环境保护汇总表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnUploadResources);
|
LogService.AddSys_Log(CurrUser, "【建筑行业能源节约与生态环境保护汇总表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnUploadResources);
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,12 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||||
/// <returns>明细记录集合</returns>
|
/// <returns>明细记录集合</returns>
|
||||||
public static List<Model.Environmental_ArchitectureReportItem> GetYearSumItems(string unitId, int? year, int? Quarters)
|
public static List<Model.Environmental_ArchitectureReportItem> GetYearSumItems(string unitId, int? year, int? Month)
|
||||||
{
|
{
|
||||||
return (from x in Funs.DB.Environmental_ArchitectureReportItem
|
return (from x in Funs.DB.Environmental_ArchitectureReportItem
|
||||||
join y in Funs.DB.Environmental_ArchitectureReport
|
join y in Funs.DB.Environmental_ArchitectureReport
|
||||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||||
where y.UnitId == unitId && y.Year == year && y.Quarters == Quarters
|
where y.UnitId == unitId && y.Year == year && y.Month == Month
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select x).Distinct().ToList();
|
select x).Distinct().ToList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,9 @@ namespace BLL
|
||||||
/// <param name = "year" > 年度 </ param >
|
/// <param name = "year" > 年度 </ param >
|
||||||
/// <param name="month">月份</param>
|
/// <param name="month">月份</param>
|
||||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdAndYearAndQuarters(string unitId, int year, int Quarters)
|
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdAndYearAndQuarters(string unitId, int year, int month)
|
||||||
{
|
{
|
||||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Quarters == Quarters && e.Year == year);
|
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Month == month && e.Year == year);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -50,7 +50,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
|
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
|
||||||
Year = ArchitectureReport.Year,
|
Year = ArchitectureReport.Year,
|
||||||
Quarters = ArchitectureReport.Quarters,
|
Month = ArchitectureReport.Month,
|
||||||
UnitId = ArchitectureReport.UnitId,
|
UnitId = ArchitectureReport.UnitId,
|
||||||
FillingDate = ArchitectureReport.FillingDate,
|
FillingDate = ArchitectureReport.FillingDate,
|
||||||
DutyPerson = ArchitectureReport.DutyPerson,
|
DutyPerson = ArchitectureReport.DutyPerson,
|
||||||
|
|
@ -72,7 +72,7 @@ namespace BLL
|
||||||
if (newArchitectureReport != null)
|
if (newArchitectureReport != null)
|
||||||
{
|
{
|
||||||
newArchitectureReport.Year = ArchitectureReport.Year;
|
newArchitectureReport.Year = ArchitectureReport.Year;
|
||||||
newArchitectureReport.Quarters = ArchitectureReport.Quarters;
|
newArchitectureReport.Month = ArchitectureReport.Month;
|
||||||
newArchitectureReport.UnitId = ArchitectureReport.UnitId;
|
newArchitectureReport.UnitId = ArchitectureReport.UnitId;
|
||||||
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
|
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
|
||||||
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
|
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
|
||||||
|
|
@ -101,9 +101,9 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Id">Id</param>
|
/// <param name="Id">Id</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdDate(string unitId, int year, int Quarters)
|
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdDate(string unitId, int year, int month)
|
||||||
{
|
{
|
||||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarters == Quarters);
|
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Month == month);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,12 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||||
/// <returns>明细记录集合</returns>
|
/// <returns>明细记录集合</returns>
|
||||||
public static List<Model.Environmental_ProjectArchitectureReportItem> GetYearSumItems(string projectId, int? year, int? Quarters)
|
public static List<Model.Environmental_ProjectArchitectureReportItem> GetYearSumItems(string projectId, int? year, int? Month)
|
||||||
{
|
{
|
||||||
return (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
return (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
||||||
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
||||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||||
where y.ProjectId == projectId && y.Year == year && y.Quarters == Quarters
|
where y.ProjectId == projectId && y.Year == year && y.Month == Month
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select x).Distinct().ToList();
|
select x).Distinct().ToList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,9 @@ namespace BLL
|
||||||
/// <param name = "year" > 年度 </ param >
|
/// <param name = "year" > 年度 </ param >
|
||||||
/// <param name="month">月份</param>
|
/// <param name="month">月份</param>
|
||||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdAndYearAndQuarters(string projectId, int year, int Quarters)
|
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdAndYearAndQuarters(string projectId, int year, int Month)
|
||||||
{
|
{
|
||||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == projectId && e.Quarters == Quarters && e.Year == year);
|
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == projectId && e.Month == Month && e.Year == year);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -50,7 +50,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
|
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
|
||||||
Year = ArchitectureReport.Year,
|
Year = ArchitectureReport.Year,
|
||||||
Quarters = ArchitectureReport.Quarters,
|
Month = ArchitectureReport.Month,
|
||||||
ProjectId = ArchitectureReport.ProjectId,
|
ProjectId = ArchitectureReport.ProjectId,
|
||||||
FillingDate = ArchitectureReport.FillingDate,
|
FillingDate = ArchitectureReport.FillingDate,
|
||||||
DutyPerson = ArchitectureReport.DutyPerson,
|
DutyPerson = ArchitectureReport.DutyPerson,
|
||||||
|
|
@ -72,7 +72,7 @@ namespace BLL
|
||||||
if (newArchitectureReport != null)
|
if (newArchitectureReport != null)
|
||||||
{
|
{
|
||||||
newArchitectureReport.Year = ArchitectureReport.Year;
|
newArchitectureReport.Year = ArchitectureReport.Year;
|
||||||
newArchitectureReport.Quarters = ArchitectureReport.Quarters;
|
newArchitectureReport.Month = ArchitectureReport.Month;
|
||||||
newArchitectureReport.ProjectId = ArchitectureReport.ProjectId;
|
newArchitectureReport.ProjectId = ArchitectureReport.ProjectId;
|
||||||
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
|
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
|
||||||
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
|
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
|
||||||
|
|
@ -101,9 +101,9 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Id">Id</param>
|
/// <param name="Id">Id</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdDate(string ProjectId, int year, int Quarters)
|
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdDate(string ProjectId, int year, int Month)
|
||||||
{
|
{
|
||||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Year == year && e.Quarters == Quarters);
|
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Year == year && e.Month == Month);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -1284,6 +1284,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(date2) && gTrainingTestRecord != null)
|
||||||
|
{
|
||||||
|
DateTime dt = DateTime.Parse(date2);
|
||||||
|
TestStartTime = dt;
|
||||||
|
}
|
||||||
string[] fieldNames = { };
|
string[] fieldNames = { };
|
||||||
object[] fieldValues = { };
|
object[] fieldValues = { };
|
||||||
if (!string.IsNullOrEmpty(Signature))
|
if (!string.IsNullOrEmpty(Signature))
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,13 @@
|
||||||
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||||
Width="150px" LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
Width="150px" LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpQuarters" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
<f:DropDownList ID="drpMonth" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||||
Width="150px" LabelWidth="50px" Label="季度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
Width="150px" LabelWidth="50px" Label="月份" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:Button ID="BtnBulletLeft" ToolTip="前一季度" Text="前一季度" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
<f:Button ID="BtnBulletLeft" ToolTip="前一个月" Text="前一个月" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
||||||
OnClick="BtnBulletLeft_Click">
|
OnClick="BtnBulletLeft_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="BtnBulletRight" ToolTip="后一季度" Text="后一季度" Icon="BulletRight" runat="server" EnablePostBack="true"
|
<f:Button ID="BtnBulletRight" ToolTip="后一个月" Text="后一个月" Icon="BulletRight" runat="server" EnablePostBack="true"
|
||||||
OnClick="BulletRight_Click">
|
OnClick="BulletRight_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
|
|
@ -68,6 +68,9 @@
|
||||||
<f:Button ID="btnView" ToolTip="查看未报项目" Text="查看未报项目" Icon="MagifierZoomOut" runat="server"
|
<f:Button ID="btnView" ToolTip="查看未报项目" Text="查看未报项目" Icon="MagifierZoomOut" runat="server"
|
||||||
OnClick="btnView_Click">
|
OnClick="btnView_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnState" ToolTip="恢复未上报状态" Text="恢复未上报状态" Icon="Pencil" runat="server"
|
||||||
|
OnClick="btnState_Click">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
||||||
|
|
@ -16,17 +16,24 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
|
||||||
BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, ConstValue.Group_0011, false);
|
BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
|
||||||
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
||||||
|
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||||
|
{
|
||||||
|
this.btnState.Hidden = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.btnState.Hidden = true;
|
||||||
|
}
|
||||||
this.drpUnit.DataTextField = "UnitName";
|
this.drpUnit.DataTextField = "UnitName";
|
||||||
drpUnit.DataValueField = "UnitId";
|
drpUnit.DataValueField = "UnitId";
|
||||||
drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList();
|
drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList();
|
||||||
drpUnit.DataBind();
|
drpUnit.DataBind();
|
||||||
this.drpUnit.Readonly = true;
|
this.drpUnit.Readonly = true;
|
||||||
////取上个报表时间
|
////取上个报表时间
|
||||||
DateTime showDate = System.DateTime.Now.AddMonths(-3);
|
DateTime showDate = System.DateTime.Now.AddMonths(-1);
|
||||||
this.drpQuarters.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
|
drpMonth.SelectedValue = showDate.Month.ToString();
|
||||||
drpYear.SelectedValue = showDate.Year.ToString();
|
drpYear.SelectedValue = showDate.Year.ToString();
|
||||||
GetValue();
|
GetValue();
|
||||||
}
|
}
|
||||||
|
|
@ -48,8 +55,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
private void GetValue()
|
private void GetValue()
|
||||||
{
|
{
|
||||||
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
||||||
int Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
|
int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue);
|
||||||
Model.Environmental_ArchitectureReport r = Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == Quarters && e.Year == year);
|
Model.Environmental_ArchitectureReport r = Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Month == month && e.Year == year);
|
||||||
if (r != null && r.UpState != BLL.Const.UpState_5)
|
if (r != null && r.UpState != BLL.Const.UpState_5)
|
||||||
{
|
{
|
||||||
string cncecAPIUrl = string.Empty;
|
string cncecAPIUrl = string.Empty;
|
||||||
|
|
@ -62,7 +69,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string getUrl = cncecAPIUrl + "/api/InformationData/GetArchitectureAuditState" + "?unitId=" + CommonService.GetThisUnitId() + "&year=" + year + "&quarters=" + Quarters;
|
string getUrl = cncecAPIUrl + "/api/InformationData/GetArchitectureAuditState" + "?unitId=" + CommonService.GetThisUnitId() + "&year=" + year + "&month=" + month;
|
||||||
var strJosn = APIGetHttpService.Http(getUrl);
|
var strJosn = APIGetHttpService.Http(getUrl);
|
||||||
if (!string.IsNullOrEmpty(strJosn))
|
if (!string.IsNullOrEmpty(strJosn))
|
||||||
{
|
{
|
||||||
|
|
@ -79,7 +86,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Model.View_Environmental_ArchitectureReport report = Funs.DB.View_Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == Quarters && e.Year == year);
|
Model.View_Environmental_ArchitectureReport report = Funs.DB.View_Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Month == month && e.Year == year);
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
string upState = string.Empty;
|
string upState = string.Empty;
|
||||||
|
|
@ -95,7 +102,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
upState = "(未上报)";
|
upState = "(未上报)";
|
||||||
}
|
}
|
||||||
this.SimpleForm1.Title = "企业建筑行业能源节约与生态环境保护汇总表" + report.QuartersStr + report.YearStr + upState;
|
this.SimpleForm1.Title = "企业建筑行业能源节约与生态环境保护汇总表" + report.MonthStr + report.YearStr + upState;
|
||||||
lbUnitName.Text = "填报企业:" + report.UnitName;
|
lbUnitName.Text = "填报企业:" + report.UnitName;
|
||||||
if (report.FillingDate != null)
|
if (report.FillingDate != null)
|
||||||
{
|
{
|
||||||
|
|
@ -214,7 +221,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var getReport = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
var getReport = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
this.btnAudit1.Hidden = true;
|
this.btnAudit1.Hidden = true;
|
||||||
this.btnAudit2.Hidden = true;
|
this.btnAudit2.Hidden = true;
|
||||||
if (getReport != null)
|
if (getReport != null)
|
||||||
|
|
@ -249,7 +256,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("ArchitectureReportSave.aspx?UnitId={0}&&Year={1}&&Quarterss={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?UnitId={0}&&Year={1}&&Months={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpMonth.SelectedValue, "编辑 - ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -259,7 +266,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnEdit_Click(object sender, EventArgs e)
|
protected void btnEdit_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
||||||
|
|
@ -277,7 +284,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnAudit1_Click(object sender, EventArgs e)
|
protected void btnAudit1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
||||||
|
|
@ -295,7 +302,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnAudit2_Click(object sender, EventArgs e)
|
protected void btnAudit2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
||||||
|
|
@ -313,7 +320,7 @@ 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)
|
||||||
{
|
{
|
||||||
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}&type=Updata", report.ArchitectureReportId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}&type=Updata", report.ArchitectureReportId, "编辑 - ")));
|
||||||
|
|
@ -331,10 +338,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnDelete_Click(object sender, EventArgs e)
|
protected void btnDelete_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnDelete);
|
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnDelete);
|
||||||
BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.ArchitectureReportId);
|
BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.ArchitectureReportId);
|
||||||
BLL.ArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
|
BLL.ArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
|
||||||
BLL.ArchitectureReportService.DeleteArchitectureReportByArchitectureReportId(report.ArchitectureReportId);
|
BLL.ArchitectureReportService.DeleteArchitectureReportByArchitectureReportId(report.ArchitectureReportId);
|
||||||
|
|
@ -377,7 +384,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId.ToString());
|
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId.ToString());
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
return report.Year + "年" + report.Quarters + "月";
|
return report.Year + "年" + report.Month + "月";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -414,7 +421,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void BtnBulletLeft_Click(object sender, EventArgs e)
|
protected void BtnBulletLeft_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetQuartersChange("-");
|
SetMonthChange("-");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -424,30 +431,30 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void BulletRight_Click(object sender, EventArgs e)
|
protected void BulletRight_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetQuartersChange("+");
|
SetMonthChange("+");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 月份加减变化
|
/// 月份加减变化
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
private void SetQuartersChange(string type)
|
private void SetMonthChange(string type)
|
||||||
{
|
{
|
||||||
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
|
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue);
|
||||||
if (nowDate.HasValue)
|
if (nowDate.HasValue)
|
||||||
{
|
{
|
||||||
DateTime showDate = new DateTime();
|
DateTime showDate = new DateTime();
|
||||||
if (type == "+")
|
if (type == "+")
|
||||||
{
|
{
|
||||||
showDate = nowDate.Value.AddMonths(3);
|
showDate = nowDate.Value.AddMonths(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
showDate = nowDate.Value.AddMonths(-3);
|
showDate = nowDate.Value.AddMonths(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.drpYear.SelectedValue = showDate.Year.ToString();
|
this.drpYear.SelectedValue = showDate.Year.ToString();
|
||||||
this.drpQuarters.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
|
drpMonth.SelectedValue = showDate.Month.ToString();
|
||||||
///值变化
|
///值变化
|
||||||
GetValue();
|
GetValue();
|
||||||
}
|
}
|
||||||
|
|
@ -462,7 +469,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnSee_Click(object sender, EventArgs e)
|
protected void btnSee_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.ArchitectureReportId, "查看 - ")));
|
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.ArchitectureReportId, "查看 - ")));
|
||||||
|
|
@ -678,14 +685,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
string info = string.Empty;
|
string info = string.Empty;
|
||||||
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
||||||
int Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
|
int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue);
|
||||||
var projects = (from x in Funs.DB.Base_Project
|
var projects = (from x in Funs.DB.Base_Project
|
||||||
where (x.ProjectState == BLL.Const.ProjectState_1 || x.ProjectState == null)
|
where (x.ProjectState == BLL.Const.ProjectState_1 || x.ProjectState == null)
|
||||||
&& (x.IsDelete == null || x.IsDelete == false)
|
&& (x.IsDelete == null || x.IsDelete == false)
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
foreach (var item in projects)
|
foreach (var item in projects)
|
||||||
{
|
{
|
||||||
var projectArchitectureReport = Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == year && x.Quarters == Quarters);
|
var projectArchitectureReport = Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == year && x.Month == month);
|
||||||
if (projectArchitectureReport == null)
|
if (projectArchitectureReport == null)
|
||||||
{
|
{
|
||||||
info += item.ProjectName + ",未填写报表;</br>";
|
info += item.ProjectName + ",未填写报表;</br>";
|
||||||
|
|
@ -719,5 +726,21 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 恢复未上报状态
|
||||||
|
/// <summary>
|
||||||
|
/// 恢复未上报状态
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnState_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
|
report.UpState = "2";
|
||||||
|
BLL.ArchitectureReportService.UpdateArchitectureReport(report);
|
||||||
|
ShowNotify("恢复成功!", MessageBoxIcon.Success);
|
||||||
|
GetValue();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,12 +7,10 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.ZHGL.Environmental
|
namespace FineUIPro.Web.ZHGL.Environmental {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class ArchitectureReport
|
public partial class ArchitectureReport {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
|
@ -87,13 +85,13 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
protected global::FineUIPro.DropDownList drpYear;
|
protected global::FineUIPro.DropDownList drpYear;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpQuarters 控件。
|
/// drpMonth 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpQuarters;
|
protected global::FineUIPro.DropDownList drpMonth;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// BtnBulletLeft 控件。
|
/// BtnBulletLeft 控件。
|
||||||
|
|
@ -194,6 +192,15 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnView;
|
protected global::FineUIPro.Button btnView;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnState 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnState;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lbUnitName 控件。
|
/// lbUnitName 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@
|
||||||
<f:DropDownList ID="drpYear" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
<f:DropDownList ID="drpYear" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||||
ShowRedStar="true" runat="server" Label="年度">
|
ShowRedStar="true" runat="server" Label="年度">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpQuarters" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
<f:DropDownList ID="drpMonth" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||||
ShowRedStar="true" runat="server" Label="季度">
|
ShowRedStar="true" runat="server" Label="月份">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||||
Label="填报企业" FocusOnPageLoad="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
Label="填报企业" FocusOnPageLoad="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
}
|
}
|
||||||
items.Clear();
|
items.Clear();
|
||||||
BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, ConstValue.Group_0011, false);
|
BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
|
||||||
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
||||||
this.drpUnit.DataTextField = "UnitName";
|
this.drpUnit.DataTextField = "UnitName";
|
||||||
drpUnit.DataValueField = "UnitId";
|
drpUnit.DataValueField = "UnitId";
|
||||||
|
|
@ -57,7 +57,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
this.drpUnit.Readonly = true;
|
this.drpUnit.Readonly = true;
|
||||||
string unitId = Request.QueryString["UnitId"];
|
string unitId = Request.QueryString["UnitId"];
|
||||||
string year = Request.QueryString["Year"];
|
string year = Request.QueryString["Year"];
|
||||||
string quarters = Request.QueryString["Quarterss"];
|
string months = Request.QueryString["Months"];
|
||||||
ArchitectureReportId = Request.QueryString["ArchitectureReportId"];
|
ArchitectureReportId = Request.QueryString["ArchitectureReportId"];
|
||||||
if (!string.IsNullOrEmpty(Request.QueryString["type"]))
|
if (!string.IsNullOrEmpty(Request.QueryString["type"]))
|
||||||
{
|
{
|
||||||
|
|
@ -87,7 +87,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
this.btnSave.Hidden = true;
|
this.btnSave.Hidden = true;
|
||||||
this.btnUpdata.Hidden = true;
|
this.btnUpdata.Hidden = true;
|
||||||
}
|
}
|
||||||
drpQuarters.SelectedValue = report.Quarters.ToString();
|
drpMonth.SelectedValue = report.Month.ToString();
|
||||||
drpYear.SelectedValue = report.Year.ToString();
|
drpYear.SelectedValue = report.Year.ToString();
|
||||||
drpUnit.SelectedValue = report.UnitId;
|
drpUnit.SelectedValue = report.UnitId;
|
||||||
if (report.FillingDate != null)
|
if (report.FillingDate != null)
|
||||||
|
|
@ -100,12 +100,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//this.btnCopy.Hidden = false;
|
//this.btnCopy.Hidden = false;
|
||||||
drpQuarters.SelectedValue = quarters;
|
drpMonth.SelectedValue = months;
|
||||||
drpYear.SelectedValue = year;
|
drpYear.SelectedValue = year;
|
||||||
txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||||
txtDutyPerson.Text = this.CurrUser.UserName;
|
txtDutyPerson.Text = this.CurrUser.UserName;
|
||||||
//增加明细集合
|
//增加明细集合
|
||||||
GetNewItems(year, quarters);
|
GetNewItems(year, months);
|
||||||
this.Grid1.DataSource = items;
|
this.Grid1.DataSource = items;
|
||||||
this.Grid1.DataBind();
|
this.Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
|
@ -150,7 +150,9 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
Grid1.Rows[58].CellCssClasses[4] = "f-grid-cell-uneditable";
|
Grid1.Rows[58].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||||
Grid1.Rows[58].CellCssClasses[5] = "f-grid-cell-uneditable";
|
Grid1.Rows[58].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||||
}
|
}
|
||||||
var lastYearReport = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue) - 1, Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue));
|
if (string.IsNullOrEmpty(ArchitectureReportId))
|
||||||
|
{
|
||||||
|
var lastYearReport = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue) - 1, Funs.GetNewIntOrZero(this.drpMonth.SelectedValue));
|
||||||
if (lastYearReport != null)
|
if (lastYearReport != null)
|
||||||
{
|
{
|
||||||
var lastYearReportItems = ArchitectureReportItemService.GetItems(lastYearReport.ArchitectureReportId);
|
var lastYearReportItems = ArchitectureReportItemService.GetItems(lastYearReport.ArchitectureReportId);
|
||||||
|
|
@ -214,11 +216,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
SetLastYearUnEditableRow();
|
SetLastYearUnEditableRow();
|
||||||
//获取项目级数据
|
//获取项目级数据
|
||||||
string year = Request.QueryString["Year"];
|
string year = Request.QueryString["Year"];
|
||||||
string quarters = Request.QueryString["Quarterss"];
|
string months = Request.QueryString["Months"];
|
||||||
var items = (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
var items = (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
||||||
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
||||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||||
where y.Year == Funs.GetNewIntOrZero(year) && y.Quarters == Funs.GetNewIntOrZero(quarters)
|
where y.Year == Funs.GetNewIntOrZero(year) && y.Month == Funs.GetNewIntOrZero(months)
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
if (items.Count() > 0)
|
if (items.Count() > 0)
|
||||||
|
|
@ -285,9 +287,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
|
DateTime lastMonth = Convert.ToDateTime(drpYear.SelectedValue + "-" + drpMonth.SelectedValue + "-01").AddYears(-1);
|
||||||
DateTime lastQuarters = nowDate.Value.AddMonths(-3);
|
Environmental_ArchitectureReport lastQuartersReport = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, lastMonth.Year, lastMonth.Month);
|
||||||
Environmental_ArchitectureReport lastQuartersReport = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, lastQuarters.Year, Funs.GetNowQuarterlyByTime(lastQuarters));
|
|
||||||
if (lastQuartersReport != null)
|
if (lastQuartersReport != null)
|
||||||
{
|
{
|
||||||
var lastQuartersReportItems = BLL.ArchitectureReportItemService.GetItems(lastQuartersReport.ArchitectureReportId);
|
var lastQuartersReportItems = BLL.ArchitectureReportItemService.GetItems(lastQuartersReport.ArchitectureReportId);
|
||||||
|
|
@ -353,11 +354,11 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string year = Request.QueryString["Year"];
|
string year = Request.QueryString["Year"];
|
||||||
string quarters = Request.QueryString["Quarterss"];
|
string months = Request.QueryString["Months"];
|
||||||
var items = (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
var items = (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
||||||
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
||||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||||
where y.Year == Funs.GetNewIntOrZero(year) && y.Quarters == Funs.GetNewIntOrZero(quarters)
|
where y.Year == Funs.GetNewIntOrZero(year) && y.Month == Funs.GetNewIntOrZero(months)
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
if (items.Count() > 0)
|
if (items.Count() > 0)
|
||||||
|
|
@ -542,6 +543,13 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
items = BLL.ArchitectureReportItemService.GetShowItems(ArchitectureReportId);
|
||||||
|
this.Grid1.DataSource = items;
|
||||||
|
this.Grid1.DataBind();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SetLastYearUnEditableRow()
|
private void SetLastYearUnEditableRow()
|
||||||
{
|
{
|
||||||
|
|
@ -1302,7 +1310,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
UnitId = drpUnit.SelectedValue,
|
UnitId = drpUnit.SelectedValue,
|
||||||
Year = Funs.GetNewIntOrZero(drpYear.SelectedValue),
|
Year = Funs.GetNewIntOrZero(drpYear.SelectedValue),
|
||||||
Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue)
|
Month = Funs.GetNewIntOrZero(drpMonth.SelectedValue)
|
||||||
};
|
};
|
||||||
if (!string.IsNullOrEmpty(txtFillingDate.Text.Trim()))
|
if (!string.IsNullOrEmpty(txtFillingDate.Text.Trim()))
|
||||||
{
|
{
|
||||||
|
|
@ -1311,14 +1319,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
report.DutyPerson = txtDutyPerson.Text.Trim();
|
report.DutyPerson = txtDutyPerson.Text.Trim();
|
||||||
if (String.IsNullOrEmpty(ArchitectureReportId))
|
if (String.IsNullOrEmpty(ArchitectureReportId))
|
||||||
{
|
{
|
||||||
Environmental_ArchitectureReport old = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Environmental_ArchitectureReport old = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (old == null)
|
if (old == null)
|
||||||
{
|
{
|
||||||
report.ArchitectureReportId = SQLHelper.GetNewID(typeof(Model.Environmental_ArchitectureReport));
|
report.ArchitectureReportId = SQLHelper.GetNewID(typeof(Model.Environmental_ArchitectureReport));
|
||||||
report.UpState = BLL.Const.UpState_2;
|
report.UpState = BLL.Const.UpState_2;
|
||||||
report.FillingMan = this.CurrUser.UserName;
|
report.FillingMan = this.CurrUser.UserName;
|
||||||
BLL.ArchitectureReportService.AddArchitectureReport(report);
|
BLL.ArchitectureReportService.AddArchitectureReport(report);
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnAdd);
|
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnAdd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1332,7 +1340,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
report.ArchitectureReportId = ArchitectureReportId;
|
report.ArchitectureReportId = ArchitectureReportId;
|
||||||
report.UpState = BLL.Const.UpState_2;
|
report.UpState = BLL.Const.UpState_2;
|
||||||
BLL.ArchitectureReportService.UpdateArchitectureReport(report);
|
BLL.ArchitectureReportService.UpdateArchitectureReport(report);
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnModify);
|
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnModify);
|
||||||
}
|
}
|
||||||
ArchitectureReportId = report.ArchitectureReportId;
|
ArchitectureReportId = report.ArchitectureReportId;
|
||||||
BLL.ArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
|
BLL.ArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
|
||||||
|
|
@ -1595,12 +1603,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnCopy_Click(object sender, EventArgs e)
|
protected void btnCopy_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
|
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue);
|
||||||
if (nowDate.HasValue)
|
if (nowDate.HasValue)
|
||||||
{
|
{
|
||||||
DateTime showDate = new DateTime();
|
DateTime showDate = new DateTime();
|
||||||
showDate = nowDate.Value.AddMonths(-3);
|
showDate = nowDate.Value.AddMonths(-3);
|
||||||
Model.Environmental_ArchitectureReport ArchitectureReport = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, showDate.Year, Funs.GetNowQuarterlyByTime(showDate));
|
Model.Environmental_ArchitectureReport ArchitectureReport = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, showDate.Year, showDate.Month);
|
||||||
if (ArchitectureReport != null)
|
if (ArchitectureReport != null)
|
||||||
{
|
{
|
||||||
Model.Environmental_ArchitectureReport newArchitectureReport = new Environmental_ArchitectureReport();
|
Model.Environmental_ArchitectureReport newArchitectureReport = new Environmental_ArchitectureReport();
|
||||||
|
|
@ -1608,7 +1616,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
newArchitectureReport.ArchitectureReportId = this.ArchitectureReportId;
|
newArchitectureReport.ArchitectureReportId = this.ArchitectureReportId;
|
||||||
newArchitectureReport.UnitId = this.drpUnit.SelectedValue;
|
newArchitectureReport.UnitId = this.drpUnit.SelectedValue;
|
||||||
newArchitectureReport.Year = Convert.ToInt32(this.drpYear.SelectedValue);
|
newArchitectureReport.Year = Convert.ToInt32(this.drpYear.SelectedValue);
|
||||||
newArchitectureReport.Quarters = Convert.ToInt32(this.drpQuarters.SelectedValue);
|
newArchitectureReport.Month = Convert.ToInt32(this.drpMonth.SelectedValue);
|
||||||
newArchitectureReport.FillingMan = this.CurrUser.UserName;
|
newArchitectureReport.FillingMan = this.CurrUser.UserName;
|
||||||
newArchitectureReport.FillingDate = DateTime.Now;
|
newArchitectureReport.FillingDate = DateTime.Now;
|
||||||
newArchitectureReport.DutyPerson = this.CurrUser.UserName;
|
newArchitectureReport.DutyPerson = this.CurrUser.UserName;
|
||||||
|
|
@ -1647,7 +1655,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
var report = BLL.ArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
|
var report = BLL.ArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
drpQuarters.SelectedValue = report.Quarters.ToString();
|
drpMonth.SelectedValue = report.Month.ToString();
|
||||||
drpYear.SelectedValue = report.Year.ToString();
|
drpYear.SelectedValue = report.Year.ToString();
|
||||||
drpUnit.SelectedValue = report.UnitId;
|
drpUnit.SelectedValue = report.UnitId;
|
||||||
if (report.FillingDate != null)
|
if (report.FillingDate != null)
|
||||||
|
|
|
||||||
|
|
@ -49,13 +49,13 @@ namespace FineUIPro.Web.ZHGL.Environmental {
|
||||||
protected global::FineUIPro.DropDownList drpYear;
|
protected global::FineUIPro.DropDownList drpYear;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpQuarters 控件。
|
/// drpMonth 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpQuarters;
|
protected global::FineUIPro.DropDownList drpMonth;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpUnit 控件。
|
/// drpUnit 控件。
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectArchitectureReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Environmental.ProjectArchitectureReport" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectArchitectureReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Environmental.ProjectArchitectureReport" %>
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
|
@ -18,11 +19,21 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server"/>
|
||||||
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
<Regions>
|
<Items>
|
||||||
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox"
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
|
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||||
|
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
|
<Items>
|
||||||
|
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||||
|
BodyPadding="0px">
|
||||||
|
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree"/>
|
||||||
|
</f:ContentPanel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||||
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="True" AutoScroll="true" BodyPadding="10px"
|
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="True" AutoScroll="true" BodyPadding="10px"
|
||||||
EnableCollapse="true" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
EnableCollapse="true" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
|
|
@ -36,13 +47,13 @@
|
||||||
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||||
Width="150px" LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
Width="150px" LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpQuarters" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
<f:DropDownList ID="drpMonth" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||||
Width="150px" LabelWidth="50px" Label="季度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
Width="150px" LabelWidth="50px" Label="月份" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:Button ID="BtnBulletLeft" ToolTip="前一季度" Text="前一季度" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
<f:Button ID="BtnBulletLeft" ToolTip="前一个月" Text="前一个月" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
||||||
OnClick="BtnBulletLeft_Click">
|
OnClick="BtnBulletLeft_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="BtnBulletRight" ToolTip="后一季度" Text="后一季度" Icon="BulletRight" runat="server" EnablePostBack="true"
|
<f:Button ID="BtnBulletRight" ToolTip="后一个月" Text="后一个月" Icon="BulletRight" runat="server" EnablePostBack="true"
|
||||||
OnClick="BulletRight_Click">
|
OnClick="BulletRight_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
|
|
@ -109,9 +120,10 @@
|
||||||
</Columns>
|
</Columns>
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Region>
|
</f:Panel>
|
||||||
</Regions>
|
</Items>
|
||||||
</f:RegionPanel>
|
</f:Panel>
|
||||||
|
|
||||||
<f:Window ID="Window1" runat="server" Hidden="true"
|
<f:Window ID="Window1" runat="server" Hidden="true"
|
||||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||||
Title="编辑建筑行业能源节约与生态环境保护汇总表" CloseAction="HidePostBack" EnableIFrame="true" Height="650px"
|
Title="编辑建筑行业能源节约与生态环境保护汇总表" CloseAction="HidePostBack" EnableIFrame="true" Height="650px"
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,42 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
public partial class ProjectArchitectureReport : PageBase
|
public partial class ProjectArchitectureReport : PageBase
|
||||||
{
|
{
|
||||||
|
#region 定义项
|
||||||
|
/// <summary>
|
||||||
|
/// 项目主键
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["ProjectId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["ProjectId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#region 加载页面
|
#region 加载页面
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
|
||||||
BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, ConstValue.Group_0011, false);
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||||
|
{
|
||||||
|
this.ProjectId = Request.Params["projectId"];
|
||||||
|
}
|
||||||
|
this.InitDropDownList();
|
||||||
|
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||||
|
this.ucTree.ProjectId = this.ProjectId;
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) )
|
||||||
|
{
|
||||||
|
this.panelLeftRegion.Hidden = true;
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
|
|
||||||
this.drpUnit.DataTextField = "UnitName";
|
this.drpUnit.DataTextField = "UnitName";
|
||||||
drpUnit.DataValueField = "UnitId";
|
drpUnit.DataValueField = "UnitId";
|
||||||
|
|
@ -24,12 +52,29 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
drpUnit.DataBind();
|
drpUnit.DataBind();
|
||||||
this.drpUnit.Readonly = true;
|
this.drpUnit.Readonly = true;
|
||||||
////取上个报表时间
|
////取上个报表时间
|
||||||
DateTime showDate = System.DateTime.Now.AddMonths(-3);
|
DateTime showDate = System.DateTime.Now.AddMonths(-1);
|
||||||
this.drpQuarters.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
|
drpMonth.SelectedValue = showDate.Month.ToString();
|
||||||
drpYear.SelectedValue = showDate.Year.ToString();
|
drpYear.SelectedValue = showDate.Year.ToString();
|
||||||
GetValue();
|
GetValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void InitDropDownList()
|
||||||
|
{
|
||||||
|
BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
|
||||||
|
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 公司级树加载
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
this.GetButtonPower();
|
||||||
|
this.InitDropDownList();
|
||||||
|
this.GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
private void SetEmpty()
|
private void SetEmpty()
|
||||||
{
|
{
|
||||||
|
|
@ -46,9 +91,13 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
#region 获取记录值
|
#region 获取记录值
|
||||||
private void GetValue()
|
private void GetValue()
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(this.ProjectId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
||||||
int Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
|
int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue);
|
||||||
Model.View_Environmental_ProjectArchitectureReport report = Funs.DB.View_Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == this.CurrUser.LoginProjectId && e.Quarters == Quarters && e.Year == year);
|
Model.View_Environmental_ProjectArchitectureReport report = Funs.DB.View_Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == this.ProjectId && e.Month == month && e.Year == year);
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
string upState = string.Empty;
|
string upState = string.Empty;
|
||||||
|
|
@ -60,7 +109,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
upState = "(未上报)";
|
upState = "(未上报)";
|
||||||
}
|
}
|
||||||
this.SimpleForm1.Title = "企业建筑行业能源节约与生态环境保护汇总表" + report.QuartersStr + report.YearStr + upState;
|
this.SimpleForm1.Title = "企业建筑行业能源节约与生态环境保护汇总表" + report.MonthStr + report.YearStr + upState;
|
||||||
lbUnitName.Text = "填报企业:" + report.ProjectName;
|
lbUnitName.Text = "填报企业:" + report.ProjectName;
|
||||||
if (report.FillingDate != null)
|
if (report.FillingDate != null)
|
||||||
{
|
{
|
||||||
|
|
@ -162,7 +211,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private void GetButtonPower()
|
private void GetButtonPower()
|
||||||
{
|
{
|
||||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectArchitectureReportMenuId);
|
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectArchitectureReportMenuId);
|
||||||
if (buttonList.Count() > 0)
|
if (buttonList.Count() > 0)
|
||||||
{
|
{
|
||||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
|
|
@ -179,7 +228,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var getReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
var getReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
this.btnAudit1.Hidden = true;
|
this.btnAudit1.Hidden = true;
|
||||||
this.btnAudit2.Hidden = true;
|
this.btnAudit2.Hidden = true;
|
||||||
if (getReport != null)
|
if (getReport != null)
|
||||||
|
|
@ -203,6 +252,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
btnNew.Hidden = true;
|
||||||
|
btnEdit.Hidden = true;
|
||||||
|
btnDelete.Hidden = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -214,7 +269,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("ProjectArchitectureReportSave.aspx?UnitId={0}&&Year={1}&&Quarterss={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?UnitId={0}&&Year={1}&&Months={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpMonth.SelectedValue, "编辑 - ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -224,7 +279,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnEdit_Click(object sender, EventArgs e)
|
protected void btnEdit_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
||||||
|
|
@ -242,7 +297,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnAudit1_Click(object sender, EventArgs e)
|
protected void btnAudit1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
||||||
|
|
@ -260,7 +315,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnAudit2_Click(object sender, EventArgs e)
|
protected void btnAudit2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
|
||||||
|
|
@ -278,7 +333,7 @@ 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)
|
||||||
{
|
{
|
||||||
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}&type=Updata", report.ArchitectureReportId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}&type=Updata", report.ArchitectureReportId, "编辑 - ")));
|
||||||
|
|
@ -296,10 +351,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnDelete_Click(object sender, EventArgs e)
|
protected void btnDelete_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnDelete);
|
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnDelete);
|
||||||
BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.ArchitectureReportId);
|
BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.ArchitectureReportId);
|
||||||
BLL.ProjectArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
|
BLL.ProjectArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
|
||||||
BLL.ProjectArchitectureReportService.DeleteArchitectureReportByArchitectureReportId(report.ArchitectureReportId);
|
BLL.ProjectArchitectureReportService.DeleteArchitectureReportByArchitectureReportId(report.ArchitectureReportId);
|
||||||
|
|
@ -342,7 +397,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId.ToString());
|
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId.ToString());
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
return report.Year + "年" + report.Quarters + "月";
|
return report.Year + "年" + report.Month + "月";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -380,7 +435,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void BtnBulletLeft_Click(object sender, EventArgs e)
|
protected void BtnBulletLeft_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetQuartersChange("-");
|
SetMonthChange("-");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -390,30 +445,30 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void BulletRight_Click(object sender, EventArgs e)
|
protected void BulletRight_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetQuartersChange("+");
|
SetMonthChange("+");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 月份加减变化
|
/// 月份加减变化
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
private void SetQuartersChange(string type)
|
private void SetMonthChange(string type)
|
||||||
{
|
{
|
||||||
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
|
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue);
|
||||||
if (nowDate.HasValue)
|
if (nowDate.HasValue)
|
||||||
{
|
{
|
||||||
DateTime showDate = new DateTime();
|
DateTime showDate = new DateTime();
|
||||||
if (type == "+")
|
if (type == "+")
|
||||||
{
|
{
|
||||||
showDate = nowDate.Value.AddMonths(3);
|
showDate = nowDate.Value.AddMonths(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
showDate = nowDate.Value.AddMonths(-3);
|
showDate = nowDate.Value.AddMonths(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.drpYear.SelectedValue = showDate.Year.ToString();
|
this.drpYear.SelectedValue = showDate.Year.ToString();
|
||||||
this.drpQuarters.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
|
drpMonth.SelectedValue = showDate.Month.ToString();
|
||||||
///值变化
|
///值变化
|
||||||
GetValue();
|
GetValue();
|
||||||
}
|
}
|
||||||
|
|
@ -428,7 +483,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnSee_Click(object sender, EventArgs e)
|
protected void btnSee_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.ArchitectureReportId, "查看 - ")));
|
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.ArchitectureReportId, "查看 - ")));
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,10 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.ZHGL.Environmental
|
namespace FineUIPro.Web.ZHGL.Environmental {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class ProjectArchitectureReport
|
public partial class ProjectArchitectureReport {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
|
@ -33,22 +31,49 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
protected global::FineUIPro.PageManager PageManager1;
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RegionPanel1 控件。
|
/// Panel1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.RegionPanel RegionPanel1;
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Region2 控件。
|
/// panelLeftRegion 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Region Region2;
|
protected global::FineUIPro.Panel panelLeftRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ucTree 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelCenterRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelCenterRegion;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SimpleForm1 控件。
|
/// SimpleForm1 控件。
|
||||||
|
|
@ -87,13 +112,13 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
protected global::FineUIPro.DropDownList drpYear;
|
protected global::FineUIPro.DropDownList drpYear;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpQuarters 控件。
|
/// drpMonth 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpQuarters;
|
protected global::FineUIPro.DropDownList drpMonth;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// BtnBulletLeft 控件。
|
/// BtnBulletLeft 控件。
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@
|
||||||
<f:DropDownList ID="drpYear" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
<f:DropDownList ID="drpYear" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||||
ShowRedStar="true" runat="server" Label="年度">
|
ShowRedStar="true" runat="server" Label="年度">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpQuarters" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
<f:DropDownList ID="drpMonth" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||||
ShowRedStar="true" runat="server" Label="季度">
|
ShowRedStar="true" runat="server" Label="月份">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server" Hidden="true"
|
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server" Hidden="true"
|
||||||
Label="填报企业" FocusOnPageLoad="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
Label="填报企业" FocusOnPageLoad="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
items.Clear();
|
items.Clear();
|
||||||
BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, ConstValue.Group_0011, false);
|
BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
|
||||||
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
||||||
this.drpUnit.DataTextField = "UnitName";
|
this.drpUnit.DataTextField = "UnitName";
|
||||||
drpUnit.DataValueField = "UnitId";
|
drpUnit.DataValueField = "UnitId";
|
||||||
|
|
@ -53,7 +53,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
drpUnit.DataBind();
|
drpUnit.DataBind();
|
||||||
this.drpUnit.Readonly = true;
|
this.drpUnit.Readonly = true;
|
||||||
string year = Request.QueryString["Year"];
|
string year = Request.QueryString["Year"];
|
||||||
string quarters = Request.QueryString["Quarterss"];
|
string months = Request.QueryString["Months"];
|
||||||
ArchitectureReportId = Request.QueryString["ArchitectureReportId"];
|
ArchitectureReportId = Request.QueryString["ArchitectureReportId"];
|
||||||
if (!string.IsNullOrEmpty(ArchitectureReportId))
|
if (!string.IsNullOrEmpty(ArchitectureReportId))
|
||||||
{
|
{
|
||||||
|
|
@ -68,7 +68,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
this.btnSave.Hidden = true;
|
this.btnSave.Hidden = true;
|
||||||
this.btnSubmit.Hidden = true;
|
this.btnSubmit.Hidden = true;
|
||||||
}
|
}
|
||||||
drpQuarters.SelectedValue = report.Quarters.ToString();
|
drpMonth.SelectedValue = report.Month.ToString();
|
||||||
drpYear.SelectedValue = report.Year.ToString();
|
drpYear.SelectedValue = report.Year.ToString();
|
||||||
this.CurrUser.LoginProjectId = report.ProjectId;
|
this.CurrUser.LoginProjectId = report.ProjectId;
|
||||||
if (report.FillingDate != null)
|
if (report.FillingDate != null)
|
||||||
|
|
@ -81,12 +81,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//this.btnCopy.Hidden = false;
|
//this.btnCopy.Hidden = false;
|
||||||
drpQuarters.SelectedValue = quarters;
|
drpMonth.SelectedValue = months;
|
||||||
drpYear.SelectedValue = year;
|
drpYear.SelectedValue = year;
|
||||||
txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||||
txtDutyPerson.Text = this.CurrUser.UserName;
|
txtDutyPerson.Text = this.CurrUser.UserName;
|
||||||
//增加明细集合
|
//增加明细集合
|
||||||
GetNewItems(year, quarters);
|
GetNewItems(year, months);
|
||||||
this.Grid1.DataSource = items;
|
this.Grid1.DataSource = items;
|
||||||
this.Grid1.DataBind();
|
this.Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
|
@ -196,9 +196,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
|
DateTime lastMonth = Convert.ToDateTime(drpYear.SelectedValue + "-" + drpMonth.SelectedValue + "-01").AddYears(-1);
|
||||||
DateTime lastQuarters = nowDate.Value.AddMonths(-3);
|
Environmental_ProjectArchitectureReport lastQuartersReport = ProjectArchitectureReportService.GetArchitectureReportByProjectIdDate(this.CurrUser.LoginProjectId, lastMonth.Year, lastMonth.Month);
|
||||||
Environmental_ProjectArchitectureReport lastQuartersReport = ProjectArchitectureReportService.GetArchitectureReportByProjectIdDate(this.CurrUser.LoginProjectId, lastQuarters.Year, Funs.GetNowQuarterlyByTime(lastQuarters));
|
|
||||||
if (lastQuartersReport != null)
|
if (lastQuartersReport != null)
|
||||||
{
|
{
|
||||||
//var lastQuartersReportItems = BLL.ProjectArchitectureReportItemService.GetItems(lastQuartersReport.ArchitectureReportId);
|
//var lastQuartersReportItems = BLL.ProjectArchitectureReportItemService.GetItems(lastQuartersReport.ArchitectureReportId);
|
||||||
|
|
@ -948,7 +947,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
{
|
{
|
||||||
ProjectId = this.CurrUser.LoginProjectId,
|
ProjectId = this.CurrUser.LoginProjectId,
|
||||||
Year = Funs.GetNewIntOrZero(drpYear.SelectedValue),
|
Year = Funs.GetNewIntOrZero(drpYear.SelectedValue),
|
||||||
Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue)
|
Month = Funs.GetNewIntOrZero(drpMonth.SelectedValue)
|
||||||
};
|
};
|
||||||
if (!string.IsNullOrEmpty(txtFillingDate.Text.Trim()))
|
if (!string.IsNullOrEmpty(txtFillingDate.Text.Trim()))
|
||||||
{
|
{
|
||||||
|
|
@ -962,14 +961,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
}
|
}
|
||||||
if (String.IsNullOrEmpty(ArchitectureReportId))
|
if (String.IsNullOrEmpty(ArchitectureReportId))
|
||||||
{
|
{
|
||||||
Environmental_ProjectArchitectureReport old = ProjectArchitectureReportService.GetArchitectureReportByProjectIdDate(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
|
Environmental_ProjectArchitectureReport old = ProjectArchitectureReportService.GetArchitectureReportByProjectIdDate(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
|
||||||
if (old == null)
|
if (old == null)
|
||||||
{
|
{
|
||||||
report.ArchitectureReportId = SQLHelper.GetNewID(typeof(Model.Environmental_ProjectArchitectureReport));
|
report.ArchitectureReportId = SQLHelper.GetNewID(typeof(Model.Environmental_ProjectArchitectureReport));
|
||||||
report.FillingMan = this.CurrUser.UserName;
|
report.FillingMan = this.CurrUser.UserName;
|
||||||
ArchitectureReportId = report.ArchitectureReportId;
|
ArchitectureReportId = report.ArchitectureReportId;
|
||||||
BLL.ProjectArchitectureReportService.AddArchitectureReport(report);
|
BLL.ProjectArchitectureReportService.AddArchitectureReport(report);
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnAdd);
|
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnAdd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -982,7 +981,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
Model.Environmental_ProjectArchitectureReport oldReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
|
Model.Environmental_ProjectArchitectureReport oldReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
|
||||||
report.ArchitectureReportId = ArchitectureReportId;
|
report.ArchitectureReportId = ArchitectureReportId;
|
||||||
BLL.ProjectArchitectureReportService.UpdateArchitectureReport(report);
|
BLL.ProjectArchitectureReportService.UpdateArchitectureReport(report);
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnModify);
|
BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnModify);
|
||||||
}
|
}
|
||||||
ArchitectureReportId = report.ArchitectureReportId;
|
ArchitectureReportId = report.ArchitectureReportId;
|
||||||
BLL.ProjectArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
|
BLL.ProjectArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
|
||||||
|
|
@ -1120,12 +1119,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnCopy_Click(object sender, EventArgs e)
|
protected void btnCopy_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
|
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue);
|
||||||
if (nowDate.HasValue)
|
if (nowDate.HasValue)
|
||||||
{
|
{
|
||||||
DateTime showDate = new DateTime();
|
DateTime showDate = new DateTime();
|
||||||
showDate = nowDate.Value.AddMonths(-3);
|
showDate = nowDate.Value.AddMonths(-3);
|
||||||
Model.Environmental_ProjectArchitectureReport ArchitectureReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, showDate.Year, Funs.GetNowQuarterlyByTime(showDate));
|
Model.Environmental_ProjectArchitectureReport ArchitectureReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, showDate.Year, showDate.Month);
|
||||||
if (ArchitectureReport != null)
|
if (ArchitectureReport != null)
|
||||||
{
|
{
|
||||||
Model.Environmental_ProjectArchitectureReport newArchitectureReport = new Environmental_ProjectArchitectureReport();
|
Model.Environmental_ProjectArchitectureReport newArchitectureReport = new Environmental_ProjectArchitectureReport();
|
||||||
|
|
@ -1133,7 +1132,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
newArchitectureReport.ArchitectureReportId = this.ArchitectureReportId;
|
newArchitectureReport.ArchitectureReportId = this.ArchitectureReportId;
|
||||||
newArchitectureReport.ProjectId = this.CurrUser.LoginProjectId;
|
newArchitectureReport.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
newArchitectureReport.Year = Convert.ToInt32(this.drpYear.SelectedValue);
|
newArchitectureReport.Year = Convert.ToInt32(this.drpYear.SelectedValue);
|
||||||
newArchitectureReport.Quarters = Convert.ToInt32(this.drpQuarters.SelectedValue);
|
newArchitectureReport.Month = Convert.ToInt32(this.drpMonth.SelectedValue);
|
||||||
newArchitectureReport.FillingMan = this.CurrUser.UserName;
|
newArchitectureReport.FillingMan = this.CurrUser.UserName;
|
||||||
newArchitectureReport.FillingDate = DateTime.Now;
|
newArchitectureReport.FillingDate = DateTime.Now;
|
||||||
newArchitectureReport.DutyPerson = this.CurrUser.UserName;
|
newArchitectureReport.DutyPerson = this.CurrUser.UserName;
|
||||||
|
|
@ -1172,7 +1171,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
var report = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
|
var report = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
|
||||||
if (report != null)
|
if (report != null)
|
||||||
{
|
{
|
||||||
drpQuarters.SelectedValue = report.Quarters.ToString();
|
drpMonth.SelectedValue = report.Month.ToString();
|
||||||
drpYear.SelectedValue = report.Year.ToString();
|
drpYear.SelectedValue = report.Year.ToString();
|
||||||
this.CurrUser.LoginProjectId = report.ProjectId;
|
this.CurrUser.LoginProjectId = report.ProjectId;
|
||||||
if (report.FillingDate != null)
|
if (report.FillingDate != null)
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,10 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.ZHGL.Environmental
|
namespace FineUIPro.Web.ZHGL.Environmental {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class ProjectArchitectureReportSave
|
public partial class ProjectArchitectureReportSave {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
|
@ -51,13 +49,13 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||||
protected global::FineUIPro.DropDownList drpYear;
|
protected global::FineUIPro.DropDownList drpYear;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpQuarters 控件。
|
/// drpMonth 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpQuarters;
|
protected global::FineUIPro.DropDownList drpMonth;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpUnit 控件。
|
/// drpUnit 控件。
|
||||||
|
|
|
||||||
|
|
@ -414,49 +414,52 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||||
private string AuditData()
|
private string AuditData()
|
||||||
{
|
{
|
||||||
string err = string.Empty;
|
string err = string.Empty;
|
||||||
Model.SUBQHSEDB db = Funs.DB;
|
// Model.SUBQHSEDB db = Funs.DB;
|
||||||
var reports = from x in db.Information_MillionsMonthlyReport
|
// var reports = from x in db.Information_MillionsMonthlyReport
|
||||||
where x.FillingDate < DateTime.Now
|
// where x.FillingDate < DateTime.Now
|
||||||
orderby x.FillingDate descending
|
// orderby x.FillingDate descending
|
||||||
select x;
|
// select x;
|
||||||
if (!string.IsNullOrEmpty(this.MillionsMonthlyReportId))
|
// if (!string.IsNullOrEmpty(this.MillionsMonthlyReportId))
|
||||||
{
|
// {
|
||||||
reports = from x in reports
|
// reports = from x in reports
|
||||||
where x.MillionsMonthlyReportId != this.MillionsMonthlyReportId
|
// where x.MillionsMonthlyReportId != this.MillionsMonthlyReportId
|
||||||
orderby x.FillingDate descending
|
// orderby x.FillingDate descending
|
||||||
select x;
|
// select x;
|
||||||
}
|
// }
|
||||||
var reportIds = reports.Select(x => x.MillionsMonthlyReportId).Take(3).ToList();
|
// var reportIds = reports.Select(x => x.MillionsMonthlyReportId).Take(3).ToList();
|
||||||
|
// //var items = from x in db.Information_MillionsMonthlyReportItem
|
||||||
|
// // where reportIds.Contains(x.MillionsMonthlyReportId)
|
||||||
|
// // select new { x.Name, x.TotalWorkNum };
|
||||||
// var items = from x in db.Information_MillionsMonthlyReportItem
|
// var items = from x in db.Information_MillionsMonthlyReportItem
|
||||||
// where reportIds.Contains(x.MillionsMonthlyReportId)
|
// where reportIds.Contains(x.MillionsMonthlyReportId)
|
||||||
// select new { x.Name, x.TotalWorkNum };
|
// select new { x.Name, x.TotalWorkNum };
|
||||||
var items = from x in db.Information_MillionsMonthlyReportItem
|
// foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||||
where reportIds.Contains(x.MillionsMonthlyReportId)
|
// {
|
||||||
select new { x.Name, x.TotalWorkNum };
|
// JObject values = mergedRow.Value<JObject>("values");
|
||||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
// if (!string.IsNullOrEmpty(values["Name"].ToString()) && !string.IsNullOrEmpty(values["TotalWorkNum"].ToString()))
|
||||||
{
|
// {
|
||||||
JObject values = mergedRow.Value<JObject>("values");
|
// string name = values.Value<string>("Name");
|
||||||
if (!string.IsNullOrEmpty(values["Name"].ToString()) && !string.IsNullOrEmpty(values["TotalWorkNum"].ToString()))
|
// decimal d = values.Value<decimal>("TotalWorkNum");
|
||||||
{
|
// var list = items.Where(x => x.Name == name);
|
||||||
string name = values.Value<string>("Name");
|
// decimal a = 0;
|
||||||
decimal d = values.Value<decimal>("TotalWorkNum");
|
// if (list.Count() > 0)
|
||||||
var list = items.Where(x => x.Name == name);
|
// {
|
||||||
decimal a = 0;
|
// foreach (var item in list)
|
||||||
if (list.Count() > 0)
|
// {
|
||||||
{
|
// a += item.TotalWorkNum ?? 0;
|
||||||
foreach (var item in list)
|
// }
|
||||||
{
|
// }
|
||||||
a += item.TotalWorkNum ?? 0;
|
// if (list.Count() > 0)
|
||||||
}
|
// {
|
||||||
}
|
// decimal b = a / list.Count();
|
||||||
decimal b = a / list.Count();
|
// if (d > b * 5)
|
||||||
if (d > b * 5)
|
// {
|
||||||
{
|
// err = name + "的总工时数超过前三个月平均值5倍,请核对后重新录入!";
|
||||||
err = name + "的总工时数超过前三个月平均值5倍,请核对后重新录入!";
|
// break;
|
||||||
break;
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,9 @@ namespace Model
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 季度
|
/// 月份
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Quarters
|
public int? Month
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
|
|
|
||||||
|
|
@ -155632,6 +155632,8 @@ namespace Model
|
||||||
|
|
||||||
private string _UpState;
|
private string _UpState;
|
||||||
|
|
||||||
|
private System.Nullable<int> _Month;
|
||||||
|
|
||||||
private EntityRef<Base_Unit> _Base_Unit;
|
private EntityRef<Base_Unit> _Base_Unit;
|
||||||
|
|
||||||
private EntitySet<Environmental_ArchitectureReportItem> _Environmental_ArchitectureReportItem;
|
private EntitySet<Environmental_ArchitectureReportItem> _Environmental_ArchitectureReportItem;
|
||||||
|
|
@ -155656,6 +155658,8 @@ namespace Model
|
||||||
partial void OnDutyPersonChanged();
|
partial void OnDutyPersonChanged();
|
||||||
partial void OnUpStateChanging(string value);
|
partial void OnUpStateChanging(string value);
|
||||||
partial void OnUpStateChanged();
|
partial void OnUpStateChanged();
|
||||||
|
partial void OnMonthChanging(System.Nullable<int> value);
|
||||||
|
partial void OnMonthChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Environmental_ArchitectureReport()
|
public Environmental_ArchitectureReport()
|
||||||
|
|
@ -155829,6 +155833,26 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
|
||||||
|
public System.Nullable<int> Month
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._Month;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._Month != value))
|
||||||
|
{
|
||||||
|
this.OnMonthChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._Month = value;
|
||||||
|
this.SendPropertyChanged("Month");
|
||||||
|
this.OnMonthChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ArchitectureReport_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ArchitectureReport_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
|
||||||
public Base_Unit Base_Unit
|
public Base_Unit Base_Unit
|
||||||
{
|
{
|
||||||
|
|
@ -160218,6 +160242,8 @@ namespace Model
|
||||||
|
|
||||||
private string _UpState;
|
private string _UpState;
|
||||||
|
|
||||||
|
private System.Nullable<int> _Month;
|
||||||
|
|
||||||
private EntityRef<Base_Project> _Base_Project;
|
private EntityRef<Base_Project> _Base_Project;
|
||||||
|
|
||||||
private EntitySet<Environmental_ProjectArchitectureReportItem> _Environmental_ProjectArchitectureReportItem;
|
private EntitySet<Environmental_ProjectArchitectureReportItem> _Environmental_ProjectArchitectureReportItem;
|
||||||
|
|
@ -160242,6 +160268,8 @@ namespace Model
|
||||||
partial void OnDutyPersonChanged();
|
partial void OnDutyPersonChanged();
|
||||||
partial void OnUpStateChanging(string value);
|
partial void OnUpStateChanging(string value);
|
||||||
partial void OnUpStateChanged();
|
partial void OnUpStateChanged();
|
||||||
|
partial void OnMonthChanging(System.Nullable<int> value);
|
||||||
|
partial void OnMonthChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Environmental_ProjectArchitectureReport()
|
public Environmental_ProjectArchitectureReport()
|
||||||
|
|
@ -160415,6 +160443,26 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
|
||||||
|
public System.Nullable<int> Month
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._Month;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._Month != value))
|
||||||
|
{
|
||||||
|
this.OnMonthChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._Month = value;
|
||||||
|
this.SendPropertyChanged("Month");
|
||||||
|
this.OnMonthChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ProjectArchitectureReport_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ProjectArchitectureReport_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
||||||
public Base_Project Base_Project
|
public Base_Project Base_Project
|
||||||
{
|
{
|
||||||
|
|
@ -464685,13 +464733,13 @@ namespace Model
|
||||||
|
|
||||||
private string _YearStr;
|
private string _YearStr;
|
||||||
|
|
||||||
private string _QuartersStr;
|
private string _MonthStr;
|
||||||
|
|
||||||
private string _UnitName;
|
private string _UnitName;
|
||||||
|
|
||||||
private System.Nullable<int> _Year;
|
private System.Nullable<int> _Year;
|
||||||
|
|
||||||
private System.Nullable<int> _Quarters;
|
private System.Nullable<int> _Month;
|
||||||
|
|
||||||
private string _UpState;
|
private string _UpState;
|
||||||
|
|
||||||
|
|
@ -464781,18 +464829,18 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuartersStr", DbType="NVarChar(100)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthStr", DbType="NVarChar(100)")]
|
||||||
public string QuartersStr
|
public string MonthStr
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this._QuartersStr;
|
return this._MonthStr;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if ((this._QuartersStr != value))
|
if ((this._MonthStr != value))
|
||||||
{
|
{
|
||||||
this._QuartersStr = value;
|
this._MonthStr = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -464829,18 +464877,18 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="Int")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
|
||||||
public System.Nullable<int> Quarters
|
public System.Nullable<int> Month
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this._Quarters;
|
return this._Month;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if ((this._Quarters != value))
|
if ((this._Month != value))
|
||||||
{
|
{
|
||||||
this._Quarters = value;
|
this._Month = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -465720,13 +465768,13 @@ namespace Model
|
||||||
|
|
||||||
private string _YearStr;
|
private string _YearStr;
|
||||||
|
|
||||||
private string _QuartersStr;
|
private string _MonthStr;
|
||||||
|
|
||||||
private string _ProjectName;
|
private string _ProjectName;
|
||||||
|
|
||||||
private System.Nullable<int> _Year;
|
private System.Nullable<int> _Year;
|
||||||
|
|
||||||
private System.Nullable<int> _Quarters;
|
private System.Nullable<int> _Month;
|
||||||
|
|
||||||
private string _UpState;
|
private string _UpState;
|
||||||
|
|
||||||
|
|
@ -465816,18 +465864,18 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuartersStr", DbType="NVarChar(100)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthStr", DbType="NVarChar(100)")]
|
||||||
public string QuartersStr
|
public string MonthStr
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this._QuartersStr;
|
return this._MonthStr;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if ((this._QuartersStr != value))
|
if ((this._MonthStr != value))
|
||||||
{
|
{
|
||||||
this._QuartersStr = value;
|
this._MonthStr = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -465864,18 +465912,18 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="Int")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
|
||||||
public System.Nullable<int> Quarters
|
public System.Nullable<int> Month
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this._Quarters;
|
return this._Month;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if ((this._Quarters != value))
|
if ((this._Month != value))
|
||||||
{
|
{
|
||||||
this._Quarters = value;
|
this._Month = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -468010,7 +468058,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(200)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(50)")]
|
||||||
public string RegisterTypesName
|
public string RegisterTypesName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -469045,7 +469093,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(200)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(50)")]
|
||||||
public string RegisterTypesName
|
public string RegisterTypesName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ namespace WebAPI
|
||||||
/// <param name="states"></param>
|
/// <param name="states"></param>
|
||||||
/// <param name="pageIndex">页码</param>
|
/// <param name="pageIndex">页码</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.ResponeData getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex)
|
public Model.ResponeData getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex,int pageSize, string ProblemTypes)
|
||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
|
|
@ -58,12 +58,12 @@ namespace WebAPI
|
||||||
projectId = null;
|
projectId = null;
|
||||||
}
|
}
|
||||||
List<Model.HazardRegisterItem> getDataList = new List<Model.HazardRegisterItem>();
|
List<Model.HazardRegisterItem> getDataList = new List<Model.HazardRegisterItem>();
|
||||||
int pageCount = Funs.DB.HSSE_Hazard_HazardRegister.Count(x => (x.ProjectId == projectId || projectId == null) && (x.States == states || states == null));
|
// int pageCount = Funs.DB.HSSE_Hazard_HazardRegister.Count(x => (x.ProjectId == projectId || projectId == null) && (x.States == states || states == null));
|
||||||
if (pageCount > 0 && pageIndex > 0)
|
// if (pageCount > 0 && pageIndex > 0)
|
||||||
{
|
// {
|
||||||
getDataList = APIUnitHazardRegisterService.getHazardRegisterByProjectIdStates(projectId, states, pageIndex);
|
getDataList = APIUnitHazardRegisterService.getHazardRegisterByProjectIdStates(projectId, states, pageIndex, pageSize,ProblemTypes);
|
||||||
}
|
// }
|
||||||
responeData.data = new { pageCount, getDataList };
|
responeData.data = new { getDataList.Count, getDataList };
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -88,5 +88,97 @@ namespace WebAPI.Controllers.HSSE
|
||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 获取质量集合
|
||||||
|
/// <summary>
|
||||||
|
/// 获取集合
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getProjectQualityList(string RectifyName, int PageNumber, int PageSize)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// var query = (from a in Funs.DB.WBS_ProjectQuality
|
||||||
|
// join b in Funs.DB.Base_QualityQuestionType on a.ProjectName equals b.QualityQuestionTypeId into joined
|
||||||
|
// from b in joined.DefaultIfEmpty()
|
||||||
|
// select new
|
||||||
|
// {
|
||||||
|
// a.ProjectQualityId,
|
||||||
|
// QualityQuestionType = b != null ? b.QualityQuestionType : null
|
||||||
|
// }).ToList();
|
||||||
|
//
|
||||||
|
//
|
||||||
|
var query = (from x in Funs.DB.Base_QualityQuestionType
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.QualityQuestionTypeId,
|
||||||
|
x.QualityQuestionType,
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(RectifyName))
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.QualityQuestionType.Contains(RectifyName)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
var paginatedQuery = query
|
||||||
|
.Skip((PageNumber - 1) * PageSize)
|
||||||
|
.Take(PageSize)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
responeData.data = paginatedQuery;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 根据id获取质量明细列表
|
||||||
|
/// <summary>
|
||||||
|
/// 获取集合
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getQualityItemListBy(string RectifyId,string HazardSourcePoint, int PageNumber, int PageSize)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var query = (from x in Funs.DB.WBS_ProjectQuality
|
||||||
|
where x.ProjectName == RectifyId
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.ProjectQualityId,
|
||||||
|
x.ProjectQualityDes,
|
||||||
|
x.ProjectQualityResult
|
||||||
|
}).ToList();
|
||||||
|
if (!string.IsNullOrEmpty(HazardSourcePoint))
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.ProjectQualityDes.Contains(HazardSourcePoint)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
var paginatedQuery = query
|
||||||
|
.Skip((PageNumber - 1) * PageSize)
|
||||||
|
.Take(PageSize)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
responeData.data = paginatedQuery;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue