提交代码
This commit is contained in:
@@ -464,6 +464,8 @@
|
||||
<Compile Include="HSSE\Environmental\EnvironmentalEmergencyPlanService.cs" />
|
||||
<Compile Include="HSSE\Environmental\EnvironmentalMonitoringService.cs" />
|
||||
<Compile Include="HSSE\Environmental\UnexpectedEnvironmentalService.cs" />
|
||||
<Compile Include="HSSE\Hazard\ConstructionRiskApproveService.cs" />
|
||||
<Compile Include="HSSE\Hazard\ConstructionRiskCheckService.cs" />
|
||||
<Compile Include="HSSE\Hazard\Hazard_EnvironmentalRiskItemService.cs" />
|
||||
<Compile Include="HSSE\Hazard\Hazard_EnvironmentalRiskListService.cs" />
|
||||
<Compile Include="HSSE\Hazard\ConstructionRiskListService.cs" />
|
||||
|
||||
@@ -388,6 +388,30 @@ namespace BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据用户Id判断是否为本单位用户或管理员
|
||||
/// <summary>
|
||||
/// 根据用户UnitId判断是否为本单位用户或管理员
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool IsMainUnitOrAdmin2(string userId)
|
||||
{
|
||||
bool result = false;
|
||||
if (userId == Const.sysglyId || userId == Const.hfnbdId)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var user = Person_PersonsService.GetPerson_PersonsById(userId);
|
||||
if (user != null && (user.UnitId == Const.UnitId_SEDIN || user.UnitId == Const.UnitId_SEDINNB))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据用户ID判断是否 本单位本部用户或管理员
|
||||
/// <summary>
|
||||
/// 根据用户UnitId判断是否为本单位用户或管理员
|
||||
|
||||
@@ -200,6 +200,10 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string UnitId_SEDIN = "d72a27c9-4ba9-41c5-ab0b-c010409f20f2";
|
||||
/// <summary>
|
||||
/// 赛鼎宁波单位id
|
||||
/// </summary>
|
||||
public const string UnitId_SEDINNB = "274fc39e-66e2-4bb9-8080-acb808499e82";
|
||||
/// <summary>
|
||||
/// 集团公司单位id
|
||||
/// </summary>
|
||||
public const string UnitId_CNCEC = "722090d1-b5de-4c3c-a4f7-14f308161a3b";
|
||||
@@ -5048,5 +5052,38 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string UpState_4 = "4";
|
||||
#endregion
|
||||
|
||||
#region 风险管控流程定义
|
||||
/// <summary>
|
||||
/// 重新编制
|
||||
/// </summary>
|
||||
public const string ConstructionRisk_ReCompile = "0";
|
||||
|
||||
/// <summary>
|
||||
/// 总包专业工程师编制
|
||||
/// </summary>
|
||||
public const string ConstructionRisk_Compile = "1";
|
||||
|
||||
/// <summary>
|
||||
/// 总包施工经理审核
|
||||
/// </summary>
|
||||
public static string ConstructionRisk_Audit1 = "2";//总包
|
||||
|
||||
/// <summary>
|
||||
/// 总包安全经理审核
|
||||
/// </summary>
|
||||
public static string ConstructionRisk_Audit2 = "3";//总包
|
||||
|
||||
/// <summary>
|
||||
/// 审批完成(实施中)
|
||||
/// </summary>
|
||||
public static string ConstructionRisk_Audit3 = "4";
|
||||
|
||||
/// <summary>
|
||||
/// 完成
|
||||
/// </summary>
|
||||
public const string ConstructionRisk_Complete = "5";//分包
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,265 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionRiskApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取风险管控模板列表
|
||||
/// </summary>
|
||||
/// <param name="satartRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable getListData(string ConstructionRiskId)
|
||||
{
|
||||
var res = from x in db.HSSE_ConstructionRiskApprove
|
||||
where x.ConstructionRiskId == ConstructionRiskId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.ConstructionRiskApproveId,
|
||||
x.ConstructionRiskId,
|
||||
ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
x.ApproveDate,
|
||||
x.IsAgree,
|
||||
x.ApproveIdea,
|
||||
x.ApproveType,
|
||||
};
|
||||
return Funs.LINQToDataTable(res);
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据风险管控编号删除对应的所有风险管控审批信息
|
||||
/// </summary>
|
||||
/// <param name="ConstructionRiskId">风险管控编号</param>
|
||||
public static void DeleteConstructionRiskApprovesByConstructionRiskId(string ConstructionRiskId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.HSSE_ConstructionRiskApprove where x.ConstructionRiskId == ConstructionRiskId select x).ToList();
|
||||
db.HSSE_ConstructionRiskApprove.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取登录人的通知信息
|
||||
/// </summary>
|
||||
/// <param name="ConstructionRiskId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static IQueryable getList(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var res = from x in db.HSSE_ConstructionRiskApprove
|
||||
join ca in db.HSSE_ConstructionRisk on x.ConstructionRiskId equals ca.ConstructionRiskId
|
||||
where x.ApproveDate == null && x.ApproveType == "S" && x.ApproveMan == userId
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
//x.ConstructionRiskApproveId,
|
||||
x.ConstructionRiskId,
|
||||
//x.ApproveDate,
|
||||
//x.IsAgree,
|
||||
//x.ApproveIdea,
|
||||
//x.ApproveType,
|
||||
};
|
||||
return res.AsQueryable().Distinct();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新通知信息提醒
|
||||
/// </summary>
|
||||
/// <param name="ConstructionRiskId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetSee(string ConstructionRiskId, string userId)
|
||||
{
|
||||
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string ConstructionRiskId, string userId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var res = db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
if (res != null)
|
||||
{
|
||||
res.ApproveDate = DateTime.Now;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据风险管控编号获取一个风险管控审批信息
|
||||
/// </summary>
|
||||
/// <param name="ConstructionRiskId">风险管控编号</param>
|
||||
/// <returns>一个风险管控审批实体</returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetConstructionRiskApproveByConstructionRiskId(string ConstructionRiskId)
|
||||
{
|
||||
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改风险管控审批信息
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">风险管控审批实体</param>
|
||||
public static void UpdateConstructionRiskApprove(Model.HSSE_ConstructionRiskApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = db.HSSE_ConstructionRiskApprove.First(e => e.ConstructionRiskApproveId == approve.ConstructionRiskApproveId && e.ApproveDate == null);
|
||||
newApprove.ConstructionRiskId = approve.ConstructionRiskId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
/// <summary>
|
||||
/// 增加风险管控审批信息
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">风险管控审批实体</param>
|
||||
public static void AddConstructionRiskApprove(Model.HSSE_ConstructionRiskApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HSSE_ConstructionRiskApprove));
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = new Model.HSSE_ConstructionRiskApprove();
|
||||
newApprove.ConstructionRiskApproveId = newKeyID;
|
||||
newApprove.ConstructionRiskId = approve.ConstructionRiskId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
db.HSSE_ConstructionRiskApprove.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
|
||||
}
|
||||
public static string AddConstructionRiskApproveForApi(Model.HSSE_ConstructionRiskApprove approve)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HSSE_ConstructionRiskApprove));
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = new Model.HSSE_ConstructionRiskApprove();
|
||||
newApprove.ConstructionRiskApproveId = newKeyID;
|
||||
newApprove.ConstructionRiskId = approve.ConstructionRiskId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
|
||||
db.HSSE_ConstructionRiskApprove.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
return newKeyID;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 总包施工经理审核
|
||||
/// </summary>
|
||||
/// <param name="ConstructionRiskId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetAudit1(string ConstructionRiskId)
|
||||
{
|
||||
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 总包安全经理审核
|
||||
/// </summary>
|
||||
/// <param name="ConstructionRiskId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetAudit2(string ConstructionRiskId)
|
||||
{
|
||||
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审批完成(实施中)信息
|
||||
/// </summary>
|
||||
/// <param name="ConstructionRiskId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskApprove GetAudit3(string ConstructionRiskId)
|
||||
{
|
||||
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit3);
|
||||
}
|
||||
|
||||
public static Model.HSSE_ConstructionRiskApprove GetComplie(string ConstructionRiskId)
|
||||
{
|
||||
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Compile);
|
||||
}
|
||||
public static List<Model.HSSE_ConstructionRiskApprove> GetListDataByCodeForApi(string code)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.HSSE_ConstructionRiskApprove
|
||||
where x.ConstructionRiskId == code && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.ConstructionRiskApproveId,
|
||||
x.ConstructionRiskId,
|
||||
ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
x.ApproveDate,
|
||||
x.IsAgree,
|
||||
x.ApproveIdea,
|
||||
x.ApproveType,
|
||||
};
|
||||
List<Model.HSSE_ConstructionRiskApprove> res = new List<Model.HSSE_ConstructionRiskApprove>();
|
||||
var list = q.ToList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
Model.HSSE_ConstructionRiskApprove approve = new Model.HSSE_ConstructionRiskApprove();
|
||||
approve.ConstructionRiskApproveId = item.ConstructionRiskApproveId;
|
||||
approve.ConstructionRiskId = item.ConstructionRiskId;
|
||||
approve.ApproveMan = item.ApproveMan;
|
||||
approve.ApproveDate = item.ApproveDate;
|
||||
approve.IsAgree = item.IsAgree;
|
||||
approve.ApproveIdea = item.ApproveIdea;
|
||||
approve.ApproveType = item.ApproveType;
|
||||
res.Add(approve);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
public static Model.HSSE_ConstructionRiskApprove getCurrApproveForApi(string ConstructionRiskId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = db.HSSE_ConstructionRiskApprove.FirstOrDefault(e => e.ConstructionRiskId == ConstructionRiskId && e.ApproveType != "S" && e.ApproveDate == null);
|
||||
if (newApprove != null)
|
||||
{
|
||||
newApprove.ApproveIdea = Person_PersonsService.GetPersonsNameById(newApprove.ApproveMan);
|
||||
}
|
||||
return newApprove;
|
||||
}
|
||||
}
|
||||
public static void UpdateConstructionRiskApproveForApi(Model.HSSE_ConstructionRiskApprove approve)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = db.HSSE_ConstructionRiskApprove.FirstOrDefault(e => e.ConstructionRiskApproveId == approve.ConstructionRiskApproveId && e.ApproveDate == null);
|
||||
if (newApprove != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(approve.ConstructionRiskId))
|
||||
{
|
||||
newApprove.ConstructionRiskId = approve.ConstructionRiskId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(approve.ApproveMan))
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
if (approve.ApproveDate.HasValue)
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
if (!string.IsNullOrEmpty(approve.ApproveIdea))
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
if (approve.IsAgree.HasValue)
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
if (!string.IsNullOrEmpty(approve.ApproveType))
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ConstructionRiskCheckService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
/// </summary>
|
||||
/// <param name="hazardListCode">主键</param>
|
||||
/// <returns></returns>
|
||||
public static Model.HSSE_ConstructionRiskCheck GetConstructionRiskCheck(string ConstructionRiskCheckId)
|
||||
{
|
||||
return Funs.DB.HSSE_ConstructionRiskCheck.FirstOrDefault(e => e.ConstructionRiskCheckId == ConstructionRiskCheckId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hazardList"></param>
|
||||
public static void AddConstructionRiskCheck(Model.HSSE_ConstructionRiskCheck ConstructionRiskCheck)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskCheck newConstructionRiskCheck = new Model.HSSE_ConstructionRiskCheck
|
||||
{
|
||||
ConstructionRiskCheckId = ConstructionRiskCheck.ConstructionRiskCheckId,
|
||||
ConstructionRiskId = ConstructionRiskCheck.ConstructionRiskId,
|
||||
CheckResult = ConstructionRiskCheck.CheckResult,
|
||||
CheckMan = ConstructionRiskCheck.CheckMan,
|
||||
Rectification = ConstructionRiskCheck.Rectification,
|
||||
CheckDate = ConstructionRiskCheck.CheckDate,
|
||||
};
|
||||
Funs.DB.HSSE_ConstructionRiskCheck.InsertOnSubmit(newConstructionRiskCheck);
|
||||
Funs.DB.SubmitChanges();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hazardList"></param>
|
||||
public static void UpdateConstructionRiskCheck(Model.HSSE_ConstructionRiskCheck hazardList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskCheck newHazardList = db.HSSE_ConstructionRiskCheck.FirstOrDefault(e => e.ConstructionRiskCheckId == hazardList.ConstructionRiskCheckId);
|
||||
if (newHazardList != null)
|
||||
{
|
||||
newHazardList.CheckResult = hazardList.CheckResult;
|
||||
newHazardList.CheckMan = hazardList.CheckMan;
|
||||
newHazardList.Rectification = hazardList.Rectification;
|
||||
newHazardList.CheckDate = hazardList.CheckDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ConstructionRiskCheckId"> </param>
|
||||
public static void DeleteConstructionRiskCheck(string ConstructionRiskCheckId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskCheck hazardList = db.HSSE_ConstructionRiskCheck.FirstOrDefault(e => e.ConstructionRiskCheckId == ConstructionRiskCheckId);
|
||||
if (hazardList != null)
|
||||
{
|
||||
db.HSSE_ConstructionRiskCheck.DeleteOnSubmit(hazardList);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -39,6 +40,7 @@ namespace BLL
|
||||
DateZ = constructionRisk.DateZ,
|
||||
DateWeek = constructionRisk.DateWeek,
|
||||
ConstructionContent = constructionRisk.ConstructionContent,
|
||||
ConstructionContentId = constructionRisk.ConstructionContentId,
|
||||
States = constructionRisk.States,
|
||||
RefLicense = constructionRisk.RefLicense,
|
||||
LicenseDes = constructionRisk.LicenseDes,
|
||||
@@ -129,6 +131,7 @@ namespace BLL
|
||||
newHazardList.DateZ = hazardList.DateZ;
|
||||
newHazardList.DateWeek = hazardList.DateWeek;
|
||||
newHazardList.ConstructionContent = hazardList.ConstructionContent;
|
||||
newHazardList.ConstructionContentId = hazardList.ConstructionContentId;
|
||||
newHazardList.States = hazardList.States;
|
||||
newHazardList.RefLicense = hazardList.RefLicense;
|
||||
newHazardList.LicenseDes = hazardList.LicenseDes;
|
||||
@@ -165,5 +168,102 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取风险等级下拉项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] RiskLevelList()
|
||||
{
|
||||
ListItem[] lis = new ListItem[4];
|
||||
lis[0] = new ListItem("低风险", "低风险");
|
||||
lis[1] = new ListItem("一般风险", "一般风险");
|
||||
lis[2] = new ListItem("较大风险", "较大风险");
|
||||
lis[3] = new ListItem("重大风险", "重大风险");
|
||||
return lis;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取风险等级下拉项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] RiskLevelList2()
|
||||
{
|
||||
ListItem[] lis = new ListItem[2];
|
||||
lis[0] = new ListItem("较大风险", "较大风险");
|
||||
lis[1] = new ListItem("重大风险", "重大风险");
|
||||
return lis;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据状态选择下一步办理类型
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetDHandleTypeByState(string state)
|
||||
{
|
||||
if (state == Const.ConstructionRisk_Compile || state == Const.ConstructionRisk_ReCompile) //无是否同意
|
||||
{
|
||||
ListItem[] lis = new ListItem[1];
|
||||
lis[0] = new ListItem("总包施工经理审核", Const.ConstructionRisk_Audit1);
|
||||
return lis;
|
||||
}
|
||||
else if (state == Const.ConstructionRisk_Audit1)//有是否同意
|
||||
{
|
||||
ListItem[] lis = new ListItem[2];
|
||||
lis[0] = new ListItem("总包安全经理审核", Const.ConstructionRisk_Audit2);//是 加载
|
||||
lis[1] = new ListItem("重新编制", Const.ConstructionRisk_ReCompile);//否加载
|
||||
return lis;
|
||||
}
|
||||
else if (state == Const.ConstructionRisk_Audit2)//有是否同意
|
||||
{
|
||||
ListItem[] lis = new ListItem[2];
|
||||
lis[0] = new ListItem("审核完成", Const.ConstructionRisk_Audit3);//是 加载
|
||||
lis[1] = new ListItem("重新编制", Const.ConstructionRisk_ReCompile);//否加载
|
||||
return lis;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 把状态转换代号为文字形式
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
public static string ConvertState(object state)
|
||||
{
|
||||
if (state != null)
|
||||
{
|
||||
if (state.ToString() == BLL.Const.ConstructionRisk_ReCompile)
|
||||
{
|
||||
return "重新编制";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.ConstructionRisk_Compile)
|
||||
{
|
||||
return "编制";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.ConstructionRisk_Audit1)
|
||||
{
|
||||
return "总包施工经理审核";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.ConstructionRisk_Audit2)
|
||||
{
|
||||
return "总包安全经理审核";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.ConstructionRisk_Audit3)
|
||||
{
|
||||
return "实施中";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.ConstructionRisk_Complete)
|
||||
{
|
||||
return "完成";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ namespace BLL
|
||||
newMainItem.MainItemName = mainItemToUnitWork.MainItemName;
|
||||
newMainItem.DesignProfessionalIds = mainItemToUnitWork.DesignProfessionalIds;
|
||||
newMainItem.Remark = mainItemToUnitWork.Remark;
|
||||
newMainItem.Coordinate = mainItemToUnitWork.Coordinate;
|
||||
|
||||
db.ProjectData_MainItem.InsertOnSubmit(newMainItem);
|
||||
db.SubmitChanges();
|
||||
@@ -93,6 +94,7 @@ namespace BLL
|
||||
newMainItem.MainItemName = mainItemToUnitWork.MainItemName;
|
||||
newMainItem.DesignProfessionalIds = mainItemToUnitWork.DesignProfessionalIds;
|
||||
newMainItem.Remark = mainItemToUnitWork.Remark;
|
||||
newMainItem.Coordinate = mainItemToUnitWork.Coordinate;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user