20210907
This commit is contained in:
parent
8add136b66
commit
5ccec3cd9f
|
@ -0,0 +1,75 @@
|
|||
/**********隐患巡检(手机端)视图*************/
|
||||
ALTER VIEW [dbo].[View_Hazard_HazardRegister]
|
||||
AS
|
||||
SELECT Registration.HazardRegisterId,
|
||||
Registration.HazardCode,
|
||||
Registration.RegisterDate,
|
||||
Registration.RegisterDef,
|
||||
Registration.Rectification,
|
||||
Registration.Place,
|
||||
Registration.ResponsibleUnit,
|
||||
Registration.Observer,
|
||||
Registration.RectifiedDate,
|
||||
Registration.ProjectId,
|
||||
Registration.states,
|
||||
Registration.IsEffective,
|
||||
Registration.ResponsibleMan,
|
||||
Registration.CheckManId,
|
||||
Registration.CheckTime,
|
||||
Registration.RectificationPeriod,
|
||||
Registration.ImageUrl,
|
||||
Registration.RectificationImageUrl,
|
||||
Registration.RectificationTime,
|
||||
Registration.ConfirmMan,
|
||||
Registration.ConfirmDate,
|
||||
Registration.HandleIdea,
|
||||
Registration.CutPayment,
|
||||
Registration.ProblemTypes,
|
||||
Registration.CheckSpecialId,
|
||||
Registration.CheckItemDetailId,
|
||||
Registration.SupCheckItemSetId,
|
||||
Registration.CheckItemSetId,
|
||||
Registration.SafeSupervisionId,
|
||||
Registration.SafeSupervisionIsOK,
|
||||
Project.ProjectName,
|
||||
Registration.CheckCycle,
|
||||
ISNULL(WorkArea.UnitWorkName,'') AS WorkAreaName,
|
||||
Unit.UnitName AS ResponsibilityUnitName,
|
||||
ISNULL(User1.UserName,'') AS ResponsibilityManName,
|
||||
ISNULL(User1.Telephone,'') AS ResponsibilityManTel,
|
||||
ISNULL(User2.UserName,'') AS CheckManName,
|
||||
ISNULL(User2.Telephone,'') AS CheckManTel,
|
||||
User2.UnitId AS SendUnitId,
|
||||
ISNULL(User3.UserName,'') AS ConfirmManName,
|
||||
ISNULL(User3.Telephone,'') AS ConfirmManTel,
|
||||
ISNULL(User4.UserName,'') AS ResponsibilityManName2,
|
||||
ISNULL(User4.Telephone,'') AS ResponsibilityMan2Tel,
|
||||
(CASE WHEN Registration.states='1' and (Registration.SafeSupervisionIsOK is null OR Registration.SafeSupervisionIsOK=0) THEN '待整改'
|
||||
WHEN Registration.states='1' and Registration.SafeSupervisionIsOK=1 THEN '合格'
|
||||
WHEN Registration.states='2' THEN '已整改'
|
||||
WHEN Registration.states='3' THEN '已闭环'
|
||||
ELSE '已作废' END ) AS StatesStr,
|
||||
RegisterTypes.RegisterTypesId,
|
||||
RegisterTypes.RegisterTypesName,
|
||||
Registration.DIC_ID,
|
||||
Registration.CCManIds,
|
||||
CCManNames = STUFF(( SELECT ',' + UserName FROM Sys_User
|
||||
where PATINDEX('%,' + RTRIM(Sys_User.UserId) + ',%',',' + Registration.CCManIds + ',')>0
|
||||
ORDER BY PATINDEX('%,' + RTRIM(Registration.CCManIds) + ',%',',' + Registration.CCManIds + ',')
|
||||
FOR XML PATH('')), 1, 1,''),
|
||||
Registration.Requirements
|
||||
FROM dbo.HSSE_Hazard_HazardRegister AS Registration
|
||||
LEFT JOIN dbo.Base_Project AS Project ON Project.ProjectId = Registration.ProjectId
|
||||
LEFT JOIN dbo.WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Registration.Place
|
||||
LEFT JOIN dbo.HSSE_Hazard_HazardRegisterTypes AS RegisterTypes ON RegisterTypes.RegisterTypesId = Registration.RegisterTypesId
|
||||
LEFT JOIN dbo.Base_Unit AS Unit ON Unit.UnitId = Registration.ResponsibleUnit
|
||||
LEFT JOIN dbo.Sys_User AS User1 ON User1.UserId = Registration.ResponsibleMan
|
||||
LEFT JOIN dbo.Sys_User AS User2 ON User2.UserId = Registration.CheckManId
|
||||
LEFT JOIN dbo.Sys_User AS User3 ON User3.UserId = Registration.ConfirmMan
|
||||
LEFT JOIN dbo.Sys_User AS User4 ON User4.UserId = Registration.ResponsibleMan2
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
|
@ -73,6 +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
|
||||
select new Model.UserItem
|
||||
{
|
||||
UserId = x.UserId,
|
||||
|
@ -142,6 +143,7 @@ namespace BLL
|
|||
join z in db.Project_ProjectUnit on x.UnitId equals z.UnitId
|
||||
where y.ProjectId == projectId && z.ProjectId == projectId && z.UnitType == unitType
|
||||
&& (roleIds == null || roleList.Contains(y.RoleId)) && (strParam == null || x.UserName.Contains(strParam))
|
||||
&& y.IsPost == true
|
||||
select new Model.UserItem
|
||||
{
|
||||
UserId = x.UserId,
|
||||
|
@ -283,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,
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace BLL
|
|||
public static void DeleteHazardRegisterByHazardRegisterId(string hazardRegisterId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegister hazardRegister = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegisterId);
|
||||
var hazardRegister = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegisterId);
|
||||
if (hazardRegister != null)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -358,12 +358,13 @@ namespace BLL
|
|||
getPUser = (from x in db.Project_ProjectUser
|
||||
join u in db.Project_ProjectUnit on new { x.ProjectId, x.UnitId } equals new { u.ProjectId, u.UnitId }
|
||||
where x.ProjectId == projectId && (u.UnitId == unitId || u.UnitType == BLL.Const.ProjectUnitType_1 || u.UnitType == BLL.Const.ProjectUnitType_3 || u.UnitType == BLL.Const.ProjectUnitType_4)
|
||||
&& x.IsPost == true
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
getPUser = (from x in db.Project_ProjectUser
|
||||
where x.ProjectId == projectId
|
||||
where x.ProjectId == projectId && x.IsPost == true
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
|
@ -372,7 +373,7 @@ namespace BLL
|
|||
foreach (var item in getPUser)
|
||||
{
|
||||
List<string> roleIdList = Funs.GetStrListByStr(item.RoleId, ',');
|
||||
var getRoles = db.Sys_Role.FirstOrDefault(x =>roleIdList.Contains(x.RoleId));
|
||||
var getRoles = db.Sys_Role.FirstOrDefault(x => roleIdList.Contains(x.RoleId));
|
||||
if (getRoles != null)
|
||||
{
|
||||
string userName = RoleService.getRoleNamesRoleIds(item.RoleId) + "-" + UserService.GetUserNameByUserId(item.UserId);
|
||||
|
@ -405,7 +406,7 @@ namespace BLL
|
|||
{
|
||||
users = (from x in db.Sys_User
|
||||
join z in db.Sys_Role on x.RoleId equals z.RoleId
|
||||
where x.IsPost == true
|
||||
where x.IsPost == true
|
||||
orderby x.UserCode
|
||||
select new Model.SpSysUserItem
|
||||
{
|
||||
|
@ -431,27 +432,24 @@ namespace BLL
|
|||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.UnitId == unitId
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.UnitId == unitId && y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
where x.UnitId == unitId
|
||||
where x.UnitId == unitId && x.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
@ -475,7 +473,7 @@ namespace BLL
|
|||
{
|
||||
users = (from x in users
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId
|
||||
where y.ProjectId == projectId && y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
@ -499,18 +497,16 @@ namespace BLL
|
|||
if (listRoles.Count() > 0)
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && listRoles.Contains(y.RoleId)
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && listRoles.Contains(y.RoleId) && y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
@ -518,7 +514,7 @@ namespace BLL
|
|||
else
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
where x.UserId != BLL.Const.hfnbdId && x.UserId != Const.sedinId
|
||||
where x.UserId != BLL.Const.hfnbdId && x.UserId != Const.sedinId && x.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
|
||||
|
@ -531,12 +527,12 @@ namespace BLL
|
|||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目号和角色Id获取用户下拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Sys_User> GetUserListByProjectIdUnitIdRoleId(string projectId,string unitId, string roleIds)
|
||||
public static List<Model.Sys_User> GetUserListByProjectIdUnitIdRoleId(string projectId, string unitId, string roleIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
@ -547,18 +543,16 @@ namespace BLL
|
|||
if (listRoles.Count() > 0)
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.UnitId == unitId && listRoles.Contains(y.RoleId)
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.UnitId == unitId && listRoles.Contains(y.RoleId) && y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.UnitId == unitId
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.UnitId == unitId && y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
@ -566,7 +560,8 @@ namespace BLL
|
|||
else
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
where x.UnitId == unitId && x.UserId != BLL.Const.hfnbdId && x.UserId != Const.sedinId
|
||||
where x.UnitId == unitId && x.UserId != BLL.Const.hfnbdId && x.UserId != Const.sedinId
|
||||
&& x.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
|
||||
|
@ -665,7 +660,7 @@ namespace BLL
|
|||
{
|
||||
dropName.DataValueField = "UserId";
|
||||
dropName.DataTextField = "UserName";
|
||||
dropName.DataSource = BLL.UserService.GetUserListByProjectIdUnitIdRoleId(projectId,unitId, roleIds);
|
||||
dropName.DataSource = BLL.UserService.GetUserListByProjectIdUnitIdRoleId(projectId, unitId, roleIds);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
|
@ -700,12 +695,9 @@ namespace BLL
|
|||
List<Model.Sys_User> users = new List<Model.Sys_User>();
|
||||
//分包用户
|
||||
var q1 = (from x in db.Project_ProjectUser
|
||||
join y in db.Sys_User
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person
|
||||
on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost
|
||||
on z.WorkPostId equals a.WorkPostId
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost on z.WorkPostId equals a.WorkPostId
|
||||
where x.IsPost == true && x.UnitId == subUnitId
|
||||
&& a.CNCodes.Contains(cNProfessionalCode)
|
||||
&& x.UserId != subUserId
|
||||
|
@ -734,12 +726,9 @@ namespace BLL
|
|||
mainUnitId = mainUnit.UnitId;
|
||||
}
|
||||
var q2 = (from x in db.Project_ProjectUser
|
||||
join y in db.Sys_User
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person
|
||||
on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost
|
||||
on z.WorkPostId equals a.WorkPostId
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost on z.WorkPostId equals a.WorkPostId
|
||||
where x.IsPost == true && x.UnitId == mainUnitId && a.CNCodes.Contains(cNProfessionalCode)
|
||||
&& x.UserId != mainUserId
|
||||
&& x.ProjectId == projectId && z.ProjectId == projectId
|
||||
|
@ -807,14 +796,14 @@ namespace BLL
|
|||
{
|
||||
user = (from x in user
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where (y.ProjectId == projectId && y.UnitId == unitId)
|
||||
where (y.ProjectId == projectId && y.UnitId == unitId) && y.IsPost == true
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
user = (from x in user
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where (y.ProjectId == projectId)
|
||||
where (y.ProjectId == projectId) && y.IsPost == true
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
|
@ -839,7 +828,8 @@ namespace BLL
|
|||
var user = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
join z in db.Project_ProjectUnit on x.UnitId equals z.UnitId
|
||||
where x.IsPost == true && y.ProjectId == projectId && z.ProjectId == projectId && z.UnitType == Const.ProjectUnitType_1
|
||||
where x.IsPost == true && y.ProjectId == projectId && z.ProjectId == projectId
|
||||
&& z.UnitType == Const.ProjectUnitType_1 && y.IsPost == true
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
ListItem[] lis = new ListItem[user.Count()];
|
||||
|
@ -874,14 +864,11 @@ namespace BLL
|
|||
List<Model.Sys_User> users = new List<Model.Sys_User>();
|
||||
//分包用户
|
||||
var q1 = (from x in db.Project_ProjectUser
|
||||
join y in db.Sys_User
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person
|
||||
on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost
|
||||
on z.WorkPostId equals a.WorkPostId
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost on z.WorkPostId equals a.WorkPostId
|
||||
where x.IsPost == true && x.UnitId == subUnitId && a.CNCodes.Contains(cNProfessionalCode)
|
||||
&& x.ProjectId == projectId && z.ProjectId == projectId
|
||||
&& x.ProjectId == projectId && z.ProjectId == projectId && y.IsPost == true
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
foreach (var item in q1)
|
||||
|
@ -906,14 +893,11 @@ namespace BLL
|
|||
mainUnitId = mainUnit.UnitId;
|
||||
}
|
||||
var q2 = (from x in db.Project_ProjectUser
|
||||
join y in db.Sys_User
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person
|
||||
on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost
|
||||
on z.WorkPostId equals a.WorkPostId
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost on z.WorkPostId equals a.WorkPostId
|
||||
where x.IsPost == true && x.UnitId == mainUnitId && a.CNCodes.Contains(cNProfessionalCode)
|
||||
&& x.UserId != mainUserId
|
||||
&& x.UserId != mainUserId && y.IsPost == true
|
||||
&& x.ProjectId == projectId && z.ProjectId == projectId
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
|
@ -945,14 +929,11 @@ namespace BLL
|
|||
{
|
||||
List<Model.Sys_User> users = new List<Model.Sys_User>();
|
||||
var q1 = (from x in db.Project_ProjectUser
|
||||
join y in db.Sys_User
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person
|
||||
on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost
|
||||
on z.WorkPostId equals a.WorkPostId
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost on z.WorkPostId equals a.WorkPostId
|
||||
where x.IsPost == true && (x.UnitId == unitId1 || x.UnitId == unitId2) && a.CNCodes.Contains(cNProfessionalCode)
|
||||
&& x.ProjectId == projectId && z.ProjectId == projectId
|
||||
&& x.ProjectId == projectId && z.ProjectId == projectId && y.IsPost == true
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
foreach (var item in q1)
|
||||
|
@ -972,14 +953,11 @@ namespace BLL
|
|||
if (!string.IsNullOrEmpty(unitId3))
|
||||
{
|
||||
var q2 = (from x in db.Project_ProjectUser
|
||||
join y in db.Sys_User
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person
|
||||
on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost
|
||||
on z.WorkPostId equals a.WorkPostId
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.SitePerson_Person on y.IdentityCard equals z.IdentityCard
|
||||
join a in db.Base_WorkPost on z.WorkPostId equals a.WorkPostId
|
||||
where x.IsPost == true && a.CNCodes.Contains(cNProfessionalCode)
|
||||
&& x.ProjectId == projectId && z.ProjectId == projectId
|
||||
&& x.ProjectId == projectId && z.ProjectId == projectId && y.IsPost == true
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
var q3 = (from x in q2
|
||||
|
@ -1050,13 +1028,14 @@ namespace BLL
|
|||
user = (from x in user
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where (y.ProjectId == projectId && unitIds.Split(',').Contains(y.UnitId))
|
||||
&& y.IsPost == true
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
user = (from x in user
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where (y.ProjectId == projectId)
|
||||
where (y.ProjectId == projectId) && y.IsPost == true
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
|
@ -1078,12 +1057,10 @@ namespace BLL
|
|||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.Sys_User
|
||||
join z in db.Project_ProjectUser
|
||||
on x.UserId equals z.UserId
|
||||
join y in db.Sys_Role
|
||||
on z.RoleId equals y.RoleId
|
||||
join z in db.Project_ProjectUser on x.UserId equals z.UserId
|
||||
join y in db.Sys_Role on z.RoleId equals y.RoleId
|
||||
where x.IsPost == true && x.UnitId == unitId && (y.RoleId == role1 || y.RoleId == role2 || y.RoleId == role3 || y.RoleId == role4)
|
||||
&& z.ProjectId == projectId
|
||||
&& z.ProjectId == projectId && z.IsPost == true
|
||||
orderby x.UserId
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
@ -1099,18 +1076,16 @@ namespace BLL
|
|||
{
|
||||
List<Model.Sys_User> users = new List<Model.Sys_User>();
|
||||
var q1 = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where x.IsPost == true && x.UnitId == unitId1 && y.ProjectId == projectId
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where x.IsPost == true && x.UnitId == unitId1 && y.ProjectId == projectId && y.IsPost == true
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
users.AddRange(q1);
|
||||
if (!string.IsNullOrEmpty(unitId2))
|
||||
{
|
||||
var q2 = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.IsPost == true
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.IsPost == true && y.IsPost == true
|
||||
select x;
|
||||
var q3 = (from x in q2 where unitId2.Split(',').Contains(x.UnitId) select x).ToList();
|
||||
users.AddRange(q3);
|
||||
|
@ -1118,9 +1093,8 @@ namespace BLL
|
|||
if (!string.IsNullOrEmpty(unitId3))
|
||||
{
|
||||
var q4 = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.IsPost == true
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.IsPost == true && y.IsPost == true
|
||||
select x;
|
||||
var q5 = (from x in q4 where unitId3.Split(',').Contains(x.UnitId) select x).ToList();
|
||||
users.AddRange(q5);
|
||||
|
@ -1157,11 +1131,10 @@ namespace BLL
|
|||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var user = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.Project_ProjectUnit
|
||||
on y.UnitId equals z.UnitId
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
join z in db.Project_ProjectUnit on y.UnitId equals z.UnitId
|
||||
where x.IsPost == true && y.ProjectId == projectId && z.UnitType == BLL.Const.ProjectUnitType_3
|
||||
&& y.IsPost == true
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
ListItem[] lis = new ListItem[user.Count()];
|
||||
|
@ -1201,11 +1174,10 @@ namespace BLL
|
|||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var user = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.Project_ProjectUnit
|
||||
on y.UnitId equals z.UnitId
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
join z in db.Project_ProjectUnit on y.UnitId equals z.UnitId
|
||||
where x.IsPost == true && y.ProjectId == projectId && z.UnitType == BLL.Const.ProjectUnitType_4
|
||||
&& y.IsPost == true
|
||||
orderby x.UserId
|
||||
select x).ToList();
|
||||
ListItem[] lis = new ListItem[user.Count()];
|
||||
|
@ -1246,11 +1218,10 @@ namespace BLL
|
|||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
join z in db.Project_ProjectUnit
|
||||
on x.UnitId equals z.UnitId
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
join z in db.Project_ProjectUnit on x.UnitId equals z.UnitId
|
||||
where y.ProjectId == projectId && z.ProjectId == projectId && z.UnitType == unitType
|
||||
&& y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
@ -1307,7 +1278,7 @@ namespace BLL
|
|||
{
|
||||
users = (from x in users
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId
|
||||
where y.ProjectId == projectId && y.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
@ -1349,6 +1320,7 @@ namespace BLL
|
|||
where y.ProjectId == projectId && z.ProjectId == projectId
|
||||
where unitType == "" || unitTypes.Contains(z.UnitType)
|
||||
where unitId == "" || unitIds.Contains(z.UnitId)
|
||||
where y.IsPost == true
|
||||
orderby z.UnitType descending, x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
@ -1446,7 +1418,7 @@ namespace BLL
|
|||
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id部门获取赛鼎施工部用户下拉选项
|
||||
/// 根据单位Id部门获取施工部用户下拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Sys_User> GetUserListByUnitIdDepartId(string unitId, string DepartId)
|
||||
|
@ -1455,7 +1427,7 @@ namespace BLL
|
|||
{
|
||||
List<Model.Sys_User> list = new List<Model.Sys_User>();
|
||||
list = (from x in db.Sys_User
|
||||
where x.UnitId == unitId && x.DepartId == DepartId
|
||||
where x.UnitId == unitId && x.DepartId == DepartId && x.IsPost == true
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
return list;
|
||||
|
|
|
@ -45,6 +45,12 @@
|
|||
<f:DatePicker ID="txtEndDate" runat="server" Label="结束日期" LabelWidth="80px" Width="220px">
|
||||
</f:DatePicker>
|
||||
<f:TextBox ID="txtName" runat="server" Label="姓名" LabelWidth="50px" Width="180px" ></f:TextBox>
|
||||
<f:RadioButtonList runat="server" ID="rbPost" Width="200px" LabelWidth="0px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="rbPost_SelectedIndexChanged">
|
||||
<f:RadioItem Value="-1" Text="全部" />
|
||||
<f:RadioItem Value="1" Text="在岗" Selected="true" />
|
||||
<f:RadioItem Value="0" Text="离场" />
|
||||
</f:RadioButtonList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" ToolTip="查询" OnClick="btnSearch_Click">
|
||||
</f:Button>
|
||||
|
@ -92,7 +98,7 @@
|
|||
<f:RenderField Width="100px" ColumnID="ManHours" DataField="ManHours" SortField="ManHours"
|
||||
HeaderText="工时" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="ManOverHours" DataField="ManOverHours" SortField="ManOverHours"
|
||||
<f:RenderField Width="100px" ColumnID="ManOverHours" DataField="ManOverHours" SortField="ManOverHours"
|
||||
HeaderText="加班" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="145px" ColumnID="WorkIn1" DataField="WorkIn1" SortField="WorkIn1"
|
||||
|
|
|
@ -134,6 +134,14 @@ namespace FineUIPro.Web.Door
|
|||
strSql += " AND RecordDate >= @StartDate";
|
||||
listStr.Add(new SqlParameter("@StartDate", this.txtStartDate.Text));
|
||||
}
|
||||
if (rbPost.SelectedValue == "0")
|
||||
{
|
||||
strSql += " AND P.OutTime IS NOT NULL";
|
||||
}
|
||||
else if (rbPost.SelectedValue == "1")
|
||||
{
|
||||
strSql += " AND P.OutTime IS NULL";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtEndDate.Text))
|
||||
{
|
||||
strSql += " AND RecordDate <= @EndDate";
|
||||
|
@ -280,5 +288,10 @@ namespace FineUIPro.Web.Door
|
|||
{
|
||||
this.drpWorkTeam.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpWorkTeam.SelectedValueArray);
|
||||
}
|
||||
|
||||
protected void rbPost_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
GetPersonStatistic();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -120,6 +120,15 @@ namespace FineUIPro.Web.Door {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// rbPost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbPost;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -54,11 +54,9 @@
|
|||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="责任人" ID="drpResponsibleMan"
|
||||
>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="责任人" ID="drpResponsibleMan" >
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtRectificationPeriod" runat="server" Label="整改期限" LabelAlign="Right" Required="True" ShowRedStar="true"
|
||||
>
|
||||
<f:DatePicker ID="txtRectificationPeriod" runat="server" Label="整改期限" LabelAlign="Right" Required="True" ShowRedStar="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
|
|
@ -428,16 +428,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
Model.HSSE_Hazard_HazardRegister hazardRegister = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(rowID);
|
||||
if (hazardRegister.States == "1" || this.CurrUser.UserId == BLL.Const.sysglyId) //待整改
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, hazardRegister.HazardCode, hazardRegister.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnDelete);
|
||||
BLL.HSSE_Hazard_HazardRegisterService.DeleteHazardRegisterByHazardRegisterId(rowID);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("已进入整改流程,无法删除!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, hazardRegister.HazardCode, hazardRegister.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnDelete);
|
||||
BLL.HSSE_Hazard_HazardRegisterService.DeleteHazardRegisterByHazardRegisterId(rowID);
|
||||
}
|
||||
BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
|
|
Loading…
Reference in New Issue