质量月报共检控制点统计:按照共检申请单份数进行统计。
This commit is contained in:
parent
f975f02b59
commit
1218297193
File diff suppressed because one or more lines are too long
|
@ -1617,20 +1617,31 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
string Quantity2Sum = String.Empty;//累计检查合格点数/累计检查点数
|
string Quantity2Sum = String.Empty;//累计检查合格点数/累计检查点数
|
||||||
|
|
||||||
var inspectionUnits = 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
|
//var cqmsDetail = from c in db.View_CQMS_InspectionManagementDetail
|
||||||
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
// join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
||||||
from u in unitJoin.DefaultIfEmpty()
|
// from u in unitJoin.DefaultIfEmpty()
|
||||||
select new
|
// select new
|
||||||
{
|
// {
|
||||||
c.InspectionDate,
|
// c.InspectionDate,
|
||||||
c.ProjectId,
|
// c.ProjectId,
|
||||||
u.UnitId,
|
// u.UnitId,
|
||||||
u.UnitName,
|
// u.UnitName,
|
||||||
c.IsOnceQualified
|
// c.IsOnceQualified
|
||||||
};
|
// };
|
||||||
|
var cqmsList = from c in db.ProcessControl_InspectionManagement
|
||||||
|
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
||||||
|
from u in unitJoin.DefaultIfEmpty()
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
c.InspectionDate,
|
||||||
|
c.ProjectId,
|
||||||
|
u.UnitId,
|
||||||
|
u.UnitName,
|
||||||
|
c.IsOnceQualified
|
||||||
|
};
|
||||||
foreach (var item in inspectionUnits)
|
foreach (var item in inspectionUnits)
|
||||||
{
|
{
|
||||||
var query = from x in cqmsDetail
|
var query = from x in cqmsList
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
|
|
|
@ -1562,20 +1562,31 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
// orderby y.UnitCode
|
// orderby y.UnitCode
|
||||||
// select new { x.UnitId, y.UnitName };
|
// select new { x.UnitId, y.UnitName };
|
||||||
var unitLists = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
|
var unitLists = 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
|
//var cqmsDetail = from c in db.View_CQMS_InspectionManagementDetail
|
||||||
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
// join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
|
||||||
from u in unitJoin.DefaultIfEmpty()
|
// from u in unitJoin.DefaultIfEmpty()
|
||||||
select new
|
// select new
|
||||||
{
|
// {
|
||||||
c.CheckDate,
|
// c.CheckDate,
|
||||||
c.ProjectId,
|
// c.ProjectId,
|
||||||
u.UnitId,
|
// u.UnitId,
|
||||||
u.UnitName,
|
// u.UnitName,
|
||||||
c.IsOnceQualified
|
// c.IsOnceQualified
|
||||||
};
|
// };
|
||||||
|
var cqmsList = from c in db.ProcessControl_InspectionManagement
|
||||||
|
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 unitLists)
|
foreach (var item in unitLists)
|
||||||
{
|
{
|
||||||
var query = from x in cqmsDetail
|
var query = from x in cqmsList
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue