修改作业票
This commit is contained in:
parent
7cca1b3cd3
commit
ba8a84b2e0
|
@ -0,0 +1,357 @@
|
|||
|
||||
--获取当前人待办事项
|
||||
ALTER PROCEDURE [dbo].[Sp_APP_GetToDoItems]
|
||||
@projectId NVARCHAR(50)=NULL,
|
||||
@userId NVARCHAR(200)=NULL
|
||||
AS
|
||||
/*获取当前人待办事项*/
|
||||
BEGIN
|
||||
SELECT HazardRegisterId AS DataId
|
||||
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
|
||||
,'安全巡检' AS MenuName
|
||||
,register.RegisterDef AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,register.RegisterDate AS DataTime
|
||||
,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr
|
||||
,'/pagesHSSE/safe/inspecitonconfirm' AS UrlStr
|
||||
FROM HSSE_Hazard_HazardRegister AS register
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||
WHERE register.ProjectId=@projectId AND
|
||||
((register.states = '1' AND (register.ResponsibleMan =@userId OR register.CCManIds LIKE ('%'+@userId+'%') ))
|
||||
OR (register.states = '2' AND register.CheckManId =@userId))
|
||||
|
||||
UNION ALL
|
||||
SELECT PlanId AS DataId
|
||||
,'B782A26B-D85C-4F84-8B45-F7AA47B3159E' AS MenuId
|
||||
,'培训计划' AS MenuName
|
||||
,PlanName AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,DesignerDate AS DataTime
|
||||
,CONVERT(varchar(100),DesignerDate, 23) AS DataTimeStr
|
||||
,'/pagesTest/test/trainindex' AS UrlStr
|
||||
FROM Training_Plan AS ePlan
|
||||
LEFT JOIN Sys_User AS users ON ePlan.DesignerId= users.UserId
|
||||
WHERE (ePlan.ProjectId=@projectId or (@projectId is null and ePlan.ProjectId is null))
|
||||
AND (States = '0' OR States = '1' ) AND ePlan.DesignerId =@userId
|
||||
|
||||
UNION ALL
|
||||
SELECT TestPlanId AS DataId
|
||||
,'FAF7F4A4-A4BC-4D94-9E88-0CF5A380DB34' AS MenuId
|
||||
,'考试计划' AS MenuName
|
||||
,PlanName AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,PlanDate AS DataTime
|
||||
,CONVERT(varchar(100),PlanDate, 23) AS DataTimeStr
|
||||
,'/pagesTest/test/testplan' AS UrlStr
|
||||
FROM Training_TestPlan AS TPlan
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =TPlan.PlanManId
|
||||
WHERE (TPlan.ProjectId=@projectId or (@projectId is null and TPlan.ProjectId is null))
|
||||
AND (States = '0' OR States = '1' ) AND PlanManId =@userId
|
||||
|
||||
UNION ALL
|
||||
SELECT TaskId AS DataId
|
||||
,'E108F75D-89D0-4DCA-8356-A156C328805C' AS MenuId
|
||||
,'培训任务' AS MenuName
|
||||
,Plans.PlanName AS Content
|
||||
,users.UserId
|
||||
,users.UserName
|
||||
,TaskDate AS DataTime
|
||||
,CONVERT(varchar(100),TaskDate, 23) AS DataTimeStr
|
||||
,('/pagesTest/test/taskindex') AS UrlStr
|
||||
FROM Training_Task AS Task
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||
LEFT JOIN Training_Plan AS Plans ON Plans.PlanId =Task.PlanId
|
||||
WHERE (Task.ProjectId=@projectId or (@projectId is null and Task.ProjectId is null))
|
||||
AND (Task.States IS NULL OR Task.States != 2)
|
||||
AND Task.UserId = @userId
|
||||
|
||||
UNION ALL
|
||||
SELECT TestRecordId AS DataId
|
||||
,'0EEB138D-84F9-4686-8CBB-CAEAA6CF1B2A' AS MenuId
|
||||
,'扫码考试' AS MenuName
|
||||
,TestPlan.PlanName AS Content
|
||||
,TestRecord.TestManId
|
||||
,Person.PersonName
|
||||
,TestPlan.TestStartTime AS DataTime
|
||||
,CONVERT(varchar(100),TestPlan.TestStartTime, 23) AS DataTimeStr
|
||||
,('/pages/temp_index/index') AS UrlStr
|
||||
FROM Training_TestRecord AS TestRecord
|
||||
left join Training_TestPlan as TestPlan on TestRecord.TestPlanId = TestPlan.TestPlanId
|
||||
left join SitePerson_Person as Person on Person.PersonId = TestRecord.TestManId
|
||||
left join Sys_User as uses on Person.IdentityCard = uses.IdentityCard
|
||||
WHERE (TestRecord.ProjectId=@projectId or (@projectId is null and TestRecord.ProjectId is null))
|
||||
AND TestPlan.States ='1'
|
||||
AND TestRecord.TestEndTime IS NULL
|
||||
AND (TestRecord.TestManId = @userId or uses.UserId = @userId)
|
||||
|
||||
UNION ALL
|
||||
SELECT FireWorkId AS DataId
|
||||
,'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B' AS MenuId
|
||||
,'动火作业' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/dhuo/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_FireWork AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
UNION ALL
|
||||
SELECT HeightWorkId AS DataId
|
||||
,'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9' AS MenuId
|
||||
,'高处作业' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/gchu/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_HeightWork AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
UNION ALL
|
||||
SELECT LimitedSpaceId AS DataId
|
||||
,'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7' AS MenuId
|
||||
,'受限空间' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/sxkj/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_LimitedSpace AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
UNION ALL
|
||||
SELECT RadialWorkId AS DataId
|
||||
,'F72FF20B-D3EB-46A5-97F7-C99B2473A140' AS MenuId
|
||||
,'射线作业' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/sx/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_RadialWork AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
UNION ALL
|
||||
SELECT OpenCircuitId AS DataId
|
||||
,'4E607E83-41FC-4F49-B26F-A21CFE38328F' AS MenuId
|
||||
,'断路(占道)' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/dlu/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_OpenCircuit AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
UNION ALL
|
||||
SELECT BreakGroundId AS DataId
|
||||
,'755C6AC9-2E38-4D4F-AF33-33CB1744A907' AS MenuId
|
||||
,'动土作业' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/dtu/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_BreakGround AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
UNION ALL
|
||||
SELECT NightWorkId AS DataId
|
||||
,'7BBAE649-7B00-4475-A911-BFE3A37AC55B' AS MenuId
|
||||
,'夜间施工' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/yjsg/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_NightWork AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
UNION ALL
|
||||
SELECT LiftingWorkId AS DataId
|
||||
,'A1BE3AB6-9D4A-41E7-8870-E73423165451' AS MenuId
|
||||
,'吊装作业' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/dzhuang/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_LiftingWork AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
UNION ALL
|
||||
SELECT RectifyNoticesId AS DataId
|
||||
,'0038D764-D628-46F0-94FF-D0A22C3C45A3' AS MenuId
|
||||
,'隐患整改' AS MenuName
|
||||
,(CASE WHEN Rectify.States =1 THEN '待签发:'
|
||||
WHEN Rectify.States =2 THEN '待整改:'
|
||||
WHEN Rectify.States =3 THEN '待审核:'
|
||||
WHEN Rectify.States =4 THEN '待复查:'
|
||||
WHEN Rectify.States =5 THEN '已完成:'
|
||||
ELSE '待提交:' END + RectifyNoticesCode) AS Content
|
||||
,users.UserId
|
||||
,users.UserName
|
||||
,CheckedDate AS DataTime
|
||||
,CONVERT(varchar(100),CheckedDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN ISNULL(Rectify.States,0) =0 THEN '/pagesHSSE/rn/rn_add' --提交
|
||||
WHEN Rectify.States =1 THEN '/pagesHSSE/rn/rn_approval' --签发
|
||||
WHEN Rectify.States =2 THEN '/pagesHSSE/rn/rn_rectify' --整改
|
||||
WHEN Rectify.States =3 THEN '/pagesHSSE/rn/rn_rectifycf' --审核
|
||||
WHEN Rectify.States =4 THEN '/pagesHSSE/rn/rn_confirm' --复查
|
||||
ELSE '/pagesHSSE/rn/rn_add' END) AS UrlStr
|
||||
FROM Check_RectifyNotices AS Rectify
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||
WHERE Rectify.Projectid=@projectId AND Rectify.States <> 5
|
||||
AND ((ISNULL(Rectify.States,0) =0 AND Rectify.CompleteManId LIKE '%'+ @userId+'%')
|
||||
OR (Rectify.States =1 AND Rectify.SignPerson LIKE '%'+ @userId+'%')
|
||||
OR (Rectify.States =2 AND Rectify.DutyPersonId LIKE '%'+ @userId+'%')
|
||||
OR (Rectify.States =3 AND Rectify.UnitHeadManId LIKE '%'+ @userId+'%')
|
||||
OR (Rectify.States =4 AND Rectify.CheckPerson LIKE '%'+ @userId+'%')
|
||||
OR (Rectify.ProfessionalEngineerId LIKE '%'+ @userId+'%' AND (ProfessionalEngineerTime1 IS NULL OR ProfessionalEngineerTime2 IS NULL))
|
||||
OR (Rectify.ConstructionManagerId LIKE '%'+ @userId+'%' AND (ConstructionManagerTime1 IS NULL OR ConstructionManagerTime2 IS NULL))
|
||||
OR (Rectify.ProjectManagerId LIKE '%'+ @userId+'%' AND (ProjectManagerTime1 IS NULL OR ProjectManagerTime2 IS NULL)))
|
||||
|
||||
UNION ALL
|
||||
SELECT PersonId AS DataId
|
||||
,'EE260447-028F-46AF-8864-9A5DC9DAA5BD' AS MenuId
|
||||
,'现场人员' AS MenuName
|
||||
,Person.PersonName AS Content
|
||||
,users.UserId
|
||||
,users.UserName
|
||||
,Person.InTime AS DataTime
|
||||
,CONVERT(varchar(100),Person.InTime, 23) AS DataTimeStr
|
||||
,('/pagesHSSE/info/peopledetail') AS UrlStr
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||
WHERE Person.ProjectId=@projectId AND (Person.IsUsed IS NULL OR Person.IsUsed= 0)
|
||||
AND Person.AuditorId = @userId AND Person.AuditorDate IS NULL
|
||||
|
||||
|
||||
UNION ALL
|
||||
SELECT PauseNoticeId AS DataId
|
||||
,'C81DB7ED-165E-4C69-86B0-A3AAE37059FE' AS MenuId
|
||||
,'暂停令' AS MenuName
|
||||
,(CASE WHEN PauseNotice.PauseStates =1 THEN '待签发:'
|
||||
WHEN PauseNotice.PauseStates =2 THEN '待批准:'
|
||||
WHEN PauseNotice.PauseStates =3 THEN '待接收:'
|
||||
ELSE '待提交:' END + PauseNoticeCode) AS Content
|
||||
,users.UserId
|
||||
,users.UserName
|
||||
,PauseTime AS DataTime
|
||||
,CONVERT(varchar(100),PauseTime, 23) AS DataTimeStr
|
||||
,(CASE WHEN ISNULL(PauseNotice.PauseStates,0) =0 THEN '/pagesHSSE/info/stop_add ' --待提交
|
||||
WHEN PauseNotice.PauseStates =1 AND PauseNotice.SignManId=@userId THEN '/pagesHSSE/info/stop_approval' --待签发
|
||||
WHEN PauseNotice.PauseStates =2 AND PauseNotice.ApproveManId=@userId THEN '/pagesHSSE/info/stop_confirm' --待批准
|
||||
WHEN PauseNotice.PauseStates =3 AND PauseNotice.DutyPersonId=@userId THEN '/pagesHSSE/info/stop_feedback' --待接收
|
||||
ELSE '/pagesHSSE/info/stop_detail' END) AS UrlStr
|
||||
FROM Check_PauseNotice AS PauseNotice
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||
WHERE PauseNotice.ProjectId=@projectId AND PauseNotice.PauseStates <> 4
|
||||
AND ((ISNULL(PauseNotice.PauseStates,0) =0 AND PauseNotice.CompileManId LIKE '%'+ @userId+'%')
|
||||
OR (PauseNotice.PauseStates =1 AND PauseNotice.SignManId LIKE '%'+ @userId+'%')
|
||||
OR (PauseNotice.PauseStates =2 AND PauseNotice.ApproveManId LIKE '%'+ @userId+'%')
|
||||
OR (PauseNotice.PauseStates =3 AND PauseNotice.DutyPersonId LIKE '%'+ @userId+'%')
|
||||
OR (PauseNotice.ProfessionalEngineerId LIKE '%'+ @userId+'%' AND ProfessionalEngineerTime IS NULL)
|
||||
OR (PauseNotice.ConstructionManagerId LIKE '%'+ @userId+'%' AND ConstructionManagerTime IS NULL)
|
||||
OR (PauseNotice.UnitHeadManId LIKE '%'+ @userId+'%' AND UnitHeadManTime IS NULL)
|
||||
OR (PauseNotice.SupervisorManId LIKE '%'+ @userId+'%' AND SupervisorManTime IS NULL)
|
||||
OR (PauseNotice.OwnerId LIKE '%'+ @userId+'%' AND OwnerTime IS NULL))
|
||||
UNION ALL
|
||||
SELECT PunishNoticeId AS DataId
|
||||
,'755F1C1D-2178-47D8-9F82-A501B53A2436' AS MenuId
|
||||
,'处罚单' AS MenuName
|
||||
,(CASE WHEN PunishNotice.PunishStates =1 THEN '待签发:'
|
||||
WHEN PunishNotice.PunishStates =2 THEN '待批准:'
|
||||
WHEN PunishNotice.PunishStates =3 THEN '待回执:'
|
||||
ELSE '待提交:' END + PunishNoticeCode) AS Content
|
||||
,users.UserId
|
||||
,users.UserName
|
||||
,PunishNoticeDate AS DataTime
|
||||
,CONVERT(varchar(100),PunishNoticeDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN ISNULL(PunishNotice.PunishStates,0) =0 THEN '/pagesTest/punish/add' --待提交
|
||||
WHEN PunishNotice.PunishStates =1 AND PunishNotice.SignMan=@userId THEN '/pagesTest/punish/approval' --待签发
|
||||
WHEN PunishNotice.PunishStates =2 AND PunishNotice.ApproveMan=@userId THEN '/pagesTest/punish/rectify' --待批准
|
||||
WHEN PunishNotice.PunishStates =3 AND PunishNotice.DutyPersonId=@userId THEN '/pagesTest/punish/rectifycf' --待回执
|
||||
ELSE '/pagesTest/punish/detail' END) AS UrlStr
|
||||
FROM Check_PunishNotice AS PunishNotice
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||
WHERE PunishNotice.ProjectId=@projectId AND PunishNotice.PunishStates <> 4
|
||||
AND ((ISNULL(PunishNotice.PunishStates,0) =0 AND PunishNotice.CompileMan LIKE '%'+ @userId+'%')
|
||||
OR (PunishNotice.PunishStates =1 AND PunishNotice.SignMan LIKE '%'+ @userId+'%')
|
||||
OR (PunishNotice.PunishStates =2 AND PunishNotice.ApproveMan LIKE '%'+ @userId+'%')
|
||||
OR (PunishNotice.PunishStates =3 AND PunishNotice.DutyPersonId LIKE '%'+ @userId+'%')
|
||||
OR (PunishNotice.ProfessionalEngineerId LIKE '%'+ @userId+'%' AND ProfessionalEngineerTime IS NULL)
|
||||
OR (PunishNotice.ConstructionManagerId LIKE '%'+ @userId+'%' AND ConstructionManagerTime IS NULL)
|
||||
OR (PunishNotice.UnitHeadManId LIKE '%'+ @userId+'%' AND UnitHeadManTime IS NULL))
|
||||
UNION ALL
|
||||
SELECT ElectricityId AS DataId
|
||||
,'48F64E0F-38B2-4BDC-9B61-6200BD02CBF5' AS MenuId
|
||||
,'临时用电' AS MenuName
|
||||
,LicenseCode AS Content
|
||||
,UserId
|
||||
,users.UserName
|
||||
,ApplyDate AS DataTime
|
||||
,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr
|
||||
,(CASE WHEN States = '0' THEN '/pagesWork/ldian/add'
|
||||
ELSE '/pagesWork/dhuo/approval' END) AS UrlStr
|
||||
FROM License_Electricity AS License
|
||||
LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId
|
||||
WHERE License.ProjectId=@projectId
|
||||
AND (States = '0' OR States = '1' )
|
||||
AND License.NextManId LIKE '%'+ @userId+'%'
|
||||
|
||||
ORDER BY DataTime DESC
|
||||
END
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
临时用电作业票
|
||||
编号:
|
||||
|动土作业需附简图: |
|
||||
|申请单位 | |申请人 | |
|
||||
|作业地点 | |用电原因| |
|
||||
|有效期限 | |
|
||||
|作业内容、机 | |
|
||||
|具及安全措施 | |
|
||||
|序号 |检查单 |确认执行 |不适用 |
|
||||
|1 |使用的各类用电设施状况良好,绝缘及防 | | |
|
||||
| |护设施有效。 | | |
|
||||
|2 |用电线路有完善的保护措施,架空或埋地 | | |
|
||||
| |敷设符合规范要求,埋地有电缆走向标识 | | |
|
||||
| |,作业点拉设的电缆有防护套管保护。 | | |
|
||||
|3 |安装电工持证操作。 | | |
|
||||
|4 |安装电工绝缘鞋、绝缘手套等个人劳动防 | | |
|
||||
| |护用品齐全有效。 | | |
|
||||
|5 |安装的电缆符合“三相五线制”、“TN-S”施 | | |
|
||||
| |工用电安全规范要求。 | | |
|
||||
|6 |配电箱内有可见分断点的总断路开关。 | | |
|
||||
|7 |配电箱内配置有漏电保护器,开关箱漏电 | | |
|
||||
| |保护器额定漏电动作电流不大于30mA,额 | | |
|
||||
| |定漏电动作时间不大于0.1s;总开关箱中 | | |
|
||||
| |漏电保护器额定漏电动作电流大于30mA, | | |
|
||||
| |额定漏电动作时间大于0.1s,其额定漏电 | | |
|
||||
| |动作电流×额定漏电动作时间不大于30mA.s| | |
|
||||
| |。 | | |
|
||||
|8 |配电箱重复接地设置合格。 | | |
|
||||
|9 |其它需要补充的安全措施: | | |
|
||||
|施工单位安全人员意见: |总包单位安全人员意见: |
|
||||
| | |
|
||||
| | |
|
||||
|总包单位专业工程师意见: |总包单位施工经理意见: |
|
||||
| | |
|
||||
| | |
|
||||
|监理单位意见: |业主单位意见: |
|
||||
| | |
|
||||
| | |
|
||||
|取消: |
|
||||
|关闭: |
|
||||
|
|
@ -1994,6 +1994,7 @@
|
|||
<Content Include="File\Excel\TestRun\管道一览表.xlsx" />
|
||||
<Content Include="File\Excel\TestRun\系统划分.xlsx" />
|
||||
<Content Include="File\Excel\TestRun\设备一览表.xlsx" />
|
||||
<Content Include="File\Word\HSSE\临时用电作业票.doc" />
|
||||
<None Include="packages.config" />
|
||||
<Content Include="ReportPrint\ReportTabFile\分包商上传周报.tab" />
|
||||
<Content Include="ReportPrint\ReportTabFile\HSSE日志暨管理数据收集.tab" />
|
||||
|
|
|
@ -289,7 +289,7 @@ namespace FineUIPro.Web.HSSE.License
|
|||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
initTemplatePath = "File\\Word\\HSSE\\动土作业票.doc";
|
||||
initTemplatePath = "File\\Word\\HSSE\\临时用电作业票.doc";
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
newUrl = uploadfilepath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".doc");
|
||||
filePath = initTemplatePath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".pdf");
|
||||
|
@ -340,12 +340,12 @@ namespace FineUIPro.Web.HSSE.License
|
|||
|
||||
}
|
||||
}
|
||||
Bookmark bookmarkWorkDepth = doc.Range.Bookmarks["WorkDepth"];//开挖深度
|
||||
Bookmark bookmarkWorkDepth = doc.Range.Bookmarks["WorkDepth"];//作业原因
|
||||
if (bookmarkWorkDepth != null)
|
||||
{
|
||||
if (getElectricity != null)
|
||||
{
|
||||
bookmarkWorkDepth.Text = getElectricity.WorkDepth;
|
||||
bookmarkWorkDepth.Text = getElectricity.Reason;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class HSSELogItem
|
||||
{
|
||||
public string HSSELogId { get; set; }
|
||||
|
||||
public string ProjectId { get; set; }
|
||||
public string CompileDate { get; set; }
|
||||
public string CompileMan { get; set; }
|
||||
public string Weather { get; set; }
|
||||
public bool? IsVisible { get; set; }
|
||||
public string CompileManName { get; set; }
|
||||
public string WeatherName { get; set; }
|
||||
|
||||
public int? Num11 { get; set; }
|
||||
|
||||
|
||||
|
||||
public string Contents12 { get; set; }
|
||||
public string Contents13 { get; set; }
|
||||
public string Contents21 { get; set; }
|
||||
|
||||
public int? Num21 { get; set; }
|
||||
public string Contents22 { get; set; }
|
||||
|
||||
public int? Num22 { get; set; }
|
||||
public string Contents23 { get; set; }
|
||||
public int? Num23 { get; set; }
|
||||
public string Contents24 { get; set; }
|
||||
public int? Num24 { get; set; }
|
||||
public string Contents210 { get; set; }
|
||||
public int? Num210 { get; set; }
|
||||
public int? Num211 { get; set; }
|
||||
public string Contents31 { get; set; }
|
||||
public int? Num31 { get; set; }
|
||||
public string Contents32 { get; set; }
|
||||
public int? Num32 { get; set; }
|
||||
public string Contents41 { get; set; }
|
||||
public string Contents42 { get; set; }
|
||||
}
|
||||
}
|
|
@ -94,6 +94,7 @@
|
|||
<Compile Include="APIItem\HJGL\NDETrustItem.cs" />
|
||||
<Compile Include="APIItem\HJGL\WeldJointItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\HSEDiaryItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\HSSELogItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\IncentiveNoticeItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\LicenseDataItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\LicenseItem.cs" />
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using BLL;
|
||||
using Mvc.Controllers;
|
||||
|
||||
namespace WebAPI.Controllers.HSSE
|
||||
{
|
||||
public class HSSELogController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// 加载日志列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getHSSELogDataList( string projectId, string userId, int pageIndex=0)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = HSSELogService.getHSSELogDataList(projectId, userId);
|
||||
int pageCount = getDataList.Count;
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
getDataList = (from x in getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize)
|
||||
select x).ToList();
|
||||
}
|
||||
responeData.data = new { pageCount, getDataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载日志列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getHSSELogData(string HSSELogId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = HSSELogService.getHSSELogData(HSSELogId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载天气
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getWeatherDataList()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = ConstValue.drpConstItemList(BLL.ConstValue.Group_Weather);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存日志
|
||||
/// </summary>
|
||||
/// <param name="licenseDataItem">作业票记录</param>
|
||||
[HttpPost]
|
||||
public Model.ResponeData SaveHSSELogData([FromBody] Model.Manager_HSSELog HSSELog)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
HSSELog.IsVisible = true;
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(HSSELog.HSSELogId))
|
||||
{
|
||||
BLL.HSSELogService.UpdateHSSELog(HSSELog);
|
||||
responeData.message = "修改成功";
|
||||
}
|
||||
else
|
||||
{
|
||||
HSSELog.HSSELogId = SQLHelper.GetNewID(typeof(Model.Manager_HSSELog));
|
||||
BLL.HSSELogService.AddHSSELog(HSSELog);
|
||||
responeData.message = "保存成功";
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
ErrLogInfo.WriteLog(string.Empty, ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -181,6 +181,7 @@
|
|||
<Compile Include="Controllers\FaceController.cs" />
|
||||
<Compile Include="Controllers\DoorServerController.cs" />
|
||||
<Compile Include="Controllers\HJGL\GetHJDataController.cs" />
|
||||
<Compile Include="Controllers\HSSE\HSSELogController.cs" />
|
||||
<Compile Include="Controllers\HSSE\TestingController.cs" />
|
||||
<Compile Include="Controllers\Person\PersonCheckController.cs" />
|
||||
<Compile Include="Controllers\CQMS\CheckEquipmentController.cs" />
|
||||
|
|
Loading…
Reference in New Issue