积分优化
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.Check.HSE
|
||||
@@ -55,35 +54,45 @@ namespace FineUIPro.Web.Check.HSE
|
||||
var model = CheckProblemSafetyService.GetCheckProblemById(this.CheckId);
|
||||
if (model != null)
|
||||
{
|
||||
this.drpUnit.SelectedValue = model.UnitId;
|
||||
this.drpRectificationUser.Items.Clear();
|
||||
BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true);
|
||||
this.drpPMUser.Items.Clear();
|
||||
BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, this.drpUnit.SelectedValue, true);
|
||||
if (!string.IsNullOrWhiteSpace(model.UnitId))
|
||||
{
|
||||
this.drpUnit.SelectedValue = model.UnitId;
|
||||
this.drpRectificationUser.Items.Clear();
|
||||
BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, model.UnitId, true);
|
||||
this.drpPMUser.Items.Clear();
|
||||
BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, model.UnitId, true);
|
||||
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true);
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(model.ProjectId))
|
||||
{
|
||||
this.drpProject.SelectedValue = model.ProjectId;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(model.ProjectName))
|
||||
{
|
||||
this.drpProject.Text = model.ProjectName;
|
||||
}
|
||||
var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId);
|
||||
if (pro != null)
|
||||
{
|
||||
|
||||
var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId);
|
||||
this.txtAddress.Text = pro.ProjectAddress;
|
||||
this.drpRectificationUser.Items.Clear();
|
||||
BLL.UserService.InitUserDropDownList(this.drpRectificationUser, model.ProjectId, true);
|
||||
this.drpPMUser.Items.Clear();
|
||||
BLL.UserService.InitUserDropDownList(this.drpPMUser, model.ProjectId, true);
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(model.ProjectName))
|
||||
{
|
||||
this.drpProject.Text = model.ProjectName;
|
||||
}
|
||||
//var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId);
|
||||
//if (pro != null)
|
||||
//{
|
||||
// this.txtAddress.Text = pro.ProjectAddress;
|
||||
// this.drpPMUser.Items.Clear();
|
||||
// BLL.UserService.InitUserDropDownList(this.drpPMUser, model.ProjectId, true);
|
||||
//}
|
||||
|
||||
this.drpClassify.SelectedValue = model.ClassifyId;
|
||||
BLL.SafetyProblemClassifyItemService.InitClassifyItemDownList(this.drpClassifyItem, model.ClassifyId, true);
|
||||
if (!string.IsNullOrWhiteSpace(model.ClassifyItemId))
|
||||
{
|
||||
this.drpClassifyItem.SelectedValue = model.ClassifyItemId;
|
||||
}
|
||||
}
|
||||
this.drpNature.SelectedValue = model.NatureId;
|
||||
BLL.SafetyProblemNatureItemService.InitNatureItemDownList(this.drpNatureItem, model.NatureId, true);
|
||||
if (!string.IsNullOrWhiteSpace(model.NatureItemId))
|
||||
@@ -143,8 +152,8 @@ namespace FineUIPro.Web.Check.HSE
|
||||
{
|
||||
//受检单位
|
||||
UnitService.InitBranchUnitDropDownList(this.drpUnit, false);
|
||||
//受检项目
|
||||
ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
////受检项目
|
||||
//ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
//问题分类
|
||||
SafetyProblemClassifyService.InitClassifyDropDownList(this.drpClassify, false);
|
||||
//问题性质
|
||||
@@ -158,9 +167,9 @@ namespace FineUIPro.Web.Check.HSE
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//this.drpProject.Items.Clear();
|
||||
////受检项目
|
||||
//BLL.ProjectService.InitProjectDropDownList(this.drpProject, this.drpUnit.SelectedValue, true);
|
||||
this.drpProject.Items.Clear();
|
||||
//受检项目
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, this.drpUnit.SelectedValue, true);
|
||||
|
||||
this.drpRectificationUser.Items.Clear();
|
||||
BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true);
|
||||
@@ -182,6 +191,8 @@ namespace FineUIPro.Web.Check.HSE
|
||||
if (pro != null)
|
||||
{
|
||||
this.txtAddress.Text = pro.ProjectAddress;
|
||||
this.drpRectificationUser.Items.Clear();
|
||||
BLL.UserService.InitUserDropDownList(this.drpRectificationUser, proId, true);
|
||||
this.drpPMUser.Items.Clear();
|
||||
BLL.UserService.InitUserDropDownList(this.drpPMUser, proId, true);
|
||||
}
|
||||
@@ -386,7 +397,6 @@ namespace FineUIPro.Web.Check.HSE
|
||||
////增加一条编码记录
|
||||
//BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.SafetyCheckProblemMenuId, model.ProjectId, null, model.CheckId, model.CheckDate);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -477,7 +487,8 @@ namespace FineUIPro.Web.Check.HSE
|
||||
else
|
||||
{
|
||||
log.CurrentScore = 100 + log.Score;
|
||||
}
|
||||
}
|
||||
log.CurrentScore = log.CurrentScore < 0 ? 0 : log.CurrentScore;
|
||||
BLL.ScoreFlowLogService.AddScoreFlowLog(log);
|
||||
|
||||
//增加人员记分情况
|
||||
|
||||
Reference in New Issue
Block a user