Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
commit
ce331d9d15
|
@ -0,0 +1,13 @@
|
|||
|
||||
CREATE VIEW View_MonthReport_InspectionManagement
|
||||
AS
|
||||
/************Ô±¨È¡Êý************/
|
||||
select im.InspectionId,
|
||||
im.ProjectId,
|
||||
im.CNProfessionalId,
|
||||
im.IsOnceQualified,
|
||||
im.InspectionDate,
|
||||
detail.UnitWorkId
|
||||
from ProcessControl_InspectionManagement as im
|
||||
left join (select distinct(InspectionId),UnitWorkId from ProcessControl_InspectionManagementDetail) as detail on detail.InspectionId = im.InspectionId
|
||||
go
|
|
@ -453,5 +453,30 @@ namespace BLL
|
|||
|
||||
return InspectionMangementList;
|
||||
}
|
||||
|
||||
|
||||
public static List<Model.View_MonthReport_InspectionManagement> getViewMonthReportInspectionManagementByCNProfessionalIdAndDate(string projectId, string cNProfessionalId, DateTime startDate, DateTime SoptDate, bool isOnceQualified)
|
||||
{
|
||||
List<Model.View_MonthReport_InspectionManagement> InspectionMangementList = (from x in Funs.DB.View_MonthReport_InspectionManagement select x).ToList();
|
||||
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.ProjectId == projectId select x).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cNProfessionalId) && cNProfessionalId != "0")
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.CNProfessionalId == cNProfessionalId select x).ToList();
|
||||
}
|
||||
if (isOnceQualified == true)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList();
|
||||
}
|
||||
if (startDate != null && SoptDate != null)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.InspectionDate >= startDate && x.InspectionDate <= SoptDate select x).ToList();
|
||||
}
|
||||
|
||||
return InspectionMangementList;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1535,13 +1535,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
string Quantity1Sum = String.Empty;//本月检查合格点数/本月检查点数
|
||||
string Quantity2Sum = String.Empty;//累计检查合格点数/累计检查点数
|
||||
|
||||
|
||||
//加载所有单位
|
||||
//var units = from x in db.Project_ProjectUnit
|
||||
// join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
|
||||
// orderby y.UnitCode
|
||||
// select new { x.UnitId, y.UnitName };
|
||||
var inspectionUnits = 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
|
||||
|
@ -1678,10 +1671,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
List<string> workNames = new List<string>();
|
||||
//专业下所有集合
|
||||
List<Model.View_CQMS_InspectionManagementDetail> totalManagementList = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, projectStartDate, endDate, false);
|
||||
List<Model.View_MonthReport_InspectionManagement> totalManagementList = BLL.InspectionManagementService.getViewMonthReportInspectionManagementByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, projectStartDate, endDate, false);
|
||||
//专业下当期集合
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementList = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, startDate, endDate, false);
|
||||
List<Model.View_MonthReport_InspectionManagement> managementList = BLL.InspectionManagementService.getViewMonthReportInspectionManagementByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, startDate, endDate, false);
|
||||
workNames = totalManagementList.Select(x => x.UnitWorkId).DefaultIfEmpty().Distinct()?.ToList();
|
||||
|
||||
foreach (string item in workNames)
|
||||
{
|
||||
Model.WBS_UnitWork ins = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(item);
|
||||
|
|
|
@ -1509,8 +1509,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
CheckLotBindStatisc("PP");//检验批统计:管道
|
||||
CheckLotBindStatisc("EL");//检验批统计:电气
|
||||
CheckLotBindStatisc("IN");//检验批统计:仪表
|
||||
CheckLotBindStatisc("FF");//检验批统计:反腐
|
||||
CheckLotBindStatisc("XF");//检验批统计:消防
|
||||
CheckLotBindStatisc("AC");//检验批统计:反腐
|
||||
CheckLotBindStatisc("FF");//检验批统计:消防
|
||||
|
||||
#region 现场质量共检数据合计
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
|
@ -1670,9 +1670,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
|
||||
List<string> workNames = new List<string>();
|
||||
//专业下所有集合
|
||||
List<Model.View_CQMS_InspectionManagementDetail> totalManagementList = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, projectStartDate, endDate, false);
|
||||
List<Model.View_MonthReport_InspectionManagement> totalManagementList = BLL.InspectionManagementService.getViewMonthReportInspectionManagementByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, projectStartDate, endDate, false);
|
||||
//专业下当期集合
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementList = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, startDate, endDate, false);
|
||||
List<Model.View_MonthReport_InspectionManagement> managementList = BLL.InspectionManagementService.getViewMonthReportInspectionManagementByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, startDate, endDate, false);
|
||||
workNames = totalManagementList.Select(x => x.UnitWorkId).DefaultIfEmpty().Distinct()?.ToList();
|
||||
foreach (string item in workNames)
|
||||
{
|
||||
|
@ -1833,7 +1833,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
GvYb.SummaryData = summary;
|
||||
}
|
||||
//检验批统计:防腐
|
||||
if (cNProfessionalCode == "FF")
|
||||
if (cNProfessionalCode == "AC")
|
||||
{
|
||||
this.GvFf.DataSource = StatisticsList;
|
||||
this.GvFf.DataBind();
|
||||
|
@ -1852,7 +1852,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
GvFf.SummaryData = summary;
|
||||
}
|
||||
//检验批统计:消防
|
||||
if (cNProfessionalCode == "XF")
|
||||
if (cNProfessionalCode == "FF")
|
||||
{
|
||||
this.GvXf.DataSource = StatisticsList;
|
||||
this.GvXf.DataBind();
|
||||
|
|
1910
SGGL/Model/Model.cs
1910
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue