修改作业票
This commit is contained in:
@@ -102,7 +102,7 @@ namespace BLL
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Manager_HSSELog newHSSELog =db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
|
||||
Model.Manager_HSSELog newHSSELog = db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
|
||||
if (newHSSELog != null)
|
||||
{
|
||||
newHSSELog.CompileDate = updateHSSELog.CompileDate;
|
||||
@@ -980,5 +980,96 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 小程序接口
|
||||
/// <summary>
|
||||
/// 返回列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HSSELogItem> getHSSELogDataList(string projectId, string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.HSSELogItem> getInfoList = new List<Model.HSSELogItem>();
|
||||
getInfoList = (from x in db.Manager_HSSELog
|
||||
join y in db.Sys_User on x.CompileMan equals y.UserId
|
||||
join z in db.Sys_Const on x.Weather equals z.ConstValue
|
||||
orderby x.CompileDate
|
||||
where x.IsVisible != false && z.GroupId == BLL.ConstValue.Group_Weather && x.ProjectId == projectId
|
||||
select new Model.HSSELogItem
|
||||
{
|
||||
HSSELogId = x.HSSELogId,
|
||||
ProjectId = x.ProjectId,
|
||||
CompileDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
|
||||
CompileMan = x.CompileMan,
|
||||
Weather = x.Weather,
|
||||
IsVisible = x.IsVisible,
|
||||
CompileManName = y.UserName,
|
||||
WeatherName = z.ConstText
|
||||
}).ToList();
|
||||
Model.Project_ProjectUser projectUser = BLL.ProjectUserService.GetProjectUserByUserIdProjectId(projectId, userId);
|
||||
if (projectUser != null)
|
||||
{
|
||||
if (projectUser.RoleId.Contains(BLL.Const.HSSEEngineer)) //项目安全工程师只能看到自己的日志内容
|
||||
{
|
||||
getInfoList = getInfoList.Where(x => x.CompileMan == userId).ToList();
|
||||
}
|
||||
}
|
||||
return getInfoList;
|
||||
}
|
||||
}
|
||||
|
||||
public static Model.HSSELogItem getHSSELogData(string HSSELogId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.HSSELogItem model = new Model.HSSELogItem();
|
||||
model = (from x in db.Manager_HSSELog
|
||||
join y in db.Sys_User on x.CompileMan equals y.UserId
|
||||
join z in db.Sys_Const on x.Weather equals z.ConstValue
|
||||
orderby x.CompileDate
|
||||
where x.IsVisible != false && z.GroupId == BLL.ConstValue.Group_Weather && x.HSSELogId == HSSELogId
|
||||
select new Model.HSSELogItem
|
||||
{
|
||||
HSSELogId = x.HSSELogId,
|
||||
ProjectId = x.ProjectId,
|
||||
CompileDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
|
||||
CompileMan = x.CompileMan,
|
||||
Weather = x.Weather,
|
||||
IsVisible = x.IsVisible,
|
||||
CompileManName = y.UserName,
|
||||
WeatherName = z.ConstText,
|
||||
|
||||
|
||||
Num11=x.Num11,
|
||||
Contents12=x.Contents12,
|
||||
Contents13=x.Contents13,
|
||||
Contents21=x.Contents21,
|
||||
Num21=x.Num21,
|
||||
Contents22=x.Contents22,
|
||||
Num22=x.Num22,
|
||||
Contents23=x.Contents23,
|
||||
Num23=x.Num23,
|
||||
Contents24=x.Contents24,
|
||||
Num24=x.Num24,
|
||||
Contents210=x.Contents210,
|
||||
Num210=x.Num210,
|
||||
Num211=x.Num211,
|
||||
Contents31=x.Contents31,
|
||||
Num31=x.Num31,
|
||||
Contents32=x.Contents32,
|
||||
Num32=x.Num32,
|
||||
Contents41=x.Contents41,
|
||||
Contents42=x.Contents42
|
||||
}).FirstOrDefault();
|
||||
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user