This commit is contained in:
李超 2025-06-13 21:20:05 +08:00
commit f62c6618a1
46 changed files with 4723 additions and 736 deletions

1
.gitignore vendored
View File

@ -56,3 +56,4 @@
/SGGLPackFile2
/SGGL/FineUIPro.Web/upload
/SGGL/FineUIPro.Web/FileUpload/PersonBaseInfo/2025-4
/SGGL/BLLTests

View File

@ -0,0 +1,95 @@
alter table dbo.CQMSData_CQMS
add EquipmentInspectionNum int,
EquipmentInspectionQualifiedNum int,
MachineInspectionNum int,
MachineInspectionQualifiedNum int,
PersonInspectionNum int,
PersonInspectionQualifiedNum int,
MaterialInspectionNum int,
MaterialInspectionQualifiedNum int,
ConstructSolutionNum int,
ConstructSolutionProjectApproveNum int,
ConstructSolutionUnitApproveNum int,
SpecialEquipmentQualityAssuranceSystemNum int,
DesignDetailsNum int,
UnitProjectAcceptNum int,
UnitProjectAcceptOKNum int,
SubProjectAcceptNum int,
SubProjectAcceptOKNum int,
SubdivisionalWorksAcceptNum int,
SubdivisionalWorksAcceptOKNum int
go
exec sp_addextendedproperty 'MS_Description', N'设备报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'EquipmentInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'设备报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'EquipmentInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'机具报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'MachineInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'机具报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'MachineInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'人员报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'PersonInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'人员报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'PersonInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'材料报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'MaterialInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'材料报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'MaterialInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案数量', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'ConstructSolutionNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案项目审批数量', 'SCHEMA', 'dbo', 'TABLE',
'CQMSData_CQMS', 'COLUMN', 'ConstructSolutionProjectApproveNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案企业审批数量', 'SCHEMA', 'dbo', 'TABLE',
'CQMSData_CQMS', 'COLUMN', 'ConstructSolutionUnitApproveNum'
go
exec sp_addextendedproperty 'MS_Description', N'特种设备质保体系', 'SCHEMA', 'dbo', 'TABLE',
'CQMSData_CQMS', 'COLUMN', 'SpecialEquipmentQualityAssuranceSystemNum'
go
exec sp_addextendedproperty 'MS_Description', N'图纸会审/设计交底', 'SCHEMA', 'dbo', 'TABLE',
'CQMSData_CQMS', 'COLUMN', 'DesignDetailsNum'
go
exec sp_addextendedproperty 'MS_Description', N'分项工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'SubdivisionalWorksAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'分部工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'SubProjectAcceptOKNum'
go
exec sp_addextendedproperty 'MS_Description', N'分部工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'SubProjectAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'单位工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'UnitProjectAcceptOKNum'
go
exec sp_addextendedproperty 'MS_Description', N'单位工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'UnitProjectAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'分项工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'SubdivisionalWorksAcceptOKNum'
go

View File

@ -0,0 +1,95 @@
alter table dbo.Project_CQMSData_CQMS
add EquipmentInspectionNum int,
EquipmentInspectionQualifiedNum int,
MachineInspectionNum int,
MachineInspectionQualifiedNum int,
PersonInspectionNum int,
PersonInspectionQualifiedNum int,
MaterialInspectionNum int,
MaterialInspectionQualifiedNum int,
ConstructSolutionNum int,
ConstructSolutionProjectApproveNum int,
ConstructSolutionUnitApproveNum int,
SpecialEquipmentQualityAssuranceSystemNum int,
DesignDetailsNum int,
UnitProjectAcceptNum int,
UnitProjectAcceptOKNum int,
SubProjectAcceptNum int,
SubProjectAcceptOKNum int,
SubdivisionalWorksAcceptNum int,
SubdivisionalWorksAcceptOKNum int
go
exec sp_addextendedproperty 'MS_Description', N'设备报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'EquipmentInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'设备报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'EquipmentInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'机具报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'MachineInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'机具报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'MachineInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'人员报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'PersonInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'人员报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'PersonInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'材料报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'MaterialInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'材料报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'MaterialInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案数量', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'ConstructSolutionNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案项目审批数量', 'SCHEMA', 'dbo', 'TABLE',
'Project_CQMSData_CQMS', 'COLUMN', 'ConstructSolutionProjectApproveNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案企业审批数量', 'SCHEMA', 'dbo', 'TABLE',
'Project_CQMSData_CQMS', 'COLUMN', 'ConstructSolutionUnitApproveNum'
go
exec sp_addextendedproperty 'MS_Description', N'特种设备质保体系', 'SCHEMA', 'dbo', 'TABLE',
'Project_CQMSData_CQMS', 'COLUMN', 'SpecialEquipmentQualityAssuranceSystemNum'
go
exec sp_addextendedproperty 'MS_Description', N'图纸会审/设计交底', 'SCHEMA', 'dbo', 'TABLE',
'Project_CQMSData_CQMS', 'COLUMN', 'DesignDetailsNum'
go
exec sp_addextendedproperty 'MS_Description', N'分项工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'SubdivisionalWorksAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'分部工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'SubProjectAcceptOKNum'
go
exec sp_addextendedproperty 'MS_Description', N'分部工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'SubProjectAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'单位工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'UnitProjectAcceptOKNum'
go
exec sp_addextendedproperty 'MS_Description', N'单位工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'UnitProjectAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'分项工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'SubdivisionalWorksAcceptOKNum'
go

View File

@ -0,0 +1,4 @@
alter table Project_ProjectUnit add CQMS_OrganizationPic nvarchar(100)
GO
alter table Project_ProjectUnit add QRCodeAttachUrl nvarchar(200) null
GO

View File

@ -0,0 +1,313 @@
alter table Project_ProjectUnit add CQMS_OrganizationPic nvarchar(100)
GO
alter table Project_ProjectUnit add QRCodeAttachUrl nvarchar(200) null
GO
alter table dbo.HSSEData_HSSE add HseTechnicalNum int
go
alter table dbo.HSSEData_HSSE add ArgumentNum int
go
alter table dbo.HSSEData_HSSE add SuperArgumentNum int
go
alter table dbo.HSSEData_HSSE add ProjectDrillPersonNum int
go
alter table dbo.HSSEData_HSSE add CompanyDrillPersonNum int
go
exec sp_addextendedproperty 'MS_Description', N'安全技术交底数', 'SCHEMA', 'dbo', 'TABLE', 'HSSEData_HSSE',
'COLUMN', 'HseTechnicalNum'
go
exec sp_addextendedproperty 'MS_Description', N'危大工程论证个数', 'SCHEMA', 'dbo', 'TABLE', 'HSSEData_HSSE',
'COLUMN', 'ArgumentNum'
go
exec sp_addextendedproperty 'MS_Description', N'超危大工程论证个数', 'SCHEMA', 'dbo', 'TABLE', 'HSSEData_HSSE',
'COLUMN', 'SuperArgumentNum'
go
exec sp_addextendedproperty 'MS_Description', N'项目级参演人数', 'SCHEMA', 'dbo', 'TABLE', 'HSSEData_HSSE',
'COLUMN', 'ProjectDrillPersonNum'
go
exec sp_addextendedproperty 'MS_Description', N'公司级级参演人数', 'SCHEMA', 'dbo', 'TABLE', 'HSSEData_HSSE',
'COLUMN', 'CompanyDrillPersonNum'
go
alter table dbo.Project_HSSEData_HSSE add HseTechnicalNum int
go
alter table dbo.Project_HSSEData_HSSE add ArgumentNum int
go
alter table dbo.Project_HSSEData_HSSE add SuperArgumentNum int
go
alter table dbo.Project_HSSEData_HSSE add ProjectDrillPersonNum int
go
alter table dbo.Project_HSSEData_HSSE add CompanyDrillPersonNum int
go
exec sp_addextendedproperty 'MS_Description', N'安全技术交底数', 'SCHEMA', 'dbo', 'TABLE', 'Project_HSSEData_HSSE',
'COLUMN', 'HseTechnicalNum'
go
exec sp_addextendedproperty 'MS_Description', N'危大工程论证个数', 'SCHEMA', 'dbo', 'TABLE', 'Project_HSSEData_HSSE',
'COLUMN', 'ArgumentNum'
go
exec sp_addextendedproperty 'MS_Description', N'超危大工程论证个数', 'SCHEMA', 'dbo', 'TABLE', 'Project_HSSEData_HSSE',
'COLUMN', 'SuperArgumentNum'
go
exec sp_addextendedproperty 'MS_Description', N'项目级参演人数', 'SCHEMA', 'dbo', 'TABLE', 'Project_HSSEData_HSSE',
'COLUMN', 'ProjectDrillPersonNum'
go
exec sp_addextendedproperty 'MS_Description', N'公司级级参演人数', 'SCHEMA', 'dbo', 'TABLE', 'Project_HSSEData_HSSE',
'COLUMN', 'CompanyDrillPersonNum'
go
alter table dbo.CQMSData_CQMS
add EquipmentInspectionNum int,
EquipmentInspectionQualifiedNum int,
MachineInspectionNum int,
MachineInspectionQualifiedNum int,
PersonInspectionNum int,
PersonInspectionQualifiedNum int,
MaterialInspectionNum int,
MaterialInspectionQualifiedNum int,
ConstructSolutionNum int,
ConstructSolutionProjectApproveNum int,
ConstructSolutionUnitApproveNum int,
SpecialEquipmentQualityAssuranceSystemNum int,
DesignDetailsNum int,
UnitProjectAcceptNum int,
UnitProjectAcceptOKNum int,
SubProjectAcceptNum int,
SubProjectAcceptOKNum int,
SubdivisionalWorksAcceptNum int,
SubdivisionalWorksAcceptOKNum int
go
exec sp_addextendedproperty 'MS_Description', N'设备报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'EquipmentInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'设备报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'EquipmentInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'机具报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'MachineInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'机具报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'MachineInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'人员报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'PersonInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'人员报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'PersonInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'材料报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'MaterialInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'材料报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'MaterialInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案数量', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'ConstructSolutionNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案项目审批数量', 'SCHEMA', 'dbo', 'TABLE',
'CQMSData_CQMS', 'COLUMN', 'ConstructSolutionProjectApproveNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案企业审批数量', 'SCHEMA', 'dbo', 'TABLE',
'CQMSData_CQMS', 'COLUMN', 'ConstructSolutionUnitApproveNum'
go
exec sp_addextendedproperty 'MS_Description', N'特种设备质保体系', 'SCHEMA', 'dbo', 'TABLE',
'CQMSData_CQMS', 'COLUMN', 'SpecialEquipmentQualityAssuranceSystemNum'
go
exec sp_addextendedproperty 'MS_Description', N'图纸会审/设计交底', 'SCHEMA', 'dbo', 'TABLE',
'CQMSData_CQMS', 'COLUMN', 'DesignDetailsNum'
go
exec sp_addextendedproperty 'MS_Description', N'分项工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'SubdivisionalWorksAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'分部工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'SubProjectAcceptOKNum'
go
exec sp_addextendedproperty 'MS_Description', N'分部工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'SubProjectAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'单位工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'UnitProjectAcceptOKNum'
go
exec sp_addextendedproperty 'MS_Description', N'单位工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'UnitProjectAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'分项工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'CQMSData_CQMS',
'COLUMN', 'SubdivisionalWorksAcceptOKNum'
go
alter table dbo.Project_CQMSData_CQMS
add EquipmentInspectionNum int,
EquipmentInspectionQualifiedNum int,
MachineInspectionNum int,
MachineInspectionQualifiedNum int,
PersonInspectionNum int,
PersonInspectionQualifiedNum int,
MaterialInspectionNum int,
MaterialInspectionQualifiedNum int,
ConstructSolutionNum int,
ConstructSolutionProjectApproveNum int,
ConstructSolutionUnitApproveNum int,
SpecialEquipmentQualityAssuranceSystemNum int,
DesignDetailsNum int,
UnitProjectAcceptNum int,
UnitProjectAcceptOKNum int,
SubProjectAcceptNum int,
SubProjectAcceptOKNum int,
SubdivisionalWorksAcceptNum int,
SubdivisionalWorksAcceptOKNum int
go
exec sp_addextendedproperty 'MS_Description', N'设备报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'EquipmentInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'设备报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'EquipmentInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'机具报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'MachineInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'机具报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'MachineInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'人员报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'PersonInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'人员报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'PersonInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'材料报验-报检数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'MaterialInspectionNum'
go
exec sp_addextendedproperty 'MS_Description', N'材料报验-报检合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'MaterialInspectionQualifiedNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案数量', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'ConstructSolutionNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案项目审批数量', 'SCHEMA', 'dbo', 'TABLE',
'Project_CQMSData_CQMS', 'COLUMN', 'ConstructSolutionProjectApproveNum'
go
exec sp_addextendedproperty 'MS_Description', N'施工方案企业审批数量', 'SCHEMA', 'dbo', 'TABLE',
'Project_CQMSData_CQMS', 'COLUMN', 'ConstructSolutionUnitApproveNum'
go
exec sp_addextendedproperty 'MS_Description', N'特种设备质保体系', 'SCHEMA', 'dbo', 'TABLE',
'Project_CQMSData_CQMS', 'COLUMN', 'SpecialEquipmentQualityAssuranceSystemNum'
go
exec sp_addextendedproperty 'MS_Description', N'图纸会审/设计交底', 'SCHEMA', 'dbo', 'TABLE',
'Project_CQMSData_CQMS', 'COLUMN', 'DesignDetailsNum'
go
exec sp_addextendedproperty 'MS_Description', N'分项工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'SubdivisionalWorksAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'分部工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'SubProjectAcceptOKNum'
go
exec sp_addextendedproperty 'MS_Description', N'分部工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'SubProjectAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'单位工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'UnitProjectAcceptOKNum'
go
exec sp_addextendedproperty 'MS_Description', N'单位工程验收数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'UnitProjectAcceptNum'
go
exec sp_addextendedproperty 'MS_Description', N'分项工程合格数', 'SCHEMA', 'dbo', 'TABLE', 'Project_CQMSData_CQMS',
'COLUMN', 'SubdivisionalWorksAcceptOKNum'
go
ALTER VIEW [dbo].[View_DCGL_CheckRectifyListFromSUB]
AS
/*子公司隐患整改单集团视图*/
SELECT CheckRectifyItem.CheckRectifyItemId
,CheckRectifyItem.CheckRectifyId
,CheckRectifyItem.NoticeItemId
,CheckRectifyItem.ConfirmMan
,CheckRectifyItem.ConfirmManName
,CheckRectifyItem.ConfirmDate
,CheckRectifyItem.OrderEndDate
,CheckRectifyItem.OrderEndPerson
,CheckRectifyItem.RealEndDate
,CheckRectifyItem.Verification
,CheckRectify.CheckRectifyCode
,CheckRectify.ProjectId
,CheckRectify.UnitId
,CheckRectify.CheckDate
,CheckRectify.IssueMan
,CheckRectify.IssueDate
,CheckRectify.HandleState
,NoticeItem.ProblemTypes AS ProblemTypes
,NoticeItem.SortIndex AS SortIndex
,NoticeItem.Situation AS Situation
,'' AS WorkType
,'' AS DangerPoint
,'隐患(问题)描述:'+NoticeItem.Describe+';依据标准:'+NoticeItem.Standards+';建议:'+NoticeItem.Advice AS RiskExists
,'' AS IsProject
,'' AS CheckMan
,'' AS SubjectUnitMan
--,Table5Item.SortIndex
--,Table5Item.WorkType
--,Table5Item.DangerPoint
--,Table5Item.RiskExists
--,Table5Item.IsProject
--,Table5Item.CheckMan
--,Table5Item.SubjectUnitMan
,AttachFile.AttachFileId
,AttachFile.ToKeyId
,AttachFile.AttachSource
,AttachFile.AttachUrl
,AttachFile2.AttachFileId AS AttachFileId2
,AttachFile2.ToKeyId AS ToKeyId2
,AttachFile2.AttachSource AS AttachSource2
,AttachFile2.AttachUrl AS AttachUrl2
FROM dbo.DCGL_Check_CheckRectifyItem AS CheckRectifyItem
LEFT JOIN dbo.DCGL_Check_CheckRectify AS CheckRectify ON CheckRectifyItem.CheckRectifyid=CheckRectify.CheckRectifyId
--LEFT JOIN dbo.Check_CheckInfo_Table5Item as Table5Item on CheckRectifyItem.Table5ItemId=Table5Item.ID
LEFT JOIN DCGL_Check_CheckInfo_TableNoticeItem AS NoticeItem ON CheckRectifyItem.NoticeItemId=NoticeItem.ID
LEFT JOIN dbo.AttachFile AS AttachFile on AttachFile.ToKeyId =CheckRectifyItem.NoticeItemId
LEFT JOIN dbo.AttachFile AS AttachFile2 on AttachFile2.ToKeyId =CheckRectifyItem.CheckRectifyItemId
GO

View File

@ -0,0 +1,19 @@
--PersonId非空限制
ALTER TABLE QualityAudit_PersonQuality ALTER COLUMN PersonId NVARCHAR(50) NULL;
--
IF NOT EXISTS (SELECT * FROM RealName_BasicData WHERE BasicDataId = '7658D84F-500E-465B-B31D-086651EEEA65')
BEGIN
INSERT INTO dbo.RealName_BasicData(BasicDataId,dictTypeCode,dictCode,dictName)
VALUES('17B37E8F-E3C0-48A2-8EBB-0974B71148A2','LAB_WORK_TYPE','WORK_TYPE_GSDSZ','公司董事长')
INSERT INTO dbo.RealName_BasicData(BasicDataId,dictTypeCode,dictCode,dictName)
VALUES('7658D84F-500E-465B-B31D-086651EEEA65','LAB_WORK_TYPE','WORK_TYPE_GSZJL','公司总经理')
INSERT INTO dbo.RealName_BasicData(BasicDataId,dictTypeCode,dictCode,dictName)
VALUES('21D6A1D5-D304-4F4E-AA57-7ACB167F6208','LAB_WORK_TYPE','WORK_TYPE_GSFZJL','公司副总经理')
END

View File

@ -0,0 +1,104 @@
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,
Post.IsCQMS,
(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,
Person.IsBlacklist
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 AND Country.CountryId=City.countryId
Left JOIN Base_CNProfessional AS CNProfessional ON CNProfessional.CNProfessionalId = Person.MainCNProfessionalId
GO

View File

@ -12,8 +12,6 @@ namespace BLL
/// </summary>
public static class EnvironmentalCheckService
{
public static Model.SGGLDB db = Funs.DB;
#region
/// <summary>
@ -22,6 +20,7 @@ namespace BLL
/// <returns></returns>
public static ReturnData PushEnvironmentalCheckData()
{
var db = Funs.DB;
var items = (from x in db.EnvironmentalCheck where x.IsPushed == false select x).ToList();
Model.ReturnData responeData = new Model.ReturnData();
if (items.Count() > 0)

View File

@ -22,6 +22,15 @@ namespace BLL
return Funs.DB.QualityAudit_PersonQuality.FirstOrDefault(e => e.PersonId == personId);
}
public static List<Model.QualityAudit_PersonQuality> GetListPersonQualityByPersonId(string personId)
{
return Funs.DB.QualityAudit_PersonQuality.Where(e => e.PersonId == personId).ToList();
}
public static List<Model.QualityAudit_PersonQuality> GetListPersonQualityByUserId(string userId)
{
return Funs.DB.QualityAudit_PersonQuality.Where(e => e.UserId == userId).ToList();
}
/// <summary>
/// 获取时间段的特岗资质集合
/// </summary>
@ -85,6 +94,7 @@ namespace BLL
CompileDate = personQuality.CompileDate,
AuditDate = personQuality.AuditDate,
AuditorId = personQuality.AuditorId,
UserId = personQuality.UserId
};
db.QualityAudit_PersonQuality.InsertOnSubmit(newPersonQuality);
db.SubmitChanges();
@ -133,5 +143,22 @@ namespace BLL
db.SubmitChanges();
}
}
/// <summary>
/// 根据userId删除特殊岗位人员资质
/// </summary>
/// <param name="userId"></param>
public static void DeleteUserQuality(string userId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var personQuality = db.QualityAudit_PersonQuality.Where(e => e.UserId == userId).ToList();
foreach (var item in personQuality)
{
db.QualityAudit_PersonQuality.DeleteOnSubmit(item);
db.SubmitChanges();
}
}
}
}
}

View File

@ -122,7 +122,7 @@ namespace BLL
/// <param name="PageSize">每页数量</param>
/// <returns></returns>
public static IEnumerable getListData(string projectId, string unitId, string personName, string identityCard, string treamGroupId, string workPostIds,
bool ckTrain, string postType, bool ckJT, bool ckIdCardInfoNotOK, bool chManager, Grid Grid1,bool isBlack=false)
bool ckTrain, string postType, bool ckJT, bool ckIdCardInfoNotOK, bool chManager, bool isHsse, bool isCQMS, Grid Grid1,bool isBlack=false)
{
IQueryable<Model.View_SitePerson_Person> getPersonList = getPersonLists.Where(x => x.ProjectId == projectId);
if (!string.IsNullOrEmpty(unitId))
@ -184,6 +184,14 @@ namespace BLL
{
getPersonList = getPersonList.Where(x => x.PostType == Const.PostType_1);
}
if (isHsse == true)
{
getPersonList = getPersonList.Where(x => x.IsHsse == true);
}
if (isCQMS == true)
{
getPersonList = getPersonList.Where(x => x.IsCQMS == true);
}
if (ckIdCardInfoNotOK)
{
getPersonList = getPersonList.Where(x => x.IdentityCard == null || x.HeadImage == null || (x.IdentityCard.Length != 15 && x.IdentityCard.Length != 18));

File diff suppressed because it is too large Load Diff

View File

@ -5,14 +5,14 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using System.Net.PeerToPeer;
using System.Threading.Tasks;
namespace BLL
{
public static class HJGLData_HJGLService
{
public static SGGLDB db = Funs.DB;
public static List<string> BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList();
#region
@ -49,22 +49,22 @@ namespace BLL
if (count == 0) return null;
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
x.Id,
x.UnitId,
x.CollCropCode,
x.UnitName,
x.ReportDate,
x.WelderNum,
x.TotalDineNum,
x.CompleteDineNum,
x.TotalFilmNum,
x.OKFilmNum,
x.State,
x.CreateDate,
x.CreateMan
};
select new
{
x.Id,
x.UnitId,
x.CollCropCode,
x.UnitName,
x.ReportDate,
x.WelderNum,
x.TotalDineNum,
x.CompleteDineNum,
x.TotalFilmNum,
x.OKFilmNum,
x.State,
x.CreateDate,
x.CreateMan
};
}
#endregion
@ -91,8 +91,8 @@ namespace BLL
};
db.HJGLData_HJGL.InsertOnSubmit(table);
db.SubmitChanges();
}
}
}
public static void DeleteHJGLData_HJGLById(string Id)
@ -106,7 +106,7 @@ namespace BLL
db.SubmitChanges();
}
}
}
public static HJGLData_HJGL GetHJGLData_HJGLById(string Id)
@ -155,82 +155,27 @@ namespace BLL
return data;
}
public static HJGLData GetTodayHJGLData_HJGL()
{
var data = new HJGLData();
if (CommonService.GetIsThisUnit().CollCropCode== "91410200170644116B")
{
return GetELECLTodayHJGLData_HJGL();
}
if (CommonService.GetIsThisUnit().CollCropCode == "914200001775697881")
{
return GetCNCEC_16TodayHJGLData_HJGL();
}
var q = GetTodayData();
if (q != null && q.State == Const.CNCEC_State_S)
data = StatisticalData();
else
data = StatisticalData();
return data;
}
/// <summary>
/// 获取十一化建焊接数据
/// </summary>
/// <returns></returns>
public static HJGLData GetELECLTodayHJGLData_HJGL()
public static async Task<HJGLData> GetTodayHJGLData_HJGLAsync()
{
var data = new HJGLData();
string baseurl = "http://36.99.162.230:9493/sgglapi/api/CNCECServer/PostGetHJGLData";
string token = Const.sysglyId;
string response = Funs.RequestPost(baseurl, token, "");
var json = JsonConvert.DeserializeObject(response) as JObject;
if (json != null && json["code"]?.ToString()=="1")
{
var str = json["data"]?.ToString();
if (str != null) data = JsonConvert.DeserializeObject<HJGLData>(str);
}
return data;
/* var q = GetTodayData();
if (q != null && q.State == Const.CNCEC_State_S)
data = StatisticalData();
else
data = StatisticalData();*/
}
/// <summary>
/// 获取十六化建焊接数据
/// </summary>
/// <returns></returns>
public static HJGLData GetCNCEC_16TodayHJGLData_HJGL()
{
var data = new HJGLData();
string baseurl = "https://aq.cncec16.com.cn/hjglWebApi/api/CNCECServer/PostGetHJGLData";
string token = Const.sysglyId;
string response = Funs.RequestPost(baseurl, token, "");
if (string.IsNullOrEmpty(response))
{
try
{
baseurl = "http://192.168.1.8/hjglwebapi/api/CNCECServer/PostGetHJGLData";
response = Funs.RequestPost(baseurl, token, "");
}
catch (Exception e)
{
APICommonService.SaveSysHttpLog("GetCNCEC_16TodayHJGLData_HJGL", baseurl, e.ToString());
}
}
var json = JsonConvert.DeserializeObject(response) as JObject;
if (json != null && json["code"]?.ToString() == "1")
{
var str = json["data"]?.ToString();
if (str != null) data = JsonConvert.DeserializeObject<HJGLData>(str);
}
APICommonService.SaveSysHttpLog("GetCNCEC_16TodayHJGLData_HJGL", baseurl, response);
var modelTask = StatisticalDataAsync();
var model = await modelTask;
data = model;
return data;
}
public static HJGLData_HJGL GetTodayData()
{
var q = (from x in Funs.DB.HJGLData_HJGL
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
select x).FirstOrDefault();
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
select x).FirstOrDefault();
return q;
}
public static HJGLData_HJGL GetSubUnitHjglDataByDate(string Unitid, DateTime? reportdate)
@ -244,7 +189,7 @@ namespace BLL
var baseUnit = UnitService.GetUnitByUnitId(Unitid);
var ProjectData = (from x in Funs.DB.Project_HJGLData_HJGL
where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId)
select x).ToList();
select x).ToList();
result = new HJGLData_HJGL
{
UnitId = Unitid,
@ -259,7 +204,7 @@ namespace BLL
CreateMan = Const.sysglyId,
CreateDate = DateTime.Now
};
return result;
return result;
}
public static void UpdateTodyData_State()
{
@ -275,8 +220,8 @@ namespace BLL
{
var result = false;
var q = (from x in Funs.DB.HJGLData_HJGL
where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date
select x).ToList();
where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date
select x).ToList();
if (q != null && q.Count > 0) result = true;
return result;
}
@ -289,8 +234,8 @@ namespace BLL
{
var result = false;
var q = (from x in Funs.DB.HJGLData_HJGL
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
select x).ToList();
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
select x).ToList();
if (q.Count > 0) result = true;
return result;
}
@ -304,18 +249,31 @@ namespace BLL
return responeData;
}
public static HJGLData StatisticalData()
public static async Task<HJGLData> StatisticalDataAsync()
{
var data = new HJGLData();
var thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit();
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
var ProjectData = (from x in Funs.DB.Project_HJGLData_HJGL
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
select x).ToList();
Project_HJGLData_HJGLService.StatisticalAllProjectData();
Project_HJGLData_DefectService.StatisticalAllProjectData();
// 并行执行异步方法
var welderNumTask = HJGLData_HJGLService.GetWelderNumAsync(); //获取焊工总数
var dineInfoListTask = HJGLData_HJGLService.GetDineInfoAsync(); //获达因数信息
var chCheckItemListTask = HJGLData_HJGLService.GetCHCheckItemAsync(); //获取焊接检查信息
// 等待所有异步方法执行完成
await Task.WhenAll(
welderNumTask,
dineInfoListTask,
chCheckItemListTask
);
// 统一获取异步方法的返回值
var welderNum = await welderNumTask;
var dineInfoList = await dineInfoListTask;
var chCheckItemList = await chCheckItemListTask;
var table = new HJGLData_HJGL
{
@ -323,14 +281,69 @@ namespace BLL
CollCropCode = baseUnit.CollCropCode,
UnitName = baseUnit.UnitName,
ReportDate = DateTime.Now.Date,
WelderNum = ProjectData.Sum(x => x.WelderNum),
TotalDineNum = ProjectData.Sum(x => x.TotalDineNum),
CompleteDineNum = ProjectData.Sum(x => x.CompleteDineNum),
TotalFilmNum = ProjectData.Sum(x => x.TotalFilmNum),
OKFilmNum = ProjectData.Sum(x => x.OKFilmNum),
WelderNum = welderNum.Count(),
TotalDineNum = Convert.ToInt32(dineInfoList.Sum(x => x.Size)),
CompleteDineNum = Convert.ToInt32(dineInfoList.Sum(x => x.DoneDin)),
TotalFilmNum = Convert.ToInt32(chCheckItemList.Sum(x => x.CHT_TotalFilm)),
OKFilmNum = Convert.ToInt32(chCheckItemList.Sum(x => x.CHT_PassFilm)),
CreateMan = Const.sysglyId,
CreateDate = DateTime.Now
};
Project_HJGLData_HJGLService.DeleteProject_HJGLData_HJGLByDate(DateTime.Now.Date);
// 预先对 dineInfoList 和 chCheckItemList 按 ProjectId 进行分组
var dineInfoDict = dineInfoList
.Where(x => BeUnderConstructionList.Contains(x.ProjectId))
.GroupBy(x => x.ProjectId)
.ToDictionary(g => g.Key, g => new
{
TotalDineNum = g.Sum(x => x.Size),
CompleteDineNum = g.Sum(x => x.DoneDin)
});
var chCheckItemDict = chCheckItemList
.Where(x => BeUnderConstructionList.Contains(x.ProjectId))
.GroupBy(x => x.ProjectId)
.ToDictionary(g => g.Key, g => new
{
TotalFilmNum = g.Sum(x => x.CHT_TotalFilm),
OKFilmNum = g.Sum(x => x.CHT_PassFilm)
});
foreach (var projectid in BeUnderConstructionList)
{
// 获取焊工数量
int welderCount = welderNum.Count(x => x.ProjectId == projectid);
// 获取达因信息
var dineInfo = dineInfoDict.TryGetValue(projectid, out var dineData)
? dineData
: new { TotalDineNum = (double?)0, CompleteDineNum = (double?)0 };
// 获取拍片信息
var chCheckItem = chCheckItemDict.TryGetValue(projectid, out var checkData)
? checkData
: new { TotalFilmNum = (int?)0, OKFilmNum = (int?)0 };
var projectCqmsData = new Project_HJGLData_HJGL()
{
Id = SQLHelper.GetNewID(),
ProjectId = projectid,
UnitId = thisUnitId,
CollCropCode = baseUnit.CollCropCode,
UnitName = baseUnit.UnitName,
ReportDate = DateTime.Now.Date,
WelderNum = welderCount,
TotalDineNum = Convert.ToInt32(dineInfo.TotalDineNum),
CompleteDineNum = Convert.ToInt32(dineInfo.CompleteDineNum),
TotalFilmNum = chCheckItem.TotalFilmNum,
OKFilmNum = chCheckItem.OKFilmNum,
};
Project_HJGLData_HJGLService.AddProject_HJGLData_HJGL(projectCqmsData);
}
if (IsReportByToday())
{
table.Id = GetTodayData().Id;
@ -364,7 +377,7 @@ namespace BLL
}
public static void UpdateHJGLData_HJGL(HJGLData_HJGL newtable)
{
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var table = db.HJGLData_HJGL.FirstOrDefault(x => x.Id == newtable.Id);
@ -385,8 +398,86 @@ namespace BLL
table.CreateDate = newtable.CreateDate;
db.SubmitChanges();
}
}
}
}
/// <summary>
/// 获取焊工总数
/// </summary>
/// <returns></returns>
public static List<WelderOutput> GetWelderNum()
{
var result = (from x in Funs.DB.BS_Welder
where BeUnderConstructionList.Contains(x.ProjectId) && x.WED_IfOnGuard == true
select new Model.WelderOutput()
{
ProjectId = x.ProjectId,
UnitId = x.WED_Unit,
WEDCode = x.WED_Code,
WEDName = x.WED_Name
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
}).ToList();
return result;
}
/// <summary>
/// 获取焊工总数(异步)
/// </summary>
/// <returns></returns>
public static async Task<List<WelderOutput>> GetWelderNumAsync()
{
return await Task.Run(GetWelderNum);
}
/// <summary>
/// 获取总达因数和完成达因数
/// </summary>
/// <returns></returns>
public static IEnumerable<WeldDineOutput> GetDineInfo()
{
var result = (from x in Funs.DB.HJGL_FL_TotalQuantity
where BeUnderConstructionList.Contains(x.ProjectId)
group x by x.ProjectId into g
select new Model.WeldDineOutput()
{
ProjectId = g.Key,
Size = g.Sum(x => Convert.ToDouble(x.TotalWeldQuantity)),
DoneDin = g.Sum(x => Convert.ToDouble(x.TotalCompleted))
});
return result;
}
public static async Task<IEnumerable<WeldDineOutput>> GetDineInfoAsync()
{
return await Task.Run(GetDineInfo);
}
/// <summary>
/// 获取焊接检查信息
/// </summary>
/// <returns></returns>
public static List<CHCheckItemOutput> GetCHCheckItem()
{
var result = (from x in Funs.DB.CH_CheckItem
join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
where BeUnderConstructionList.Contains(y.ProjectId)
select new Model.CHCheckItemOutput()
{
Id = x.CHT_CheckItemID,
ProjectId = y.ProjectId,
UnitId = y.UnitId,
CHT_TotalFilm = x.CHT_TotalFilm,
CHT_PassFilm = x.CHT_PassFilm
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
}).ToList();
return result;
}
/// <summary>
/// 获取焊接检查信息(异步)
/// </summary>
/// <returns></returns>
public static async Task<List<CHCheckItemOutput>> GetCHCheckItemAsync()
{
return await Task.Run(GetCHCheckItem);
}
}
}

View File

@ -9,7 +9,7 @@ using System.Web.UI.WebControls;
using Aspose.Words.Lists;
using FineUIPro;
using Model;
using Newtonsoft.Json;
using Newtonsoft.Json;
namespace BLL
{
@ -17,7 +17,7 @@ namespace BLL
{
public static SGGLDB Db = Funs.DB;
public static List<string> BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x=> (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList();
public static List<string> BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList();
public static void AddHSSEData_HSSE(HSSEData_HSSE newtable)
{
@ -40,6 +40,7 @@ namespace BLL
SafeTrainNum = newtable.SafeTrainNum,
SpecialTrainNum = newtable.SpecialTrainNum,
SpecialOperationTrainNum = newtable.SpecialOperationTrainNum,
HseTechnicalNum = newtable.HseTechnicalNum,
EnvironmentalTrainNum = newtable.EnvironmentalTrainNum,
TotalEnergyConsumption = newtable.TotalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption,
@ -75,10 +76,12 @@ namespace BLL
CompanySpecialPlanNum = newtable.CompanySpecialPlanNum,
CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan,
CompanyDrillNum = newtable.CompanyDrillNum,
CompanyDrillPersonNum = newtable.CompanyDrillPersonNum,
ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum,
ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum,
ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan,
ProjectDrillNum = newtable.ProjectDrillNum,
ProjectDrillPersonNum = newtable.ProjectDrillPersonNum,
CostExtract = newtable.CostExtract,
CostUse = newtable.CostUse,
UseEquipmentNum = newtable.UseEquipmentNum,
@ -97,10 +100,12 @@ namespace BLL
TrainPersonNum = newtable.TrainPersonNum,
ConstructionNum = newtable.ConstructionNum,
FinishedNum = newtable.FinishedNum,
ArgumentNum = newtable.ArgumentNum,
SuperCompletedNum = newtable.SuperCompletedNum,
SuperTrainPersonNum = newtable.SuperTrainPersonNum,
SuperConstructionNum = newtable.SuperConstructionNum,
SuperFinishedNum = newtable.SuperFinishedNum,
SuperArgumentNum = newtable.SuperArgumentNum,
State = newtable.State,
CreateDate = newtable.CreateDate,
CreateMan = newtable.CreateMan
@ -148,6 +153,7 @@ namespace BLL
item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum;
item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum;
item.CompanyDrillNum = dataHsse.CompanyDrillNum;
item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum;
item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum;
item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan;
item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum;
@ -158,6 +164,7 @@ namespace BLL
item.CostUse = dataHsse.CostUse;
item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum;
item.FinishedNum = dataHsse.FinishedNum;
item.ArgumentNum = dataHsse.ArgumentNum;
item.GeneralAccidentNum = dataHsse.GeneralAccidentNum;
item.GeneralClosedNum = dataHsse.GeneralClosedNum;
item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum;
@ -183,6 +190,7 @@ namespace BLL
item.NewWaterConsumption = dataHsse.NewWaterConsumption;
item.ProjectComprehensivePlanNum = dataHsse.ProjectComprehensivePlanNum;
item.ProjectDrillNum = dataHsse.ProjectDrillNum;
item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum;
item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum;
item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum;
item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum;
@ -203,6 +211,7 @@ namespace BLL
item.ShutdownNum = dataHsse.ShutdownNum;
item.SpecialEquipmentNum = dataHsse.SpecialEquipmentNum;
item.SpecialOperationTrainNum = dataHsse.SpecialOperationTrainNum;
item.HseTechnicalNum = dataHsse.HseTechnicalNum;
item.EnvironmentalTrainNum = dataHsse.EnvironmentalTrainNum;
item.SpecialSeriousAccidentNum = dataHsse.SpecialSeriousAccidentNum;
item.SpecialTrainNum = dataHsse.SpecialTrainNum;
@ -210,6 +219,7 @@ namespace BLL
item.SuperConstructionNum = dataHsse.SuperConstructionNum;
item.SuperFinishedNum = dataHsse.SuperFinishedNum;
item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum;
item.SuperArgumentNum = dataHsse.SuperArgumentNum;
item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption;
item.TotalWorkingHour = dataHsse.TotalWorkingHour;
item.TrainPersonNum = dataHsse.TrainPersonNum;
@ -253,6 +263,7 @@ namespace BLL
item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum;
item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum;
item.CompanyDrillNum = dataHsse.CompanyDrillNum;
item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum;
item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum;
item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan;
item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum;
@ -263,6 +274,7 @@ namespace BLL
item.CostUse = dataHsse.CostUse;
item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum;
item.FinishedNum = dataHsse.FinishedNum;
item.ArgumentNum = dataHsse.ArgumentNum;
item.GeneralAccidentNum = dataHsse.GeneralAccidentNum;
item.GeneralClosedNum = dataHsse.GeneralClosedNum;
item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum;
@ -288,6 +300,7 @@ namespace BLL
item.NewWaterConsumption = dataHsse.NewWaterConsumption;
item.ProjectComprehensivePlanNum = dataHsse.ProjectComprehensivePlanNum;
item.ProjectDrillNum = dataHsse.ProjectDrillNum;
item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum;
item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum;
item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum;
item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum;
@ -308,12 +321,14 @@ namespace BLL
item.ShutdownNum = dataHsse.ShutdownNum;
item.SpecialEquipmentNum = dataHsse.SpecialEquipmentNum;
item.SpecialOperationTrainNum = dataHsse.SpecialOperationTrainNum;
item.HseTechnicalNum = dataHsse.HseTechnicalNum;
item.EnvironmentalTrainNum = dataHsse.EnvironmentalTrainNum;
item.SpecialSeriousAccidentNum = dataHsse.SpecialSeriousAccidentNum;
item.SpecialTrainNum = dataHsse.SpecialTrainNum;
item.SuperCompletedNum = dataHsse.SuperCompletedNum;
item.SuperConstructionNum = dataHsse.SuperConstructionNum;
item.SuperFinishedNum = dataHsse.SuperFinishedNum;
item.SuperArgumentNum = dataHsse.SuperArgumentNum;
item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum;
item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption;
item.TotalWorkingHour = dataHsse.TotalWorkingHour;
@ -341,13 +356,13 @@ namespace BLL
}
public static async Task<HSSEData> GetTodayHSSEData_HSSE()
{
var modelTask= StatisticalDataAsync();
var model=await modelTask;
{
var modelTask = StatisticalDataAsync();
var model = await modelTask;
HSSEData data = model;
return data;
}
}
public static HSSEData_HSSE GetTodayData()
{
var q = (from x in Funs.DB.HSSEData_HSSE
@ -520,7 +535,7 @@ namespace BLL
TotalWorkingHour = GetTotalWorkingHour(),
LostWorkingHour = GetLostWorkingHour(),
SafeWorkingHour = GetSafeWorkingHour(),
SafeTrainNum = GetSafeTrain().Sum(x => x.TrainPersonNum),
SafeTrainNum = GetSafeTrain().Sum(x => x.TrainPersonNum) + GetBoShengSafeTrain().Sum(x => x.TrainPersonNum),
SpecialTrainNum = GetSpecialTrain().Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = GetSpecialOperationTrain().Sum(x => x.TrainPersonNum),
EnvironmentalTrainNum = 0,
@ -602,7 +617,7 @@ namespace BLL
var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel());
return data;
}
}
public static async Task<HSSEData> StatisticalDataAsync()
{
@ -631,8 +646,10 @@ namespace BLL
var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync();
var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync();
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var safeTrainBoShengTask = HSSEData_HSSEService.GetBoShengSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
var hseTechnicalTask = HSSEData_HSSEService.GetHseTechnicalAsync();
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
@ -688,9 +705,9 @@ namespace BLL
totalWorkingHourTask,
lostWorkingHourTask,
safeWorkingHourTask,
safeTrainTask,
safeTrainTask, safeTrainBoShengTask,
specialTrainTask,
specialOperationTrainTask,
specialOperationTrainTask, hseTechnicalTask,
headOfficeInspectorGeneralTask,
headOfficeFullTimeTask,
branchInspectorGeneralTask,
@ -749,8 +766,10 @@ namespace BLL
var lostWorkingHour = await lostWorkingHourTask;
var safeWorkingHour = await safeWorkingHourTask;
var safeTrainList = await safeTrainTask;
var safeTrainBoShengList = await safeTrainBoShengTask;
var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask;
var hseTechnicalList = await hseTechnicalTask;
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
var headOfficeFullTimeList = await headOfficeFullTimeTask;
var branchInspectorGeneralList = await branchInspectorGeneralTask;
@ -809,9 +828,10 @@ namespace BLL
TotalWorkingHour = totalWorkingHour,
LostWorkingHour = lostWorkingHour,
SafeWorkingHour = safeWorkingHour,
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum),
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum) + safeTrainBoShengList.Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum),
HseTechnicalNum = hseTechnicalList.Count(),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = totalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
@ -843,10 +863,12 @@ namespace BLL
CompanySpecialPlanNum = companySpecialPlanList.Count(),
CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(),
CompanyDrillNum = companyDrillList.Count(),
CompanyDrillPersonNum = companyDrillList.Sum(x => x.JointPersonNum),
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(),
ProjectSpecialPlanNum = projectSpecialPlanList.Count(),
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(),
ProjectDrillNum = projectDrillList.Count(),
ProjectDrillPersonNum = projectDrillList.Sum(x => x.JointPersonNum),
CostExtract = Convert.ToInt32(costExtract.Sum(x => x.SUMCost)),
CostUse = Convert.ToInt32(costUseList.Sum(x => x.SUMCost)),
UseEquipmentNum = useEquipmentList.Count(),
@ -865,16 +887,67 @@ namespace BLL
TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
ArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.ArgumentNum),
SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum)
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum),
SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum),
SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum)
};
#region
Project_HSSEData_HSSEService.DeleteProject_HSSEData_HSSEByDate(DateTime.Now.Date);
var generalHiddenRectificationOutputsDict = generalHiddenRectificationOutputsList
.GroupBy(x => x.ProjectId)
.ToDictionary(
g => g.Key,
g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) }
);
var majorHiddenRectificationOutputsDict = majorHiddenRectificationOutputsList
.GroupBy(x => x.ProjectId)
.ToDictionary(
g => g.Key,
g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) }
);
var securityRiskOutputList = securityRiskOutputListTask.Result;
var securityRiskOutputDict = securityRiskOutputList
.GroupBy(x => x.ProjectId)
.ToDictionary(
g => g.Key,
g => new
{
LowRiskNum = g.Sum(x => x.LowRiskNum),
GeneralRiskNum = g.Sum(x => x.GeneralRiskNum),
MediumRiskNum = g.Sum(x => x.MediumRiskNum),
HighRiskNum = g.Sum(x => x.HighRiskNum)
}
);
var largeEngineeringOutputList = largeEngineeringOutputsTask.Result;
var largeEngineeringOutputsDict = largeEngineeringOutputList
.GroupBy(x => x.ProjectId)
.ToDictionary(
g => g.Key,
g => new
{
CompletedNum = g.Sum(x => x.CompletedNum),
TrainPersonNum = g.Sum(x => x.TrainPersonNum),
ConstructionNum = g.Sum(x => x.ConstructionNum),
FinishedNum = g.Sum(x => x.FinishedNum),
ArgumentNum = g.Sum(x => x.ArgumentNum),
SuperCompletedNum = g.Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = g.Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = g.Sum(x => x.SuperConstructionNum),
SuperArgumentNum = g.Sum(x => x.SuperArgumentNum)
}
);
foreach (var projectid in BeUnderConstructionList)
{
generalHiddenRectificationOutputsDict.TryGetValue(projectid, out var generalHiddenRectificationOutputs);
majorHiddenRectificationOutputsDict.TryGetValue(projectid, out var majorHiddenRectificationOutputs);
securityRiskOutputDict.TryGetValue(projectid, out var securityRiskOutputs);
largeEngineeringOutputsDict.TryGetValue(projectid, out var largeEngineeringOutputs);
var projectHsseData = new Project_HSSEData_HSSE
{
Id = SQLHelper.GetNewID(),
@ -891,12 +964,13 @@ namespace BLL
SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
HseTechnicalNum = hseTechnicalList.Count(x => x.ProjectId == projectid),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = 0,
IncomeComprehensiveEnergyConsumption = 0,
NewWaterConsumption = 0,
HeadOfficeInspectorGeneralNum = 0,
HeadOfficeFullTimeNum =0,
HeadOfficeFullTimeNum = 0,
BranchInspectorGeneralNum = 0,
BranchFullTimeNum = 0,
SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => x.ProjectId == projectid),
@ -923,33 +997,37 @@ namespace BLL
SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => x.ProjectId == projectid),
CompanyComprehensivePlanNum = 0,
CompanySpecialPlanNum = 0,
CompanyOnSiteDisposalPlan =0,
CompanyOnSiteDisposalPlan = 0,
CompanyDrillNum = 0,
CompanyDrillPersonNum = 0,
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => x.ProjectId == projectid),
ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => x.ProjectId == projectid),
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => x.ProjectId == projectid),
ProjectDrillNum = projectDrillList.Count(x => x.ProjectId == projectid),
ProjectDrillPersonNum = projectDrillList.Where(x => x.ProjectId == projectid).Sum(x => x.JointPersonNum),
CostExtract = Convert.ToInt32(costExtract.Where(x => x.ProjectId == projectid).Sum(x => x.SUMCost)),
CostUse = Convert.ToInt32(costUseList.Where(x => x.ProjectId == projectid).Sum(x => x.SUMCost)),
UseEquipmentNum = useEquipmentList.Count(x => x.ProjectId == projectid),
SpecialEquipmentNum = specialEquipmentList.Count(x => x.ProjectId == projectid),
LicensesNum = licensesList.Count(x => x.ProjectId == projectid),
LicensesCloseNum = licensesCloseList.Count(x => x.ProjectId == projectid),
GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.RecNum),
GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.NoRecNum),
MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.RecNum),
MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.NoRecNum),
LowRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.LowRiskNum),
GeneralRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.GeneralRiskNum),
MediumRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.MediumRiskNum),
HighRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.HighRiskNum),
CompletedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.CompletedNum),
TrainPersonNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
ConstructionNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.ConstructionNum),
FinishedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.FinishedNum),
SuperCompletedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperConstructionNum)
GeneralClosedNum = generalHiddenRectificationOutputs?.ClosedNum ?? 0,
GeneralNotClosedNum = generalHiddenRectificationOutputs?.NotClosedNum ?? 0,
MajorClosedNum = majorHiddenRectificationOutputs?.ClosedNum ?? 0,
MajorNotClosedNum = majorHiddenRectificationOutputs?.NotClosedNum ?? 0,
LowRiskNum = securityRiskOutputs?.LowRiskNum ?? 0,
GeneralRiskNum = securityRiskOutputs?.GeneralRiskNum ?? 0,
MediumRiskNum = securityRiskOutputs?.MediumRiskNum ?? 0,
HighRiskNum = securityRiskOutputs?.HighRiskNum ?? 0,
CompletedNum = largeEngineeringOutputs?.CompletedNum ?? 0,
TrainPersonNum = largeEngineeringOutputs?.TrainPersonNum ?? 0,
ConstructionNum = largeEngineeringOutputs?.ConstructionNum ?? 0,
FinishedNum = largeEngineeringOutputs?.FinishedNum ?? 0,
ArgumentNum = largeEngineeringOutputs?.ArgumentNum ?? 0,
SuperCompletedNum = largeEngineeringOutputs?.SuperCompletedNum ?? 0,
SuperTrainPersonNum = largeEngineeringOutputs?.SuperTrainPersonNum ?? 0,
SuperConstructionNum = largeEngineeringOutputs?.SuperConstructionNum ?? 0,
SuperArgumentNum = largeEngineeringOutputs?.SuperArgumentNum ?? 0
};
Project_HSSEData_HSSEService.AddProject_HSSEData_HSSE(projectHsseData);
}
@ -1109,6 +1187,7 @@ namespace BLL
table.SafeTrainNum = newtable.SafeTrainNum;
table.SpecialTrainNum = newtable.SpecialTrainNum;
table.SpecialOperationTrainNum = newtable.SpecialOperationTrainNum;
table.HseTechnicalNum = newtable.HseTechnicalNum;
table.EnvironmentalTrainNum = newtable.EnvironmentalTrainNum;
table.TotalEnergyConsumption = newtable.TotalEnergyConsumption;
table.IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption;
@ -1144,10 +1223,12 @@ namespace BLL
table.CompanySpecialPlanNum = newtable.CompanySpecialPlanNum;
table.CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan;
table.CompanyDrillNum = newtable.CompanyDrillNum;
table.CompanyDrillPersonNum = newtable.CompanyDrillPersonNum;
table.ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum;
table.ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum;
table.ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan;
table.ProjectDrillNum = newtable.ProjectDrillNum;
table.ProjectDrillPersonNum = newtable.ProjectDrillPersonNum;
table.CostExtract = newtable.CostExtract;
table.CostUse = newtable.CostUse;
table.UseEquipmentNum = newtable.UseEquipmentNum;
@ -1166,10 +1247,12 @@ namespace BLL
table.TrainPersonNum = newtable.TrainPersonNum;
table.ConstructionNum = newtable.ConstructionNum;
table.FinishedNum = newtable.FinishedNum;
table.ArgumentNum = newtable.ArgumentNum;
table.SuperCompletedNum = newtable.SuperCompletedNum;
table.SuperTrainPersonNum = newtable.SuperTrainPersonNum;
table.SuperConstructionNum = newtable.SuperConstructionNum;
table.SuperFinishedNum = newtable.SuperFinishedNum;
table.SuperArgumentNum = newtable.SuperArgumentNum;
table.State = newtable.State;
table.CreateMan = newtable.CreateMan;
table.CreateDate = newtable.CreateDate;
@ -1217,10 +1300,10 @@ namespace BLL
/// </summary>
/// <returns></returns>
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetHeadOfficeInspectorGeneralAsync()
{
{
return await Task.Run(GetHeadOfficeInspectorGeneral);
}
/// <summary>
/// 获取企业总部专职人数
@ -1258,7 +1341,7 @@ namespace BLL
/// <returns></returns>
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetHeadOfficeFullTimeAsync()
{
return await Task.Run(GetHeadOfficeFullTime);
return await Task.Run(GetHeadOfficeFullTime);
}
/// <summary>
@ -1297,7 +1380,7 @@ namespace BLL
/// <returns></returns>
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetBranchFullTimeAsync()
{
return await Task.Run(GetBranchFullTime);
}
@ -1336,7 +1419,7 @@ namespace BLL
/// <returns></returns>
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetBranchInspectorGeneralAsync()
{
return await Task.Run(GetBranchInspectorGeneral);
}
/// <summary>
@ -1376,7 +1459,7 @@ namespace BLL
/// </summary>
/// <returns></returns>
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetProjectInspectorGeneralAsync()
{
{
return await Task.Run(GetProjectInspectorGeneral);
}
@ -1434,7 +1517,7 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join post in Funs.DB.Base_WorkPost on x.WorkPostId equals post.WorkPostId into postGroup
from post in postGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId)
where BeUnderConstructionList.Contains(p.ProjectId)
select new Model.OfSafetySupervisorsOutput
{
ProjectId = x.ProjectId,
@ -1460,7 +1543,7 @@ namespace BLL
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetProjectSafetyMonitorAsync()
{
return await Task.Run(GetProjectSafetyMonitor);
}
/// <summary>
@ -1525,7 +1608,7 @@ namespace BLL
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetSafetyInjectionEngineerAsync()
{
return await Task.Run(GetSafetyInjectionEngineer);
}
/// <summary>
@ -1585,7 +1668,7 @@ namespace BLL
/// 获取A证人员异步
/// </summary>
/// <returns></returns>
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetCertificateAAsync()
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetCertificateAAsync()
{
return await Task.Run(GetCertificateA);
}
@ -1650,7 +1733,7 @@ namespace BLL
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetCertificateBAsync()
{
return await Task.Run(GetCertificateB);
}
/// <summary>
@ -1711,7 +1794,7 @@ namespace BLL
/// 获取C证人员异步
/// </summary>
/// <returns></returns>
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetCertificateCAsync()
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetCertificateCAsync()
{
return await Task.Run(GetCertificateC);
}
@ -1722,29 +1805,29 @@ namespace BLL
/// 获取企业安委会会数据
/// </summary>
/// <returns></returns>
public static List<MeetingOutput> GetSafetyCommitteeMeeting()
public static List<MeetingOutput> GetSafetyCommitteeMeeting()
{
var result =
(from x in Funs.DB.Meeting_CompanySafetyMeeting
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
where x.CompileDate > Const.DtmarkTime
select new MeetingOutput()
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
UnitId = x.UnitId,
UnitName = u.UnitName,
Id = x.CompanySafetyMeetingId,
MeetingName = x.CompanySafetyMeetingName,
MeetingDate = x.CompanySafetyMeetingDate,
MeetingHours = x.MeetingHours,
HostMan = x.MeetingHostMan,
AttentPerson = x.AttentPerson,
AttentPersonNum = x.AttentPersonNum,
});
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
where x.CompileDate > Const.DtmarkTime
select new MeetingOutput()
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
UnitId = x.UnitId,
UnitName = u.UnitName,
Id = x.CompanySafetyMeetingId,
MeetingName = x.CompanySafetyMeetingName,
MeetingDate = x.CompanySafetyMeetingDate,
MeetingHours = x.MeetingHours,
HostMan = x.MeetingHostMan,
AttentPerson = x.AttentPerson,
AttentPersonNum = x.AttentPersonNum,
});
return result.ToList();
}
/// <summary>
@ -1775,7 +1858,7 @@ namespace BLL
public static List<MeetingOutput> GetEnterpriseTopicsMeeting()
{
var result =
(from x in Funs.DB.Meeting_CompanySpecialMeeting
(from x in Funs.DB.Meeting_CompanySpecialMeeting
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
where x.CompileDate > Const.DtmarkTime
@ -1798,7 +1881,7 @@ namespace BLL
/// 获取企业专题会议(异步)
/// </summary>
/// <returns></returns>
public static async Task<List<MeetingOutput>> GetEnterpriseTopicsMeetingAsync()
public static async Task<List<MeetingOutput>> GetEnterpriseTopicsMeetingAsync()
{
return await Task.Run(GetEnterpriseTopicsMeeting);
}
@ -1904,7 +1987,7 @@ namespace BLL
/// </summary>
/// <returns></returns>
public static async Task<List<MeetingOutput>> GetProjectSafetyLeadingGroupMeetingAsync()
{
{
return await Task.Run(GetProjectSafetyLeadingGroupMeeting);
}
/// <summary>
@ -2133,7 +2216,7 @@ namespace BLL
from p in pGroup.DefaultIfEmpty()
join u in Funs.DB.Base_Unit on x.ResponsibleUnit equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
join user in Funs.DB.Sys_User on x.CheckManId equals user.UserId into userGroup
join user in Funs.DB.Sys_User on x.CheckManId equals user.UserId into userGroup
from user in userGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && x.CheckTime > Const.DtmarkTime
select new Model.CheckOutput()
@ -2566,7 +2649,7 @@ namespace BLL
from projectType in projectTypeJoin.DefaultIfEmpty()
join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
from sysConst in sysConstJoin.DefaultIfEmpty()
where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false)
where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false)
select new ProjectOutput
{
ProjectId = project.ProjectId,
@ -2703,7 +2786,7 @@ namespace BLL
/// </summary>
/// <returns></returns>
public static async Task<int> GetLostWorkingHourAsync()
{
{
return await Task.Run(GetLostWorkingHour);
}
@ -2788,6 +2871,39 @@ namespace BLL
return await Task.Run(GetSafeTrain);
}
/// <summary>
/// 获取三级安全教育培训数——博晟培训
/// </summary>
/// <returns></returns>
public static List<EduTrainOutput> GetBoShengSafeTrain()
{
var result = (from x in Funs.DB.Bo_Sheng_Train
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && (x.TrainType == "入场(厂)培训" || x.TrainType == "入厂(场)级培训")
&& (x.DeleteTag == "False" || x.DeleteTag == null) && x.TrainStartDate > Const.DtmarkTime
select new Model.EduTrainOutput()
{
Id = x.ID,
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
UnitName = x.TrainDepart,
TrainTitle = x.RecordName,
TrainStartDate = x.TrainStartDate,
TrainEndDate = x.TrainEndDate,
TrainPersonNum = x.PersonCount ?? 0,
}).ToList();
return result;
}
/// <summary>
/// 获取三级安全教育培训数——博晟培训(异步)
/// </summary>
/// <returns></returns>
public static async Task<List<EduTrainOutput>> GetBoShengSafeTrainAsync()
{
return await Task.Run(GetBoShengSafeTrain);
}
/// <summary>
/// 获取专项培训数
/// </summary>
@ -2855,6 +2971,60 @@ namespace BLL
return await Task.Run(GetSpecialOperationTrain);
}
/// <summary>
/// 获取安全技术交底数
/// </summary>
/// <returns></returns>
public static int GetHseTechnicalNum()
{
var list = (from x in Funs.DB.License_HSETechnical
where BeUnderConstructionList.Contains(x.ProjectId)
select x).Distinct().ToList();
var result = list.ToList().Count();
return result;
}
/// <summary>
/// 获取安全技术交底数(异步)
/// </summary>
/// <returns></returns>
public static async Task<int> GetHseTechnicalNumAsync()
{
return await Task.Run(GetHseTechnicalNum);
}
/// <summary>
/// 获取安全技术交底
/// </summary>
/// <returns></returns>
public static List<LicenseHSETechnicalOutput> GetHseTechnical()
{
var result = (from x in Funs.DB.License_HSETechnical
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseHSETechnicalOutput()
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
UnitName = UnitService.getUnitNamesUnitIds(x.UnitId),
Id = x.HSETechnicalId,
HSETechnicalCode = x.HSETechnicalCode,
WorkContents = x.WorkContents
}).ToList();
return result;
}
/// <summary>
/// 获取安全技术交底(异步)
/// </summary>
/// <returns></returns>
public static async Task<List<LicenseHSETechnicalOutput>> GetHseTechnicalAsync()
{
return await Task.Run(GetHseTechnical);
}
#endregion
@ -3127,22 +3297,22 @@ namespace BLL
public static List<Model.CostSmallDetailOutput> GetCostExtract()
{
var query = from cost in Funs.DB.CostGoods_CostSmallDetail
join p in Funs.DB.Base_Project on cost.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join unit in Funs.DB.Base_Unit on cost.UnitId equals unit.UnitId into unitGroup
from unit in unitGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId)
select new CostSmallDetailOutput
{
Id = cost.CostSmallDetailId,
ProjectId = p.ProjectId,
ProjectCode = p.ProjectCode,
ProjectName = p.ProjectName,
UnitId = cost.UnitId,
UnitName = unit.UnitName,
Months = cost.Months,
SUMCost = cost.Extract//Math.Round(sumCost, 2)
};
join p in Funs.DB.Base_Project on cost.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join unit in Funs.DB.Base_Unit on cost.UnitId equals unit.UnitId into unitGroup
from unit in unitGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId)
select new CostSmallDetailOutput
{
Id = cost.CostSmallDetailId,
ProjectId = p.ProjectId,
ProjectCode = p.ProjectCode,
ProjectName = p.ProjectName,
UnitId = cost.UnitId,
UnitName = unit.UnitName,
Months = cost.Months,
SUMCost = cost.Extract//Math.Round(sumCost, 2)
};
return query.ToList();
}
public static async Task<List<Model.CostSmallDetailOutput>> GetCostExtractAsync()
@ -3304,7 +3474,7 @@ namespace BLL
return query.ToList();
}
public static async Task<List<Model.ConstructionEquipmentOutput>> GetSpecialEquipmentAsync()
{
{
return await Task.Run(GetSpecialEquipment);
}
@ -3342,7 +3512,7 @@ namespace BLL
}
public static async Task<List<LicenseOutput>> GetLicensesAsync()
{
return await Task.Run(GetLicenses);
}
@ -3399,17 +3569,17 @@ namespace BLL
ProjectId = gg.Key.ProjectId,
ProjectName = gg.Key.ProjectName,
ProjectCode = gg.Key.ProjectCode,
ProNum = gg.Count(y => y.States != "4" && y.States != "-1"),
RecNum = gg.Count(y => y.States == "3"),
NoRecNum = gg.Count(y => y.States != "3" && y.States != "-1"),
RecRate = gg.Count(y => y.States != "4" && y.States != "-1") == 0 ? "0" :
Math.Round(Convert.ToDecimal( gg.Count(y => y.States == "3") /
ProNum = gg.Count(y => y.States != "4" && y.States != "-1"),
RecNum = gg.Count(y => y.States == "3"),
NoRecNum = gg.Count(y => y.States != "3" && y.States != "-1"),
RecRate = gg.Count(y => y.States != "4" && y.States != "-1") == 0 ? "0" :
Math.Round(Convert.ToDecimal(gg.Count(y => y.States == "3") /
gg.Count(y => y.States != "4" && y.States != "-1") * 100), 2, MidpointRounding.AwayFromZero).ToString()
}).ToList();
foreach (var item in query)
{
item.RecRate = Math .Round(Convert.ToDecimal(item.RecRate),2) .ToString(); // 转换为字符串并格式化为两位小数
item.RecRate = Math.Round(Convert.ToDecimal(item.RecRate), 2).ToString(); // 转换为字符串并格式化为两位小数
}
return query;
}
@ -3434,12 +3604,12 @@ namespace BLL
ProjectId = gg.Key.ProjectId,
ProjectName = gg.Key.ProjectName,
ProjectCode = gg.Key.ProjectCode,
ProNum = gg.Count(y => y.States != "4" && y.States != "-1" ),
RecNum = gg.Count(y => y.States == "3" ),
NoRecNum = gg.Count(y => y.States != "3" && y.States != "-1" ),
RecRate = gg.Count(y => y.States != "4" && y.States != "-1" ) == 0 ? "0" :
Math.Round((decimal)gg.Count(y => y.States == "3" ) /
gg.Count(y => y.States != "4" && y.States != "-1" ) * 100, 2, MidpointRounding.AwayFromZero).ToString()
ProNum = gg.Count(y => y.States != "4" && y.States != "-1"),
RecNum = gg.Count(y => y.States == "3"),
NoRecNum = gg.Count(y => y.States != "3" && y.States != "-1"),
RecRate = gg.Count(y => y.States != "4" && y.States != "-1") == 0 ? "0" :
Math.Round((decimal)gg.Count(y => y.States == "3") /
gg.Count(y => y.States != "4" && y.States != "-1") * 100, 2, MidpointRounding.AwayFromZero).ToString()
}).ToList();
foreach (var item in query)
{
@ -3462,22 +3632,22 @@ namespace BLL
public static List<Model.SecurityRiskOutput> GetSecurityRiskOutputs()
{
var query = (from x in Funs.DB.Base_Project
join y in Funs.DB.Hazard_HazardSelectedItem on x.ProjectId equals y.ProjectId into yGroup
from y in yGroup.DefaultIfEmpty()
join z in Funs.DB.Base_RiskLevel on y.HazardLevel equals z.RiskLevelId into zGroup
from z in zGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(x.ProjectId) && (y.IsStart == true || y.State == "1")
group new { y, z } by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg
select new SecurityRiskOutput
{
ProjectId = gg.Key.ProjectId,
ProjectName = gg.Key.ProjectName,
ProjectCode = gg.Key.ProjectCode,
LowRiskNum = gg.Sum(g => (g.z.RiskLevel == 1 || g.y.HazardLevel == "1") ? 1 : 0),
GeneralRiskNum = gg.Sum(g => (g.z.RiskLevel == 2 || g.y.HazardLevel == "2") ? 1 : 0),
MediumRiskNum = gg.Sum(g => (g.z.RiskLevel == 3 || g.y.HazardLevel == "3") ? 1 : 0),
HighRiskNum = gg.Sum(g => g.z.RiskLevel == 4 ? 1 : 0),
}).ToList();
join y in Funs.DB.Hazard_HazardSelectedItem on x.ProjectId equals y.ProjectId into yGroup
from y in yGroup.DefaultIfEmpty()
join z in Funs.DB.Base_RiskLevel on y.HazardLevel equals z.RiskLevelId into zGroup
from z in zGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(x.ProjectId) && (y.IsStart == true || y.State == "1")
group new { y, z } by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg
select new SecurityRiskOutput
{
ProjectId = gg.Key.ProjectId,
ProjectName = gg.Key.ProjectName,
ProjectCode = gg.Key.ProjectCode,
LowRiskNum = gg.Sum(g => (g.z.RiskLevel == 1 || g.y.HazardLevel == "1") ? 1 : 0),
GeneralRiskNum = gg.Sum(g => (g.z.RiskLevel == 2 || g.y.HazardLevel == "2") ? 1 : 0),
MediumRiskNum = gg.Sum(g => (g.z.RiskLevel == 3 || g.y.HazardLevel == "3") ? 1 : 0),
HighRiskNum = gg.Sum(g => g.z.RiskLevel == 4 ? 1 : 0),
}).ToList();
return query;
}
public static async Task<List<Model.SecurityRiskOutput>> GetSecurityRiskOutputsAsync()
@ -3503,20 +3673,21 @@ namespace BLL
ProjectId = gg.Key.ProjectId,
ProjectName = gg.Key.ProjectName,
ProjectCode = gg.Key.ProjectCode,
CompletedNum = gg.Count(x => x.States == "1" && x.IsSuperLargerHazard == false ),
TrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == false ).Sum(x => x.TrainPersonNum) ?? 0,
ConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == false ),
CompletedNum = gg.Count(x => x.States == "1" && x.IsSuperLargerHazard == false),
TrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == false).Sum(x => x.TrainPersonNum) ?? 0,
ConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == false),
FinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == false),
ArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == false),
SuperCompletedNum = gg.Count(x => x.States == "1" && x.IsSuperLargerHazard == true),
SuperTrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == true).Sum(x => x.TrainPersonNum) ?? 0,
SuperConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == true),
SuperFinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == true),
SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true),
}).ToList();
return query;
}
public static async Task<List<Model.LargeEngineeringOutput>> GetLargeEngineeringOutputsAsync()
{
{
return await Task.Run(GetLargeEngineeringOutputs);
}
@ -3684,6 +3855,7 @@ namespace BLL
x.SafeTrainNum,
x.SpecialTrainNum,
x.SpecialOperationTrainNum,
x.HseTechnicalNum,
x.EnvironmentalTrainNum,
x.TotalEnergyConsumption,
x.IncomeComprehensiveEnergyConsumption,
@ -3719,10 +3891,12 @@ namespace BLL
x.CompanySpecialPlanNum,
x.CompanyOnSiteDisposalPlan,
x.CompanyDrillNum,
x.CompanyDrillPersonNum,
x.ProjectComprehensivePlanNum,
x.ProjectSpecialPlanNum,
x.ProjectOnSiteDisposalPlan,
x.ProjectDrillNum,
x.ProjectDrillPersonNum,
x.CostExtract,
x.CostUse,
x.UseEquipmentNum,
@ -3741,10 +3915,12 @@ namespace BLL
x.TrainPersonNum,
x.ConstructionNum,
x.FinishedNum,
x.ArgumentNum,
x.SuperCompletedNum,
x.SuperTrainPersonNum,
x.SuperConstructionNum,
x.SuperFinishedNum,
x.SuperArgumentNum,
x.State,
x.CreateDate,
x.CreateMan

View File

@ -4,320 +4,324 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BLL {
public class MainSevice
namespace BLL
{
/// <summary>
/// 在建项目集合
/// </summary>
private List<string> _beUnderConstructionList;
private HSSEData_HSSE _hsseData;
private string _unitId;
private int _unitType;
public MainSevice(string userid)
public class MainSevice
{
var userModel = UserService.GetUserByUserId(userid);
int unitType = CommonService.GetUnitTypeByUserId(userid);
var projectList = ProjectService.GetProjectWorkList().Select(x => new { x.ProjectId, x.UnitId }).ToList();
_unitId = userModel.UnitId;
_unitType = unitType;
if (unitType == 0)
{
_beUnderConstructionList = projectList.Select(x => x.ProjectId).ToList();
_unitId = CommonService.GetThisUnitId();
}
else if (unitType == 1)
{
_beUnderConstructionList = projectList.Where(x => x.UnitId == userModel.UnitId).Select(x => x.ProjectId).ToList();
}
else if (unitType == 2)
{
_beUnderConstructionList = new List<string>() { "0" };
}
}
public async Task<HSSEData_HSSE> GetHsseDataAsync()
{
/// <summary>
/// 在建项目集合
/// </summary>
private List<string> _beUnderConstructionList;
private HSSEData_HSSE _hsseData;
private string _unitId;
private int _unitType;
public MainSevice(string userid)
{
var userModel = UserService.GetUserByUserId(userid);
int unitType = CommonService.GetUnitTypeByUserId(userid);
var projectList = ProjectService.GetProjectWorkList().Select(x => new { x.ProjectId, x.UnitId }).ToList();
_unitId = userModel.UnitId;
_unitType = unitType;
if (unitType == 0)
{
_beUnderConstructionList = projectList.Select(x => x.ProjectId).ToList();
_unitId = CommonService.GetThisUnitId();
}
else if (unitType == 1)
{
_beUnderConstructionList = projectList.Where(x => x.UnitId == userModel.UnitId).Select(x => x.ProjectId).ToList();
}
else if (unitType == 2)
{
_beUnderConstructionList = new List<string>() { "0" };
}
}
public async Task<HSSEData_HSSE> GetHsseDataAsync()
{
try
{
// 并行执行异步方法
var totalEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
var incomeComprehensiveEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
var newWaterConsumptionTask = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
var securityRiskOutputListTask = HSSEData_HSSEService.GetSecurityRiskOutputsAsync()
.ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId)));
var largeEngineeringOutputsTask = HSSEData_HSSEService.GetLargeEngineeringOutputsAsync()
.ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId)));
var safetyInjectionEngineerTask = HSSEData_HSSEService.GetSafetyInjectionEngineerAsync();
var certificateATask = HSSEData_HSSEService.GetCertificateAAsync();
var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync();
var certificateCTask = HSSEData_HSSEService.GetCertificateCAsync();
var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync();
var shutdownTask = HSSEData_HSSEService.GetShutdownAsync();
var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync();
var majorProjectsUnderConstructionTask = HSSEData_HSSEService.GetMajorProjectsUnderConstructionAsync();
var totalWorkingHourTask = HSSEData_HSSEService.GetTotalWorkingHourAsync();
var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync();
var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync();
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
var branchFullTimeTask = HSSEData_HSSEService.GetBranchFullTimeAsync();
var projectInspectorGeneralTask = HSSEData_HSSEService.GetProjectInspectorGeneralAsync();
var projectFullTimeTask = HSSEData_HSSEService.GetProjectFullTimeAsync();
var projectSafetyMonitorTask = HSSEData_HSSEService.GetProjectSafetyMonitorAsync();
var safetyCommitteeMeetingTask = HSSEData_HSSEService.GetSafetyCommitteeMeetingAsync();
var enterpriseTopicsMeetingTask = HSSEData_HSSEService.GetEnterpriseTopicsMeetingAsync();
var projectSafetyLeadingGroupMeetingTask = HSSEData_HSSEService.GetProjectSafetyLeadingGroupMeetingAsync();
var projectSafetyMeetingTask = HSSEData_HSSEService.GetProjectSafetyMeetingAsync();
var companyLeadShiftCheckTask = HSSEData_HSSEService.GetCompanyLeadShiftCheckAsync();
var companyComprehensiveCheckTask = HSSEData_HSSEService.GetCompanyComprehensiveCheckAsync();
var companySpecialCheckTask = HSSEData_HSSEService.GetCompanySpecialCheckAsync();
var projectLeadShiftCheckTask = HSSEData_HSSEService.GetProjectLeadShiftCheckAsync();
var projectSpecialCheckTask = HSSEData_HSSEService.GetProjectSpecialCheckAsync();
var projectMajorCheckTask = HSSEData_HSSEService.GetProjectMajorCheckAsync();
var nearMissTask = HSSEData_HSSEService.GetNearMissAsync();
var recordableEventTask = HSSEData_HSSEService.GetRecordableEventAsync();
var generalAccidentTask = HSSEData_HSSEService.GetGeneralAccidentAsync();
var majorAccidentTask = HSSEData_HSSEService.GetMajorAccidentAsync();
var seriousAccidentTask = HSSEData_HSSEService.GetSeriousAccidentAsync();
var specialSeriousAccidentTask = HSSEData_HSSEService.GetSpecialSeriousAccidentAsync();
var companyComprehensivePlanTask = HSSEData_HSSEService.GetCompanyComprehensivePlanAsync();
var companySpecialPlanTask = HSSEData_HSSEService.GetCompanySpecialPlanAsync();
var companyOnSiteDisposalPlanTask = HSSEData_HSSEService.GetCompanyOnSiteDisposalPlanAsync();
var companyDrillTask = HSSEData_HSSEService.GetCompanyDrillAsync();
var projectComprehensivePlanTask = HSSEData_HSSEService.GetProjectComprehensivePlanAsync();
var projectSpecialPlanTask = HSSEData_HSSEService.GetProjectSpecialPlanAsync();
var projectOnSiteDisposalPlanTask = HSSEData_HSSEService.GetProjectOnSiteDisposalPlanAsync();
var projectDrillTask = HSSEData_HSSEService.GetProjectDrillAsync();
var costExtractTask = HSSEData_HSSEService.GetCostExtractAsync();
var costUseTask = HSSEData_HSSEService.GetCostUseAsync();
var useEquipmentTask = HSSEData_HSSEService.GetUseEquipmentAsync();
var specialEquipmentTask = HSSEData_HSSEService.GetSpecialEquipmentAsync();
var licensesTask = HSSEData_HSSEService.GetLicensesAsync();
var licensesCloseTask = HSSEData_HSSEService.GetLicensesCloseAsync();
var generalHiddenRectificationOutputsTask = HSSEData_HSSEService.GetGeneralHiddenRectificationOutputsAsync();
var majorHiddenRectificationOutputsTask = HSSEData_HSSEService.GetMajorHiddenRectificationOutputsAsync();
// 等待所有异步方法执行完成
await Task.WhenAll(
securityRiskOutputListTask,
largeEngineeringOutputsTask,
safetyInjectionEngineerTask,
certificateATask,
certificateBTask,
certificateCTask,
beUnderConstructionTask,
shutdownTask,
joinConstructionPersonTask,
majorProjectsUnderConstructionTask,
totalWorkingHourTask,
lostWorkingHourTask,
safeWorkingHourTask,
safeTrainTask,
specialTrainTask,
specialOperationTrainTask,
headOfficeInspectorGeneralTask,
headOfficeFullTimeTask,
branchInspectorGeneralTask,
branchFullTimeTask,
projectInspectorGeneralTask,
projectFullTimeTask,
projectSafetyMonitorTask,
safetyCommitteeMeetingTask,
enterpriseTopicsMeetingTask,
projectSafetyLeadingGroupMeetingTask,
projectSafetyMeetingTask,
companyLeadShiftCheckTask,
companyComprehensiveCheckTask,
companySpecialCheckTask,
projectLeadShiftCheckTask,
projectSpecialCheckTask,
projectMajorCheckTask,
nearMissTask,
recordableEventTask,
generalAccidentTask,
majorAccidentTask,
seriousAccidentTask,
specialSeriousAccidentTask,
companyComprehensivePlanTask,
companySpecialPlanTask,
companyOnSiteDisposalPlanTask,
companyDrillTask,
projectComprehensivePlanTask,
projectSpecialPlanTask,
projectOnSiteDisposalPlanTask,
projectDrillTask,
costExtractTask,
costUseTask,
useEquipmentTask,
specialEquipmentTask,
licensesTask,
licensesCloseTask,
generalHiddenRectificationOutputsTask,
majorHiddenRectificationOutputsTask
);
// 并行执行异步方法
var totalEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
var incomeComprehensiveEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
var newWaterConsumptionTask = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
var securityRiskOutputListTask = HSSEData_HSSEService.GetSecurityRiskOutputsAsync()
.ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId)));
var largeEngineeringOutputsTask = HSSEData_HSSEService.GetLargeEngineeringOutputsAsync()
.ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId)));
var safetyInjectionEngineerTask = HSSEData_HSSEService.GetSafetyInjectionEngineerAsync();
var certificateATask = HSSEData_HSSEService.GetCertificateAAsync();
var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync();
var certificateCTask = HSSEData_HSSEService.GetCertificateCAsync();
var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync();
var shutdownTask = HSSEData_HSSEService.GetShutdownAsync();
var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync();
var majorProjectsUnderConstructionTask = HSSEData_HSSEService.GetMajorProjectsUnderConstructionAsync();
var totalWorkingHourTask = HSSEData_HSSEService.GetTotalWorkingHourAsync();
var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync();
var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync();
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var safeTrainBoShengTask = HSSEData_HSSEService.GetBoShengSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
var branchFullTimeTask = HSSEData_HSSEService.GetBranchFullTimeAsync();
var projectInspectorGeneralTask = HSSEData_HSSEService.GetProjectInspectorGeneralAsync();
var projectFullTimeTask = HSSEData_HSSEService.GetProjectFullTimeAsync();
var projectSafetyMonitorTask = HSSEData_HSSEService.GetProjectSafetyMonitorAsync();
var safetyCommitteeMeetingTask = HSSEData_HSSEService.GetSafetyCommitteeMeetingAsync();
var enterpriseTopicsMeetingTask = HSSEData_HSSEService.GetEnterpriseTopicsMeetingAsync();
var projectSafetyLeadingGroupMeetingTask = HSSEData_HSSEService.GetProjectSafetyLeadingGroupMeetingAsync();
var projectSafetyMeetingTask = HSSEData_HSSEService.GetProjectSafetyMeetingAsync();
var companyLeadShiftCheckTask = HSSEData_HSSEService.GetCompanyLeadShiftCheckAsync();
var companyComprehensiveCheckTask = HSSEData_HSSEService.GetCompanyComprehensiveCheckAsync();
var companySpecialCheckTask = HSSEData_HSSEService.GetCompanySpecialCheckAsync();
var projectLeadShiftCheckTask = HSSEData_HSSEService.GetProjectLeadShiftCheckAsync();
var projectSpecialCheckTask = HSSEData_HSSEService.GetProjectSpecialCheckAsync();
var projectMajorCheckTask = HSSEData_HSSEService.GetProjectMajorCheckAsync();
var nearMissTask = HSSEData_HSSEService.GetNearMissAsync();
var recordableEventTask = HSSEData_HSSEService.GetRecordableEventAsync();
var generalAccidentTask = HSSEData_HSSEService.GetGeneralAccidentAsync();
var majorAccidentTask = HSSEData_HSSEService.GetMajorAccidentAsync();
var seriousAccidentTask = HSSEData_HSSEService.GetSeriousAccidentAsync();
var specialSeriousAccidentTask = HSSEData_HSSEService.GetSpecialSeriousAccidentAsync();
var companyComprehensivePlanTask = HSSEData_HSSEService.GetCompanyComprehensivePlanAsync();
var companySpecialPlanTask = HSSEData_HSSEService.GetCompanySpecialPlanAsync();
var companyOnSiteDisposalPlanTask = HSSEData_HSSEService.GetCompanyOnSiteDisposalPlanAsync();
var companyDrillTask = HSSEData_HSSEService.GetCompanyDrillAsync();
var projectComprehensivePlanTask = HSSEData_HSSEService.GetProjectComprehensivePlanAsync();
var projectSpecialPlanTask = HSSEData_HSSEService.GetProjectSpecialPlanAsync();
var projectOnSiteDisposalPlanTask = HSSEData_HSSEService.GetProjectOnSiteDisposalPlanAsync();
var projectDrillTask = HSSEData_HSSEService.GetProjectDrillAsync();
var costExtractTask = HSSEData_HSSEService.GetCostExtractAsync();
var costUseTask = HSSEData_HSSEService.GetCostUseAsync();
var useEquipmentTask = HSSEData_HSSEService.GetUseEquipmentAsync();
var specialEquipmentTask = HSSEData_HSSEService.GetSpecialEquipmentAsync();
var licensesTask = HSSEData_HSSEService.GetLicensesAsync();
var licensesCloseTask = HSSEData_HSSEService.GetLicensesCloseAsync();
var generalHiddenRectificationOutputsTask = HSSEData_HSSEService.GetGeneralHiddenRectificationOutputsAsync();
var majorHiddenRectificationOutputsTask = HSSEData_HSSEService.GetMajorHiddenRectificationOutputsAsync();
// 等待所有异步方法执行完成
await Task.WhenAll(
securityRiskOutputListTask,
largeEngineeringOutputsTask,
safetyInjectionEngineerTask,
certificateATask,
certificateBTask,
certificateCTask,
beUnderConstructionTask,
shutdownTask,
joinConstructionPersonTask,
majorProjectsUnderConstructionTask,
totalWorkingHourTask,
lostWorkingHourTask,
safeWorkingHourTask,
safeTrainTask,
safeTrainBoShengTask,
specialTrainTask,
specialOperationTrainTask,
headOfficeInspectorGeneralTask,
headOfficeFullTimeTask,
branchInspectorGeneralTask,
branchFullTimeTask,
projectInspectorGeneralTask,
projectFullTimeTask,
projectSafetyMonitorTask,
safetyCommitteeMeetingTask,
enterpriseTopicsMeetingTask,
projectSafetyLeadingGroupMeetingTask,
projectSafetyMeetingTask,
companyLeadShiftCheckTask,
companyComprehensiveCheckTask,
companySpecialCheckTask,
projectLeadShiftCheckTask,
projectSpecialCheckTask,
projectMajorCheckTask,
nearMissTask,
recordableEventTask,
generalAccidentTask,
majorAccidentTask,
seriousAccidentTask,
specialSeriousAccidentTask,
companyComprehensivePlanTask,
companySpecialPlanTask,
companyOnSiteDisposalPlanTask,
companyDrillTask,
projectComprehensivePlanTask,
projectSpecialPlanTask,
projectOnSiteDisposalPlanTask,
projectDrillTask,
costExtractTask,
costUseTask,
useEquipmentTask,
specialEquipmentTask,
licensesTask,
licensesCloseTask,
generalHiddenRectificationOutputsTask,
majorHiddenRectificationOutputsTask
);
// 统一获取异步方法的返回值
var totalEnergyConsumption = totalEnergyConsumptionTask;
var incomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumptionTask;
var newWaterConsumption = newWaterConsumptionTask;
var safetyInjectionEngineerList = await safetyInjectionEngineerTask;
var certificateAList = await certificateATask;
var certificateBList = await certificateBTask;
var certificateCList = await certificateCTask;
var beUnderConstructionList = await beUnderConstructionTask;
var shutdownList = await shutdownTask;
var joinConstructionPersonList = await joinConstructionPersonTask;
var majorProjectsUnderConstructionList = await majorProjectsUnderConstructionTask;
var totalWorkingHour = await totalWorkingHourTask;
var lostWorkingHour = await lostWorkingHourTask;
var safeWorkingHour = await safeWorkingHourTask;
var safeTrainList = await safeTrainTask;
var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask;
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
var headOfficeFullTimeList = await headOfficeFullTimeTask;
var branchInspectorGeneralList = await branchInspectorGeneralTask;
var branchFullTimeList = await branchFullTimeTask;
var projectInspectorGeneralList = await projectInspectorGeneralTask;
var projectFullTimeList = await projectFullTimeTask;
var projectSafetyMonitorList = await projectSafetyMonitorTask;
var safetyCommitteeMeetingList = await safetyCommitteeMeetingTask;
var enterpriseTopicsMeetingList = await enterpriseTopicsMeetingTask;
var projectSafetyLeadingGroupMeetingList = await projectSafetyLeadingGroupMeetingTask;
var projectSafetyMeetingList = await projectSafetyMeetingTask;
var companyLeadShiftCheckList = await companyLeadShiftCheckTask;
var companyComprehensiveCheckList = await companyComprehensiveCheckTask;
var companySpecialCheckList = await companySpecialCheckTask;
var projectLeadShiftCheckList = await projectLeadShiftCheckTask;
var projectSpecialCheckList = await projectSpecialCheckTask;
var projectMajorCheckList = await projectMajorCheckTask;
var nearMissList = await nearMissTask;
var recordableEventList = await recordableEventTask;
var generalAccidentList = await generalAccidentTask;
var majorAccidentList = await majorAccidentTask;
var seriousAccidentList = await seriousAccidentTask;
var specialSeriousAccidentList = await specialSeriousAccidentTask;
var companyComprehensivePlanList = await companyComprehensivePlanTask;
var companySpecialPlanList = await companySpecialPlanTask;
var companyOnSiteDisposalPlanList = await companyOnSiteDisposalPlanTask;
var companyDrillList = await companyDrillTask;
var projectComprehensivePlanList = await projectComprehensivePlanTask;
var projectSpecialPlanList = await projectSpecialPlanTask;
var projectOnSiteDisposalPlanList = await projectOnSiteDisposalPlanTask;
var projectDrillList = await projectDrillTask;
var costExtractList = await costExtractTask;
var costUseList = await costUseTask;
var useEquipmentList = await useEquipmentTask;
var specialEquipmentList = await specialEquipmentTask;
var licensesList = await licensesTask;
var licensesCloseList = await licensesCloseTask;
var generalHiddenRectificationOutputsList = await generalHiddenRectificationOutputsTask;
var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask;
// 统一获取异步方法的返回值
var totalEnergyConsumption = totalEnergyConsumptionTask;
var incomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumptionTask;
var newWaterConsumption = newWaterConsumptionTask;
var safetyInjectionEngineerList = await safetyInjectionEngineerTask;
var certificateAList = await certificateATask;
var certificateBList = await certificateBTask;
var certificateCList = await certificateCTask;
var beUnderConstructionList = await beUnderConstructionTask;
var shutdownList = await shutdownTask;
var joinConstructionPersonList = await joinConstructionPersonTask;
var majorProjectsUnderConstructionList = await majorProjectsUnderConstructionTask;
var totalWorkingHour = await totalWorkingHourTask;
var lostWorkingHour = await lostWorkingHourTask;
var safeWorkingHour = await safeWorkingHourTask;
var safeTrainList = await safeTrainTask;
var safeTrainBoShengList = await safeTrainBoShengTask;
var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask;
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
var headOfficeFullTimeList = await headOfficeFullTimeTask;
var branchInspectorGeneralList = await branchInspectorGeneralTask;
var branchFullTimeList = await branchFullTimeTask;
var projectInspectorGeneralList = await projectInspectorGeneralTask;
var projectFullTimeList = await projectFullTimeTask;
var projectSafetyMonitorList = await projectSafetyMonitorTask;
var safetyCommitteeMeetingList = await safetyCommitteeMeetingTask;
var enterpriseTopicsMeetingList = await enterpriseTopicsMeetingTask;
var projectSafetyLeadingGroupMeetingList = await projectSafetyLeadingGroupMeetingTask;
var projectSafetyMeetingList = await projectSafetyMeetingTask;
var companyLeadShiftCheckList = await companyLeadShiftCheckTask;
var companyComprehensiveCheckList = await companyComprehensiveCheckTask;
var companySpecialCheckList = await companySpecialCheckTask;
var projectLeadShiftCheckList = await projectLeadShiftCheckTask;
var projectSpecialCheckList = await projectSpecialCheckTask;
var projectMajorCheckList = await projectMajorCheckTask;
var nearMissList = await nearMissTask;
var recordableEventList = await recordableEventTask;
var generalAccidentList = await generalAccidentTask;
var majorAccidentList = await majorAccidentTask;
var seriousAccidentList = await seriousAccidentTask;
var specialSeriousAccidentList = await specialSeriousAccidentTask;
var companyComprehensivePlanList = await companyComprehensivePlanTask;
var companySpecialPlanList = await companySpecialPlanTask;
var companyOnSiteDisposalPlanList = await companyOnSiteDisposalPlanTask;
var companyDrillList = await companyDrillTask;
var projectComprehensivePlanList = await projectComprehensivePlanTask;
var projectSpecialPlanList = await projectSpecialPlanTask;
var projectOnSiteDisposalPlanList = await projectOnSiteDisposalPlanTask;
var projectDrillList = await projectDrillTask;
var costExtractList = await costExtractTask;
var costUseList = await costUseTask;
var useEquipmentList = await useEquipmentTask;
var specialEquipmentList = await specialEquipmentTask;
var licensesList = await licensesTask;
var licensesCloseList = await licensesCloseTask;
var generalHiddenRectificationOutputsList = await generalHiddenRectificationOutputsTask;
var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask;
// 构造结果对象
var table = new HSSEData_HSSE
{
JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
TotalWorkingHour = totalWorkingHour,
LostWorkingHour = lostWorkingHour,
SafeWorkingHour = safeWorkingHour,
SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = totalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
NewWaterConsumption = newWaterConsumption,
HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(),
HeadOfficeFullTimeNum = headOfficeFullTimeList.Count,
BranchInspectorGeneralNum = branchInspectorGeneralList.Count,
BranchFullTimeNum = branchFullTimeList.Count,
ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId),
CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId),
CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId),
CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId)),
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum),
GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum),
MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum),
HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum),
CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum),
TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum)
};
// 构造结果对象
var table = new HSSEData_HSSE
{
JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
TotalWorkingHour = totalWorkingHour,
LostWorkingHour = lostWorkingHour,
SafeWorkingHour = safeWorkingHour,
SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum) + safeTrainBoShengList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = totalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
NewWaterConsumption = newWaterConsumption,
HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(),
HeadOfficeFullTimeNum = headOfficeFullTimeList.Count,
BranchInspectorGeneralNum = branchInspectorGeneralList.Count,
BranchFullTimeNum = branchFullTimeList.Count,
ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId),
CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId),
CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId),
CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId)),
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum),
GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum),
MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum),
HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum),
CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum),
TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum)
};
if (_unitType == 0)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count();
table.ShutdownNum = shutdownList.Count();
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count();
table.EnterpriseTopicsMeetingNum = enterpriseTopicsMeetingList.Count();
table.CertificateANum = certificateAList.Count();
table.CertificateBNum = certificateBList.Count();
table.CertificateCNum = certificateCList.Count();
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count();
if (_unitType == 0)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count();
table.ShutdownNum = shutdownList.Count();
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count();
table.EnterpriseTopicsMeetingNum = enterpriseTopicsMeetingList.Count();
table.CertificateANum = certificateAList.Count();
table.CertificateBNum = certificateBList.Count();
table.CertificateCNum = certificateCList.Count();
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count();
}
else if (_unitType == 1)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count(x => x.UnitId == _unitId);
table.ShutdownNum = shutdownList.Count(x => x.UnitId == _unitId);
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => x.UnitId == _unitId);
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
}
}
else if (_unitType == 1)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count(x => x.UnitId == _unitId);
table.ShutdownNum = shutdownList.Count(x => x.UnitId == _unitId);
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => x.UnitId == _unitId);
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
}
_hsseData = table;
return _hsseData;
_hsseData = table;
return _hsseData;
}
catch (Exception ex)
{
@ -326,35 +330,36 @@ public class MainSevice
}
}
public List<HSSEDataHiddenDangerDetailItem> GetDataHiddenDangerDetailItems()
{
var db = Funs.DB;
var list = from x in db.HSSE_Hazard_HazardRegister
where _beUnderConstructionList.Contains(x.ProjectId)
select x;
var data = (from x in list
join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId
group x by new
{ x.ProjectId, x.RegisterTypesId, y.RegisterTypesName }
into g
select new
{
UnitId = _unitId,
ProjectId = g.Key.ProjectId,
TypeName = g.Key.RegisterTypesName,
TotalNum = g.Count(),
NeedRectifyNum = g.Count(x => x.States == "1"),
}).ToList();
public List<HSSEDataHiddenDangerDetailItem> GetDataHiddenDangerDetailItems()
{
var db = Funs.DB;
var list = from x in db.HSSE_Hazard_HazardRegister
where _beUnderConstructionList.Contains(x.ProjectId)
select x;
var data = (from x in list
join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId
group x by new
{ x.ProjectId, x.RegisterTypesId, y.RegisterTypesName }
into g
select new
{
UnitId = _unitId,
ProjectId = g.Key.ProjectId,
TypeName = g.Key.RegisterTypesName,
TotalNum = g.Count(),
NeedRectifyNum = g.Count(x => x.States == "1"),
}).ToList();
var result = (from x in data
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
return result;
var result = (from x in data
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
return result;
}
}
} }
}

View File

@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using Model;
using Newtonsoft.Json;
using Microsoft.SqlServer.Dts.Runtime;
namespace BLL
{
@ -48,6 +49,18 @@ namespace BLL
/// </summary>
ProjectDivision,
/// <summary>
/// 报验数据
/// </summary>
Inspection,
/// <summary>
/// 施工方案数据
/// </summary>
ConstructSolution,
/// <summary>
/// 特种设备质保体系和图纸会审/设计交底
/// </summary>
SpecialEquipmentAndDesignDetails,
/// <summary>
/// 全部数据
/// </summary>
All
@ -195,6 +208,25 @@ namespace BLL
SubProjectNum = newtable.SubProjectNum,
SubdivisionalWorksNum = newtable.SubdivisionalWorksNum,
InspectionLotNum = newtable.InspectionLotNum,
EquipmentInspectionNum = newtable.EquipmentInspectionNum,
EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum,
MachineInspectionNum = newtable.MachineInspectionNum,
MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum,
PersonInspectionNum = newtable.PersonInspectionNum,
PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum,
MaterialInspectionNum = newtable.MaterialInspectionNum,
MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum,
ConstructSolutionNum = newtable.ConstructSolutionNum,
ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum,
ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum,
SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum,
DesignDetailsNum = newtable.DesignDetailsNum,
UnitProjectAcceptNum = newtable.UnitProjectAcceptNum,
UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum,
SubProjectAcceptNum = newtable.SubProjectAcceptNum,
SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum,
SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum,
SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum
};
db.Project_CQMSData_CQMS.InsertOnSubmit(table);
db.SubmitChanges();
@ -247,6 +279,25 @@ namespace BLL
table.SubProjectNum = newtable.SubProjectNum;
table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum;
table.InspectionLotNum = newtable.InspectionLotNum;
table.EquipmentInspectionNum = newtable.EquipmentInspectionNum;
table.EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum;
table.MachineInspectionNum = newtable.MachineInspectionNum;
table.MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum;
table.PersonInspectionNum = newtable.PersonInspectionNum;
table.PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum;
table.MaterialInspectionNum = newtable.MaterialInspectionNum;
table.MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum;
table.ConstructSolutionNum = newtable.ConstructSolutionNum;
table.ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum;
table.ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum;
table.SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum;
table.DesignDetailsNum = newtable.DesignDetailsNum;
table.UnitProjectAcceptNum = newtable.UnitProjectAcceptNum;
table.UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum;
table.SubProjectAcceptNum = newtable.SubProjectAcceptNum;
table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum;
table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum;
table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum;
db.SubmitChanges();
}
}
@ -269,6 +320,20 @@ namespace BLL
}
}
public static void DeleteProject_CQMSData_CQMByDate(DateTime? reportDate)
{
using (var db = new SGGLDB(Funs.ConnString))
{
var table = db.Project_CQMSData_CQMS.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
if (table != null)
{
db.Project_CQMSData_CQMS.DeleteAllOnSubmit(table);
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据projectid判断当天项目是否已统计数据
/// </summary>
@ -322,6 +387,7 @@ namespace BLL
StatisticalData(item.ProjectId, CQMSDateType.All);
}
}
/// <summary>
/// 统计数据
/// </summary>
@ -392,6 +458,13 @@ namespace BLL
table.UnitProjectOnesOKNum = GetUnitProjectOnesOKNum(projectid);
table.MaterialInRecheckNum = GetMaterialInRecheckNum(projectid);
table.MaterialInRecheckOKNum = GetMaterialInRecheckOKNum(projectid);
table.UnitProjectAcceptNum = GetUnitProjectOnesNum(projectid);
table.UnitProjectAcceptOKNum = GetUnitProjectOnesOKNum(projectid);
table.SubProjectAcceptNum = GetMaterialInRecheckNum(projectid);
table.SubProjectAcceptOKNum = GetMaterialInRecheckOKNum(projectid);
table.SubdivisionalWorksAcceptNum = GetSubdivisionalWorksAcceptNum(projectid);
table.SubdivisionalWorksAcceptOKNum = GetSubdivisionalWorksAcceptOKNum(projectid);
}
if (cQMSDateType == CQMSDateType.ProjectDivision || cQMSDateType == CQMSDateType.All)
{
@ -401,6 +474,28 @@ namespace BLL
table.SubdivisionalWorksNum = GetSubdivisionalWorksNum(projectid);
table.InspectionLotNum = GetInspectionLotNum(projectid);
}
if (cQMSDateType == CQMSDateType.Inspection || cQMSDateType == CQMSDateType.All)
{
table.EquipmentInspectionNum = GetComprehensiveInspectionEquipmentNum(projectid);
table.EquipmentInspectionQualifiedNum = GetComprehensiveInspectionEquipmentOKNum(projectid);
table.MachineInspectionNum = GetComprehensiveInspectionMachineNum(projectid);
table.MachineInspectionQualifiedNum = GetComprehensiveInspectionMachineOKNum(projectid);
table.PersonInspectionNum = GetComprehensiveInspectionPersonNum(projectid);
table.PersonInspectionQualifiedNum = GetComprehensiveInspectionPersonOKNum(projectid);
table.MaterialInspectionNum = GetComprehensiveInspectionMaterialNum(projectid);
table.MaterialInspectionQualifiedNum = GetComprehensiveInspectionMaterialOKNum(projectid);
}
if (cQMSDateType == CQMSDateType.ConstructSolution || cQMSDateType == CQMSDateType.All)
{
table.ConstructSolutionNum = GetConstructSolutionNum(projectid);
table.ConstructSolutionProjectApproveNum = GetConstructSolutionProjectApproveNum(projectid);
table.ConstructSolutionUnitApproveNum = GetConstructSolutionUnitApproveNum(projectid);
}
if (cQMSDateType == CQMSDateType.SpecialEquipmentAndDesignDetails || cQMSDateType == CQMSDateType.All)
{
table.SpecialEquipmentQualityAssuranceSystemNum = GetSpecialEquipmentQualityAssuranceSystemNum(projectid);
table.DesignDetailsNum = GetTechnicalDisclosePersonNum(projectid);
}
if (IsReportByToday(projectid))
{
@ -691,6 +786,32 @@ namespace BLL
select x).Count();
return result;
}
/// <summary>
/// 获取分项工程验收数
/// </summary>
/// <returns></returns>
public static int GetSubdivisionalWorksAcceptNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
where y.ProjectId == projectid && y.CheckAcceptType == "6" && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}
/// <summary>
/// 获取分项工程验收合格数
/// </summary>
/// <returns></returns>
public static int GetSubdivisionalWorksAcceptOKNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
where y.ProjectId == projectid && y.CheckAcceptType == "6" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}
/// <summary>
/// 获取单项工程个数
/// </summary>
@ -747,6 +868,148 @@ namespace BLL
return result;
}
/// <summary>
/// 设备报验-报检数
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static int GetComprehensiveInspectionEquipmentNum(string projectid)
{
int result = (from x in Funs.DB.Comprehensive_InspectionEquipment
where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
}
/// <summary>
/// 设备报验-报检合格数
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static int GetComprehensiveInspectionEquipmentOKNum(string projectid)
{
int result = (from x in Funs.DB.Comprehensive_InspectionEquipment
where x.ProjectId == projectid && x.SamplingResult == "1" && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
}
/// <summary>
/// 获取机具报验-报检数
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static int GetComprehensiveInspectionMachineNum(string projectid)
{
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
}
/// <summary>
/// 获取机具报验-报检合格数
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static int GetComprehensiveInspectionMachineOKNum(string projectid)
{
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
where x.ProjectId == projectid && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
}
/// <summary>
/// 获取人员报验-报检数
/// </summary>
/// <returns></returns>
public static int GetComprehensiveInspectionPersonNum(string projectid)
{
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
where x.ProjectId == projectid && x.IsOnSite.HasValue && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
}
/// <summary>
/// 获取人员报验-报检合格数
/// </summary>
/// <returns></returns>
public static int GetComprehensiveInspectionPersonOKNum(string projectid)
{
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
where x.ProjectId == projectid && x.IsOnSite == true && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
}
/// <summary>
/// 获取材料报验-报检数
/// </summary>
/// <returns></returns>
public static int GetComprehensiveInspectionMaterialNum(string projectid)
{
var result = 0;
return result;
}
/// <summary>
/// 获取材料报验-报检合格数
/// </summary>
/// <returns></returns>
public static int GetComprehensiveInspectionMaterialOKNum(string projectid)
{
var result = 0;
return result;
}
/// <summary>
/// 施工方案数量
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static int GetConstructSolutionNum(string projectid)
{
var result = (from x in Funs.DB.Solution_CQMSConstructSolution
where x.ProjectId == projectid
select x).Count();
return result;
}
/// <summary>
/// 施工方案数量——项目审批数量
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static int GetConstructSolutionProjectApproveNum(string projectid)
{
var result = (from x in Funs.DB.Solution_CQMSConstructSolution
where x.ProjectId == projectid && x.State == "1"
select x).Count();
return result;
}
/// <summary>
/// 施工方案数量——企业审批数量
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static int GetConstructSolutionUnitApproveNum(string projectid)
{
var result = 0;
return result;
}
/// <summary>
/// 特种设备质保体系
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static int GetSpecialEquipmentQualityAssuranceSystemNum(string projectid)
{
var result = 0;
return result;
}
#region

View File

@ -100,6 +100,20 @@ namespace BLL
}
#endregion
public static void DeleteProject_HJGLData_HJGLByDate(DateTime? reportDate)
{
using (var db = new SGGLDB(Funs.ConnString))
{
var table = db.Project_HJGLData_HJGL.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
if (table != null)
{
db.Project_HJGLData_HJGL.DeleteAllOnSubmit(table);
db.SubmitChanges();
}
}
}
public static Model.Project_HJGLData_HJGL GetProject_HJGLData_HJGLById(string Id)
{
return db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == Id);
@ -348,7 +362,7 @@ namespace BLL
/// <summary>
/// 推送项目焊接数据
/// </summary>
/// <returns></returns>
/// <returns></returns>
public static ReturnData PushProjectHJGLData()
{
var items = (from x in Funs.DB.Project_HJGLData_HJGL

View File

@ -129,6 +129,7 @@ namespace BLL
SafeTrainNum = newtable.SafeTrainNum,
SpecialTrainNum = newtable.SpecialTrainNum,
SpecialOperationTrainNum = newtable.SpecialOperationTrainNum,
HseTechnicalNum = newtable.HseTechnicalNum,
TotalEnergyConsumption = newtable.TotalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption,
NewWaterConsumption = newtable.NewWaterConsumption,
@ -163,10 +164,12 @@ namespace BLL
CompanySpecialPlanNum = newtable.CompanySpecialPlanNum,
CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan,
CompanyDrillNum = newtable.CompanyDrillNum,
CompanyDrillPersonNum = newtable.CompanyDrillPersonNum,
ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum,
ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum,
ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan,
ProjectDrillNum = newtable.ProjectDrillNum,
ProjectDrillPersonNum = newtable.ProjectDrillPersonNum,
CostExtract = newtable.CostExtract,
CostUse = newtable.CostUse,
UseEquipmentNum = newtable.UseEquipmentNum,
@ -185,10 +188,12 @@ namespace BLL
TrainPersonNum = newtable.TrainPersonNum,
ConstructionNum = newtable.ConstructionNum,
FinishedNum = newtable.FinishedNum,
ArgumentNum = newtable.ArgumentNum,
SuperCompletedNum = newtable.SuperCompletedNum,
SuperTrainPersonNum = newtable.SuperTrainPersonNum,
SuperConstructionNum = newtable.SuperConstructionNum,
SuperFinishedNum = newtable.SuperFinishedNum
SuperFinishedNum = newtable.SuperFinishedNum,
SuperArgumentNum = newtable.SuperArgumentNum
};
db.Project_HSSEData_HSSE.InsertOnSubmit(table);
db.SubmitChanges();

File diff suppressed because one or more lines are too long

View File

@ -49,8 +49,11 @@
<f:ListItem Value="1" Text="关键工序验收" />
<f:ListItem Value="2" Text="特殊过程验收" />
<f:ListItem Value="3" Text="隐蔽工程验收" />
<f:ListItem Value="4" Text="单位工程一次验收" />
<f:ListItem Value="5" Text="材料进场复验" />
<f:ListItem Value="4" Text="单位工程验收" />
<f:ListItem Value="5" Text="分部工程验收" />
<f:ListItem Value="6" Text="分项工程验收" />
<%--<f:ListItem Value="4" Text="单位工程一次验收" />
<f:ListItem Value="5" Text="材料进场复验" />--%>
</f:DropDownList>
</Items>
</f:FormRow>

View File

@ -49,8 +49,11 @@
<f:ListItem Value="1" Text="关键工序验收" />
<f:ListItem Value="2" Text="特殊过程验收" />
<f:ListItem Value="3" Text="隐蔽工程验收" />
<f:ListItem Value="4" Text="单位工程一次验收" />
<f:ListItem Value="5" Text="材料进场复验" />
<f:ListItem Value="4" Text="单位工程验收" />
<f:ListItem Value="5" Text="分部工程验收" />
<f:ListItem Value="6" Text="分项工程验收" />
<%--<f:ListItem Value="4" Text="单位工程一次验收" />
<f:ListItem Value="5" Text="材料进场复验" />--%>
</f:DropDownList>
</Items>
</f:FormRow>

View File

@ -32,6 +32,12 @@
Width="200px" LabelWidth="70px"
LabelAlign="right">
</f:TextBox>
<f:CheckBox runat="server" ID="ckJT" Label="未同步" LabelAlign="right" LabelWidth="70px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckTrain" Label="未培训" LabelAlign="right" LabelWidth="70px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btSearch" Text="查询" Icon="SystemSearch" runat="server" OnClick="TextBox_TextChanged"></f:Button>
@ -51,10 +57,10 @@
<f:CheckBox runat="server" ID="chManager" Label="管理人员" LabelAlign="right" LabelWidth="80px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckJT" Label="未同步" LabelAlign="right" LabelWidth="70px"
<f:CheckBox runat="server" ID="chIsHsse" Label="安管人员" LabelAlign="right" LabelWidth="80px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckTrain" Label="未培训" LabelAlign="right" LabelWidth="70px"
<f:CheckBox runat="server" ID="chIsCQMS" Label="质量管理" LabelAlign="right" LabelWidth="80px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>

View File

@ -77,7 +77,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
var getData = PersonService.getListData(this.ProjectId, unitId, this.txtPersonName.Text.Trim(), this.txtIdentityCard.Text.Trim(),
"", Funs.GetStringByArray(this.drpPost.SelectedValueArray), this.ckTrain.Checked, this.rblPost.SelectedValue, this.ckJT.Checked,
false, this.chManager.Checked, Grid1, true);
false, this.chManager.Checked, this.chIsHsse.Checked, this.chIsCQMS.Checked, Grid1, true);
Grid1.RecordCount = PersonService.count;
Grid1.DataSource = getData;
Grid1.DataBind();

View File

@ -86,6 +86,24 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.TextBox txtIdentityCard;
/// <summary>
/// ckJT 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckJT;
/// <summary>
/// ckTrain 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckTrain;
/// <summary>
/// btSearch 控件。
/// </summary>
@ -123,22 +141,22 @@ namespace FineUIPro.Web.HSSE.SitePerson
protected global::FineUIPro.CheckBox chManager;
/// <summary>
/// ckJT 控件。
/// chIsHsse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckJT;
protected global::FineUIPro.CheckBox chIsHsse;
/// <summary>
/// ckTrain 控件。
/// chIsCQMS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckTrain;
protected global::FineUIPro.CheckBox chIsCQMS;
/// <summary>
/// ToolbarFill1 控件。

View File

@ -65,6 +65,15 @@
Width="200px" LabelWidth="70px"
LabelAlign="right">
</f:TextBox>
<f:CheckBox runat="server" ID="ckJT" Label="未同步" LabelAlign="right" LabelWidth="70px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckTrain" Label="未培训" LabelAlign="right" LabelWidth="70px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckIdCardInfoNotOK" Label="信息不全" LabelAlign="right" LabelWidth="80px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btSearch" Text="查询" Icon="SystemSearch" runat="server" OnClick="TextBox_TextChanged"></f:Button>
@ -85,13 +94,10 @@
<f:CheckBox runat="server" ID="chManager" Label="管理人员" LabelAlign="right" LabelWidth="80px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckJT" Label="未同步" LabelAlign="right" LabelWidth="70px"
<f:CheckBox runat="server" ID="chIsHsse" Label="安管人员" LabelAlign="right" LabelWidth="80px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckTrain" Label="未培训" LabelAlign="right" LabelWidth="70px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:CheckBox runat="server" ID="ckIdCardInfoNotOK" Label="信息不全" LabelAlign="right" LabelWidth="80px"
<f:CheckBox runat="server" ID="chIsCQMS" Label="质量管理" LabelAlign="right" LabelWidth="80px"
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>

View File

@ -182,7 +182,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
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.rblPost.SelectedValue, this.ckJT.Checked,
this.ckIdCardInfoNotOK.Checked, this.chManager.Checked, Grid1);
this.ckIdCardInfoNotOK.Checked, this.chManager.Checked, this.chIsHsse.Checked, this.chIsCQMS.Checked, Grid1);
Grid1.RecordCount = PersonService.count;
Grid1.DataSource = getData;
Grid1.DataBind();

View File

@ -140,6 +140,33 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.TextBox txtIdentityCard;
/// <summary>
/// ckJT 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckJT;
/// <summary>
/// ckTrain 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckTrain;
/// <summary>
/// ckIdCardInfoNotOK 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIdCardInfoNotOK;
/// <summary>
/// btSearch 控件。
/// </summary>
@ -186,31 +213,22 @@ namespace FineUIPro.Web.HSSE.SitePerson
protected global::FineUIPro.CheckBox chManager;
/// <summary>
/// ckJT 控件。
/// chIsHsse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckJT;
protected global::FineUIPro.CheckBox chIsHsse;
/// <summary>
/// ckTrain 控件。
/// chIsCQMS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckTrain;
/// <summary>
/// ckIdCardInfoNotOK 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIdCardInfoNotOK;
protected global::FineUIPro.CheckBox chIsCQMS;
/// <summary>
/// ToolbarFill1 控件。

View File

@ -82,7 +82,9 @@
</f:FormRow>
<f:FormRow runat="server">
<items>
<f:CheckBox runat="server" Label="是否督查人员" LabelAlign="Right" ID="cbIsInspectionBrigade" />
<f:DropDownList ID="drpCertificate" runat="server" Label="特岗证书" LabelAlign="Right" LabelWidth="90px" EnableEdit="true" EnableCheckBoxSelect="True" EnableMultiSelect="True" EmptyText="--请选择--" AutoSelectFirstItem="false" >
</f:DropDownList>
<f:CheckBox runat="server" Label="是否督查人员" LabelAlign="Right" ID="cbIsInspectionBrigade" LabelWidth="100px" />
</items>
</f:FormRow>
</Rows>

View File

@ -78,6 +78,7 @@ namespace FineUIPro.Web.SysManage
DepartService.InitDepartDropDownList(this.drpDepart, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpMainCNProfessional, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpViceCNProfessional, true);
CertificateService.InitCertificateDropDownList(this.drpCertificate, false);
if (!string.IsNullOrEmpty(this.UnitId))
{
this.drpIsOffice.SelectedValue = "False";
@ -126,6 +127,7 @@ namespace FineUIPro.Web.SysManage
this.Image2.ImageUrl = "~/" + this.SignatureUrl;
}
this.drpDepart.SelectedValue = user.DepartId;
this.drpCertificate.SelectedValueArray = PersonQualityService.GetListPersonQualityByUserId(this.UserId)?.Select(x => x.CertificateId).ToArray();
if (!string.IsNullOrEmpty(user.MainCNProfessionalId))
{
this.drpMainCNProfessional.SelectedValue = user.MainCNProfessionalId;
@ -222,6 +224,7 @@ namespace FineUIPro.Web.SysManage
newUser.SignatureUrl = this.SignatureUrl;
newUser.IsPost = Convert.ToBoolean(this.drpIsPost.SelectedValue);
newUser.IsOffice = Convert.ToBoolean(this.drpIsOffice.SelectedValue);
newUser.CertificateId = drpCertificate.SelectedValue;
if (this.drpMainCNProfessional.SelectedValue != Const._Null)
{
newUser.MainCNProfessionalId = this.drpMainCNProfessional.SelectedValue;
@ -258,6 +261,19 @@ namespace FineUIPro.Web.SysManage
UserService.UpdateUser(newUser);
LogService.AddSys_Log(this.CurrUser, newUser.UserCode, newUser.UserId, BLL.Const.UserMenuId, BLL.Const.BtnModify);
}
PersonQualityService.DeleteUserQuality(this.UserId);
foreach (var item in this.drpCertificate.SelectedValueArray)
{
Model.QualityAudit_PersonQuality newPersonQuality = new Model.QualityAudit_PersonQuality
{
PersonQualityId = SQLHelper.GetNewID(typeof(Model.QualityAudit_PersonQuality)),
UserId = this.UserId,
CompileMan = this.CurrUser.UserId,
CompileDate = DateTime.Now
};
newPersonQuality.CertificateId = item;
BLL.PersonQualityService.AddPersonQuality(newPersonQuality);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}

View File

@ -194,6 +194,15 @@ namespace FineUIPro.Web.SysManage
/// </remarks>
protected global::FineUIPro.RadioButtonList rblHomePageType;
/// <summary>
/// drpCertificate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCertificate;
/// <summary>
/// cbIsInspectionBrigade 控件。
/// </summary>

View File

@ -184,7 +184,7 @@ namespace FineUIPro.Web.common
// 质量管理人员(合并公司+项目级查询)
var qualityQuery = db.Base_WorkPost
.Where(x => x.IsCQMS == true)
.GroupJoin(db.SitePerson_Person.Where(x => x.IsUsed == true),
.GroupJoin(db.SitePerson_Person.Where(x => x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now)),
post => post.WorkPostId,
person => person.WorkPostId,
(post, persons) => new { post, persons })

View File

@ -428,8 +428,8 @@
let opt = {
grid: {
top: fontSize(60),
bottom: fontSize(30)
top: fontSize(40),
bottom: fontSize(20)
},
legend: {
top: fontSize(10),
@ -440,7 +440,6 @@
type: 'category',
data: label,
axisLabel: {
color: '#3FB0FF'
},
axisLine: {
@ -449,23 +448,47 @@
color: '#84D7FE'
}
},
axisTick: {
show: false
}
//axisTick: {
// show: false
//}
},
yAxis: {
type: 'value',
axisLabel: {
color: '#3FB0FF'
yAxis: [
{
type: 'value',
name: '数量',
position: 'left',
splitNumber: 5,
alignTicks: true,
axisLabel: {
color: '#3FB0FF'
},
splitLine: {
lineStyle: {
color: '#1B538B', // 设置Y轴线颜色为白色
type: 'dashed'
}
},
},
splitLine: {
show: true,
lineStyle: {
color: '#1B538B',
type: 'dashed'
{
type: 'value',
name: '百分比',
position: 'right',
splitNumber: 5,
interval: 25,
max: 100,
min: 0,
alignTicks: true,
axisLabel: {
color: '#3FB0FF'
},
splitLine: {
lineStyle: {
color: '#1B538B', // 设置Y轴线颜色为白色
type: 'dashed'
}
}
}
},
],
series: [
{
name: '<%=total%>',
@ -475,6 +498,7 @@
itemStyle: {
color: '#20AFFF'
},
yAxisIndex: 0,
label: {
// 柱图头部显示值
show: true,
@ -483,7 +507,7 @@
fontSize: fontSize(10),
formatter: (params) => {
let str = params.value;
console.log(params.name)
//console.log(params.name)
if (params.name == '<%=RectificationRate%>') {
str = str + '%'
}
@ -499,6 +523,7 @@
itemStyle: {
color: '#12CDA2'
},
yAxisIndex: 0,
label: {
// 柱图头部显示值
show: true,
@ -522,6 +547,7 @@
itemStyle: {
color: '#FFA602'
},
yAxisIndex: 1,
showSymbol: false,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [

View File

@ -1,5 +1,6 @@
using BLL;
using FineUIPro.Web.BaseInfo;
using FineUIPro.Web.DataShow;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@ -148,14 +149,15 @@ namespace FineUIPro.Web.common
{
int result = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where y.IsCQMS == true && x.IsUsed == true
where y.IsCQMS == true && x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now)
select x).Count();
return result;
}
else {
else
{
int result = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where y.IsCQMS == true && x.IsUsed == true && pids.Contains(x.ProjectId)
where y.IsCQMS == true && x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now) && pids.Contains(x.ProjectId)
select x).Count();
return result;
}
@ -175,7 +177,8 @@ namespace FineUIPro.Web.common
select x).Count();
return result;
}
else {
else
{
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
where x.IsOnSite == true && x.InspectionType.Contains("计量") && pids.Contains(x.ProjectId)
select x).Count();
@ -196,7 +199,8 @@ namespace FineUIPro.Web.common
select x).Count();
return result;
}
else {
else
{
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
where x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true && pids.Contains(x.ProjectId)
select x).Count();
@ -223,7 +227,8 @@ namespace FineUIPro.Web.common
result = num2;
return result;
}
else {
else
{
int result = 0;
//过期提醒记录数
var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now
@ -247,7 +252,8 @@ namespace FineUIPro.Web.common
select x).Count();
return result;
}
else {
else
{
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
where x.IsTrain == true && pids.Contains(x.ProjectId)
select x).Count();
@ -268,7 +274,8 @@ namespace FineUIPro.Web.common
var q = Funs.GetNewIntOrZero(result.ToString());
return q;
}
else {
else
{
var result = (from x in Funs.DB.Comprehensive_DesignDetails
where pids.Contains(x.ProjectId)
select x.JoinPersonNum ?? 0).ToList().Sum();
@ -285,19 +292,30 @@ namespace FineUIPro.Web.common
if (pids == null)
{
int allCount = 0;
var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true
var getPersonQualitys = from x in Funs.DB.QualityAudit_PersonQuality
join y in Funs.DB.SitePerson_Person on x.PersonId equals y.PersonId
join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId
where x.LimitDate.HasValue && x.LimitDate < DateTime.Now && y.OutTime == null && z.PostType == Const.PostType_2
select x;
//var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
// where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true
// select x;
//// 预警人数
allCount = getPersonQualitys.Count();
this.spanQualityChartAnalysis.InnerHtml = allCount.ToString();
}
else {
else
{
int allCount = 0;
var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true && pids.Contains(x.ProjectId)
var getPersonQualitys = from x in Funs.DB.QualityAudit_PersonQuality
join y in Funs.DB.SitePerson_Person on x.PersonId equals y.PersonId
join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId
where x.LimitDate.HasValue && x.LimitDate < DateTime.Now && y.OutTime == null && z.PostType == Const.PostType_2 && pids.Contains(y.ProjectId)
select x;
//var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
// where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true && pids.Contains(x.ProjectId)
// select x;
//// 预警人数
allCount = getPersonQualitys.Count();
this.spanQualityChartAnalysis.InnerHtml = allCount.ToString();
@ -326,7 +344,8 @@ namespace FineUIPro.Web.common
// select x).Count();
return result;
}
else {
else
{
int result = 0;
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
where pids.Contains(x.ProjectId)
@ -337,7 +356,7 @@ namespace FineUIPro.Web.common
}
}
/// <summary>
/// 次合格数量
/// 次合格数量
/// </summary>
/// <returns></returns>
public int getIsOnceInspectionManagement()
@ -350,7 +369,7 @@ namespace FineUIPro.Web.common
// BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
// null, null, DateTime.Parse("2001-01-01"), DateTime.Now, true);
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.IsOnceQualified == true
where (x.IsOnceQualified == null || x.IsOnceQualified == true)
select x).Count();
result = num2;
@ -359,11 +378,12 @@ namespace FineUIPro.Web.common
// select x).Count();
return result;
}
else {
else
{
int result = 0;
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.IsOnceQualified == true && pids.Contains(x.ProjectId)
where (x.IsOnceQualified == null || x.IsOnceQualified == true) && pids.Contains(x.ProjectId)
select x).Count();
result = num2;
@ -398,7 +418,8 @@ namespace FineUIPro.Web.common
select x).Count();
return result;
}
else {
else
{
int result = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && x.State == "7" && pids.Contains(x.ProjectId)
select x).Count();
@ -418,7 +439,8 @@ namespace FineUIPro.Web.common
select x).Count();
return result;
}
else {
else
{
int result = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && x.State != "7" && pids.Contains(x.ProjectId)
select x).Count();
@ -463,7 +485,8 @@ namespace FineUIPro.Web.common
select x).Count();
return result;
}
else {
else
{
int result = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId)
select x).Count();
@ -583,7 +606,8 @@ namespace FineUIPro.Web.common
}
return result;
}
else {
else
{
int result = 0;
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
@ -708,7 +732,7 @@ namespace FineUIPro.Web.common
private void getInspectionManagementInfo()
{
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
if (this.CurrUser.UserId == BLL.Const.hfnbdId && 1 == 2)
{
//var q=(from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
var q = (from x in Funs.DB.Control_PointCropping where x.ParentId == null || x.ParentId == "" orderby x.OperateTime select x).ToList();
@ -731,7 +755,7 @@ namespace FineUIPro.Web.common
where x.CNProfessionalId == item.ControlId
select x).Count();
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true
where x.CNProfessionalId == item.ControlId && (x.IsOnceQualified == null || x.IsOnceQualified == true)
select x).Count();
}
else
@ -740,7 +764,7 @@ namespace FineUIPro.Web.common
where x.CNProfessionalId == item.ControlId && pids.Contains(x.ProjectId)
select x).Count();
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
where x.CNProfessionalId == item.ControlId && (x.IsOnceQualified == null || x.IsOnceQualified == true) && pids.Contains(x.ProjectId)
select x).Count();
}
@ -767,7 +791,7 @@ namespace FineUIPro.Web.common
else
{
var q = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
foreach (var item in q)
{
//获取专业
@ -785,7 +809,7 @@ namespace FineUIPro.Web.common
where x.CNProfessionalId == item.CNProfessionalId
select x).Count();
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true
where x.CNProfessionalId == item.CNProfessionalId && (x.IsOnceQualified == null || x.IsOnceQualified == true)
select x).Count();
}
else
@ -794,7 +818,7 @@ namespace FineUIPro.Web.common
where x.CNProfessionalId == item.CNProfessionalId && pids.Contains(x.ProjectId)
select x).Count();
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
where x.CNProfessionalId == item.CNProfessionalId && (x.IsOnceQualified == null || x.IsOnceQualified == true) && pids.Contains(x.ProjectId)
select x).Count();
}
@ -839,7 +863,7 @@ namespace FineUIPro.Web.common
protected string ncrCount;
private void getNcrInfo()
{
if (pids==null)
if (pids == null)
{
//闭环项 有完成日期的
//var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate != null).Count();
@ -888,7 +912,7 @@ namespace FineUIPro.Web.common
ncrZy = ncrZy.TrimEnd(',');
ncrCount = ncrCount.TrimEnd(',');
}
}
#endregion

File diff suppressed because it is too large Load Diff

View File

@ -253,6 +253,7 @@
<Compile Include="TokenItem.cs" />
<Compile Include="ZHGL\DataSync\AccidentOutput.cs" />
<Compile Include="ZHGL\DataSync\BaseEntities.cs" />
<Compile Include="ZHGL\DataSync\CHCheckItemOutput.cs" />
<Compile Include="ZHGL\DataSync\CheckOutput.cs" />
<Compile Include="ZHGL\DataSync\ConstructionEquipmentOutput.cs" />
<Compile Include="ZHGL\DataSync\CostSmallDetailOutput.cs" />
@ -262,7 +263,9 @@
<Compile Include="ZHGL\DataSync\HiddenRectificationOutput.cs" />
<Compile Include="ZHGL\DataSync\HJGLDataItem.cs" />
<Compile Include="ZHGL\DataSync\HSSEDataItem.cs" />
<Compile Include="ZHGL\DataSync\InspectionManagementOutput.cs" />
<Compile Include="ZHGL\DataSync\LargeEngineeringOutput.cs" />
<Compile Include="ZHGL\DataSync\LicenseHSETechnicalOutput.cs" />
<Compile Include="ZHGL\DataSync\LicenseOutput.cs" />
<Compile Include="ZHGL\DataSync\MeetingOutput.cs" />
<Compile Include="ZHGL\DataSync\OfSafetySupervisorsOutput.cs" />
@ -270,6 +273,9 @@
<Compile Include="ZHGL\DataSync\ProjectOutput.cs" />
<Compile Include="ZHGL\DataSync\SecurityRiskOutput.cs" />
<Compile Include="ZHGL\DataSync\SYHSEDataItem.cs" />
<Compile Include="ZHGL\DataSync\WBSBreakdownProjectOutput.cs" />
<Compile Include="ZHGL\DataSync\WeldDineOutput.cs" />
<Compile Include="ZHGL\DataSync\WelderOutput.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />

View File

@ -0,0 +1,20 @@
using System;
namespace Model
{
/// <summary>
/// 焊接信息
/// </summary>
public class CHCheckItemOutput : BaseEntities
{
public string Id { get; set; }
/// <summary>
/// 总片数
/// </summary>
public int? CHT_TotalFilm { get; set; }
/// <summary>
/// 合格片数
/// </summary>
public int? CHT_PassFilm { get; set; }
}
}

View File

@ -54,6 +54,25 @@ namespace Model
public int? UnitProjectOnesOKNum { get; set; }
public string UnitProjectOnesRate { get; set; }
public int? UseNum { get; set; }
public int? EquipmentInspectionNum { get; set; }
public int? EquipmentInspectionQualifiedNum { get; set; }
public int? MachineInspectionNum { get; set; }
public int? MachineInspectionQualifiedNum { get; set; }
public int? PersonInspectionNum { get; set; }
public int? PersonInspectionQualifiedNum { get; set; }
public int? MaterialInspectionNum { get; set; }
public int? MaterialInspectionQualifiedNum { get; set; }
public int? ConstructSolutionNum { get; set; }
public int? ConstructSolutionProjectApproveNum { get; set; }
public int? ConstructSolutionUnitApproveNum { get; set; }
public int? SpecialEquipmentQualityAssuranceSystemNum { get; set; }
public int? DesignDetailsNum { get; set; }
public int? UnitProjectAcceptNum { get; set; }
public int? UnitProjectAcceptOKNum { get; set; }
public int? SubProjectAcceptNum { get; set; }
public int? SubProjectAcceptOKNum { get; set; }
public int? SubdivisionalWorksAcceptNum { get; set; }
public int? SubdivisionalWorksAcceptOKNum { get; set; }
}
}

View File

@ -29,6 +29,8 @@ namespace Model
public int? CompanyComprehensiveCheckNum { get; set; }
public int? CompanyComprehensivePlanNum { get; set; }
public int? CompanyDrillNum { get; set; }
public int? CompanyDrillPersonNum { get; set; }
public int? CompanyLeadShiftCheckNum { get; set; }
public int? CompanyOnSiteDisposalPlan { get; set; }
public int? CompanySpecialCheckNum { get; set; }
@ -39,6 +41,8 @@ namespace Model
public int? CostUse { get; set; }
public int? EnterpriseTopicsMeetingNum { get; set; }
public int? FinishedNum { get; set; }
public int? ArgumentNum { get; set; }
public int? SuperArgumentNum { get; set; }
public int? GeneralAccidentNum { get; set; }
public int? GeneralClosedNum { get; set; }
public int? GeneralNotClosedNum { get; set; }
@ -64,6 +68,8 @@ namespace Model
public decimal? NewWaterConsumption { get; set; }
public int? ProjectComprehensivePlanNum { get; set; }
public int? ProjectDrillNum { get; set; }
public int? ProjectDrillPersonNum { get; set; }
public int? ProjectFullTimeNum { get; set; }
public int? ProjectInspectorGeneralNum { get; set; }
public int? ProjectLeadShiftCheckNum { get; set; }
@ -84,6 +90,8 @@ namespace Model
public int? ShutdownNum { get; set; }
public int? SpecialEquipmentNum { get; set; }
public int? SpecialOperationTrainNum { get; set; }
public int? HseTechnicalNum { get; set; }
public int? EnvironmentalTrainNum { get; set; }
public int? SpecialSeriousAccidentNum { get; set; }
public int? SpecialTrainNum { get; set; }

View File

@ -0,0 +1,16 @@
using System;
namespace Model
{
/// <summary>
/// 质量验收数据
/// </summary>
public class InspectionManagementOutput : BaseEntities
{
public string Id { get; set; }
public string BreakdownCode { get; set; }
public string BreakdownName { get; set; }
public string Basis { get; set; }
public string CheckPoints { get; set; }
}
}

View File

@ -1,6 +1,6 @@
namespace Model
{
public class LargeEngineeringOutput:BaseEntities
public class LargeEngineeringOutput : BaseEntities
{
/// <summary>
/// 危大工程审批完成数
@ -34,5 +34,13 @@
/// 超危大工程完工个数
/// </summary>
public int SuperFinishedNum { get; set; }
/// <summary>
/// 危大工程论证个数
/// </summary>
public int ArgumentNum { get; set; }
/// <summary>
/// 超危大工程论证个数
/// </summary>
public int SuperArgumentNum { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
namespace Model
{
/// <summary>
/// 安全技术交底
/// </summary>
public class LicenseHSETechnicalOutput : BaseEntities
{
public string HSETechnicalCode { get; set; }
public string WorkContents { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class WBSBreakdownProjectOutput :BaseEntities
{
/// <summary>
/// 主键
/// </summary>
public string Id { get; set; }
/// <summary>
/// 数量
/// </summary>
public int Sum { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using System;
namespace Model
{
/// <summary>
/// 焊接达因数
/// </summary>
public class WeldDineOutput : BaseEntities
{
public string Id { get; set; }
/// <summary>
/// 达因数
/// </summary>
public double? Size { get; set; }
/// <summary>
/// 完成达因数
/// </summary>
public double? DoneDin { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
namespace Model
{
/// <summary>
/// 焊工数据
/// </summary>
public class WelderOutput : BaseEntities
{
public string Id { get; set; }
public string WEDCode { get; set; }
public string WEDName { get; set; }
}
}

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2026
# Visual Studio Version 17
VisualStudioVersion = 17.10.35013.160
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FineUIPro.Web", "FineUIPro.Web\FineUIPro.Web.csproj", "{C88D3156-2D56-4DB0-922E-1995FB61C9BD}"
EndProject

View File

@ -3,6 +3,7 @@ using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
@ -18,7 +19,7 @@ namespace WebAPI.Controllers
/// 获取质量统计数据
/// </summary>
/// <returns></returns>
public Model.ReturnData PostGetCQMSData()
public async Task<Model.ReturnData> PostGetCQMSData()
{
var returnData = new Model.ReturnData();
returnData.type = "CQMS";
@ -28,7 +29,15 @@ namespace WebAPI.Controllers
returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime;
if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now)
{
returnData.data = CQMSDataService.GetTodayCQMSData_CQMS();
try
{
returnData.data = await CQMSDataService.GetTodayCQMSData_CQMS();
}
catch (Exception ex)
{
returnData.code = 0;
returnData.message = ex.ToString();
}
}
else
{
@ -69,7 +78,7 @@ namespace WebAPI.Controllers
/// 获取焊接统计数据
/// </summary>
/// <returns></returns>
public Model.ReturnData PostGetHJGLData()
public async Task<ReturnData> PostGetHJGLData()
{
var returnData = new Model.ReturnData();
returnData.type = "HJGL";
@ -79,7 +88,15 @@ namespace WebAPI.Controllers
returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime;
if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now)
{
returnData.data = HJGLData_HJGLService.GetTodayHJGLData_HJGL();
try
{
returnData.data = await HJGLData_HJGLService.GetTodayHJGLData_HJGLAsync();
}
catch (Exception ex)
{
returnData.code = 0;
returnData.message = ex.ToString();
}
}
else
{
@ -119,7 +136,7 @@ namespace WebAPI.Controllers
/// 获取安全统计数据
/// </summary>
/// <returns></returns>
public Model.ReturnData PostGetHSSEData()
/*public Model.ReturnData PostGetHSSEData()
{
var returnData = new Model.ReturnData();
returnData.type = "HSSE";
@ -131,7 +148,7 @@ namespace WebAPI.Controllers
{
try
{
returnData.data = HSSEData_HSSEService.GetTodayHSSEData_HSSE().Result;
returnData.data = HSSEData_HSSEService.StatisticalDataAsync().Result;
}
catch (Exception ex)
@ -147,7 +164,35 @@ namespace WebAPI.Controllers
returnData.message = "token失效";
}
return returnData;
}*/
public async Task<Model.ReturnData> PostGetHSSEData()
{
var returnData = new Model.ReturnData();
returnData.type = "HSSE";
returnData.time = DateTime.Now.ToString();
ServerService.GetToken();
returnData.token = BLL.SysConstSetService.CNCECToken;
returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime;
if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now)
{
try
{
returnData.data = await HSSEData_HSSEService.GetTodayHSSEData_HSSE();
}
catch (Exception ex)
{
returnData.code = 0;
returnData.message = ex.ToString();
}
}
else
{
returnData.code = 500;
returnData.message = "token失效";
}
return returnData;
}
/// <summary>
/// 获取安全统计数据成功后,回调通知上报成功
/// </summary>

View File

@ -6,7 +6,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PublishTargetUrl>G:\发布\五环WebApi</_PublishTargetUrl>
<History>True|2025-06-04T03:23:17.3803405Z||;True|2025-06-04T11:04:32.4212196+08:00||;True|2025-05-26T19:19:09.7246357+08:00||;True|2025-05-26T19:16:39.1283077+08:00||;True|2025-05-26T19:09:24.1561616+08:00||;True|2025-04-07T16:11:44.5172315+08:00||;True|2025-04-02T18:10:22.8695984+08:00||;True|2025-04-02T17:59:51.2978116+08:00||;True|2025-04-02T17:50:55.8630437+08:00||;True|2025-04-02T17:49:22.5114405+08:00||;True|2025-04-02T17:47:11.0650205+08:00||;True|2025-04-02T17:39:09.8576853+08:00||;True|2025-04-02T17:38:15.3079030+08:00||;True|2025-04-02T17:22:03.6735964+08:00||;True|2025-04-02T17:19:04.4220913+08:00||;True|2025-04-02T17:17:14.0244636+08:00||;True|2025-04-02T17:11:09.6583011+08:00||;True|2025-04-02T17:07:23.6330597+08:00||;True|2025-04-02T16:58:45.4070649+08:00||;True|2025-04-02T16:50:20.5907511+08:00||;True|2025-04-02T16:44:18.5351224+08:00||;True|2025-04-02T16:31:11.1297141+08:00||;True|2025-04-02T16:18:43.1126995+08:00||;True|2025-04-02T14:50:42.5384021+08:00||;True|2025-04-01T10:53:08.9403414+08:00||;True|2025-04-01T10:52:08.7646389+08:00||;True|2025-04-01T09:52:56.3095742+08:00||;True|2025-03-13T16:44:25.3220313+08:00||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||;</History>
<History>True|2025-06-04T15:24:01.0324973Z||;True|2025-06-04T18:39:41.7304136+08:00||;True|2025-06-04T11:23:17.3803405+08:00||;True|2025-06-04T11:04:32.4212196+08:00||;True|2025-05-26T19:19:09.7246357+08:00||;True|2025-05-26T19:16:39.1283077+08:00||;True|2025-05-26T19:09:24.1561616+08:00||;True|2025-04-07T16:11:44.5172315+08:00||;True|2025-04-02T18:10:22.8695984+08:00||;True|2025-04-02T17:59:51.2978116+08:00||;True|2025-04-02T17:50:55.8630437+08:00||;True|2025-04-02T17:49:22.5114405+08:00||;True|2025-04-02T17:47:11.0650205+08:00||;True|2025-04-02T17:39:09.8576853+08:00||;True|2025-04-02T17:38:15.3079030+08:00||;True|2025-04-02T17:22:03.6735964+08:00||;True|2025-04-02T17:19:04.4220913+08:00||;True|2025-04-02T17:17:14.0244636+08:00||;True|2025-04-02T17:11:09.6583011+08:00||;True|2025-04-02T17:07:23.6330597+08:00||;True|2025-04-02T16:58:45.4070649+08:00||;True|2025-04-02T16:50:20.5907511+08:00||;True|2025-04-02T16:44:18.5351224+08:00||;True|2025-04-02T16:31:11.1297141+08:00||;True|2025-04-02T16:18:43.1126995+08:00||;True|2025-04-02T14:50:42.5384021+08:00||;True|2025-04-01T10:53:08.9403414+08:00||;True|2025-04-01T10:52:08.7646389+08:00||;True|2025-04-01T09:52:56.3095742+08:00||;True|2025-03-13T16:44:25.3220313+08:00||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
<ItemGroup>
@ -86,22 +86,22 @@
<publishTime>10/28/2024 14:02:50</publishTime>
</File>
<File Include="bin/App_global.asax.compiled">
<publishTime>06/04/2025 11:23:15</publishTime>
<publishTime>06/05/2025 01:08:59</publishTime>
</File>
<File Include="bin/App_global.asax.dll">
<publishTime>06/04/2025 11:23:15</publishTime>
<publishTime>06/05/2025 01:08:59</publishTime>
</File>
<File Include="bin/Aspose.Words.dll">
<publishTime>12/06/2024 20:13:58</publishTime>
</File>
<File Include="bin/BLL.dll">
<publishTime>06/04/2025 11:23:05</publishTime>
<publishTime>06/05/2025 01:08:49</publishTime>
</File>
<File Include="bin/BLL.dll.config">
<publishTime>12/26/2024 09:46:52</publishTime>
</File>
<File Include="bin/BLL.pdb">
<publishTime>06/04/2025 11:23:05</publishTime>
<publishTime>06/05/2025 01:08:49</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/18/2020 05:32:28</publishTime>
@ -128,10 +128,10 @@
<publishTime>07/25/2012 19:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
<publishTime>06/04/2025 11:04:03</publishTime>
<publishTime>06/05/2025 01:08:44</publishTime>
</File>
<File Include="bin/Model.pdb">
<publishTime>06/04/2025 11:04:03</publishTime>
<publishTime>06/05/2025 01:08:44</publishTime>
</File>
<File Include="bin/netstandard.dll">
<publishTime>07/04/2024 14:13:01</publishTime>
@ -389,13 +389,13 @@
<publishTime>02/09/2013 00:42:28</publishTime>
</File>
<File Include="bin/WebAPI.dll">
<publishTime>06/04/2025 11:23:06</publishTime>
<publishTime>06/05/2025 01:08:50</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
<publishTime>06/04/2025 11:23:06</publishTime>
<publishTime>06/05/2025 01:08:50</publishTime>
</File>
<File Include="bin/WebAPI.xml">
<publishTime>06/04/2025 11:23:06</publishTime>
<publishTime>06/05/2025 01:08:50</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 21:57:34</publishTime>
@ -479,7 +479,7 @@
<publishTime>10/28/2024 14:02:50</publishTime>
</File>
<File Include="PrecompiledApp.config">
<publishTime>06/04/2025 11:23:07</publishTime>
<publishTime>06/05/2025 01:08:51</publishTime>
</File>
<File Include="Scripts/bootstrap.js">
<publishTime>10/28/2024 14:02:50</publishTime>