This commit is contained in:
杨红卫 2021-08-16 17:41:00 +08:00
parent dfd370a9b0
commit dba64994c3
44 changed files with 1962 additions and 839 deletions

View File

@ -1,3 +0,0 @@
alter table JDGL_QuantityCompletion add StartDate datetime null
alter table JDGL_QuantityCompletion add EndDate datetime null
GO

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -625,6 +625,7 @@
<Compile Include="PZHGL\InformationProject\WorkHandoverService.cs" />
<Compile Include="PZHGL\ProjectData\ProjectMapService.cs" />
<Compile Include="PZHGL\ProjectData\ProjectPageDataService.cs" />
<Compile Include="SortConditionHelper.cs" />
<Compile Include="SQLHelper.cs" />
<Compile Include="Common\Const.cs" />
<Compile Include="ErrLogInfo.cs" />
@ -708,6 +709,7 @@
<Compile Include="ZHGL\ProjectAccident\AccidentStatisticsService.cs" />
<Compile Include="ZHGL\ProjectAccident\ProjectAccidentReportService.cs" />
<Compile Include="ZHGL\RealName\BasicDataService.cs" />
<Compile Include="ZHGL\RealName\LeavePostService.cs" />
<Compile Include="ZHGL\RealName\CityService.cs" />
<Compile Include="ZHGL\RealName\CountryService.cs" />
<Compile Include="ZHGL\RealName\RealNameMonitorService.cs" />

View File

@ -2810,6 +2810,10 @@ namespace BLL
/// </summary>
public const string PersonInfoTemplateUrl = "File\\Excel\\DataIn\\现场人员考勤导入模版.xls";
/// <summary>
/// 实名制人员考勤导入模版
/// </summary>
public const string RealName_LeavePostTemplateUrl = "File\\Excel\\DataIn\\实名制人员导入模版.xls";
/// <summary>
/// 专项检查导入模板
/// </summary>
public const string CheckSpecialTemplateUrl = "File\\Excel\\DataIn\\专项检查导入模板.xls";

View File

@ -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
/// </summary>
public static class PersonService
{
public static Model.SGGLDB db = Funs.DB;
#region
/// <summary>
/// 记录数
/// </summary>
public static int count
{
get;
set;
}
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.View_SitePerson_Person> getPersonLists = from x in db.View_SitePerson_Person select x;
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="PageIndex">页码</param>
/// <param name="PageSize">每页数量</param>
/// <returns></returns>
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<Model.View_SitePerson_Person> 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),
};
}
/// <summary>
///
/// </summary>
/// <returns></returns>
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
/// <summary>
/// 根据主键获取人员信息
/// </summary>

View File

@ -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<T> DataSorting<T>(IQueryable<T> 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<T> query = source.AsQueryable().Provider.CreateQuery<T>(expr);
return query;
}
public static IQueryable<T> DataPaging<T>(IQueryable<T> source, int pageNumber, int pageSize)
{
return source.Skip(pageNumber * pageSize).Take(pageSize);
}
public static IQueryable<T> SortingAndPaging<T>(IQueryable<T> source, string sortExpression, string sortDirection, int pageNumber, int pageSize)
{
IQueryable<T> query = DataSorting<T>(source, sortExpression, sortDirection);
return DataPaging(query, pageNumber, pageSize);
}
}
}

View File

@ -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
/// <summary>
/// 记录数
/// </summary>
public static int count
{
get;
set;
}
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.RealName_LeavePost> getLeavePosts = from x in db.RealName_LeavePost select x;
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="PageIndex">页码</param>
/// <param name="PageSize">每页数量</param>
/// <returns></returns>
public static IEnumerable getListData(string states, string projectCode, string personName, string identityCard, Grid Grid1)
{
IQueryable<Model.RealName_LeavePost> 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
/// <summary>
/// 添加实名制人员信息
/// </summary>
/// <param name="LeavePost"></param>
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();
}
/// <summary>
/// 修改实名制人员信息
/// </summary>
/// <param name="LeavePost"></param>
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();
}
}
/// <summary>
///
/// </summary>
/// <param name="LeavePost"></param>
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();
}
}
}
}

View File

@ -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,

View File

@ -1 +1,38 @@


错误信息开始=====>
错误类型: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

View File

@ -1486,6 +1486,8 @@
<Content Include="ZHGL\ProjectAccident\AccidentStatistics.aspx" />
<Content Include="ZHGL\ProjectAccident\AccidentStatisticsEdit.aspx" />
<Content Include="ZHGL\ProjectAccident\AccidentStatisticsView.aspx" />
<Content Include="ZHGL\RealName\LeavePost.aspx" />
<Content Include="ZHGL\RealName\LeavePostIn.aspx" />
<Content Include="ZHGL\RealName\SynchroRecord.aspx" />
<Content Include="ZHGL\RealName\SynchroSet.aspx" />
<Content Include="ZHGL\RealName\BasicData.aspx" />
@ -14640,6 +14642,20 @@
<Compile Include="ZHGL\ProjectAccident\AccidentStatisticsView.aspx.designer.cs">
<DependentUpon>AccidentStatisticsView.aspx</DependentUpon>
</Compile>
<Compile Include="ZHGL\RealName\LeavePost.aspx.cs">
<DependentUpon>LeavePost.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ZHGL\RealName\LeavePost.aspx.designer.cs">
<DependentUpon>LeavePost.aspx</DependentUpon>
</Compile>
<Compile Include="ZHGL\RealName\LeavePostIn.aspx.cs">
<DependentUpon>LeavePostIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ZHGL\RealName\LeavePostIn.aspx.designer.cs">
<DependentUpon>LeavePostIn.aspx</DependentUpon>
</Compile>
<Compile Include="ZHGL\RealName\SynchroRecord.aspx.cs">
<DependentUpon>SynchroRecord.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -107,7 +107,7 @@
</f:Panel>
<f:Window ID="Window1" Title="编辑考勤" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="950px" Height="450px">
Width="1000px" Height="600px">
</f:Window>
<f:Window ID="Window2" Title="导入考勤" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"

View File

@ -17,7 +17,8 @@
<Items>
<f:Label ID="Label1" runat="server">
</f:Label>
<f:RadioButtonList ID="rblCheck" runat="server" AutoPostBack="true" OnSelectedIndexChanged="rblCheck_SelectedIndexChanged">
<f:RadioButtonList ID="rblCheck" runat="server" Hidden="true"
AutoPostBack="true" OnSelectedIndexChanged="rblCheck_SelectedIndexChanged">
<f:RadioItem Value="手动" Text="手动" Selected="true" />
<f:RadioItem Value="自动" Text="自动" />
</f:RadioButtonList>
@ -27,61 +28,21 @@
</f:FormRow>
<f:FormRow>
<Items>
<%--<f:DropDownBox runat="server" ID="drpPersonId" Label="人员姓名" EmptyText="请从下拉表格中选择"
MatchFieldWidth="false" LabelAlign="Right" AutoPostBack="true" OnTextChanged="drpPersonId_TextChanged"
EnableMultiSelect="false" Required="true" ShowRedStar="true" >
<PopPanel>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" DataIDField="PersonId"
DataTextField="PersonName" DataKeyNames="PersonId" AllowSorting="true" SortField="CardNo"
SortDirection="ASC" EnableColumnLines="true" Hidden="true" Width="900px" PageSize="10000"
Height="300px" EnableMultiSelect="false" EnableCheckBoxSelect="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:TextBox runat="server" Label="卡号" ID="txtCardNo" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" Width="250px" LabelAlign="Right">
</f:TextBox>
<f:TextBox runat="server" Label="姓名" ID="txtPersonName" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" Width="250px" LabelAlign="Right">
</f:TextBox>
<f:TextBox runat="server" Label="身份证号" ID="txtIdentityCard" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" Width="300px" LabelAlign="Right">
</f:TextBox>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField Width="100px" ColumnID="CardNo" DataField="CardNo" SortField="CardNo"
FieldType="String" HeaderText="卡号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PersonName" DataField="PersonName" EnableFilter="true"
SortField="PersonName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderText="所在单位" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="WorkPostName" DataField="WorkPostName" SortField="WorkPostName"
FieldType="String" HeaderText="岗位" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
</f:Grid>
</PopPanel>
</f:DropDownBox>--%>
<f:DropDownBox runat="server" ID="drpPersonId" Label="人员姓名" EmptyText="请从下拉表格中选择"
<f:DropDownBox runat="server" ID="drpPersonId" Label="人员姓名" EmptyText="请从下拉表格中选择" ShowRedStar="true"
EnableMultiSelect="true" MatchFieldWidth="false" Values="105,108" AutoPostBack="true" OnTextChanged="drpPersonId_TextChanged">
<PopPanel>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" Width="900px" Height="300px" Hidden="true"
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" Width="900px" Height="500px" Hidden="true"
DataIDField="PersonId" DataTextField="PersonName" EnableMultiSelect="true" KeepCurrentSelection="true"
DataKeyNames="PersonId" EnableCheckBoxSelect="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:TextBox runat="server" Label="卡号" ID="txtCardNo" EmptyText="输入查询条件" AutoPostBack="true"
<f:DropDownList runat="server" ID="drpUnit" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
Width="300px" LabelAlign="Right" LabelWidth="50px">
</f:DropDownList>
<%--<f:TextBox runat="server" Label="卡号" ID="txtCardNo" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" Width="250px" LabelAlign="Right">
</f:TextBox>
</f:TextBox>--%>
<f:TextBox runat="server" Label="姓名" ID="txtPersonName" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" Width="250px" LabelAlign="Right">
</f:TextBox>
@ -114,29 +75,13 @@
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtIdCard" Label="身份证号码" Readonly="true" runat="server"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="40% 25% 35%">
<Items>
<f:TextBox ID="txtWorkArea" runat="server" Label="单位工程" MaxLength="100" LabelAlign="Right">
</f:TextBox>
<f:DropDownList ID="drpWorkArea" runat="server" AutoPostBack="true" EnableMultiSelect="true" OnSelectedIndexChanged="drpWorkArea_SelectedIndexChanged">
</f:DropDownList>
<f:Label ID="Label4" runat="server" Text="说明:检查区域可从下拉框选择也可手动编辑。" CssClass="lab" MarginLeft="5px">
</f:Label>
<f:TextBox ID="txtIdCard" Label="身份证号码" Readonly="true" runat="server" ShowRedStar="true"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtAddress" runat="server" Label="进出地点" MaxLength="50" LabelAlign="Right">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpType" runat="server" Label="进出时间">
<f:DropDownList ID="drpType" runat="server" Label="进出时间" ShowRedStar="true">
<f:ListItem Value="1" Text="入场时间" />
<f:ListItem Value="0" Text="出场时间" />
</f:DropDownList>
@ -146,6 +91,28 @@
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpWorkArea" runat="server" AutoPostBack="true" EnableMultiSelect="true"
OnSelectedIndexChanged="drpWorkArea_SelectedIndexChanged" Label="单位工程">
</f:DropDownList>
<f:Label ID="Label4" runat="server" Text="说明:单位工程可从下拉框选择也可手动编辑。" CssClass="lab" MarginLeft="5px">
</f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtWorkArea" runat="server" MaxLength="100" LabelAlign="Right" Label=" ">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtAddress" runat="server" Label="进出地点" MaxLength="50" LabelAlign="Right">
</f:TextBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">

View File

@ -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
/// <param name="e"></param>
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<SqlParameter> listStr = new List<SqlParameter>();
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()))
{

View File

@ -94,13 +94,13 @@ namespace FineUIPro.Web.HSSE.SitePerson {
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtCardNo 控件。
/// drpUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCardNo;
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// txtPersonName 控件。
@ -129,42 +129,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.TextBox txtIdCard;
/// <summary>
/// txtWorkArea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWorkArea;
/// <summary>
/// drpWorkArea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpWorkArea;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// txtAddress 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAddress;
/// <summary>
/// drpType 控件。
/// </summary>
@ -192,6 +156,42 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.TextBox txtTime2;
/// <summary>
/// drpWorkArea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpWorkArea;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// txtWorkArea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWorkArea;
/// <summary>
/// txtAddress 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAddress;
/// <summary>
/// Toolbar1 控件。
/// </summary>

View File

@ -9,6 +9,7 @@
.f-grid-row.Red {
background-color: red;
}
.LabelColor {
color: Red;
font-size: small;
@ -42,7 +43,7 @@
TitleToolTip="人员信息" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="人员信息" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="PersonId" DataIDField="PersonId" AllowSorting="true" SortField="CardNo,PersonName" SortDirection="ASC"
runat="server" BoxFlex="1" DataKeyNames="PersonId" DataIDField="PersonId" AllowSorting="true" SortField="PersonName" SortDirection="ASC"
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" EnableColumnLines="true" ForceFit="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True" EnableCheckBoxSelect="true">
@ -52,16 +53,14 @@
<f:TextBox runat="server" Label="姓名" ID="txtPersonName" EmptyText="输入查询条件"
Width="200px" LabelWidth="70px" LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="卡号" ID="txtCardNo" EmptyText="输入查询条件"
Width="200px" LabelWidth="50px" LabelAlign="right" Hidden="true">
</f:TextBox>
<f:DropDownList ID="drpPost" runat="server" Label="岗位" EnableEdit="true" EnableMultiSelect="true"
AutoPostBack="true" OnSelectedIndexChanged="drpPost_SelectedIndexChanged"
Width="200px" LabelWidth="50px" LabelAlign="right" ForceSelection="false" EnableCheckBoxSelect="true">
</f:DropDownList>
<f:DropDownList ID="drpTreamGroup" runat="server" Label="班组" EnableEdit="true"
Width="200px" LabelWidth="50px" LabelAlign="right" ForceSelection="false">
</f:DropDownList>
<f:TextBox runat="server" Label="身份证" ID="txtIdentityCard" EmptyText="输入查询条件"
<f:TextBox runat="server" Label="身份证" ID="txtIdentityCard" EmptyText="输入查询条件"
Width="200px" LabelWidth="70px"
LabelAlign="right">
</f:TextBox>
@ -70,10 +69,10 @@
</Toolbars>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<Items>
<f:CheckBox runat="server" ID="ckIdCardInfoNotOK" Label="信息不全" LabelAlign="right" LabelWidth="80px">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckIspost" Label="未在岗" LabelAlign="right" LabelWidth="80px">
<f:CheckBox runat="server" ID="ckIspost" Label="未在岗" LabelAlign="right" LabelWidth="80px">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckJT" Label="未同步" LabelAlign="right" LabelWidth="80px">
</f:CheckBox>
@ -93,7 +92,7 @@
</f:Button>
<f:Button ID="btnQR" ToolTip="批量生成二维码" Icon="TableRefresh" runat="server" OnClick="btnQR_Click">
</f:Button>
<f:Button ID="btnPhoto" ToolTip="刷新照片转二进制" Icon="ArrowRefresh" runat="server" OnClick="btnPhoto_Click" >
<f:Button ID="btnPhoto" ToolTip="刷新照片转二进制" Icon="ArrowRefresh" runat="server" OnClick="btnPhoto_Click">
</f:Button>
</Items>
</f:Toolbar>
@ -103,43 +102,32 @@
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
TextAlign="Center">
</f:RenderField>
<%-- <f:RenderField HeaderText="卡号" ColumnID="CardNo" DataField="CardNo" SortField="CardNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>--%>
<f:RenderField HeaderText="岗位名称" ColumnID="WorkPostName" DataField="WorkPostName" SortField="WorkPostName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="单位名称" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="200px">
</f:RenderField>
<%-- <f:RenderField HeaderText="部门名称" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField> --%>
<f:TemplateField ColumnID="tfI" HeaderText="身份证号" Width="170px" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:Label ID="lbI" runat="server" Text=' <%# Bind("IdentityCard") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfI" HeaderText="身份证号" Width="170px" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:Label ID="lbI" runat="server" Text=' <%# Bind("IdentityCard") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField HeaderText="班组" ColumnID="TeamGroupName" DataField="TeamGroupName" SortField="TeamGroupName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px">
</f:RenderField>
<%-- <f:RenderField HeaderText="单位工程" ColumnID="WorkAreaName" DataField="WorkAreaName" SortField="WorkAreaName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="110px" >
</f:RenderField> --%>
<f:RenderField Width="100px" ColumnID="InTime" DataField="InTime" SortField="InTime"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="入场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<%-- <f:RenderField HeaderText="电话" ColumnID="Telephone" DataField="Telephone" SortField="Telephone"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="110px">
</f:RenderField>--%>
<f:RenderField HeaderText="在场" ColumnID="IsUsedName" DataField="IsUsedName" SortField="IsUsedName"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="入场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="OutTime" DataField="OutTime" SortField="OutTime"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="出场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="状态" ColumnID="PersonState" DataField="PersonState" SortField="PersonState"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="60px">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="OutTime" DataField="OutTime" SortField="OutTime"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="出场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />

View File

@ -179,84 +179,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
unitId = str[0];
}
}
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
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);
}
}
}

View File

@ -111,15 +111,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.TextBox txtPersonName;
/// <summary>
/// txtCardNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCardNo;
/// <summary>
/// drpPost 控件。
/// </summary>

View File

@ -142,7 +142,7 @@
<f:CheckBox runat="server" ID="ckIsOutside" Label="外聘" LabelAlign="Right"></f:CheckBox>
<f:TextBox ID="txtTelephone" runat="server" Label="电话" LabelAlign="Right" MaxLength="50">
</f:TextBox>
<f:RadioButtonList ID="rblIsUsed" runat="server" Label="人员在场" LabelAlign="Right" Required="True" ShowRedStar="True">
<f:RadioButtonList ID="rblIsUsed" runat="server" Label="审核通过" LabelAlign="Right" Required="True" ShowRedStar="True">
<f:RadioItem Value="True" Text="是" />
<f:RadioItem Value="False" Text="否" />
</f:RadioButtonList>

View File

@ -0,0 +1,103 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeavePost.aspx.cs"
Inherits="FineUIPro.Web.ZHGL.RealName.LeavePost" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>实名制人员</title>
<style type="text/css">
.f-grid-row .f-grid-cell-inner {
white-space: normal;
word-break: break-all;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="实名制人员" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="NewId" AllowPaging="true"
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange"
DataIDField="NewId" AllowSorting="true" SortField="InTime" EnableTextSelection="True"
SortDirection="DESC" EnableColumnLines="true" OnSort="Grid1_Sort" ForceFit="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:RadioButtonList runat="server" ID="rblStates" AutoPostBack="true" Width="150px"
OnSelectedIndexChanged="btnSearch_Click">
<f:RadioItem Value="0" Text="全部" Selected="true" />
<f:RadioItem Value="1" Text="离岗" />
</f:RadioButtonList>
<f:TextBox runat="server" Label="项目编码" id="txtProjectCode" LabelWidth="80px" Width="220px"></f:TextBox>
<f:TextBox runat="server" Label="姓名" id="txtName" LabelWidth="80px" Width="200px"></f:TextBox>
<f:TextBox runat="server" Label="身份证" id="txtIdentityCard" LabelWidth="80px" Width="280px"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" ToolTip="查询" OnClick="btnSearch_Click">
</f:Button>
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" runat="server" OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
<f:Button ID="btnDel" runat="server" Icon="Delete" ToolTip="清空" OnClick="btnDel_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="60px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="Id" DataField="Id" FieldType="String" HeaderText="Id"
HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="PersonName" DataField="PersonName"
SortField="PersonName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="160px" ColumnID="IdentityCard" DataField="IdentityCard"
SortField="IdentityCard" FieldType="String" HeaderText="身份证" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="ProjectCode" DataField="ProjectCode"
SortField="ProjectCode" FieldType="String" HeaderText="项目编码" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ProjectShortName" DataField="ProjectShortName"
SortField="ProjectShortName" FieldType="String" HeaderText="项目简称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="InTime" DataField="InTime" SortField="InTime"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="入场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="OutTime" DataField="OutTime" SortField="OutTime"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="出场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window2" Title="导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window2_Close"
Width="1200px" Height="600px">
</f:Window>
</form>
</body>
</html>

View File

@ -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
{
/// <summary>
/// 加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
}
/// <summary>
/// 获取数据,合并相同行
/// </summary>
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
/// 导出按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
/// <summary>
/// 导出方法
/// </summary>
/// <param name="grid"></param>
/// <returns></returns>
private string GetGridTableHtml(Grid grid)
{
StringBuilder sb = new StringBuilder();
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/><html xmlns:x=\"urn:schemas-microsoft-com:office:excel\">");
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
sb.Append("<tr>");
foreach (GridColumn column in grid.Columns)
{
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
}
sb.Append("</tr>");
foreach (GridRow row in grid.Rows)
{
sb.Append("<tr>");
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("<td x:str>{0}</td>", html);
}
sb.Append("</tr>");
}
sb.Append("</table>");
return sb.ToString();
}
#endregion
#region
/// <summary>
/// 改变索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
this.GridBind();
}
/// <summary>
/// 分页下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
this.GridBind();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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);
}
}
}

View File

@ -0,0 +1,177 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.ZHGL.RealName {
public partial class LeavePost {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// rblStates 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblStates;
/// <summary>
/// txtProjectCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtProjectCode;
/// <summary>
/// txtName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtName;
/// <summary>
/// txtIdentityCard 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIdentityCard;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// btnDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDel;
/// <summary>
/// labNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label labNumber;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
}
}

View File

@ -0,0 +1,93 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeavePostIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.RealName.LeavePostIn" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>人员管理导入</title>
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
LabelWidth="150px">
</f:FileUpload>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
EnableColumnLines="true" BoxFlex="1" DataKeyNames="Id" DataIDField="Id" ForceFit="true"
AllowSorting="true" SortField="ProjectCode,InTime" PageSize="100000" Height="400px">
<Columns>
<f:TemplateField Width="55px" HeaderText="序号">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="PersonName" DataField="PersonName"
SortField="PersonName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField ColumnID="IdentityCard" DataField="IdentityCard"
SortField="IdentityCard" FieldType="String" HeaderText="身份证" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField ColumnID="ProjectCode" DataField="ProjectCode"
SortField="ProjectCode" FieldType="String" HeaderText="项目编码" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField ColumnID="ProjectShortName" DataField="ProjectShortName"
SortField="ProjectShortName" FieldType="String" HeaderText="项目简称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField ColumnID="InTime" DataField="InTime" SortField="InTime"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="入场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="OutTime" DataField="OutTime" SortField="OutTime"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="出场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -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
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 人员考勤集合
/// </summary>
public static List<Model.RealName_LeavePost> viewLeavePosts = new List<Model.RealName_LeavePost>();
/// <summary>
/// 错误集合
/// </summary>
public static string errorInfos = string.Empty;
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// 审核
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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提取数据
/// <summary>
/// 从Excel提取数据--》Dataset
/// </summary>
/// <param name="filename">Excel文件路径名</param>
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的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集行数</param>
/// <returns></returns>
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
/// <summary>
/// 导入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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提取数据
/// <summary>
/// 从Excel提取数据--》Dataset
/// </summary>
/// <param name="filename">Excel文件路径名</param>
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的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集列数</param>
/// <returns></returns>
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
/// <summary>
/// 保存
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// 下载模板按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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")));
}
/// <summary>
/// 下载导入模板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
}
}

View File

@ -0,0 +1,141 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.ZHGL.RealName {
public partial class LeavePostIn {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// fuAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload fuAttachUrl;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// hdFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// hdCheckResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckResult;
}
}

View File

@ -1,8 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Tree>
<TreeNode id="858E83E9-ADE5-452E-BD65-82D8DFF872C0" Text="分部、工作项及费用清单设置" NavigateUrl="JDGL/WBS/WBSSetAudit.aspx">
<TreeNode id="F3AA42B3-5776-4992-A625-1216C579FEDE" Text="项目进度情况" NavigateUrl="JDGL/Check/ProgressCompletion.aspx">
</TreeNode>
<TreeNode id="E3905BF1-289B-4500-BD34-36F97D649AFC" Text="工作量录入" NavigateUrl="JDGL/WBS/WorkloadInput.aspx"></TreeNode>
<TreeNode id="2A3F8526-95C7-4D30-B2DD-DD26696BE150" Text="工作量统计" NavigateUrl="JDGL/WBS/WorkloadStatistics.aspx"></TreeNode>
<TreeNode id="59AAE0F0-2DB6-4065-B304-7E2C56EC3E5D" Text="赢得值曲线" NavigateUrl="JDGL/CostAnalysis/EarnedValueCurve.aspx"></TreeNode>
<TreeNode id="2AE9D982-A499-497F-8F54-ADDA5856887E" Text="工程量完成情况" NavigateUrl="JDGL/Check/QuantityCompletion.aspx"></TreeNode>
<TreeNode id="82E513B9-1A6F-495A-A633-EBC89CE5273A" Text="低温储罐完成情况" NavigateUrl="JDGL/Check/LowTankCompletion.aspx"></TreeNode>
<TreeNode id="4ACA0647-4D44-462E-8277-1EF9F100566A" Text="钢结构完成情况" NavigateUrl="JDGL/Check/SteelStructureCompletion.aspx"></TreeNode>
<TreeNode id="92FD1845-F56C-4111-8BA0-91838A18B750" Text="设备完成情况" NavigateUrl="JDGL/Check/EquipmentCompletion.aspx"></TreeNode>
<TreeNode id="9AE07A76-3A54-4414-BC8C-C86A18C737BA" Text="管道完成情况" NavigateUrl="JDGL/Check/PipelineCompletion.aspx"></TreeNode>
<TreeNode id="8A8A1050-F227-42ED-9456-8CB5ECA36512" Text="电气完成情况" NavigateUrl="JDGL/Check/ElectricalCompletion.aspx"></TreeNode>
<TreeNode id="7EC1FBAF-BEC9-46CD-9E3B-0D0093B4E1C2" Text="仪表完成情况" NavigateUrl="JDGL/Check/MeterCompletion.aspx"></TreeNode>
<TreeNode id="C7037A5D-D8A6-4C1C-A5B8-2083C31C0A7B" Text="全厂地下管网完成情况" NavigateUrl="JDGL/Check/UndergroundPipeCompletion.aspx"></TreeNode>
</Tree>

View File

@ -51,5 +51,6 @@
<TreeNode id="D78C6E54-4240-4E82-B9B5-8ED76CF62981" Text="劳务实名制对接" NavigateUrl=""><TreeNode id="1E451E0C-A125-4117-B8AC-14E74011B52B" Text="同步设置" NavigateUrl="ZHGL/RealName/SynchroSet.aspx"></TreeNode>
<TreeNode id="C0B52610-ED93-4881-AC61-1764C243F84A" Text="基础数据" NavigateUrl="ZHGL/RealName/BasicData.aspx"></TreeNode>
<TreeNode id="F36E6C54-E39F-4032-874D-548EE090A35B" Text="同步记录" NavigateUrl="ZHGL/RealName/SynchroRecord.aspx"></TreeNode>
<TreeNode id="4882C5F0-9D49-4B2E-BA30-E806D3CDF6FA" Text="离岗人员修正" NavigateUrl="ZHGL/RealName/LeavePost.aspx"></TreeNode>
</TreeNode>
</Tree>

View File

@ -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> RealName_LeavePost
{
get
{
return this.GetTable<RealName_LeavePost>();
}
}
public System.Data.Linq.Table<RealName_PersonInOutNow> 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<System.DateTime> _InTime;
private System.Nullable<System.DateTime> _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<System.DateTime> value);
partial void OnInTimeChanged();
partial void OnOutTimeChanging(System.Nullable<System.DateTime> 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<System.DateTime> 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<System.DateTime> 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> _Sys_User;
private EntityRef<WBS_DivisionProject> _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<Base_Project>);
this._Sys_User = default(EntityRef<Sys_User>);
this._WBS_DivisionProject = default(EntityRef<WBS_DivisionProject>);
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> _WBS_BreakdownProject;
private EntityRef<Base_Project> _Base_Project;
#region
@ -339183,7 +339405,6 @@ namespace Model
public WBS_DivisionProject()
{
this._WBS_BreakdownProject = new EntitySet<WBS_BreakdownProject>(new Action<WBS_BreakdownProject>(this.attach_WBS_BreakdownProject), new Action<WBS_BreakdownProject>(this.detach_WBS_BreakdownProject));
this._Base_Project = default(EntityRef<Base_Project>);
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> 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")]