安全检查修改

This commit is contained in:
geh
2025-08-20 17:53:27 +08:00
parent 0582110471
commit 821ad2e5c9
8 changed files with 127 additions and 11 deletions
@@ -1,6 +1,7 @@
using BLL;
using System;
using System.Linq;
using System.Text;
namespace FineUIPro.Web.HSSE.HiddenInspection
{
@@ -87,10 +88,21 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
UnitWorkService.InitUnitWorkDownList(this.drpWorkArea, this.CurrUser.LoginProjectId, true);
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, null, true);
var query = (from x in Funs.DB.Technique_Rectify
where x.IsEndLever.Value == true
select new
{
RegisterTypesId = x.RectifyId,
RegisterTypesName = x.RectifyName,
}).ToList();
this.drpRegisterTypes.DataTextField = "RegisterTypesName";
this.drpRegisterTypes.DataValueField = "RegisterTypesId";
this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型
// this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型
this.drpRegisterTypes.DataSource = query; //安全巡检类型
this.drpRegisterTypes.DataBind();
Funs.FineUIPleaseSelect(drpRegisterTypes);
if (!string.IsNullOrWhiteSpace(type))
{
this.drpRegisterTypes.Items.FindByText(type).Selected = true;
@@ -127,6 +139,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
if (!string.IsNullOrEmpty(registration.RegisterTypesId))
{
this.drpRegisterTypes.SelectedValue = registration.RegisterTypesId;
drpRegisterTypes_SelectedIndexChanged(null, null);
}
if (!string.IsNullOrEmpty(registration.CheckCycle))
{
@@ -144,8 +157,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{
this.txtRectificationPeriod.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", registration.RectificationPeriod);
}
this.txtRegisterDef.Text = registration.RegisterDef;
this.drpRegisterDef.Text = registration.RegisterDef;
this.txtRequirements.Text = registration.Requirements;
this.txtCutPayment.Text = registration.CutPayment.ToString();
this.drpCheckMan.SelectedValue = registration.CheckManId;
if (registration.CheckTime != null)
@@ -168,7 +181,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
if (control != null)
{
var risk = Funs.DB.HSSE_ConstructionRisk.FirstOrDefault(x => x.ConstructionRiskId == control.ConstructionRiskId);
txtRegisterDef.Text = risk.LicenseDes;
// txtRegisterDef.Text = risk.LicenseDes;
drpUnit.SelectedValue = risk.UnitId;
drpWorkArea.SelectedValue = risk.WorkAreaId;
}
@@ -263,7 +276,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{
register.Place = this.drpWorkArea.SelectedValue;
}
register.RegisterDef = this.txtRegisterDef.Text.Trim();
if (this.drpRegisterDef.SelectedValue != null && this.drpRegisterDef.SelectedValue != BLL.Const._Null)
{
register.RegisterDef = this.drpRegisterDef.SelectedText.Trim();
}
else
{
register.RegisterDef = this.drpRegisterDef.Text.Trim();
}
register.Requirements = this.txtRequirements.Text.Trim();
if (this.drpResponsibleMan.SelectedValue != BLL.Const._Null)
{
register.ResponsibleMan = this.drpResponsibleMan.SelectedValue;
@@ -322,5 +343,64 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
}
#endregion
/// <summary>
/// 检查项
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpRegisterTypes_SelectedIndexChanged(object sender, EventArgs e)
{
string selectedRegisterTypeId = this.drpRegisterTypes.SelectedValue;
if (!string.IsNullOrEmpty(selectedRegisterTypeId) && selectedRegisterTypeId != BLL.Const._Null)
{
var query = (from x in Funs.DB.Technique_RectifyItem
where x.RectifyId == this.drpRegisterTypes.SelectedValue
select new
{
x.RectifyItemId,
x.HazardSourcePoint,
x.RiskAnalysis,
x.RiskPrevention
}).ToList();
this.drpRegisterDef.DataTextField = "HazardSourcePoint";
this.drpRegisterDef.DataValueField = "RectifyItemId";
this.drpRegisterDef.DataSource = query; //安全巡检类型
this.drpRegisterDef.DataBind();
this.txtRequirements.Text = "";
}
}
/// <summary>
/// 问题描述下拉列表文本变更事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpRegisterDef_TextChanged(object sender, EventArgs e)
{
//给整改要求赋值
string selectedRegisterDefId = this.drpRegisterDef.SelectedValue;
if (!string.IsNullOrEmpty(selectedRegisterDefId) && selectedRegisterDefId != BLL.Const._Null)
{
var query = (from x in Funs.DB.Technique_RectifyItem
where x.RectifyItemId == selectedRegisterDefId
select new
{
x.RectifyItemId,
x.HazardSourcePoint,
x.RiskAnalysis,
x.RiskPrevention
}).FirstOrDefault();
if (query != null)
{
this.txtRequirements.Text = query.RiskPrevention;
}
}
}
}
}