20240528 质量月报修改

This commit is contained in:
2024-05-28 18:42:12 +08:00
parent f36bf41692
commit 7be591cb7c
23 changed files with 80 additions and 76 deletions
@@ -436,8 +436,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in units)
var generalPlanUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in generalPlanUnits)
{
var query = from c in db.Comprehensive_GeneralPlanApproval
@@ -518,8 +518,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in units)
var majorPlanUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in majorPlanUnits)
{
var query = from c in db.Comprehensive_MajorPlanApproval
@@ -858,8 +858,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
}
int i = 1;
var cNProfessionals = from x in db.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
&& x.CNProfessionalId != BLL.Const.ComprehensiveId orderby x.SortIndex select x;
var cNProfessionals = from x in db.Base_CNProfessional
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
&& x.CNProfessionalId != BLL.Const.ComprehensiveId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId
orderby x.SortIndex
select x;
foreach (var item in cNProfessionals)
{
//专业下所有集合
@@ -928,10 +931,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2
// orderby y.UnitCode
// select new { x.UnitId, y.UnitName };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
foreach (var item in units)
var passWelderUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
foreach (var item in passWelderUnits)
{
var query = from c in db.Comprehensive_InspectionPerson
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
@@ -1152,12 +1154,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2)
// orderby y.UnitCode
// select new { x.UnitId, y.UnitName };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
var nondestructiveTestUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
int? totalNum0 = 0, totalNum1 = 0;//拍片数量合计
foreach (var item in units)
foreach (var item in nondestructiveTestUnits)
{
int? num0 = 0, num1 = 0;//拍片数量小计
@@ -1343,10 +1345,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in units)
var inspectionEquipmentUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in inspectionEquipmentUnits)
{
var query = from c in db.Comprehensive_InspectionEquipment
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
@@ -1452,8 +1453,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in units)
var measuringInspectionUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in measuringInspectionUnits)
{
var query = from c in db.Comprehensive_InspectionMachine
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
@@ -1541,7 +1542,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
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
from u in unitJoin.DefaultIfEmpty()
@@ -1553,7 +1554,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
u.UnitName,
c.IsOnceQualified
};
foreach (var item in units)
foreach (var item in inspectionUnits)
{
var query = from x in cqmsDetail
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
@@ -1902,8 +1903,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in units)
var pressureUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in pressureUnits)
{
var query = from c in db.Comprehensive_PressurePipe
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
@@ -1979,8 +1980,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in units)
var pipingUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in pipingUnits)
{
var query = from c in db.Comprehensive_PressurePipe
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
@@ -2056,8 +2057,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in units)
var specialUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in specialUnits)
{
var query = from c in db.Comprehensive_SpecialEquipment
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
@@ -2139,9 +2140,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2
// orderby y.UnitCode
// select new { x.UnitId, y.UnitName };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
var ncrUnits = units.ToList();
foreach (var item in units)
foreach (var item in ncrUnits)
{
var query = from c in db.Comprehensive_NCRManagement
@@ -2234,8 +2235,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// 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 };
units = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in units)
var unitLists = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in unitLists)
{
var query = from c in db.Check_CheckControl
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
@@ -2388,13 +2389,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
int Quantity3Sum = 0;
int Quantity4Sum = 0;
//加载所有单位
//var units = from x in db.Project_ProjectUnit
//var sendUnits = 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)
// where x.ProjectId == this.CurrUser.LoginProjectId
// 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();
foreach (var item in units)
var unitLists = units.ToList();
foreach (var item in unitLists)
{
var query = from c in db.Comprehensive_DataReceivingDoc
join u in db.Base_Unit on c.SendUnit equals u.UnitId into unitJoin