添加会审代办
This commit is contained in:
parent
d10d6843cb
commit
75041220af
Binary file not shown.
|
@ -170,5 +170,41 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改HazardRegister
|
||||
/// </summary>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <returns></returns>
|
||||
public static void updateHazardRegister(Model.HazardRegisterItem hazardRegister)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
var isUpdate =
|
||||
db.HSSE_Hazard_HazardRegister_Unit.FirstOrDefault(x =>
|
||||
x.HazardRegisterId == hazardRegister.HazardRegisterId);
|
||||
if (isUpdate != null)
|
||||
{
|
||||
isUpdate.CheckTime = DateTime.Now;
|
||||
isUpdate.ReviewedManId = hazardRegister.ReviewedManId;
|
||||
isUpdate.RegisterDef = hazardRegister.RegisterDef;
|
||||
isUpdate.Requirements = hazardRegister.Requirements;
|
||||
//判断如果查询的会审人和修改的会审人一致,状态改为1
|
||||
if (!string.IsNullOrEmpty(isUpdate.CCManIds) && !string.IsNullOrEmpty(hazardRegister.ReviewedManId))
|
||||
{
|
||||
bool areEqual = string.Join(",", isUpdate.CCManIds.Split(',').OrderBy(x => x)) == string.Join(",", hazardRegister.ReviewedManId.Split(',').OrderBy(x => x));
|
||||
if (areEqual)
|
||||
{
|
||||
isUpdate.States = "1";
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -193,6 +193,10 @@ namespace BLL
|
|||
public static List<Model.HandleStep> GetStatesList()
|
||||
{
|
||||
List<Model.HandleStep> handleSteps = new List<Model.HandleStep>();
|
||||
Model.HandleStep handleStep5 = new Model.HandleStep();
|
||||
handleStep5.Id = "4";
|
||||
handleStep5.Name = "待会审";
|
||||
handleSteps.Add(handleStep5);
|
||||
Model.HandleStep handleStep1 = new Model.HandleStep();
|
||||
handleStep1.Id = "1";
|
||||
handleStep1.Name = "待整改";
|
||||
|
|
|
@ -367,5 +367,13 @@ namespace Model
|
|||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 会审人ids
|
||||
/// </summary>
|
||||
public string ReviewedManId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202375,6 +202375,8 @@ namespace Model
|
|||
|
||||
private string _Risk_Level;
|
||||
|
||||
private string _ReviewedManId;
|
||||
|
||||
private EntityRef<Base_Unit> _Base_Unit;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
|
@ -202467,6 +202469,8 @@ namespace Model
|
|||
partial void OnRequirementsChanged();
|
||||
partial void OnRisk_LevelChanging(string value);
|
||||
partial void OnRisk_LevelChanged();
|
||||
partial void OnReviewedManIdChanging(string value);
|
||||
partial void OnReviewedManIdChanged();
|
||||
#endregion
|
||||
|
||||
public HSSE_Hazard_HazardRegister_Unit()
|
||||
|
@ -203339,6 +203343,26 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewedManId", DbType="NVarChar(2000)")]
|
||||
public string ReviewedManId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ReviewedManId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ReviewedManId != value))
|
||||
{
|
||||
this.OnReviewedManIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ReviewedManId = value;
|
||||
this.SendPropertyChanged("ReviewedManId");
|
||||
this.OnReviewedManIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_Unit_Base_Unit", Storage="_Base_Unit", ThisKey="ResponsibleUnit", OtherKey="UnitId", IsForeignKey=true)]
|
||||
public Base_Unit Base_Unit
|
||||
{
|
||||
|
|
|
@ -184,5 +184,33 @@ namespace WebAPI
|
|||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 会审人提交操作
|
||||
|
||||
/// <summary>
|
||||
/// 修改HazardRegister
|
||||
/// </summary>
|
||||
/// <param name="hazardRegisterId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData updateHazardRegister([FromBody] Model.HazardRegisterItem hazardRegister)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
BLL.APIUnitHazardRegisterService.updateHazardRegister(hazardRegister);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue