提交代码
This commit is contained in:
@@ -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_Const where x.ConstText == "集团接口地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet9 != null)
|
||||
{
|
||||
cncecAPIUrl = sysSet9.ConstValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cncecAPIUrl))
|
||||
{
|
||||
try
|
||||
{
|
||||
string getUrl = cncecAPIUrl + "/api/InformationData/GetArchitectureAuditState" + "?unitId=" + BLL.Const.UnitId_SEDIN + "&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
|
||||
{
|
||||
@@ -185,7 +220,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||
if (getReport != null)
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
//if (getReport.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入
|
||||
//if (getReport.HandleMan == this.CurrUser.UserId) //当前人是下一步办理入
|
||||
//{
|
||||
// if (getReport.HandleState == BLL.Const.HandleState_2)
|
||||
// {
|
||||
@@ -357,15 +392,15 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user