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 @@
+ Width="1000px" Height="600px">
-
+
@@ -27,61 +28,21 @@
- <%--
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- --%>
-
-
-
+
+ <%--
-
+ --%>
@@ -114,29 +75,13 @@
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
@@ -146,6 +91,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfoEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfoEdit.aspx.cs
index ea9a067e..46ac817f 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfoEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfoEdit.aspx.cs
@@ -53,6 +53,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.ProjectId = this.CurrUser.LoginProjectId;
///区域下拉框
BLL.UnitWorkService.InitUnitWorkDownList(this.drpWorkArea, this.ProjectId, true);
+ UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
+ if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId))
+ {
+ this.drpUnit.SelectedValue = this.CurrUser.UnitId;
+ this.drpUnit.Enabled = false;
+ }
BindGrid(string.Empty);
this.CheckingId = Request.Params["CheckingId"];
if (!string.IsNullOrEmpty(Request.Params["type"]))
@@ -145,14 +151,25 @@ namespace FineUIPro.Web.HSSE.SitePerson
///
protected void drpWorkArea_SelectedIndexChanged(object sender, EventArgs e)
{
- if (this.drpWorkArea.SelectedValue != BLL.Const._Null)
+ string selectName = string.Empty;
+ foreach (var item in this.drpWorkArea.SelectedValueArray)
{
- this.txtWorkArea.Text = this.drpWorkArea.SelectedText;
- }
- else
- {
- this.txtWorkArea.Text = string.Empty;
+ if (item != Const._Null)
+ {
+ string text = this.drpWorkArea.Items.FindByValue(item).Text;
+ if (string.IsNullOrEmpty(selectName))
+ {
+ selectName = text;
+ }
+ else
+ {
+ selectName += ","+ text;
+ }
+ }
}
+
+ this.txtWorkArea.Text = selectName;
+ this.drpWorkArea.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpWorkArea.SelectedValueArray);
}
#endregion
@@ -175,12 +192,18 @@ namespace FineUIPro.Web.HSSE.SitePerson
string strSql = @"SELECT Person.PersonId,Person.CardNo,Person.PersonName,Person.IdentityCard,Person.UnitId,Person.WorkPostId,Unit.UnitName,WorkPost.WorkPostName "
+ @" FROM SitePerson_Person AS Person "
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId "
- + @" LEFT JOIN Base_WorkPost AS WorkPost ON WorkPost.WorkPostId = Person.WorkPostId WHERE ProjectId='" + this.ProjectId + "'";
+ + @" LEFT JOIN Base_WorkPost AS WorkPost ON WorkPost.WorkPostId = Person.WorkPostId "
+ +@" WHERE IsUsed =1 AND (OutTime IS NULL OR OutTime > GETDATE()) AND ProjectId='" + this.ProjectId + "'";
List listStr = new List();
- if (!string.IsNullOrEmpty(this.txtCardNo.Text.Trim()))
+ //if (!string.IsNullOrEmpty(this.txtCardNo.Text.Trim()))
+ //{
+ // strSql += " AND Person.CardNo LIKE @CardNo";
+ // listStr.Add(new SqlParameter("@CardNo", "%" + this.txtCardNo.Text.Trim() + "%"));
+ //}
+ if (this.drpUnit.SelectedValue != Const._Null)
{
- strSql += " AND Person.CardNo LIKE @CardNo";
- listStr.Add(new SqlParameter("@CardNo", "%" + this.txtCardNo.Text.Trim() + "%"));
+ strSql += " AND Person.UnitId = @UnitId";
+ listStr.Add(new SqlParameter("@UnitId", this.drpUnit.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
{
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfoEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfoEdit.aspx.designer.cs
index 283a9348..1dfcccc1 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfoEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfoEdit.aspx.designer.cs
@@ -94,13 +94,13 @@ namespace FineUIPro.Web.HSSE.SitePerson {
protected global::FineUIPro.Toolbar Toolbar2;
///
- /// txtCardNo 控件。
+ /// drpUnit 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtCardNo;
+ protected global::FineUIPro.DropDownList drpUnit;
///
/// txtPersonName 控件。
@@ -129,42 +129,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
///
protected global::FineUIPro.TextBox txtIdCard;
- ///
- /// txtWorkArea 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtWorkArea;
-
- ///
- /// drpWorkArea 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpWorkArea;
-
- ///
- /// Label4 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Label Label4;
-
- ///
- /// txtAddress 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtAddress;
-
///
/// drpType 控件。
///
@@ -192,6 +156,42 @@ namespace FineUIPro.Web.HSSE.SitePerson {
///
protected global::FineUIPro.TextBox txtTime2;
+ ///
+ /// drpWorkArea 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpWorkArea;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label4;
+
+ ///
+ /// txtWorkArea 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtWorkArea;
+
+ ///
+ /// txtAddress 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAddress;
+
///
/// Toolbar1 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
index 04e4e3b2..940f7a5c 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
@@ -9,6 +9,7 @@
.f-grid-row.Red {
background-color: red;
}
+
.LabelColor {
color: Red;
font-size: small;
@@ -42,7 +43,7 @@
TitleToolTip="人员信息" AutoScroll="true">
@@ -52,16 +53,14 @@
-
-
-
@@ -70,10 +69,10 @@
-
+
-
+
@@ -93,7 +92,7 @@
-
+
@@ -103,43 +102,32 @@
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
TextAlign="Center">
- <%--
- --%>
- <%--
- --%>
-
-
-
-
-
+
+
+
+
+
- <%--
- --%>
-
- <%--
- --%>
-
+
+
+
+
-
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
index b006b4c8..daee3422 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
@@ -179,84 +179,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
unitId = str[0];
}
}
- string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
- List listStr = new List
- {
- new SqlParameter("@ProjectId", this.ProjectId)
- };
- if (!string.IsNullOrEmpty(unitId))
- {
- if (unitId == "0")
- {
- strSql += " AND UnitId IS NULL ";
- }
- else
- {
- strSql += " AND UnitId =@UnitId ";
- listStr.Add(new SqlParameter("@UnitId", unitId));
- }
- }
- if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
- {
- strSql += " AND PersonName LIKE @PersonName";
- listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
- }
- if (!string.IsNullOrEmpty(this.txtCardNo.Text.Trim()))
- {
- strSql += " AND CardNo LIKE @CardNo";
- listStr.Add(new SqlParameter("@CardNo", "%" + this.txtCardNo.Text.Trim() + "%"));
- }
- if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim()))
- {
- strSql += " AND IdentityCard LIKE @IdentityCard";
- listStr.Add(new SqlParameter("@IdentityCard", "%" + this.txtIdentityCard.Text.Trim() + "%"));
- }
- if (!string.IsNullOrEmpty(this.drpTreamGroup.SelectedValue) && this.drpTreamGroup.SelectedValue != BLL.Const._Null)
- {
- strSql += " AND TeamGroupId = @TeamGroupId";
- listStr.Add(new SqlParameter("@TeamGroupId", this.drpTreamGroup.SelectedValue));
- }
- if (this.drpPost.SelectedItemArray.Count() > 1 || (this.drpPost.SelectedValue != BLL.Const._Null && this.drpPost.SelectedItemArray.Count() == 1))
- {
- strSql += " AND (1=2 ";
- int i = 0;
- foreach (var item in this.drpPost.SelectedValueArray)
- {
- if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
- {
- strSql += " OR WorkPostId = @WorkPostId" + i.ToString();
- listStr.Add(new SqlParameter("@WorkPostId" + i.ToString(), item));
- }
-
- i++;
- }
-
- strSql += ")";
- }
- if (this.ckTrain.Checked)
- {
- strSql += " AND TrainCount =0";
- }
- if (this.ckIspost.Checked)
- {
- strSql += " AND IsUsedName ='否'";
- }
- if (this.ckJT.Checked)
- {
- strSql += " AND RealNameAddTime IS NULL";
- }
- if (this.ckIdCardInfoNotOK.Checked)
- {
- strSql += " AND (IdcardType is null or IdentityCard is null or PhotoUrl is null or HeadImage IS NULL OR (LEN(IdentityCard) != 15 AND LEN(IdentityCard) != 18))";
- }
-
- SqlParameter[] parameter = listStr.ToArray();
- DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
-
- Grid1.RecordCount = tb.Rows.Count;
- var table = this.GetPagedDataTable(Grid1, tb);
- Grid1.DataSource = table;
+ var getData = PersonService.getListData(this.ProjectId, unitId, this.txtPersonName.Text.Trim(), this.txtIdentityCard.Text.Trim(),
+ this.drpTreamGroup.SelectedValue, Funs.GetStringByArray(this.drpPost.SelectedValueArray), this.ckTrain.Checked, this.ckIspost.Checked, this.ckJT.Checked,
+ this.ckIdCardInfoNotOK.Checked, Grid1);
+ Grid1.RecordCount = PersonService.count;
+ Grid1.DataSource = getData;
Grid1.DataBind();
}
}
@@ -737,5 +665,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
ShowNotify("操作完成,新转二进制照片" + num.ToString() + "条", MessageBoxIcon.Success);
}
+
+
+ protected void drpPost_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.drpPost.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpPost.SelectedValueArray);
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
index 40d1e56f..d84c954d 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
@@ -111,15 +111,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
///
protected global::FineUIPro.TextBox txtPersonName;
- ///
- /// txtCardNo 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtCardNo;
-
///
/// drpPost 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx
index 30f1cbd5..0a450be7 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx
@@ -142,7 +142,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx
new file mode 100644
index 00000000..e5963151
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx
@@ -0,0 +1,103 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeavePost.aspx.cs"
+ Inherits="FineUIPro.Web.ZHGL.RealName.LeavePost" %>
+
+
+
+
+ 实名制人员
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx.cs
new file mode 100644
index 00000000..1bee8b96
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx.cs
@@ -0,0 +1,147 @@
+using BLL;
+using System;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.ZHGL.RealName
+{
+ public partial class LeavePost : PageBase
+ {
+ ///
+ /// 加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ //this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ //this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.GridBind();
+ }
+ }
+
+ ///
+ /// 获取数据,合并相同行
+ ///
+ private void GridBind()
+ {
+ var getData = LeavePostService.getListData(this.rblStates.SelectedValue, this.txtProjectCode.Text.Trim(), this.txtName.Text.Trim(), this.txtIdentityCard.Text.Trim(), Grid1);
+ Grid1.RecordCount = LeavePostService.count;
+ Grid1.DataSource = getData;
+ Grid1.DataBind();
+ }
+
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ this.GridBind();
+ }
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员记录" + filename, System.Text.Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ this.Grid1.PageSize = this.Grid1.RecordCount;
+ this.GridBind();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+ ///
+ /// 导出方法
+ ///
+ ///
+ ///
+ private string GetGridTableHtml(Grid grid)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ sb.Append("");
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ sb.AppendFormat("{0} | ", column.HeaderText);
+ }
+ sb.Append("
");
+ foreach (GridRow row in grid.Rows)
+ {
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ string html = row.Values[column.ColumnIndex].ToString();
+ if (column.ColumnID == "tfNumber")
+ {
+ html = (row.FindControl("labNumber") as AspNet.Label).Text;
+ }
+ sb.AppendFormat("{0} | ", html);
+ }
+
+ sb.Append("
");
+ }
+
+ sb.Append("
");
+
+ return sb.ToString();
+ }
+ #endregion
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.GridBind();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.GridBind();
+ }
+ #endregion
+
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("LeavePostIn.aspx", "导入 - ")));
+ }
+
+ protected void Window2_Close(object sender, WindowCloseEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ protected void btnDel_Click(object sender, EventArgs e)
+ {
+ LeavePostService.DeleteLeavePost();
+ ShowNotify("删除完成!", MessageBoxIcon.Success);
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx.designer.cs
new file mode 100644
index 00000000..59ef40af
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePost.aspx.designer.cs
@@ -0,0 +1,177 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ZHGL.RealName {
+
+
+ public partial class LeavePost {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// rblStates 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblStates;
+
+ ///
+ /// txtProjectCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectCode;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// txtIdentityCard 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIdentityCard;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// btnDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDel;
+
+ ///
+ /// labNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label labNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window2;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx
new file mode 100644
index 00000000..247e8cc6
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx
@@ -0,0 +1,93 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeavePostIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.RealName.LeavePostIn" %>
+
+
+
+
+
+
+ 人员管理导入
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx.cs
new file mode 100644
index 00000000..1b45e897
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx.cs
@@ -0,0 +1,470 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.OleDb;
+using System.IO;
+using System.Linq;
+
+namespace FineUIPro.Web.ZHGL.RealName
+{
+ public partial class LeavePostIn : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 上传预设的虚拟路径
+ ///
+ private string initPath = Const.ExcelUrl;
+
+ ///
+ /// 人员考勤集合
+ ///
+ public static List viewLeavePosts = new List();
+
+ ///
+ /// 错误集合
+ ///
+ public static string errorInfos = string.Empty;
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.hdFileName.Text = string.Empty;
+ this.hdCheckResult.Text = string.Empty;
+ if (viewLeavePosts != null)
+ {
+ viewLeavePosts.Clear();
+ }
+ errorInfos = string.Empty;
+ }
+ }
+ #endregion
+
+ #region 审核
+ ///
+ /// 审核
+ ///
+ ///
+ ///
+ protected void btnAudit_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (this.fuAttachUrl.HasFile == false)
+ {
+ ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
+ if (IsXls != ".xls")
+ {
+ ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (viewLeavePosts!=null)
+ {
+ viewLeavePosts.Clear();
+ }
+ if (!string.IsNullOrEmpty(errorInfos))
+ {
+ errorInfos = string.Empty;
+ }
+ string rootPath = Server.MapPath("~/");
+ string initFullPath = rootPath + initPath;
+ if (!Directory.Exists(initFullPath))
+ {
+ Directory.CreateDirectory(initFullPath);
+ }
+
+ this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
+ string filePath = initFullPath + this.hdFileName.Text;
+ this.fuAttachUrl.PostedFile.SaveAs(filePath);
+ ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
+ }
+ catch (Exception ex)
+ {
+ ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
+ }
+ }
+
+ #region 读Excel提取数据
+ ///
+ /// 从Excel提取数据--》Dataset
+ ///
+ /// Excel文件路径名
+ private void ImportXlsToData(string fileName)
+ {
+ try
+ {
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
+ OleDbDataAdapter oleAdMaster = null;
+ DataTable m_tableName = new DataTable();
+ DataSet ds = new DataSet();
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ if (m_tableName != null && m_tableName.Rows.Count > 0)
+ {
+
+ m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
+
+ }
+ string sqlMaster;
+ sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
+ oleAdMaster.Fill(ds, "m_tableName");
+ oleAdMaster.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
+
+ AddDatasetToSQL(ds.Tables[0], 5);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
+ #endregion
+
+ #region 将Dataset的数据导入数据库
+ ///
+ /// 将Dataset的数据导入数据库
+ ///
+ /// 数据集
+ /// 数据集行数
+ ///
+ private bool AddDatasetToSQL(DataTable pds, int Cols)
+ {
+ string result = string.Empty;
+ int ic, ir;
+ ic = pds.Columns.Count;
+ if (ic < Cols)
+ {
+ Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning);
+ }
+ ir = pds.Rows.Count;
+ if (pds != null && ir > 0)
+ {
+ var projects = from x in Funs.DB.Base_Project select x;
+ for (int i = 0; i < ir; i++)
+ {
+ string col0 = pds.Rows[i][0].ToString().Trim();
+ string col1 = pds.Rows[i][1].ToString().Trim();
+ if (string.IsNullOrEmpty(col1))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "【姓名】不能为空!" + "|";
+ }
+ string col2 = pds.Rows[i][2].ToString().Trim();
+ if (string.IsNullOrEmpty(col2))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "【身份证号码】不能为空!" + "|";
+ }
+
+ string col3 = pds.Rows[i][3].ToString().Trim();
+ if (!string.IsNullOrEmpty(col3))
+ {
+ var getProject = projects.FirstOrDefault(x=>x.ProjectCode ==col3 || x.JTProjectCode == col3);
+ if (getProject == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "【项目编码】[" + col3 + "]错误!|";
+ }
+ }
+ else
+ {
+ result += "第" + (i + 2).ToString() + "行," + "【项目编码】不能为空!" + "|";
+ }
+ string col5 = pds.Rows[i][5].ToString();
+ if (!string.IsNullOrEmpty(col5))
+ {
+ try
+ {
+ DateTime inTime = Convert.ToDateTime(col5);
+ }
+ catch (Exception)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "时间" + "," + "[" + col5 + "]错误!" + "|";
+ }
+ }
+ }
+ if (!string.IsNullOrEmpty(result))
+ {
+ result = result.Substring(0, result.LastIndexOf("|"));
+ errorInfos = result;
+ Alert alert = new Alert
+ {
+ Message = result,
+ Target = Target.Self
+ };
+ alert.Show();
+ }
+ else
+ {
+ errorInfos = string.Empty;
+ ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
+ }
+ }
+ else
+ {
+ ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
+ }
+ return true;
+ }
+ #endregion
+ #endregion
+
+ #region 导入
+ ///
+ /// 导入
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(errorInfos))
+ {
+ if (!string.IsNullOrEmpty(this.hdFileName.Text))
+ {
+ string rootPath = Server.MapPath("~/");
+ ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
+ }
+ else
+ {
+ ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
+ }
+ }
+
+ #region Excel提取数据
+ ///
+ /// 从Excel提取数据--》Dataset
+ ///
+ /// Excel文件路径名
+ private void ImportXlsToData2(string fileName)
+ {
+ try
+ {
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
+ OleDbDataAdapter oleAdMaster = null;
+ DataTable m_tableName = new DataTable();
+ DataSet ds = new DataSet();
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ if (m_tableName != null && m_tableName.Rows.Count > 0)
+ {
+
+ m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
+
+ }
+ string sqlMaster;
+ sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
+ oleAdMaster.Fill(ds, "m_tableName");
+ oleAdMaster.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
+
+ AddDatasetToSQL2(ds.Tables[0], 5);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
+ #endregion
+
+ #region 将Dataset的数据导入数据库
+ ///
+ /// 将Dataset的数据导入数据库
+ ///
+ /// 数据集
+ /// 数据集列数
+ ///
+ private bool AddDatasetToSQL2(DataTable pds, int Cols)
+ {
+ int ic, ir;
+ viewLeavePosts.Clear();
+ ic = pds.Columns.Count;
+ if (ic < Cols)
+ {
+ Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
+ }
+
+ ir = pds.Rows.Count;
+ if (pds != null && ir > 0)
+ {
+ var projects = from x in Funs.DB.Base_Project select x;
+ for (int i = 0; i < ir; i++)
+ {
+ Model.RealName_LeavePost newLeavePost = new Model.RealName_LeavePost
+ {
+ Id = pds.Rows[i][0].ToString().Trim(),
+ PersonName = pds.Rows[i][1].ToString().Trim(),
+ IdentityCard = pds.Rows[i][2].ToString().Trim(),
+ ProjectCode = pds.Rows[i][3].ToString().Trim(),
+ ProjectShortName = pds.Rows[i][4].ToString().Trim(),
+ InTime = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim()),
+ OutTime = Funs.GetNewDateTime(pds.Rows[i][6].ToString().Trim())
+ };
+
+ var person =Funs.DB.RealName_LeavePost.FirstOrDefault(x=>x.ProjectCode == newLeavePost.ProjectCode && x.IdentityCard== newLeavePost.IdentityCard);
+ if (person == null)
+ {
+ viewLeavePosts.Add(newLeavePost);
+ }
+ }
+ if (viewLeavePosts.Count > 0)
+ {
+ this.Grid1.Hidden = false;
+ this.Grid1.DataSource = viewLeavePosts;
+ this.Grid1.DataBind();
+ }
+ }
+ else
+ {
+ ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
+ }
+ return true;
+ }
+ #endregion
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(errorInfos))
+ {
+ int a = viewLeavePosts.Count();
+ var getProjects = from x in Funs.DB.Base_Project select x;
+ for (int i = 0; i < a; i++)
+ {
+ Model.RealName_LeavePost newLeavePost = new Model.RealName_LeavePost
+ {
+ Id = viewLeavePosts[i].Id,
+ PersonName = viewLeavePosts[i].PersonName,
+ IdentityCard = viewLeavePosts[i].IdentityCard,
+ ProjectCode = viewLeavePosts[i].ProjectCode,
+ ProjectShortName = viewLeavePosts[i].ProjectShortName,
+ InTime = viewLeavePosts[i].InTime,
+ OutTime = viewLeavePosts[i].OutTime,
+ };
+ var getProject = getProjects.FirstOrDefault(x => x.ProjectCode == newLeavePost.ProjectCode || x.JTProjectCode == newLeavePost.ProjectCode);
+ if (getProject != null)
+ {
+ newLeavePost.ProjectId = getProject.ProjectId;
+ if (!newLeavePost.OutTime.HasValue)
+ {
+ var getPerson = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.ProjectId == getProject.ProjectId && x.IdentityCard == newLeavePost.IdentityCard);
+ if (getPerson != null)
+ {
+ if (getPerson.OutTime.HasValue)
+ {
+ if (getPerson.OutTime >= newLeavePost.InTime)
+ {
+ newLeavePost.OutTime = getPerson.OutTime;
+ }
+ else
+ {
+ newLeavePost.OutTime = newLeavePost.InTime.Value.AddDays(1);
+ }
+ }
+ else if (getPerson.IsUsed == false)
+ {
+ newLeavePost.OutTime = DateTime.Now;
+ }
+ }
+ else
+ {
+ newLeavePost.OutTime = DateTime.Now;
+ }
+ }
+ }
+
+ BLL.LeavePostService.AddLeavePost(newLeavePost);
+ }
+ string rootPath = Server.MapPath("~/");
+ string initFullPath = rootPath + initPath;
+ string filePath = initFullPath + this.hdFileName.Text;
+ if (filePath != string.Empty && System.IO.File.Exists(filePath))
+ {
+ System.IO.File.Delete(filePath);//删除上传的XLS文件
+ }
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ else
+ {
+ Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
+
+ #region 下载模板
+ ///
+ /// 下载模板按钮
+ ///
+ ///
+ ///
+ protected void btnDownLoad_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
+ }
+
+ ///
+ /// 下载导入模板
+ ///
+ ///
+ ///
+ protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
+ {
+ if (e.EventArgument == "Confirm_OK")
+ {
+ string rootPath = Server.MapPath("~/");
+ string filePath = Const.RealName_LeavePostTemplateUrl;
+ string uploadfilepath = rootPath + filePath;
+ string fileName = Path.GetFileName(filePath);
+ FileInfo info = new FileInfo(uploadfilepath);
+ long fileSize = info.Length;
+ Response.ClearContent();
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.ContentType = "excel/plain";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ Response.AddHeader("Content-Length", fileSize.ToString().Trim());
+ Response.TransmitFile(uploadfilepath, 0, fileSize);
+ Response.End();
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx.designer.cs
new file mode 100644
index 00000000..fdd7267f
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/LeavePostIn.aspx.designer.cs
@@ -0,0 +1,141 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ZHGL.RealName {
+
+
+ public partial class LeavePostIn {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnAudit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAudit;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnDownLoad 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDownLoad;
+
+ ///
+ /// fuAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FileUpload fuAttachUrl;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// hdFileName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdFileName;
+
+ ///
+ /// hdCheckResult 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdCheckResult;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
index 82629df1..e99d866d 100644
--- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
@@ -1,8 +1,13 @@
-
+
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
index 10eeb3bf..3f76f5fb 100644
--- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
@@ -51,5 +51,6 @@
+
\ No newline at end of file
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index a87ce46e..c87fbd26 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -1484,6 +1484,9 @@ namespace Model
partial void InsertRealName_Country(RealName_Country instance);
partial void UpdateRealName_Country(RealName_Country instance);
partial void DeleteRealName_Country(RealName_Country instance);
+ partial void InsertRealName_LeavePost(RealName_LeavePost instance);
+ partial void UpdateRealName_LeavePost(RealName_LeavePost instance);
+ partial void DeleteRealName_LeavePost(RealName_LeavePost instance);
partial void InsertRealName_PersonInOutNow(RealName_PersonInOutNow instance);
partial void UpdateRealName_PersonInOutNow(RealName_PersonInOutNow instance);
partial void DeleteRealName_PersonInOutNow(RealName_PersonInOutNow instance);
@@ -5920,6 +5923,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table RealName_LeavePost
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table RealName_PersonInOutNow
{
get
@@ -231434,6 +231445,260 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RealName_LeavePost")]
+ public partial class RealName_LeavePost : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _NewId;
+
+ private string _Id;
+
+ private string _PersonName;
+
+ private string _IdentityCard;
+
+ private string _ProjectId;
+
+ private string _ProjectCode;
+
+ private string _ProjectShortName;
+
+ private System.Nullable _InTime;
+
+ private System.Nullable _OutTime;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnNewIdChanging(string value);
+ partial void OnNewIdChanged();
+ partial void OnIdChanging(string value);
+ partial void OnIdChanged();
+ partial void OnPersonNameChanging(string value);
+ partial void OnPersonNameChanged();
+ partial void OnIdentityCardChanging(string value);
+ partial void OnIdentityCardChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
+ partial void OnProjectCodeChanging(string value);
+ partial void OnProjectCodeChanged();
+ partial void OnProjectShortNameChanging(string value);
+ partial void OnProjectShortNameChanged();
+ partial void OnInTimeChanging(System.Nullable value);
+ partial void OnInTimeChanged();
+ partial void OnOutTimeChanging(System.Nullable value);
+ partial void OnOutTimeChanged();
+ #endregion
+
+ public RealName_LeavePost()
+ {
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string NewId
+ {
+ get
+ {
+ return this._NewId;
+ }
+ set
+ {
+ if ((this._NewId != value))
+ {
+ this.OnNewIdChanging(value);
+ this.SendPropertyChanging();
+ this._NewId = value;
+ this.SendPropertyChanged("NewId");
+ this.OnNewIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50)")]
+ public string Id
+ {
+ get
+ {
+ return this._Id;
+ }
+ set
+ {
+ if ((this._Id != value))
+ {
+ this.OnIdChanging(value);
+ this.SendPropertyChanging();
+ this._Id = value;
+ this.SendPropertyChanged("Id");
+ this.OnIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(100)")]
+ public string PersonName
+ {
+ get
+ {
+ return this._PersonName;
+ }
+ set
+ {
+ if ((this._PersonName != value))
+ {
+ this.OnPersonNameChanging(value);
+ this.SendPropertyChanging();
+ this._PersonName = value;
+ this.SendPropertyChanged("PersonName");
+ this.OnPersonNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IdentityCard", DbType="NVarChar(50)")]
+ public string IdentityCard
+ {
+ get
+ {
+ return this._IdentityCard;
+ }
+ set
+ {
+ if ((this._IdentityCard != value))
+ {
+ this.OnIdentityCardChanging(value);
+ this.SendPropertyChanging();
+ this._IdentityCard = value;
+ this.SendPropertyChanged("IdentityCard");
+ this.OnIdentityCardChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
+ public string ProjectId
+ {
+ get
+ {
+ return this._ProjectId;
+ }
+ set
+ {
+ if ((this._ProjectId != value))
+ {
+ this.OnProjectIdChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectId = value;
+ this.SendPropertyChanged("ProjectId");
+ this.OnProjectIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")]
+ public string ProjectCode
+ {
+ get
+ {
+ return this._ProjectCode;
+ }
+ set
+ {
+ if ((this._ProjectCode != value))
+ {
+ this.OnProjectCodeChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectCode = value;
+ this.SendPropertyChanged("ProjectCode");
+ this.OnProjectCodeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectShortName", DbType="NVarChar(50)")]
+ public string ProjectShortName
+ {
+ get
+ {
+ return this._ProjectShortName;
+ }
+ set
+ {
+ if ((this._ProjectShortName != value))
+ {
+ this.OnProjectShortNameChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectShortName = value;
+ this.SendPropertyChanged("ProjectShortName");
+ this.OnProjectShortNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InTime", DbType="DateTime")]
+ public System.Nullable InTime
+ {
+ get
+ {
+ return this._InTime;
+ }
+ set
+ {
+ if ((this._InTime != value))
+ {
+ this.OnInTimeChanging(value);
+ this.SendPropertyChanging();
+ this._InTime = value;
+ this.SendPropertyChanged("InTime");
+ this.OnInTimeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OutTime", DbType="DateTime")]
+ public System.Nullable OutTime
+ {
+ get
+ {
+ return this._OutTime;
+ }
+ set
+ {
+ if ((this._OutTime != value))
+ {
+ this.OnOutTimeChanging(value);
+ this.SendPropertyChanging();
+ this._OutTime = value;
+ this.SendPropertyChanged("OutTime");
+ this.OnOutTimeChanged();
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RealName_PersonInOutNow")]
public partial class RealName_PersonInOutNow : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -335094,8 +335359,6 @@ namespace Model
private EntityRef _Sys_User;
- private EntityRef _WBS_DivisionProject;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -335154,7 +335417,6 @@ namespace Model
{
this._Base_Project = default(EntityRef);
this._Sys_User = default(EntityRef);
- this._WBS_DivisionProject = default(EntityRef);
OnCreated();
}
@@ -335253,10 +335515,6 @@ namespace Model
{
if ((this._DivisionProjectId != value))
{
- if (this._WBS_DivisionProject.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnDivisionProjectIdChanging(value);
this.SendPropertyChanging();
this._DivisionProjectId = value;
@@ -335718,40 +335976,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_BreakdownProject_WBS_DivisionProject", Storage="_WBS_DivisionProject", ThisKey="DivisionProjectId", OtherKey="DivisionProjectId", IsForeignKey=true)]
- public WBS_DivisionProject WBS_DivisionProject
- {
- get
- {
- return this._WBS_DivisionProject.Entity;
- }
- set
- {
- WBS_DivisionProject previousValue = this._WBS_DivisionProject.Entity;
- if (((previousValue != value)
- || (this._WBS_DivisionProject.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._WBS_DivisionProject.Entity = null;
- previousValue.WBS_BreakdownProject.Remove(this);
- }
- this._WBS_DivisionProject.Entity = value;
- if ((value != null))
- {
- value.WBS_BreakdownProject.Add(this);
- this._DivisionProjectId = value.DivisionProjectId;
- }
- else
- {
- this._DivisionProjectId = default(string);
- }
- this.SendPropertyChanged("WBS_DivisionProject");
- }
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -339151,8 +339375,6 @@ namespace Model
private string _OldDivisionId;
- private EntitySet _WBS_BreakdownProject;
-
private EntityRef _Base_Project;
#region 可扩展性方法定义
@@ -339183,7 +339405,6 @@ namespace Model
public WBS_DivisionProject()
{
- this._WBS_BreakdownProject = new EntitySet(new Action(this.attach_WBS_BreakdownProject), new Action(this.detach_WBS_BreakdownProject));
this._Base_Project = default(EntityRef);
OnCreated();
}
@@ -339392,19 +339613,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_BreakdownProject_WBS_DivisionProject", Storage="_WBS_BreakdownProject", ThisKey="DivisionProjectId", OtherKey="DivisionProjectId", DeleteRule="NO ACTION")]
- public EntitySet WBS_BreakdownProject
- {
- get
- {
- return this._WBS_BreakdownProject;
- }
- set
- {
- this._WBS_BreakdownProject.Assign(value);
- }
- }
-
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_DivisionProject_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@@ -339458,18 +339666,6 @@ namespace Model
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
-
- private void attach_WBS_BreakdownProject(WBS_BreakdownProject entity)
- {
- this.SendPropertyChanging();
- entity.WBS_DivisionProject = this;
- }
-
- private void detach_WBS_BreakdownProject(WBS_BreakdownProject entity)
- {
- this.SendPropertyChanging();
- entity.WBS_DivisionProject = null;
- }
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.WBS_ForeignBreakdown")]