diff --git a/DataBase/版本日志/SGGLDB_V2021-04-19-001.sql b/DataBase/版本日志/SGGLDB_V2021-04-19-001.sql deleted file mode 100644 index 27f5bc8b..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-04-19-001.sql +++ /dev/null @@ -1,3 +0,0 @@ -alter table JDGL_QuantityCompletion add StartDate datetime null -alter table JDGL_QuantityCompletion add EndDate datetime null -GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2021-04-21-001.sql b/DataBase/版本日志/SGGLDB_V2021-04-21-001.sql deleted file mode 100644 index 5750b103..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-04-21-001.sql +++ /dev/null @@ -1,36 +0,0 @@ - -/*******ȫ********/ -ALTER VIEW [dbo].[View_Technique_RectifyItem] -AS -SELECT M.RectifyItemId, - M.RectifyId, - M.HazardSourcePoint, - M.RiskAnalysis, - M.RiskPrevention, - M.SimilarRisk, - R.RectifyName, - R.RectifyCode, - M.CompileMan, - M.CompileDate, - M.AuditMan, - M.AuditDate, - M.IsPass, - U.UserName AS CompileManName, - UR.UserName AS AuditManName, - CAST(0 AS BIT) as IsSelected -FROM dbo.Technique_RectifyItem AS M -LEFT JOIN dbo.Technique_Rectify AS R ON R.RectifyId=M.RectifyId -LEFT JOIN dbo.Sys_User AS U ON U.UserId=M.CompileMan -LEFT JOIN dbo.Sys_User AS UR ON U.UserId=M.AuditMan - -GO - -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('29F27641-06ED-435A-9F9B-FCE6366801BE','ҵල','HSSE/Hazard/ProjectSuperviseCheckRectify.aspx',65,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) -GO ---ҵල -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('B6BC2531-A381-4843-9E08-C49EFB3B541B','29F27641-06ED-435A-9F9B-FCE6366801BE','޸',2) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('FBBC83E5-DF22-4995-8086-CB7A970CE2D3','29F27641-06ED-435A-9F9B-FCE6366801BE','',4) -GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2021-04-24-001.sql b/DataBase/版本日志/SGGLDB_V2021-04-24-001.sql deleted file mode 100644 index 57dd8691..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-04-24-001.sql +++ /dev/null @@ -1,60 +0,0 @@ -ALTER PROCEDURE [dbo].[SpCheckDayStatistic] - @ProjectId NVARCHAR(50), - @StartTime NVARCHAR(15)=NULL, - @EndTime NVARCHAR(15)=NULL, - @States CHAR(1)=NULL, - @UnitName NVARCHAR(200)=NULL, - @WorkAreaName NVARCHAR(200)=NULL -AS -/*ճѲ*/ -BEGIN -SELECT CheckDayDetail.CheckDayDetailId - ,CheckDay.CheckDayId - ,CheckDay.CheckDayId+','+ISNULL(CheckDayDetail.CheckDayDetailId,'') AS NewChcekId - ,CodeRecords.Code AS CheckDayCode - ,ISNULL(Checks.CheckCount,0) AS CheckCount - ,CheckDayDetail.WorkArea - ,Unit.UnitName - ,CheckDayDetail.CompleteStatus - ,(CASE WHEN CheckDayDetail.CompleteStatus=1 THEN '' ELSE '' END) AS CompleteStatusName - ,CONVERT(VARCHAR(100), CheckDayDetail.LimitedDate, 23) AS LimitedDate - ,CheckDayDetail.CompletedDate - ,CheckDay.CheckPerson - ,CONVERT(VARCHAR(100), CheckDay.CheckTime, 23) AS CheckTime - --,CheckDay.CheckTime - ,CheckDayDetail.CheckItemType - ,CheckDayDetail.CheckItem - ,CheckDayDetail.HandleStep - ,CheckDayDetail.Unqualified - ,(CASE WHEN CheckDay.States='0' OR CheckDay.States IS NULL THEN '['+ISNULL(OperateUser.UserName,Users.UserName)+']ύ' WHEN CheckDay.States='2' THEN '/' ELSE '['+OperateUser.UserName+']' END) AS FlowOperateName - ,CheckPersonUsers.UserName AS CheckPersonName - ,person.PersonName - ,CheckDayDetail.HiddenDangerType - ,CheckDayDetail.HiddenDangerLevel - ,checkDayDetail.Suggestions -FROM Check_CheckDay AS CheckDay -LEFT JOIN Sys_CodeRecords AS CodeRecords ON CheckDay.CheckDayId=CodeRecords.DataId -LEFT JOIN Check_CheckDayDetail AS CheckDayDetail ON CheckDayDetail.CheckDayId = CheckDay.CheckDayId AND CheckDayDetail.CheckDayDetailId IS NOT NULL ---LEFT JOIN ProjectData_WorkArea AS WorkArea on WorkArea.WorkAreaId=CheckDayDetail.CheckArea -LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=CheckDayDetail.UnitId -LEFT JOIN (SELECT COUNT(*) AS CheckCount, CheckDayId - FROM Check_CheckDayDetail GROUP BY CheckDayId) AS Checks ON Checks.CheckDayId = CheckDay.CheckDayId -LEFT JOIN Sys_FlowOperate AS FlowOperate ON CheckDay.CheckDayId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1 -LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId -LEFT JOIN Sys_User AS Users ON CheckDay.CompileMan=Users.UserId -LEFT JOIN Sys_User AS CheckPersonUsers ON CheckDay.CheckPerson=CheckPersonUsers.UserId -LEFT JOIN dbo.SitePerson_Person AS person ON person.PersonId = CheckDayDetail.PersonId -WHERE (@StartTime IS NULL OR CheckDay.CheckTime>=@StartTime) - AND (@EndTime IS NULL OR CheckDay.CheckTime <=@EndTime ) - AND CheckDay.ProjectId=@ProjectId - AND (@States IS NULL OR CheckDay.States=@States) - AND (@UnitName IS NULL OR Unit.UnitName LIKE '%'+@UnitName+'%' ) - AND (@WorkAreaName IS NULL OR CheckDayDetail.WorkArea LIKE '%'+@WorkAreaName+'%' ) -ORDER BY CheckDayCode DESC - -END - - -GO - - diff --git a/DataBase/版本日志/SGGLDB_V2021-06-08-001.sql b/DataBase/版本日志/SGGLDB_V2021-06-08-001.sql deleted file mode 100644 index cb3f5f19..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-06-08-001.sql +++ /dev/null @@ -1,41 +0,0 @@ -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 diff --git a/DataBase/版本日志/SGGLDB_V2021-06-08-002.sql b/DataBase/版本日志/SGGLDB_V2021-06-08-002.sql deleted file mode 100644 index 0ab35783..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-06-08-002.sql +++ /dev/null @@ -1,91 +0,0 @@ -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 - - diff --git a/DataBase/版本日志/SGGLDB_V2021-07-08-001.sql b/DataBase/版本日志/SGGLDB_V2021-07-08-001.sql deleted file mode 100644 index 5aac9a60..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-07-08-001.sql +++ /dev/null @@ -1,14 +0,0 @@ -ALTER TABLE Base_Project ADD JTProjectCode nvarchar(50) null -go -EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ŶԽĿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'JTProjectCode' -GO - -update Base_Project set JTProjectCode = ProjectCode -go -update RealName_SynchroSet set proCode=(select JTProjectCode from Base_Project where RealName_SynchroSet.proCode=ProjectCode) -GO -update SitePerson_PersonInOutNow set proCode=(select JTProjectCode from Base_Project where SitePerson_PersonInOutNow.proCode=ProjectCode) -GO -update RealName_PersonInOutNow set proCode=(select JTProjectCode from Base_Project where RealName_PersonInOutNow.proCode=ProjectCode) -GO - diff --git a/DataBase/版本日志/SGGLDB_V2021-07-09-001.sql b/DataBase/版本日志/SGGLDB_V2021-07-09-001.sql deleted file mode 100644 index bb89c622..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-07-09-001.sql +++ /dev/null @@ -1,98 +0,0 @@ -ALTER VIEW [dbo].[View_SitePerson_Person] -AS -SELECT Person.PersonId, - Person.CardNo, - Person.PersonName, - Person.Sex, - (Case Person.Sex WHEN '1' THEN '' WHEN '2' THEN 'Ů' ELSE '' END) AS SexName, - Person.IdentityCard, - Person.Address, - Person.ProjectId, - Person.UnitId, - Person.Birthday, - Person.TeamGroupId, - Person.WorkAreaId, - Person.WorkPostId, - Person.InTime, - Person.OutTime, - Person.OutResult, - Person.Telephone, - Person.PositionId, - Person.PostTitleId, - Person.PhotoUrl, - Person.IsUsed, - (CASE Person.IsUsed WHEN 'TRUE' THEN '' ELSE '' END) AS IsUsedName, - Person.IsCardUsed, - (CASE Person.IsCardUsed WHEN 'TRUE' THEN '' ELSE '' END) AS IsCardUsedName, - Person.PersonIndex, - Project.ProjectCode, - Project.ProjectName, - Unit.UnitCode, - Unit.UnitName, - TeamGroup.TeamGroupName, - --WorkArea.UnitWorkCode AS WorkAreaCode, - WorkAreaCode= STUFF((SELECT ',' + UnitWorkCode FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''), - --WorkArea.UnitWorkName AS WorkAreaName - WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''), - Post.WorkPostName, - Position.PositionName, - Title.PostTitleName, - Depart.DepartName, - Post.PostType, - Post.IsHsse, - (SELECT COUNT(*) FROM EduTrain_TrainRecordDetail T WHERE T.PersonId=Person.PersonId) AS TrainCount, - Person.AuditorId, - sysUser.UserName AS AuditorName, - Person.AuditorDate, - Person.IDCardUrl, - Person.IsForeign, - case when Person.IsForeign=1 then '' else '' end as IsForeignStr, - Person.IdcardType, - BasicData1.dictName as IdcardTypeName, - Person.IdcardStartDate, - Person.IdcardEndDate, - Person.IdcardForever, - case when Person.IdcardForever='Y' then '' else '' end as IdcardForeverStr, - Person.PoliticsStatus, - BasicData2.dictName as PoliticsStatusName, - Person.IdcardAddress, - Person.Nation, - BasicData3.dictName as NationName, - Person.EduLevel, - BasicData4.dictName as EduLevelName, - Person.MaritalStatus, - BasicData5.dictName as MaritalStatusName, - Person.CountryCode, - Country.cname as CountryName, - Person.ProvinceCode, - City.cname as ProvinceName, - Person.MainCNProfessionalId, - CNProfessional.ProfessionalName as MainCNProfessionalName, - Person.ViceCNProfessionalId, - '' as ViceCNProfessionalName, - Person.IsOutside, - case when Person.IsOutside=1 then '' else '' end as IsOutsideStr, - Person.HeadImage -FROM SitePerson_Person AS Person -LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId -LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId -LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=Person.TeamGroupId ---LEFT JOIN WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Person.WorkAreaId -LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = Person.WorkPostId -LEFT JOIN Base_Position AS Position ON Position.PositionId = Person.PositionId -Left JOIN Base_PostTitle AS Title ON Title.PostTitleId = Person.PostTitleId -Left JOIN Base_Depart AS Depart ON Depart.DepartId = Person.DepartId -Left JOIN Sys_User AS sysUser ON sysUser.UserId = Person.AuditorId -Left JOIN RealName_BasicData AS BasicData1 ON BasicData1.dictCode = Person.IdcardType -Left JOIN RealName_BasicData AS BasicData2 ON BasicData2.dictCode = Person.PoliticsStatus -Left JOIN RealName_BasicData AS BasicData3 ON BasicData3.dictCode = Person.Nation -Left JOIN RealName_BasicData AS BasicData4 ON BasicData4.dictCode = Person.EduLevel -Left JOIN RealName_BasicData AS BasicData5 ON BasicData5.dictCode = Person.MaritalStatus -Left JOIN RealName_Country AS Country ON Country.CountryId = Person.CountryCode -Left JOIN RealName_City AS City ON City.provinceCode = Person.ProvinceCode -Left JOIN Base_CNProfessional AS CNProfessional ON CNProfessional.CNProfessionalId = Person.MainCNProfessionalId - - -GO - - diff --git a/DataBase/版本日志/SGGLDB_V2021-07-20-001.sql b/DataBase/版本日志/SGGLDB_V2021-07-20-001.sql deleted file mode 100644 index 1708b4e4..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-07-20-001.sql +++ /dev/null @@ -1,45 +0,0 @@ -ALTER VIEW [dbo].[View_SitePerson_Checking] -AS -/*Աͼ*/ -SELECT ch.CheckingId,person.CardNo,ch.ProjectId,person.IdentityCard,ch.WorkAreaId,ch.IntoOutTime,ch.IntoOut, - ch.[Address],ch.WorkAreaName,person.PersonName,person.UnitId,unit.UnitName,ch.States -from dbo.SitePerson_Checking ch - left join dbo.SitePerson_Person person on ch.PersonId=person.PersonId - left join dbo.Base_Unit unit on person.UnitId=unit.UnitId - - -GO - -UPDATE SitePerson_Checking SET IntoOut=0 WHERE IntoOut !=1 -GO -/****** Object: Index [NonClusteredIndex-20210720-112756] Script Date: 2021/7/20 11:31:47 ******/ -CREATE NONCLUSTERED INDEX [NonClusteredIndex-20210720-112756] ON [dbo].[t_d_facerecord] -( - [ProjectId] ASC, - [EmployNO] ASC, - [RoleID] ASC, - [DateTimeRecord] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - -/****** Object: Index [NonClusteredIndex-20210720-113607] Script Date: 2021/7/20 11:36:59 ******/ -CREATE NONCLUSTERED INDEX [NonClusteredIndex-20210720-113607] ON [dbo].[t_d_EmployInOutRecord] -( - [ProjectId] ASC, - [RecordDate] ASC, - [IDCardNo] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - -/****** Object: Index [SitePerson_PersonInOut_PersonIdChangeTime] Script Date: 2021/7/20 11:38:07 ******/ -DROP INDEX [SitePerson_PersonInOut_PersonIdChangeTime] ON [dbo].[SitePerson_PersonInOut] -GO - -/****** Object: Index [SitePerson_PersonInOut_PersonIdChangeTime] Script Date: 2021/7/20 11:38:07 ******/ -CREATE NONCLUSTERED INDEX [SitePerson_PersonInOut_PersonIdChangeTime] ON [dbo].[SitePerson_PersonInOut] -( - [ProjectId] ASC, - [PersonId] ASC, - [ChangeTime] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO diff --git a/DataBase/版本日志/SGGLDB_V2021-07-23-001.sql b/DataBase/版本日志/SGGLDB_V2021-07-23-001.sql deleted file mode 100644 index 1f3ce42f..00000000 --- a/DataBase/版本日志/SGGLDB_V2021-07-23-001.sql +++ /dev/null @@ -1,26 +0,0 @@ -ALTER VIEW [dbo].[View_SitePerson_Checking] -AS -/*Աͼ*/ -SELECT ch.CheckingId -,person.CardNo -,ch.PersonId -,ch.ProjectId -,person.IdentityCard -,ch.WorkAreaId -,ch.IntoOutTime -,ch.IntoOut -,ch.[Address] -,ch.WorkAreaName -,person.PersonName -,person.UnitId -,unit.UnitName -,ch.States -from dbo.SitePerson_Checking ch - left join dbo.SitePerson_Person person on ch.PersonId=person.PersonId - left join dbo.Base_Unit unit on person.UnitId=unit.UnitId - - - -GO - - diff --git a/DataBase/版本日志/SGGLDB_V2021-08-16-001.sql b/DataBase/版本日志/SGGLDB_V2021-08-16-001.sql new file mode 100644 index 00000000..e85729ca --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2021-08-16-001.sql @@ -0,0 +1,53 @@ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('4882C5F0-9D49-4B2E-BA30-E806D3CDF6FA','ʵԱ','ZHGL/RealName/LeavePost.aspx',40,'D78C6E54-4240-4E82-B9B5-8ED76CF62981','Menu_ZHGL',1,1,1) +GO + +CREATE TABLE [dbo].[RealName_LeavePost]( + [NewId] [nvarchar](50) NOT NULL, + [Id] [nvarchar](50) NULL, + [PersonName] [nvarchar](100) NULL, + [IdentityCard] [nvarchar](50) NULL, + [ProjectId] [nvarchar](50) NULL, + [ProjectCode] [nvarchar](50) NULL, + [ProjectShortName] [nvarchar](50) NULL, + [InTime] [datetime] NULL, + [OutTime] [datetime] NULL, + CONSTRAINT [PK_RealName_LeavePost] PRIMARY KEY CLUSTERED +( + [NewId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'NewId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'Id' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'PersonName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֤ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'IdentityCard' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'ProjectCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'ProjectShortName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'볡ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'InTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost', @level2type=N'COLUMN',@level2name=N'OutTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵԱڶԱȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RealName_LeavePost' +GO + + diff --git a/DataBase/版本日志/SGGLDB_V2021-07-02-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-02-001.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2021-07-02-001.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-02-001.sql diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-08-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-08-001.sql index e8544001..5aac9a60 100644 --- a/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-08-001.sql +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-08-001.sql @@ -1,15 +1,6 @@ -/****** Object: Index [NonClusteredIndex-20210708-144637] Script Date: 2021/7/8 14:47:55 ******/ -CREATE NONCLUSTERED INDEX [NonClusteredIndex-20210708-144637] ON [dbo].[t_d_EmployInOutRecord] -( - [ProjectId] ASC, - [RecordDate] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - - ALTER TABLE Base_Project ADD JTProjectCode nvarchar(50) null go -EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'集团对接项目号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'JTProjectCode' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ŶԽĿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'JTProjectCode' GO update Base_Project set JTProjectCode = ProjectCode diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-09-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-09-001.sql index 6eb447cf..bb89c622 100644 --- a/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-09-001.sql +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-09-001.sql @@ -96,103 +96,3 @@ Left JOIN Base_CNProfessional AS CNProfessional ON CNProfessional.CNProfessional GO -ALTER VIEW [dbo].[View_SitePerson_Person] -AS -SELECT Person.PersonId, - Person.CardNo, - Person.PersonName, - Person.Sex, - (Case Person.Sex WHEN '1' THEN '' WHEN '2' THEN 'Ů' ELSE '' END) AS SexName, - Person.IdentityCard, - Person.Address, - Person.ProjectId, - Person.UnitId, - Person.Birthday, - Person.TeamGroupId, - Person.WorkAreaId, - Person.WorkPostId, - Person.InTime, - Person.OutTime, - Person.OutResult, - Person.Telephone, - Person.PositionId, - Person.PostTitleId, - Person.PhotoUrl, - Person.IsUsed, - (CASE Person.IsUsed WHEN 'TRUE' THEN '' ELSE '' END) AS IsUsedName, - Person.IsCardUsed, - (CASE Person.IsCardUsed WHEN 'TRUE' THEN '' ELSE '' END) AS IsCardUsedName, - Person.PersonIndex, - Project.ProjectCode, - Project.ProjectName, - Unit.UnitCode, - Unit.UnitName, - TeamGroup.TeamGroupName, - --WorkArea.UnitWorkCode AS WorkAreaCode, - WorkAreaCode= STUFF((SELECT ',' + UnitWorkCode FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''), - --WorkArea.UnitWorkName AS WorkAreaName - WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''), - Post.WorkPostName, - Position.PositionName, - Title.PostTitleName, - Depart.DepartName, - Post.PostType, - Post.IsHsse, - (SELECT COUNT(*) FROM EduTrain_TrainRecordDetail T WHERE T.PersonId=Person.PersonId) AS TrainCount, - Person.AuditorId, - sysUser.UserName AS AuditorName, - Person.AuditorDate, - Person.IDCardUrl, - Person.IsForeign, - case when Person.IsForeign=1 then '' else '' end as IsForeignStr, - Person.IdcardType, - BasicData1.dictName as IdcardTypeName, - Person.IdcardStartDate, - Person.IdcardEndDate, - Person.IdcardForever, - case when Person.IdcardForever='Y' then '' else '' end as IdcardForeverStr, - Person.PoliticsStatus, - BasicData2.dictName as PoliticsStatusName, - Person.IdcardAddress, - Person.Nation, - BasicData3.dictName as NationName, - Person.EduLevel, - BasicData4.dictName as EduLevelName, - Person.MaritalStatus, - BasicData5.dictName as MaritalStatusName, - Person.CountryCode, - Country.cname as CountryName, - Person.ProvinceCode, - City.cname as ProvinceName, - Person.MainCNProfessionalId, - CNProfessional.ProfessionalName as MainCNProfessionalName, - Person.ViceCNProfessionalId, - '' as ViceCNProfessionalName, - Person.IsOutside, - case when Person.IsOutside=1 then '' else '' end as IsOutsideStr, - Person.HeadImage, - RealNameAddTime -FROM SitePerson_Person AS Person -LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId -LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId -LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=Person.TeamGroupId ---LEFT JOIN WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Person.WorkAreaId -LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = Person.WorkPostId -LEFT JOIN Base_Position AS Position ON Position.PositionId = Person.PositionId -Left JOIN Base_PostTitle AS Title ON Title.PostTitleId = Person.PostTitleId -Left JOIN Base_Depart AS Depart ON Depart.DepartId = Person.DepartId -Left JOIN Sys_User AS sysUser ON sysUser.UserId = Person.AuditorId -Left JOIN RealName_BasicData AS BasicData1 ON BasicData1.dictCode = Person.IdcardType -Left JOIN RealName_BasicData AS BasicData2 ON BasicData2.dictCode = Person.PoliticsStatus -Left JOIN RealName_BasicData AS BasicData3 ON BasicData3.dictCode = Person.Nation -Left JOIN RealName_BasicData AS BasicData4 ON BasicData4.dictCode = Person.EduLevel -Left JOIN RealName_BasicData AS BasicData5 ON BasicData5.dictCode = Person.MaritalStatus -Left JOIN RealName_Country AS Country ON Country.CountryId = Person.CountryCode -Left JOIN RealName_City AS City ON City.provinceCode = Person.ProvinceCode -Left JOIN Base_CNProfessional AS CNProfessional ON CNProfessional.CNProfessionalId = Person.MainCNProfessionalId - - - -GO - - diff --git a/DataBase/版本日志/SGGLDB_V2021-07-09-002.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-09-002.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2021-07-09-002.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2021-07-09-002.sql diff --git a/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql b/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql index cc7b3165..d316b5d3 100644 --- a/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql +++ b/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql @@ -393,6 +393,10 @@ GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('F36E6C54-E39F-4032-874D-548EE090A35B','同步记录','ZHGL/RealName/SynchroRecord.aspx',30,'D78C6E54-4240-4E82-B9B5-8ED76CF62981','Menu_ZHGL',1,1,1) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('4882C5F0-9D49-4B2E-BA30-E806D3CDF6FA','离岗人员修正','ZHGL/RealName/LeavePost.aspx',40,'D78C6E54-4240-4E82-B9B5-8ED76CF62981','Menu_ZHGL',1,1,1) + GO + ----本部综合管理 --INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) --VALUES('A57CBE1D-B9F4-4FB6-A428-10197734AAB6','数据统计','',30,'0','Menu_ZHGL',1,0,1) diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 6a88a714..98ab9914 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -625,6 +625,7 @@ + @@ -708,6 +709,7 @@ + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 7d0ba2a0..7797adbb 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -2810,6 +2810,10 @@ namespace BLL /// public const string PersonInfoTemplateUrl = "File\\Excel\\DataIn\\现场人员考勤导入模版.xls"; /// + /// 实名制人员考勤导入模版 + /// + public const string RealName_LeavePostTemplateUrl = "File\\Excel\\DataIn\\实名制人员导入模版.xls"; + /// /// 专项检查导入模板 /// public const string CheckSpecialTemplateUrl = "File\\Excel\\DataIn\\专项检查导入模板.xls"; diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs index 35487fc7..d1ca5a98 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs @@ -1,7 +1,8 @@ -using System; +using FineUIPro; +using System; +using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { @@ -10,6 +11,138 @@ namespace BLL /// public static class PersonService { + public static Model.SGGLDB db = Funs.DB; + + #region 获取列表 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getPersonLists = from x in db.View_SitePerson_Person select x; + + /// + /// 获取分页列表 + /// + /// 页码 + /// 每页数量 + /// + public static IEnumerable getListData(string projectId, string unitId, string personName, string identityCard, string treamGroupId, string workPostIds, + bool ckTrain, bool ckIspost, bool ckJT, bool ckIdCardInfoNotOK, Grid Grid1) + { + IQueryable getPersonList = getPersonLists.Where(x => x.ProjectId == projectId); + if (!string.IsNullOrEmpty(unitId)) + { + if (unitId == "0") + { + getPersonList = getPersonList.Where(x => x.UnitId == null); + } + else + { + getPersonList = getPersonList.Where(x => x.UnitId == unitId); + } + } + if (!string.IsNullOrEmpty(personName)) + { + getPersonList = getPersonList.Where(x => x.PersonName.Contains(personName)); + } + if (!string.IsNullOrEmpty(identityCard)) + { + getPersonList = getPersonList.Where(x => x.IdentityCard.Contains(identityCard)); + } + if (!string.IsNullOrEmpty(treamGroupId) && treamGroupId != Const._Null) + { + getPersonList = getPersonList.Where(x => x.TeamGroupId == treamGroupId); + } + if (!string.IsNullOrEmpty(workPostIds)) + { + getPersonList = getPersonList.Where(x => workPostIds.Contains(x.WorkPostId)); + } + if (ckTrain) + { + getPersonList = getPersonList.Where(x => x.TrainCount == 0); + } + if (ckIspost) + { + getPersonList = getPersonList.Where(x => x.IsUsed == false || x.InTime.Value > DateTime.Now + || (x.OutTime.HasValue && x.OutTime < DateTime.Now)); + } + if (ckJT) + { + getPersonList = getPersonList.Where(x => x.RealNameAddTime == null); + } + if (ckIdCardInfoNotOK) + { + getPersonList = getPersonList.Where(x => x.IdentityCard == null || x.HeadImage == null || (x.IdentityCard.Length != 15 && x.IdentityCard.Length != 18)); + } + + count = getPersonList.Count(); + if (count == 0) + { + return null; + } + + + getPersonList = SortConditionHelper.SortingAndPaging(getPersonList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getPersonList + select new + { + x.PersonId, + x.CardNo, + x.PersonName, + x.WorkPostName, + x.UnitName, + x.IdentityCard, + x.TeamGroupName, + x.InTime, + x.OutTime, + PersonState = getPersonState(x.IsUsed, x.AuditorDate, x.InTime, x.OutTime), + }; + } + + /// + /// + /// + /// + public static string getPersonState(bool isUsed,DateTime? auditorDate,DateTime? inTime, DateTime? outTime) + { + string name = string.Empty; + if (isUsed == false && !auditorDate.HasValue) + { + name = "在审"; + } + else if (isUsed == true && inTime <= DateTime.Now && (!outTime.HasValue || outTime >= DateTime.Now)) + { + name = "在岗"; + } + else if (isUsed == true && outTime.HasValue && outTime <= DateTime.Now) + { + name = "离岗"; + } + else if (isUsed == false && auditorDate.HasValue) + { + name = "打回"; + } + + return name; + ////在审 + //int count0 = getViews.Where(x => x.IsUsed == false && !x.AuditorDate.HasValue).Count(); + ////在岗 + //int count1 = getViews.Where(x => x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime >= DateTime.Now)).Count(); + ////离岗 + //int count2 = getViews.Where(x => x.IsUsed == true && x.OutTime <= DateTime.Now).Count(); + ////打回 + //int count3 = getViews.Where(x => x.IsUsed == false && x.AuditorDate.HasValue).Count(); + } + #endregion + /// /// 根据主键获取人员信息 /// diff --git a/SGGL/BLL/SortConditionHelper.cs b/SGGL/BLL/SortConditionHelper.cs new file mode 100644 index 00000000..e9ff090f --- /dev/null +++ b/SGGL/BLL/SortConditionHelper.cs @@ -0,0 +1,38 @@ +using System; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; + +namespace BLL +{ + public static class SortConditionHelper + { + public static IQueryable DataSorting(IQueryable source, string sortExpression, string sortDirection) + { + string sortingDir = string.Empty; + if (sortDirection.ToUpper().Trim() == "ASC") + sortingDir = " OrderBy "; + else if (sortDirection.ToUpper().Trim() == "DESC") + sortingDir = " OrderByDescending "; + ParameterExpression param = Expression.Parameter(typeof(T), sortExpression); + PropertyInfo pi = typeof(T).GetProperty(sortExpression); + Type[] types = new Type[2]; + types[0] = typeof(T); + types[1] = pi.PropertyType; + Expression expr = Expression.Call(typeof(Queryable), sortingDir, types, source.Expression, Expression.Lambda(Expression.Property(param, sortExpression), param)); + IQueryable query = source.AsQueryable().Provider.CreateQuery(expr); + return query; + } + + public static IQueryable DataPaging(IQueryable source, int pageNumber, int pageSize) + { + return source.Skip(pageNumber * pageSize).Take(pageSize); + } + + public static IQueryable SortingAndPaging(IQueryable source, string sortExpression, string sortDirection, int pageNumber, int pageSize) + { + IQueryable query = DataSorting(source, sortExpression, sortDirection); + return DataPaging(query, pageNumber, pageSize); + } + } +} \ No newline at end of file diff --git a/SGGL/BLL/ZHGL/RealName/LeavePostService.cs b/SGGL/BLL/ZHGL/RealName/LeavePostService.cs new file mode 100644 index 00000000..612bb689 --- /dev/null +++ b/SGGL/BLL/ZHGL/RealName/LeavePostService.cs @@ -0,0 +1,124 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Linq; + +namespace BLL +{ + public static class LeavePostService + { + public static Model.SGGLDB db = Funs.DB; + #region 获取列表 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getLeavePosts = from x in db.RealName_LeavePost select x; + + /// + /// 获取分页列表 + /// + /// 页码 + /// 每页数量 + /// + public static IEnumerable getListData(string states, string projectCode, string personName, string identityCard, Grid Grid1) + { + IQueryable getLeavePostList = getLeavePosts; + if (states == "1") + { + getLeavePostList = getLeavePostList.Where(x => x.OutTime.HasValue); + } + if (!string.IsNullOrEmpty(personName)) + { + getLeavePostList = getLeavePostList.Where(x => x.PersonName.Contains(personName)); + } + if (!string.IsNullOrEmpty(identityCard)) + { + getLeavePostList = getLeavePostList.Where(x => x.IdentityCard.Contains(identityCard)); + } + + count = getLeavePostList.Count(); + if (count == 0) + { + return null; + } + + getLeavePostList = SortConditionHelper.SortingAndPaging(getLeavePostList.OrderBy(x=>x.ProjectCode), Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getLeavePostList + select new + { + x.NewId, + x.Id, + x.PersonName, + x.IdentityCard, + x.ProjectId, + x.ProjectCode, + x.ProjectShortName, + x.InTime, + x.OutTime, + }; + } + #endregion + + /// + /// 添加实名制人员信息 + /// + /// + public static void AddLeavePost(Model.RealName_LeavePost LeavePost) + { + Model.SGGLDB db = Funs.DB; + Model.RealName_LeavePost newLeavePost = new Model.RealName_LeavePost + { + NewId = SQLHelper.GetNewID(), + Id = LeavePost.Id, + PersonName = LeavePost.PersonName, + IdentityCard = LeavePost.IdentityCard, + ProjectId = LeavePost.ProjectId, + ProjectCode = LeavePost.ProjectCode, + ProjectShortName = LeavePost.ProjectShortName, + InTime = LeavePost.InTime, + OutTime = LeavePost.OutTime + }; + db.RealName_LeavePost.InsertOnSubmit(newLeavePost); + db.SubmitChanges(); + } + + /// + /// 修改实名制人员信息 + /// + /// + public static void UpdateLeavePost(Model.RealName_LeavePost LeavePost) + { + Model.SGGLDB db = Funs.DB; + var getLeavePost = db.RealName_LeavePost.FirstOrDefault(e => e.NewId == LeavePost.NewId); + if (getLeavePost != null) + { + getLeavePost.OutTime = LeavePost.OutTime; + db.SubmitChanges(); + } + } + + /// + /// + /// + /// + public static void DeleteLeavePost() + { + Model.SGGLDB db = Funs.DB; + var getLeavePost = from x in db.RealName_LeavePost select x; + if (getLeavePost.Count() > 0) + { + db.RealName_LeavePost.DeleteAllOnSubmit(getLeavePost); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index ba07ebba..9b8a5629 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -919,13 +919,12 @@ namespace BLL where ((x.IdentityCard != null && x.IdentityCard != "" && identityCard == null) || (identityCard != null && x.IdentityCard == identityCard)) && y.JTProjectCode == proCode && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 - && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue)) - && ((x.IdcardType == null || x.IdcardType == "SHENFEN_ZHENGJIAN") - && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18)) + && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue)) + && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18) select new { name = x.PersonName, - idcardType = x.IdcardType ?? "SHENFEN_ZHENGJIAN", + idcardType = "SHENFEN_ZHENGJIAN", idcardNumber = x.IdentityCard, idcardStartDate = x.IdcardStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate) : null, idcardEndDate = x.IdcardEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate) : null, diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 5f282702..26d7522b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1 +1,38 @@ - \ No newline at end of file + +错误信息开始=====> +错误类型:HttpException +错误信息:文件“/ZHGL/RealName/LeavePost.aspx”不存在。 +错误堆栈: + 在 System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) + 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) + 在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) + 在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) + 在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) + 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +出错时间:08/16/2021 14:45:33 +出错文件:http://localhost:8118/ZHGL/RealName/LeavePost.aspx +IP地址:::1 + +出错时间:08/16/2021 14:45:33 + + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) + 在 FineUIPro.ResourceHelper.GetResourceContentAsBinary(String resName, String resVersion) + 在 FineUIPro.ResourceHandler.ProcessRequest(HttpContext context) + 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) + 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +出错时间:08/16/2021 16:29:05 +出错文件:http://localhost:8118/res.axd?font=lib.iconfont.iconfont.woff&t=636947851460000000 +IP地址:::1 + +出错时间:08/16/2021 16:29:05 + diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/实名制人员导入模版.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/实名制人员导入模版.xls new file mode 100644 index 00000000..054d5dd9 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/实名制人员导入模版.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202108160435213114.xlsx b/SGGL/FineUIPro.Web/File/Excel/Temp/202108160435213114.xlsx new file mode 100644 index 00000000..0785b7b7 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202108160435213114.xlsx differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202108160437039751.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202108160437039751.xls new file mode 100644 index 00000000..e90e85e4 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202108160437039751.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202108160439474816.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202108160439474816.xls new file mode 100644 index 00000000..e90e85e4 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202108160439474816.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 90e70345..f8c79c0d 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1486,6 +1486,8 @@ + + @@ -14640,6 +14642,20 @@ AccidentStatisticsView.aspx + + LeavePost.aspx + ASPXCodeBehind + + + LeavePost.aspx + + + LeavePostIn.aspx + ASPXCodeBehind + + + LeavePostIn.aspx + SynchroRecord.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx index 750e86be..c0313107 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx @@ -107,7 +107,7 @@