提交代码
This commit is contained in:
@@ -73,7 +73,7 @@ namespace BLL
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||
&& (roleIds == null || roleList.Contains(y.RoleId)) && (strParam == null || x.UserName.Contains(strParam))
|
||||
&& y.IsPost ==true
|
||||
&& y.IsPost == true
|
||||
select new Model.UserItem
|
||||
{
|
||||
UserId = x.UserId,
|
||||
@@ -285,7 +285,7 @@ namespace BLL
|
||||
{
|
||||
var getDataLists = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId
|
||||
where y.ProjectId == projectId
|
||||
select new Model.UserItem
|
||||
{
|
||||
UserId = x.UserId,
|
||||
@@ -330,5 +330,79 @@ namespace BLL
|
||||
return getDataList.OrderBy(x => x.UnitName).ThenBy(x => x.UserName).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//HSSE副经理
|
||||
public static string HSSEEngineerf = "e2166a63-23ae-41de-9fbd-63ead785c033";
|
||||
//分包商HSE经理
|
||||
public static string FbsGcs = "b01b5d82-c0d9-44fc-b3b9-fca91da34d28";
|
||||
//分包商HSE工程师
|
||||
public static string FbsHseGcs = "9d12f8fa-56a3-4db4-849e-e85e1c21a769";
|
||||
/// <summary>
|
||||
/// 根据受检单位项目id获取参加检查人员(项目HSE经理、HSE工程师、 HSSE副经理、受检单位的分包商HSE经理、分包商HSE工程师)
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitid"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.UserItem> getCheckUserByProjectIdAndUnitid(string projectId, string unitid)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
//当前项目的项目HSE经理、HSE工程师、 HSSE副经理
|
||||
var getlist1 =(from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId==projectId &&
|
||||
(y.RoleId.Contains(Const.HSSEManager) || y.RoleId.Contains(Const.HSSEEngineer)
|
||||
|| y.RoleId.Contains(HSSEEngineerf)
|
||||
)
|
||||
select new Model.UserItem
|
||||
{
|
||||
UserId = x.UserId,
|
||||
Account = x.Account,
|
||||
UserCode = x.UserCode,
|
||||
Password = x.Password,
|
||||
UserName = x.UserName,
|
||||
RoleId = y.RoleId,
|
||||
RoleName = RoleService.getRoleNamesRoleIds(y.RoleId),
|
||||
UnitId = y.UnitId,
|
||||
UnitName = db.Base_Unit.First(z => z.UnitId == y.UnitId).UnitName,
|
||||
LoginProjectId = y.ProjectId,
|
||||
LoginProjectName = db.Base_Project.First(z => z.ProjectId == y.ProjectId).ProjectName,
|
||||
IdentityCard = x.IdentityCard,
|
||||
Email = x.Email,
|
||||
Telephone = x.Telephone,
|
||||
IsOffice = x.IsOffice,
|
||||
SignatureUrl = x.SignatureUrl.Replace('\\', '/'),
|
||||
}).ToList();
|
||||
//受检单位的分包商HSE经理、分包商HSE工程师
|
||||
var getlist2 =(from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && y.UnitId == unitid &&
|
||||
(y.RoleId.Contains(FbsGcs) || y.RoleId.Contains(FbsHseGcs)
|
||||
)
|
||||
select new Model.UserItem
|
||||
{
|
||||
UserId = x.UserId,
|
||||
Account = x.Account,
|
||||
UserCode = x.UserCode,
|
||||
Password = x.Password,
|
||||
UserName = x.UserName,
|
||||
RoleId = y.RoleId,
|
||||
RoleName = RoleService.getRoleNamesRoleIds(y.RoleId),
|
||||
UnitId = y.UnitId,
|
||||
UnitName = db.Base_Unit.First(z => z.UnitId == y.UnitId).UnitName,
|
||||
LoginProjectId = y.ProjectId,
|
||||
LoginProjectName = db.Base_Project.First(z => z.ProjectId == y.ProjectId).ProjectName,
|
||||
IdentityCard = x.IdentityCard,
|
||||
Email = x.Email,
|
||||
Telephone = x.Telephone,
|
||||
IsOffice = x.IsOffice,
|
||||
SignatureUrl = x.SignatureUrl.Replace('\\', '/'),
|
||||
}).ToList();
|
||||
var getlist = getlist1.Union(getlist2).ToList<Model.UserItem>();
|
||||
return getlist;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,8 @@ namespace BLL
|
||||
|
||||
ResponsibleMan = x.ResponsibleMan,
|
||||
ReceiveMan = x.ReceiveMan,
|
||||
ReceiveManName = UserService.getUserNamesUserIds(x.ReceiveMan)
|
||||
ReceiveManName = UserService.getUserNamesUserIds(x.ReceiveMan),
|
||||
AttachUrl2= APIUpLoadFileService.getFileUrl(x.CheckSpecialId+"zgh", null),
|
||||
|
||||
};
|
||||
return getInfo.FirstOrDefault();
|
||||
@@ -98,8 +99,8 @@ namespace BLL
|
||||
|
||||
ResponsibleMan = x.ResponsibleMan,
|
||||
ReceiveMan = x.ReceiveMan,
|
||||
ReceiveManName = UserService.getUserNamesUserIds(x.ReceiveMan)
|
||||
|
||||
ReceiveManName = UserService.getUserNamesUserIds(x.ReceiveMan),
|
||||
AttachUrl2 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId + "zgh", null),
|
||||
};
|
||||
return getInfo.FirstOrDefault();
|
||||
}
|
||||
@@ -232,7 +233,7 @@ namespace BLL
|
||||
//// 删除专项检查明细项
|
||||
Check_CheckSpecialDetailService.DeleteCheckSpecialDetails(newCheckSpecial.CheckSpecialId);
|
||||
}
|
||||
////保存附件
|
||||
////保存附件(提交前附件)
|
||||
if (!string.IsNullOrEmpty(newItem.AttachUrl1))
|
||||
{
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl1, 10, null), newItem.AttachUrl1, Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId);
|
||||
@@ -242,6 +243,16 @@ namespace BLL
|
||||
CommonService.DeleteAttachFileById(Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId);
|
||||
}
|
||||
|
||||
////保存附件(整改后附件)
|
||||
if (!string.IsNullOrEmpty(newItem.AttachUrl2))
|
||||
{
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl2, 10, null), newItem.AttachUrl2, Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId+"zgh");
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId + "zgh");
|
||||
}
|
||||
|
||||
///// 新增检查项
|
||||
if (newItem.CheckSpecialDetailItems != null && newItem.CheckSpecialDetailItems.Count() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user