Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
@@ -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
|
||||||
@@ -402,7 +402,7 @@
|
|||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
|
||||||
<f:Panel ID="Panel12" IsFluid="true" Title="3.3 质量控制点或检验试验计划(ITP)情况" runat="server" EnableCollapse="false"
|
<f:Panel ID="Panel12" IsFluid="true" Title="3.3 检验试验计划(ITP)发布情况统计" runat="server" EnableCollapse="false"
|
||||||
ShowHeader="true">
|
ShowHeader="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Form ID="Form11" runat="server" ShowBorder="true" BodyPadding="5px" ShowHeader="false" Title="表单">
|
<f:Form ID="Form11" runat="server" ShowBorder="true" BodyPadding="5px" ShowHeader="false" Title="表单">
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||||||
//加载所有专业
|
//加载所有专业
|
||||||
CNProfessionals = (from x in db.Base_CNProfessional
|
CNProfessionals = (from x in db.Base_CNProfessional
|
||||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||||
&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
//&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select new ProfessionalsClass
|
select new ProfessionalsClass
|
||||||
{
|
{
|
||||||
@@ -1542,19 +1542,28 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||||||
// orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
// select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
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)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.View_CQMS_InspectionManagementDetail
|
var query = from x in cqmsDetail
|
||||||
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
|
||||||
from u in unitJoin.DefaultIfEmpty()
|
|
||||||
where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId
|
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
c.CheckDate,
|
x.CheckDate,
|
||||||
c.ProjectId,
|
x.ProjectId,
|
||||||
u.UnitId,
|
x.UnitId,
|
||||||
u.UnitName,
|
x.UnitName,
|
||||||
c.IsOnceQualified
|
x.IsOnceQualified
|
||||||
};
|
};
|
||||||
var AllList = query.ToList();
|
var AllList = query.ToList();
|
||||||
var monethCount = query
|
var monethCount = query
|
||||||
|
|||||||
@@ -401,7 +401,7 @@
|
|||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
|
||||||
<f:Panel ID="Panel12" IsFluid="true" Title="3.3 质量控制点或检验试验计划(ITP)情况" runat="server" EnableCollapse="false"
|
<f:Panel ID="Panel12" IsFluid="true" Title="3.3 检验试验计划(ITP)发布情况统计" runat="server" EnableCollapse="false"
|
||||||
ShowHeader="true">
|
ShowHeader="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Form ID="Form11" runat="server" ShowBorder="true" BodyPadding="5px" ShowHeader="false" Title="表单">
|
<f:Form ID="Form11" runat="server" ShowBorder="true" BodyPadding="5px" ShowHeader="false" Title="表单">
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||||||
//加载所有专业
|
//加载所有专业
|
||||||
CNProfessionals = (from x in db.Base_CNProfessional
|
CNProfessionals = (from x in db.Base_CNProfessional
|
||||||
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
|
||||||
&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
//&& x.CNProfessionalId != BLL.Const.ComprehensiveId
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select new ProfessionalsClass
|
select new ProfessionalsClass
|
||||||
{
|
{
|
||||||
@@ -1546,19 +1546,28 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||||||
// orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
// select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
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)
|
foreach (var item in units)
|
||||||
{
|
{
|
||||||
var query = from c in db.View_CQMS_InspectionManagementDetail
|
var query = from x in cqmsDetail
|
||||||
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
|
||||||
from u in unitJoin.DefaultIfEmpty()
|
|
||||||
where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId
|
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
c.CheckDate,
|
x.CheckDate,
|
||||||
c.ProjectId,
|
x.ProjectId,
|
||||||
u.UnitId,
|
x.UnitId,
|
||||||
u.UnitName,
|
x.UnitName,
|
||||||
c.IsOnceQualified
|
x.IsOnceQualified
|
||||||
};
|
};
|
||||||
var AllList = query.ToList();
|
var AllList = query.ToList();
|
||||||
var monethCount = query
|
var monethCount = query
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<Use64BitIISExpress>false</Use64BitIISExpress>
|
<Use64BitIISExpress>false</Use64BitIISExpress>
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
|
|||||||
Reference in New Issue
Block a user