diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-07-phf.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-07-phf.sql new file mode 100644 index 00000000..3a427d9a --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-05-07-phf.sql @@ -0,0 +1,34 @@ +--Îå»·Ôö¼ÓË÷Òý£¬ÌáÉý²éѯЧÂÊ +CREATE NONCLUSTERED INDEX [QualityAudit_PersonQuality_LimitDate_Index] +ON [dbo].[QualityAudit_PersonQuality] ([LimitDate]) +INCLUDE ([PersonId]) +GO + +CREATE NONCLUSTERED INDEX [Bo_Sheng_TrainPerson_ProjectId_DeleteTag_Index] +ON [dbo].[Bo_Sheng_TrainPerson] ([ProjectId],[DeleteTag]) +INCLUDE ([ID],[DeleteUser],[DeleteDate],[EmpName],[IdentifyId],[Photo],[Station],[Category],[CategoryName],[RecordId],[SignName],[DepartId],[DepartName],[SignInDate],[SignInType],[TrainPeriod],[State],[TotalScore],[PassScore],[Score],[IsPass],[GroupNo],[ExamNo],[ExamCount],[DeviceNo],[OwnerDepartId],[UploadTime],[Answers],[CreateDate],[CreateUser],[OperDate],[OperUser]) +GO + +CREATE NONCLUSTERED INDEX [License_LicenseManager_ProjectId_Index] +ON [dbo].[License_LicenseManager] ([ProjectId]) +INCLUDE ([LicenseManagerId],[LicenseTypeId],[LicenseManagerCode],[LicenseManageName],[UnitId],[LicenseManageContents],[CompileMan],[CompileDate],[States],[WorkAreaId],[StartDate],[EndDate],[ApplicantMan],[WorkStates],[IsHighRisk]) +GO + +CREATE NONCLUSTERED INDEX [GJSX_ProjectId_Index] +ON [dbo].[GJSX] ([ProjectId]) +GO + +CREATE NONCLUSTERED INDEX [WBS_BreakdownProject_ProjectId_IsSelected_Class_Index] +ON [dbo].[WBS_BreakdownProject] ([ProjectId],[IsSelected],[Class]) + +GO + +CREATE NONCLUSTERED INDEX [ProcessControl_InspectionManagement_ProjectId_IsOnceQualified_Index] +ON [dbo].[ProcessControl_InspectionManagement] ([ProjectId],[IsOnceQualified]) +INCLUDE ([InspectionId]) +Go + +CREATE NONCLUSTERED INDEX [Hazard_HazardSelectedItem_ProjectId_Index] +ON [dbo].[Hazard_HazardSelectedItem] ([ProjectId]) +INCLUDE ([HazardLevel]) +GO \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs index 3ec68e33..038f2f7a 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs @@ -1542,19 +1542,28 @@ namespace FineUIPro.Web.CQMS.ManageReportNew // orderby y.UnitCode // select new { x.UnitId, y.UnitName }; units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList(); + var cqmsDetail = from c in db.View_CQMS_InspectionManagementDetail + join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin + from u in unitJoin.DefaultIfEmpty() + select new + { + c.CheckDate, + c.ProjectId, + u.UnitId, + u.UnitName, + c.IsOnceQualified + }; foreach (var item in units) { - var query = from c in db.View_CQMS_InspectionManagementDetail - join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin - from u in unitJoin.DefaultIfEmpty() - where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId + var query = from x in cqmsDetail + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId select new { - c.CheckDate, - c.ProjectId, - u.UnitId, - u.UnitName, - c.IsOnceQualified + x.CheckDate, + x.ProjectId, + x.UnitId, + x.UnitName, + x.IsOnceQualified }; var AllList = query.ToList(); var monethCount = query diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs index bcc1e45d..a0fe06e9 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs @@ -1546,19 +1546,28 @@ namespace FineUIPro.Web.CQMS.ManageReportNew // orderby y.UnitCode // select new { x.UnitId, y.UnitName }; units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList(); + var cqmsDetail = from c in db.View_CQMS_InspectionManagementDetail + join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin + from u in unitJoin.DefaultIfEmpty() + select new + { + c.CheckDate, + c.ProjectId, + u.UnitId, + u.UnitName, + c.IsOnceQualified + }; foreach (var item in units) { - var query = from c in db.View_CQMS_InspectionManagementDetail - join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin - from u in unitJoin.DefaultIfEmpty() - where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId + var query = from x in cqmsDetail + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId select new { - c.CheckDate, - c.ProjectId, - u.UnitId, - u.UnitName, - c.IsOnceQualified + x.CheckDate, + x.ProjectId, + x.UnitId, + x.UnitName, + x.IsOnceQualified }; var AllList = query.ToList(); var monethCount = query diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index 63ca13cc..9e91deff 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index bd497c6b..5fe155da 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true