1
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Solution
|
||||
@@ -53,7 +54,8 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpHazardType, ConstValue.Group_LargerHazardType, true);
|
||||
//是否需要专家论证
|
||||
BLL.ConstValue.InitConstValueRadioButtonList(this.rblIsArgument, ConstValue.Group_0001, "False");
|
||||
|
||||
//是否超危大工程
|
||||
BLL.ConstValue.InitConstValueRadioButtonList(this.rblIsSuperLargerHazard, ConstValue.Group_0001, "False");
|
||||
this.HazardId = Request.Params["HazardId"];
|
||||
var largerHazard = BLL.LargerHazardService.GetLargerHazardByHazardId(this.HazardId);
|
||||
if (largerHazard != null)
|
||||
@@ -81,8 +83,26 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
{
|
||||
this.rblIsArgument.SelectedValue = "False";
|
||||
}
|
||||
if (largerHazard.IsSuperLargerHazard == true)
|
||||
{
|
||||
this.rblIsSuperLargerHazard.SelectedValue = "True";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.rblIsSuperLargerHazard.SelectedValue = "False";
|
||||
}
|
||||
if (largerHazard.TrainPersonNum != null)
|
||||
{
|
||||
this.txtTrainPersonNum.Text = largerHazard.TrainPersonNum.ToString();
|
||||
}
|
||||
if (largerHazard.OperativesNum != null)
|
||||
{
|
||||
this.txtOperativesNum.Text = largerHazard.OperativesNum.ToString();
|
||||
}
|
||||
this.drpStates.SelectedValue = largerHazard.States;
|
||||
this.txtRemark.Text = HttpUtility.HtmlDecode(largerHazard.Remark);
|
||||
this.txtDescriptions.Text = largerHazard.Descriptions;
|
||||
txtHazardName.Text = largerHazard.HazardName;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -92,38 +112,10 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
this.txtRemark.Text = HttpUtility.HtmlDecode("描述");
|
||||
this.txtRecordTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
///初始化审核菜单
|
||||
this.ctlAuditFlow.MenuId = BLL.Const.ProjectLargerHazardListMenuId;
|
||||
this.ctlAuditFlow.DataId = this.HazardId;
|
||||
this.ctlAuditFlow.ProjectId = this.ProjectId;
|
||||
this.ctlAuditFlow.UnitId = this.CurrUser.UnitId;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 提交按钮
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpHazardType.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ctlAuditFlow.NextStep == BLL.Const.State_1 && this.ctlAuditFlow.NextPerson == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择下一步办理人!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.SaveData(BLL.Const.BtnSubmit);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存按钮
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
@@ -155,17 +147,16 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
Address = this.txtAddress.Text.Trim(),
|
||||
ExpectedTime = Funs.GetNewDateTime(this.txtExpectedTime.Text.Trim()),
|
||||
IsArgument = Convert.ToBoolean(this.rblIsArgument.SelectedValue),
|
||||
IsSuperLargerHazard = Convert.ToBoolean(this.rblIsSuperLargerHazard.SelectedValue),
|
||||
TrainPersonNum = Funs.GetNewIntOrZero(this.txtTrainPersonNum.Text.Trim()),
|
||||
OperativesNum = Funs.GetNewIntOrZero(this.txtOperativesNum.Text.Trim()),
|
||||
Remark = HttpUtility.HtmlEncode(this.txtRemark.Text.Trim()),
|
||||
Descriptions = this.txtDescriptions.Text.Trim(),
|
||||
RecordTime = Funs.GetNewDateTime(this.txtRecordTime.Text.Trim()),
|
||||
ProjectId = this.ProjectId,
|
||||
////单据状态
|
||||
States = BLL.Const.State_0
|
||||
States = this.drpStates.SelectedValue,
|
||||
HazardName = txtHazardName.Text.Trim()
|
||||
};
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
largerHazard.States = this.ctlAuditFlow.NextStep;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
largerHazard.HazardId = this.HazardId;
|
||||
@@ -175,28 +166,170 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
else
|
||||
{
|
||||
largerHazard.HazardId = SQLHelper.GetNewID(typeof(Model.Solution_LargerHazard));
|
||||
largerHazard.RecardMan = this.CurrUser.PersonId;
|
||||
largerHazard.RecardMan = this.CurrUser.UserId;
|
||||
this.HazardId = largerHazard.HazardId;
|
||||
BLL.LargerHazardService.AddLargerHazard(largerHazard);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId, BLL.Const.ProjectLargerHazardListMenuId, BLL.Const.BtnAdd);
|
||||
|
||||
#region 修改2024-6-23 11:36:39 如果是专家论证,加到专家论证清单中
|
||||
if (rblIsArgument.SelectedValue == "True")
|
||||
{
|
||||
var LargerHazardListId = SQLHelper.GetNewID();
|
||||
var txtHazardCode = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectExpertArgumentMenuId, this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
|
||||
Model.Solution_LargerHazardList newRecord = new Model.Solution_LargerHazardList
|
||||
{
|
||||
LargerHazardListId = LargerHazardListId,
|
||||
HazardCode = txtHazardCode,
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
RecordTime = Funs.GetNewDateTime(this.txtRecordTime.Text),
|
||||
VersionNo = "V1.0",
|
||||
RecardManId = this.CurrUser.UserId,
|
||||
////单据状态
|
||||
States = BLL.Const.State_1,
|
||||
};
|
||||
|
||||
BLL.ExpertArgumentService.AddLargerHazardList(newRecord);
|
||||
//子项
|
||||
Model.Solution_LargerHazardListItem itemModel = new Model.Solution_LargerHazardListItem();
|
||||
itemModel.LargerHazardListItemId = SQLHelper.GetNewID();
|
||||
itemModel.SortIndex = 1;
|
||||
itemModel.LargerHazardListId = LargerHazardListId;
|
||||
itemModel.ExpectedStartTime = txtExpectedTime.SelectedDate;
|
||||
itemModel.IsArgument = true;
|
||||
Funs.DB.Solution_LargerHazardListItem.InsertOnSubmit(itemModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
////保存流程审核数据
|
||||
this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectLargerHazardListMenuId, this.HazardId, (type == BLL.Const.BtnSubmit ? true : false), this.drpHazardType.SelectedItem.Text, "../Solution/LargerHazardView.aspx?HazardId={0}");
|
||||
//Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ProjectInformation);
|
||||
//Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.DangerousProject);
|
||||
}
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// 上传审批页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
protected void btnAttachUrl1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId, BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId + "1", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传会签页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId + "2", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传方案内容
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazardWord&menuId={1}", this.HazardId + "3", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传专项培训
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl4_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId + "4", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传安全技术交底
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl5_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId + "5", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传旁站
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl6_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId + "6", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传验收
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl7_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId + "7", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传监测
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl8_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId + "8", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传隐患
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl9_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}", this.HazardId + "9", BLL.Const.ProjectLargerHazardListMenuId)));
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -211,10 +344,9 @@ namespace FineUIPro.Web.HSSE.Solution
|
||||
IsArgument = Convert.ToBoolean(this.rblIsArgument.SelectedValue),
|
||||
Remark = HttpUtility.HtmlEncode(this.txtRemark.Text.Trim()),
|
||||
ProjectId = this.ProjectId,
|
||||
////单据状态
|
||||
States = BLL.Const.State_0,
|
||||
States = this.drpStates.SelectedValue,
|
||||
HazardId = SQLHelper.GetNewID(typeof(Model.Solution_LargerHazard)),
|
||||
RecardMan = this.CurrUser.PersonId,
|
||||
RecardMan = this.CurrUser.UserId,
|
||||
RecordTime = Funs.GetNewDateTime(this.txtRecordTime.Text.Trim())
|
||||
};
|
||||
this.HazardId = largerHazard.HazardId;
|
||||
|
||||
Reference in New Issue
Block a user