This commit is contained in:
2021-06-18 20:37:07 +08:00
parent e7cb804684
commit 65a719e331
32 changed files with 1093 additions and 128 deletions
@@ -0,0 +1,41 @@
delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_PDigData')
go
delete from Sys_Menu where MenuType='Menu_PDigData'
go
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('B0A4F8E9-143E-410A-AAD7-348EC72ADA0B','劳务实名制对接','',10,'0','Menu_PDigData',0,0,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('ECC3A343-A0CC-48BB-BA81-904FE2BE8D9B','同步设置','ZHGL/RealName/SynchroSet.aspx',10,'B0A4F8E9-143E-410A-AAD7-348EC72ADA0B','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('B453D00F-93EB-49CD-BF5A-9169314856CB','ECC3A343-A0CC-48BB-BA81-904FE2BE8D9B','保存',1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('86369F0D-0E01-4206-BF62-60A29B880EF5','基础数据','ZHGL/RealName/BasicData.aspx',20,'B0A4F8E9-143E-410A-AAD7-348EC72ADA0B','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('E4A82EEE-C172-483C-B726-47115FB6CCFC','86369F0D-0E01-4206-BF62-60A29B880EF5','保存',1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('46B15547-BB67-43F8-86AE-D8DB8928EFE4','同步记录','ZHGL/RealName/SynchroRecord.aspx',30,'B0A4F8E9-143E-410A-AAD7-348EC72ADA0B','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('1BF93DE5-4145-4828-8692-038F3ABD519C','项目考勤','',20,'0','Menu_PDigData',0,0,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('56E3E7B8-65D4-4121-930D-8B7EFC2F1645','出入记录','Door/InOutList.aspx',10,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('637F560D-4F3F-498F-B47D-8BB7EA33A2F6','人员考勤','Door/InOutRecord.aspx',20,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E0F7DDC3-C1B3-4F9E-9B7E-086AEB1E28B1','人员考勤图形分析','Door/InOutRecordChart.aspx',30,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E6B5DAD1-8B9A-47AC-B7A8-33AB3B0B630C','单位考勤','Door/InOutManHours.aspx',40,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('984AB874-D5CB-4077-8ADB-6E154F5B636C','缺勤人员','Door/AbsenceDuty.aspx',50,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
@@ -0,0 +1,91 @@
CREATE PROC [dbo].[SP_InOutList]
@projectId NVARCHAR(50) = NULL,
@unitId NVARCHAR(50) = NULL,
@name NVARCHAR(50) = NULL,
@type NVARCHAR(10)=NULL,
@startTime DATETIME = NULL,
@endTime DATETIME = NULL
AS
/*出入记录*/
BEGIN
IF(@type='1')
BEGIN
SELECT NEWID
,ValidEventID AS ID
,V.ProjectId
,EmployName
,DepartmentID
,DepartmentName AS DepartName
,AreaID,AreaName
,EmployNO
,CAST(V.CardNO AS nvarchar(20)) AS CardID
,RecordDateTime AS DateTimeRecord
,RecordAll AS RecordDes
,(CASE WHEN InOrOut=2 THEN '出门' ELSE '进门' END) AS InOrOut
,P.UnitId
,P.TeamGroupId
FROM t_d_validcardevent V
LEFT JOIN SitePerson_Person AS P ON V.IDCardNo=P.IdentityCard AND V.ProjectId=P.ProjectId
WHERE V.ProjectId = @ProjectId
AND (RecordDateTime >= @startTime OR @startTime IS NULL)
AND (RecordDateTime <= @endTime OR @endTime IS NULL)
AND (P.UnitId = @unitId OR @unitId IS NULL)
AND (EmployName like ('%'+@name+'%') OR @name IS NULL)
ORDER BY RecordDateTime DESC
END
ELSE IF(@type='2')
BEGIN
SELECT NewID
,ID
,V.ProjectId
,EmployName
,DepartmentID
,DepartName
,AreaID
,AreaName
,EmployNO
,CAST(V.CardID AS nvarchar(20)) AS CardID
,RoleID
,DateTimeRecord
,RecordDes
,InOrOut
,P.UnitId,P.TeamGroupId
FROM t_d_facerecord V
LEFT JOIN SitePerson_Person AS P ON V.EmployNO=P.IdentityCard AND V.ProjectId=P.ProjectId
WHERE V.ProjectId = @ProjectId AND V.RoleID = '微信端'
AND (DateTimeRecord >= @startTime OR @startTime IS NULL)
AND (DateTimeRecord <= @endTime OR @endTime IS NULL)
AND (P.UnitId = @unitId OR @unitId IS NULL)
AND (EmployName like ('%'+@name+'%') OR @name IS NULL)
ORDER BY DateTimeRecord DESC
END
ELSE
BEGIN
SELECT NewID
,ID
,V.ProjectId
,EmployName
,DepartmentID
,DepartName
,AreaID
,AreaName
,EmployNO
,CAST(V.CardID AS nvarchar(20)) AS CardID
,RoleID
,DateTimeRecord
,RecordDes
,InOrOut
,P.UnitId,P.TeamGroupId
FROM t_d_facerecord V
LEFT JOIN SitePerson_Person AS P ON V.EmployNO=P.IdentityCard AND V.ProjectId=P.ProjectId
WHERE V.ProjectId = @ProjectId AND V.RoleID != '微信端'
AND (DateTimeRecord >= @startTime OR @startTime IS NULL)
AND (DateTimeRecord <= @endTime OR @endTime IS NULL)
AND (P.UnitId = @unitId OR @unitId IS NULL)
AND (EmployName like ('%'+@name+'%') OR @name IS NULL)
ORDER BY DateTimeRecord DESC
END
END
GO
@@ -1,26 +1,41 @@
--DELETE FROM Sys_Menu WHERE MenuId='1BF93DE5-4145-4828-8692-038F3ABD519C' OR SuperMenu='1BF93DE5-4145-4828-8692-038F3ABD519C'
--GO
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('1BF93DE5-4145-4828-8692-038F3ABD519C','项目考勤','',10,'0','Menu_PDigData',0,0,1)
--GO
--delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_PDigData')
--go
--delete from Sys_Menu where MenuType='Menu_PDigData'
--go
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('56E3E7B8-65D4-4121-930D-8B7EFC2F1645','出入记录','Door/InOutList.aspx',10,'0','Menu_PDigData',0,1,1)
VALUES('B0A4F8E9-143E-410A-AAD7-348EC72ADA0B','劳务实名制对接','',10,'0','Menu_PDigData',0,0,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('ECC3A343-A0CC-48BB-BA81-904FE2BE8D9B','同步设置','ZHGL/RealName/SynchroSet.aspx',10,'B0A4F8E9-143E-410A-AAD7-348EC72ADA0B','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('B453D00F-93EB-49CD-BF5A-9169314856CB','ECC3A343-A0CC-48BB-BA81-904FE2BE8D9B','保存',1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('86369F0D-0E01-4206-BF62-60A29B880EF5','基础数据','ZHGL/RealName/BasicData.aspx',20,'B0A4F8E9-143E-410A-AAD7-348EC72ADA0B','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('E4A82EEE-C172-483C-B726-47115FB6CCFC','86369F0D-0E01-4206-BF62-60A29B880EF5','保存',1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('46B15547-BB67-43F8-86AE-D8DB8928EFE4','同步记录','ZHGL/RealName/SynchroRecord.aspx',30,'B0A4F8E9-143E-410A-AAD7-348EC72ADA0B','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('637F560D-4F3F-498F-B47D-8BB7EA33A2F6','人员考勤','Door/InOutRecord.aspx',20,'0','Menu_PDigData',0,1,1)
VALUES('1BF93DE5-4145-4828-8692-038F3ABD519C','项目考勤','',20,'0','Menu_PDigData',0,0,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E0F7DDC3-C1B3-4F9E-9B7E-086AEB1E28B1','人员考勤图形分析','Door/InOutRecordChart.aspx',25,'0','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E6B5DAD1-8B9A-47AC-B7A8-33AB3B0B630C','单位考勤','Door/InOutManHours.aspx',30,'0','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('984AB874-D5CB-4077-8ADB-6E154F5B636C','缺勤人员','Door/AbsenceDuty.aspx',40,'0','Menu_PDigData',0,1,1)
GO
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('8114BAA1-0D5D-404E-A798-95B6C833A7F3','考勤统计','Door/InOutstatistics.aspx',40,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_HSSE',0,1,1)
--GO
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('7F4D841D-E8A5-424A-BEDB-D46B6042092B','考勤统计(按岗位)','Door/InOutPoststatistics.aspx',50,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_HSSE',0,1,1)
--GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('56E3E7B8-65D4-4121-930D-8B7EFC2F1645','出入记录','Door/InOutList.aspx',10,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('637F560D-4F3F-498F-B47D-8BB7EA33A2F6','人员考勤','Door/InOutRecord.aspx',20,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E0F7DDC3-C1B3-4F9E-9B7E-086AEB1E28B1','人员考勤图形分析','Door/InOutRecordChart.aspx',30,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E6B5DAD1-8B9A-47AC-B7A8-33AB3B0B630C','单位考勤','Door/InOutManHours.aspx',40,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('984AB874-D5CB-4077-8ADB-6E154F5B636C','缺勤人员','Door/AbsenceDuty.aspx',50,'1BF93DE5-4145-4828-8692-038F3ABD519C','Menu_PDigData',0,1,1)
GO