危害因素调整
This commit is contained in:
@@ -39,6 +39,20 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单位id
|
||||
/// </summary>
|
||||
public string UnitId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 操作人
|
||||
/// </summary>
|
||||
public string CompileMan
|
||||
@@ -75,6 +89,7 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = Request.Params["ProjectId"];
|
||||
this.UnitId = Request.Params["UnitId"];
|
||||
|
||||
|
||||
this.CompileMan = this.CurrUser.UserId;
|
||||
@@ -303,7 +318,7 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
else
|
||||
{
|
||||
Year = ct.Year.ToString();
|
||||
Month = ct.Month.ToString();
|
||||
Month = ct.Month > 9 ? ct.Month.ToString() : $"0{ct.Month}";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -425,6 +440,18 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
return (lstError, null);
|
||||
}
|
||||
|
||||
string UnitProjectName = string.Empty;
|
||||
if (!string.IsNullOrWhiteSpace(this.ProjectId))
|
||||
{
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
UnitProjectName = project.ProjectName;
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(this.UnitId))
|
||||
{
|
||||
var unit = BLL.UnitService.GetUnitByUnitId(this.UnitId);
|
||||
UnitProjectName = unit.UnitName;
|
||||
}
|
||||
|
||||
// 其余字段可根据实际业务映射到实体
|
||||
var entity = new Model.HazardFactor_OccHealth
|
||||
{
|
||||
@@ -433,7 +460,9 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
CompileMan = this.CompileMan,
|
||||
CompileManName = this.CompileManName,
|
||||
State = int.Parse(BLL.Const.State_1),//默认已提交
|
||||
ProjectId =this.ProjectId,
|
||||
ProjectId = this.ProjectId,
|
||||
UnitId = this.UnitId,
|
||||
UnitProjectName = UnitProjectName,
|
||||
Year = Year,
|
||||
Month = Month,
|
||||
WorkPlace = WorkPlace,
|
||||
|
||||
Reference in New Issue
Block a user