diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 395393e0..38c97e42 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -797,6 +797,10 @@ namespace BLL /// 上报失败 /// public const string UpState_4 = "4"; + /// + /// 已上报(集团已审核) + /// + public const string UpState_5 = "5"; #endregion #region 菜单id diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs index bcc7d7de..24e04338 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using BLL; +using Newtonsoft.Json.Linq; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental @@ -48,13 +49,47 @@ namespace FineUIPro.Web.ZHGL.Environmental { int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); int Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue); + Model.Environmental_ArchitectureReport r = Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == Quarters && e.Year == year); + if (r != null && r.UpState != BLL.Const.UpState_5) + { + string cncecAPIUrl = string.Empty; + var sysSet9 = (from x in Funs.DB.Sys_Set where x.SetName == "集团接口地址" select x).ToList().FirstOrDefault(); + if (sysSet9 != null) + { + cncecAPIUrl = sysSet9.SetValue; + } + if (!string.IsNullOrEmpty(cncecAPIUrl)) + { + try + { + string getUrl = cncecAPIUrl + "/api/InformationData/GetArchitectureAuditState" + "?unitId=" + CommonService.GetThisUnitId() + "&year=" + year + "&quarters=" + Quarters; + var strJosn = APIGetHttpService.Http(getUrl); + if (!string.IsNullOrEmpty(strJosn)) + { + JObject obj = JObject.Parse(strJosn); + if (obj["data"] != null && obj["data"].ToString() == "True") + { + r.UpState = BLL.Const.UpState_5; + Funs.DB.SubmitChanges(); + } + } + } + catch (Exception) + { + } + } + } Model.View_Environmental_ArchitectureReport report = Funs.DB.View_Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == Quarters && e.Year == year); if (report != null) { string upState = string.Empty; - if (report.UpState == BLL.Const.UpState_3) + if (report.UpState == BLL.Const.UpState_5) { - upState = "(已上报)"; + upState = "(已上报(集团已审核))"; + } + else if (report.UpState == BLL.Const.UpState_3) + { + upState = "(已上报(集团未审核))"; } else { @@ -357,15 +392,15 @@ namespace FineUIPro.Web.ZHGL.Environmental /// protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) { - var units = BLL.UnitService.GetUnitDropDownList(); - if (units != null && !string.IsNullOrEmpty(this.drpUnit.SelectedText)) - { - var unit = units.FirstOrDefault(x => x.UnitName == this.drpUnit.SelectedText); - if (unit != null) - { - drpUnit.SelectedValue = unit.UnitId; - } - } + //var units = BLL.UnitService.GetUnitDropDownList(); + //if (units != null && !string.IsNullOrEmpty(this.drpUnit.SelectedText)) + //{ + // var unit = units.FirstOrDefault(x => x.UnitName == this.drpUnit.SelectedText); + // if (unit != null) + // { + // drpUnit.SelectedValue = unit.UnitId; + // } + //} GetValue(); } diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx index aef849ad..ce5b7d87 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx @@ -17,6 +17,11 @@ white-space: normal; word-break: break-all; } + + .customlabel span { + color: red; + font-weight: bold; + } @@ -94,6 +99,7 @@ <%----%> +