2023-04-28
This commit is contained in:
@@ -42,11 +42,11 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
GetButtonPower();
|
||||
this.ItemSelectedList = new List<string>();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
this.drpStates.DataValueField = "Id";
|
||||
this.drpStates.DataTextField = "Name";
|
||||
this.drpStates.DataSource = BLL.HSSE_Hazard_HazardRegisterService.GetStatesList(); ;
|
||||
this.drpStates.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpStates);
|
||||
//this.drpStates.DataValueField = "Id";
|
||||
//this.drpStates.DataTextField = "Name";
|
||||
//this.drpStates.DataSource = BLL.HSSE_Hazard_HazardRegisterService.GetStatesList(); ;
|
||||
//this.drpStates.DataBind();
|
||||
//Funs.FineUIPleaseSelect(this.drpStates);
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
@@ -57,9 +57,9 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
|
||||
string strSql = "SELECT a.CheckSpecialCode,a.CheckTime,b.* FROM Check_CheckSpecial a left join View_CheckSpecialDetail b on a.CheckSpecialId=b.CheckSpecialId WHERE ";
|
||||
|
||||
|
||||
string strSql = "SELECT a.CheckSpecialCode,(CASE WHEN a.States='2' THEN '已完成' WHEN a.States='1' THEN '待整改' ELSE '待提交' END) AS StatesName,a.CheckTime,b.* FROM Check_CheckSpecial a right join View_CheckSpecialDetail b on a.CheckSpecialId=b.CheckSpecialId WHERE ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
@@ -111,15 +111,15 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
strSql += " AND RectificationTime <= @EndRectificationTime";
|
||||
listStr.Add(new SqlParameter("@EndRectificationTime", this.txtEndRectificationTime.Text.Trim()));
|
||||
}
|
||||
|
||||
|
||||
if (this.drpStates.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND States LIKE @States";
|
||||
strSql += " AND a.States LIKE @States";
|
||||
listStr.Add(new SqlParameter("@States", "%" + this.drpStates.SelectedValue + "%"));
|
||||
}
|
||||
if (!CommonService.IsMainUnitOrAdmin(this.CurrUser.UserId))
|
||||
{
|
||||
strSql += " AND (ResponsibleUnit =@ResponsibleUnit OR SendUnitId=@SendUnitId)";
|
||||
strSql += " AND (UnitId = @ResponsibleUnit OR ProposeUnitId =@SendUnitId)";
|
||||
listStr.Add(new SqlParameter("@ResponsibleUnit", this.CurrUser.UnitId));
|
||||
listStr.Add(new SqlParameter("@SendUnitId", this.CurrUser.UnitId));
|
||||
}
|
||||
@@ -276,14 +276,14 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
return;
|
||||
}
|
||||
string RegistrationId = Grid1.SelectedRowID;
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId);
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByCheckItemDetailId(RegistrationId);
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.States == "1") //待整改
|
||||
{
|
||||
if (registration.ResponsibleMan == this.CurrUser.UserId) //当前人是责任人,可以进行整改操作
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationRectify.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HiddenInspection/HiddenRectificationRectify.aspx?HazardRegisterId={0}", registration.HazardRegisterId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -314,14 +314,14 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
return;
|
||||
}
|
||||
string RegistrationId = Grid1.SelectedRowID;
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId);
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByCheckItemDetailId(RegistrationId);
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.States == Const.State_2) //待确认
|
||||
{
|
||||
if (registration.CheckManId == this.CurrUser.UserId) //当前人是检查人,可以进行确认操作
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationConfirm.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HiddenInspection/HiddenRectificationConfirm.aspx?HazardRegisterId={0}", registration.HazardRegisterId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -348,7 +348,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx", "登记 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HiddenInspection/HiddenRectificationAdd.aspx", "登记 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -366,7 +366,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
string RegistrationId = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
Model.HSSE_Hazard_HazardRegister hazardRegister = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId);
|
||||
Model.HSSE_Hazard_HazardRegister hazardRegister = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByCheckItemDetailId(RegistrationId);
|
||||
if (e.CommandName == "IsSelected")
|
||||
{
|
||||
CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected");
|
||||
@@ -386,7 +386,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
}
|
||||
}
|
||||
if (e.CommandName == "attchUrl")
|
||||
{
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CheckSpecial&menuId={1}&edit=1&type=-1", RegistrationId, BLL.Const.ProjectCheckSpecialMenuId)));
|
||||
}
|
||||
if (e.CommandName == "del")
|
||||
@@ -703,5 +703,33 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected string ConvertState(object state)
|
||||
{
|
||||
if (state != null)
|
||||
{
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByCheckItemDetailId(state.ToString());
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.States == "1") //待整改
|
||||
{
|
||||
return "待整改";
|
||||
}
|
||||
else if(registration.States == "2") //待整改
|
||||
{
|
||||
return "已整改-待复查验收";
|
||||
}
|
||||
else if(registration.States == "3") //待整改
|
||||
{
|
||||
return "已闭环";
|
||||
}
|
||||
{
|
||||
return "编制";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user