集团三库

This commit is contained in:
2026-09-10 18:51:12 +08:00
parent dc6abc4cbb
commit 5be709c0e6
131 changed files with 25364 additions and 970 deletions
@@ -49,13 +49,17 @@ namespace FineUIPro.Web.HSSE.Accident
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
WorkPostService.InitWorkPostNameDropDownList(this.drpPost, true);
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, null, true);
Funs.FineUIPleaseSelect(this.dpAccidentLevel);
Funs.FineUIPleaseSelect(this.dpAccidentType);
Funs.FineUIPleaseSelect(this.dpResponsibilityType);
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.Enabled = false;
}
this.ProjectId = this.CurrUser.LoginProjectId;
this.AccidentHandleId = Request.Params["AccidentHandleId"];
if (!string.IsNullOrEmpty(this.AccidentHandleId))
@@ -68,7 +72,7 @@ namespace FineUIPro.Web.HSSE.Accident
if (this.ProjectId != this.CurrUser.LoginProjectId)
{
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
}
this.txtAccidentHandleCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.AccidentHandleId);
@@ -100,6 +104,33 @@ namespace FineUIPro.Web.HSSE.Accident
}
this.txtAccidentHandle.Text = accidentHandle.AccidentHandle;
//this.txtRemark.Text = accidentHandle.Remark;
if (!string.IsNullOrWhiteSpace(accidentHandle.AccidentLevel))
{
this.dpAccidentLevel.SelectedValue = accidentHandle.AccidentLevel.ToString();
}
if (!string.IsNullOrWhiteSpace(accidentHandle.AccidentType))
{
this.dpAccidentType.SelectedValue = accidentHandle.AccidentType.ToString();
}
if (!string.IsNullOrWhiteSpace(accidentHandle.PositionName))
{
this.drpPost.SelectedValue = accidentHandle.PositionName.ToString();
}
if (!string.IsNullOrWhiteSpace(accidentHandle.ResponsibilityType))
{
this.dpResponsibilityType.SelectedValue = accidentHandle.ResponsibilityType.ToString();
}
if (!string.IsNullOrWhiteSpace(accidentHandle.ResponsibleMan))
{
this.drpResponsibleMan.SelectedValue = accidentHandle.ResponsibleMan.ToString();
}
this.txtAccidentLocation.Text = accidentHandle.AccidentLocation;
this.txtContractingResponsibility.Text = accidentHandle.ContractingResponsibility;
this.txtResponsibilityDesc.Text = accidentHandle.ResponsibilityDesc;
if (accidentHandle.IndirectMoneyLoss != null)
{
this.txtIndirectMoneyLoss.Text = accidentHandle.IndirectMoneyLoss.ToString();
}
}
}
else
@@ -115,6 +146,28 @@ namespace FineUIPro.Web.HSSE.Accident
}
}
#endregion
/// <summary>
/// 单位选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpUnit_OnSelectedIndexChanged(object sender, EventArgs e)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
this.drpResponsibleMan.Items.Clear();
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
this.drpResponsibleMan.DataSource = from x in db.Sys_User
join y in db.Project_ProjectUser on x.UserId equals y.UserId
where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnitId.SelectedValue
select x;
this.drpResponsibleMan.DataBind();
}
Funs.FineUIPleaseSelect(this.drpResponsibleMan);
this.drpResponsibleMan.SelectedValue = BLL.Const._Null;
}
}
#region
/// <summary>
@@ -166,12 +219,38 @@ namespace FineUIPro.Web.HSSE.Accident
//Remark = this.txtRemark.Text.Trim(),
CompileMan = this.CurrUser.UserId,
CompileDate = DateTime.Now,
States = BLL.Const.State_0
States = BLL.Const.State_0,
AccidentLocation = this.txtAccidentLocation.Text.Trim(),
IndirectMoneyLoss = Funs.GetNewDecimalOrZero(this.txtIndirectMoneyLoss.Text.Trim()),
ContractingResponsibility = this.txtContractingResponsibility.Text.Trim(),
ResponsibilityDesc = this.txtResponsibilityDesc.Text.Trim(),
};
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
accidentHandle.UnitId = this.drpUnitId.SelectedValue;
}
if (this.dpAccidentLevel.SelectedValue != BLL.Const._Null)
{
accidentHandle.AccidentLevel = this.dpAccidentLevel.SelectedValue;
}
if (this.dpAccidentType.SelectedValue != BLL.Const._Null)
{
accidentHandle.AccidentType = this.dpAccidentType.SelectedValue;
}
if (this.drpPost.SelectedValue != BLL.Const._Null)
{
accidentHandle.PositionName = this.drpPost.SelectedValue;
}
if (this.dpResponsibilityType.SelectedValue != BLL.Const._Null)
{
accidentHandle.ResponsibilityType = this.dpResponsibilityType.SelectedValue;
}
if (this.drpResponsibleMan.SelectedValue != BLL.Const._Null)
{
accidentHandle.ResponsibleMan = this.drpResponsibleMan.SelectedValue;
accidentHandle.ResponsibleManName = this.drpResponsibleMan.SelectedText;
}
if (type == BLL.Const.BtnSubmit)
{
@@ -198,6 +277,14 @@ namespace FineUIPro.Web.HSSE.Accident
BLL.AccidentHandleService.AddAccidentHandle(accidentHandle);
BLL.LogService.AddSys_Log(this.CurrUser, this.txtAccidentHandleCode.Text, this.AccidentHandleId, BLL.Const.ProjectAccidentHandleMenuId, Const.BtnAdd);
}
//更新三库事故事件
string message = string.Empty;
SanKuDataSummaryReportService.UpdateAccidentRecord(this.AccidentHandleId, ref message);
if (!string.IsNullOrWhiteSpace(message))
{
ShowNotify(message, MessageBoxIcon.Warning);
}
////保存流程审核数据
this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectAccidentHandleMenuId, this.AccidentHandleId, (type == BLL.Const.BtnSubmit ? true : false), accidentHandle.AccidentHandleName, "../Accident/AccidentHandleView.aspx?AccidentHandleId={0}");
}