1
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
alter table Information_MillionsMonthlyReport add KeyWorkNum int null
|
||||
alter table Information_MillionsMonthlyReport add KeyWorkOKNum int null
|
||||
alter table Information_MillionsMonthlyReport add KeyWorkOKRate nvarchar(20) null
|
||||
GO
|
||||
|
||||
|
||||
/*************企业百万工时安全统计月报表**************/
|
||||
ALTER VIEW [dbo].[View_Information_MillionsMonthlyReport]
|
||||
AS
|
||||
SELECT
|
||||
Report.MillionsMonthlyReportId,
|
||||
Report.UnitId,
|
||||
Report.FillingDate,
|
||||
Report.UpState,
|
||||
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate,
|
||||
Group_0008.ConstText as YearStr,
|
||||
Group_0009.ConstText as MonthStr,
|
||||
U.UnitName,
|
||||
Report.Year,
|
||||
Report.Month,
|
||||
Report.DutyPerson,
|
||||
Report.RecordableIncidentRate,
|
||||
Report.LostTimeRate,
|
||||
Report.LostTimeInjuryRate,
|
||||
Report.DeathAccidentFrequency,
|
||||
Report.AccidentMortality,
|
||||
Report.HandleState,
|
||||
Report.KeyWorkNum,
|
||||
Report.KeyWorkOKNum,
|
||||
Report.KeyWorkOKRate,
|
||||
Report.HandleMan,
|
||||
US.PersonName AS UserName
|
||||
FROM dbo.Information_MillionsMonthlyReport AS Report
|
||||
LEFT JOIN Base_Unit AS U ON U.UnitId=Report.UnitId
|
||||
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.[Year]
|
||||
LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =Report.[Month]
|
||||
LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user