20023-08-10
This commit is contained in:
@@ -323,12 +323,12 @@ namespace BLL
|
||||
public static void StatisticalData(string projectid, CQMSDateType cQMSDateType)
|
||||
{
|
||||
string thisUnitId = string.Empty;
|
||||
var thisUnit = Const.UnitId_CWCEC;
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
if (thisUnit != null)
|
||||
{
|
||||
thisUnitId = thisUnit;
|
||||
thisUnitId = thisUnit.UnitId;
|
||||
}
|
||||
var base_Unit = BLL.UnitService.GetUnitByUnitId(thisUnitId);
|
||||
var baseUnit = BLL.UnitService.GetUnitByUnitId(thisUnitId);
|
||||
Model.Project_CQMSData_CQMS table = new Model.Project_CQMSData_CQMS();
|
||||
|
||||
if (IsReportByToday(projectid))
|
||||
@@ -340,8 +340,8 @@ namespace BLL
|
||||
table.Id = SQLHelper.GetNewID();
|
||||
}
|
||||
table.UnitId = thisUnitId;
|
||||
table.CollCropCode = base_Unit.CollCropCode;
|
||||
table.UnitName = base_Unit.UnitName;
|
||||
table.CollCropCode = baseUnit.CollCropCode;
|
||||
table.UnitName = baseUnit.UnitName;
|
||||
table.ProjectId = projectid;
|
||||
table.ReportDate = DateTime.Now.Date;
|
||||
if (cQMSDateType == CQMSDateType.QualityTraining || cQMSDateType == CQMSDateType.All)
|
||||
@@ -352,7 +352,7 @@ namespace BLL
|
||||
if (cQMSDateType == CQMSDateType.MeasuringInstruments || cQMSDateType == CQMSDateType.All)
|
||||
{
|
||||
table.UseNum = GetUseNum(projectid);
|
||||
table.OKNum = GetOKNum(projectid);
|
||||
table.OKNum = GetOkNum(projectid);
|
||||
}
|
||||
if (cQMSDateType == CQMSDateType.ManagerData || cQMSDateType == CQMSDateType.All)
|
||||
{
|
||||
@@ -376,11 +376,11 @@ namespace BLL
|
||||
if (cQMSDateType == CQMSDateType.QualityAcceptance || cQMSDateType == CQMSDateType.All)
|
||||
{
|
||||
table.KeyProcessNum = GetKeyProcessNum(projectid);
|
||||
table.KeyProcessOKNum = GetKeyProcessOKNum(projectid);
|
||||
table.KeyProcessOKNum = GetKeyProcessOkNum(projectid);
|
||||
table.SpecialProcessNum = GetSpecialProcessNum(projectid);
|
||||
table.SpecialProcessOKNum = GetSpecialProcessOKNum(projectid);
|
||||
table.SpecialProcessOKNum = GetSpecialProcessOkNum(projectid);
|
||||
table.ConcealedWorksNum = GetConcealedWorksNum(projectid);
|
||||
table.ConcealedWorksOKNum = GetConcealedWorksOKNum(projectid);
|
||||
table.ConcealedWorksOKNum = GetConcealedWorksOkNum(projectid);
|
||||
table.UnitProjectOnesNum = GetUnitProjectOnesNum(projectid);
|
||||
table.UnitProjectOnesOKNum = GetUnitProjectOnesOKNum(projectid);
|
||||
table.MaterialInRecheckNum = GetMaterialInRecheckNum(projectid);
|
||||
@@ -411,8 +411,8 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetTrainPersonNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.ProjectId == projectid && x.IsTrain == true
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.ProjectId == projectid && x.IsTrain == true && x.CompileDate>Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -422,8 +422,8 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetTechnicalDisclosePersonNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||
where x.ProjectId == projectid
|
||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||
where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
|
||||
select x.JoinPersonNum).ToList().Sum(x => x.Value);
|
||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||
return q;
|
||||
@@ -436,6 +436,7 @@ namespace BLL
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where x.ProjectId == projectid && x.IsOnSite == true && x.InspectionType.Contains("计量")
|
||||
&& x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -443,10 +444,11 @@ namespace BLL
|
||||
/// 获取校准合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetOKNum(string projectid)
|
||||
public static int GetOkNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where x.ProjectId == projectid && x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true
|
||||
&& x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -474,9 +476,9 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetProjectPersonNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
join y in Funs.DB.Base_WorkPost on x.PostId equals y.WorkPostId
|
||||
where x.ProjectId == projectid && y.IsCQMS == true && x.IsOnSite == true
|
||||
int result = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.ProjectId == projectid && y.IsCQMS == true && x.IsUsed == true
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -486,8 +488,8 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetProblemNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
where x.ProjectId == projectid && x.CheckDate <= DateTime.Now
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
where x.ProjectId == projectid && x.CheckDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -498,7 +500,7 @@ namespace BLL
|
||||
public static int GetProblemCompletedNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
where x.ProjectId == projectid && x.CheckDate <= DateTime.Now && x.State == "7"
|
||||
where x.ProjectId == projectid && x.CheckDate > Const.DtmarkTime && x.State == "7"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -509,7 +511,7 @@ namespace BLL
|
||||
public static int GetProblemNotCompletedNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
where x.ProjectId == projectid && x.CheckDate <= DateTime.Now && x.State != "7"
|
||||
where x.ProjectId == projectid && x.CheckDate > Const.DtmarkTime && x.State != "7"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -520,7 +522,7 @@ namespace BLL
|
||||
public static int GetSNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains("S") && x.IsSelected == true
|
||||
where x.ProjectId == projectid && x.Class.Contains("S") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -531,7 +533,7 @@ namespace BLL
|
||||
public static int GetANum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains("A") && x.IsSelected == true
|
||||
where x.ProjectId == projectid && x.Class.Contains("A") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -542,7 +544,7 @@ namespace BLL
|
||||
public static int GetBNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains("B") && x.IsSelected == true
|
||||
where x.ProjectId == projectid && x.Class.Contains("B") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -553,7 +555,7 @@ namespace BLL
|
||||
public static int GetCNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains("C") && x.IsSelected == true
|
||||
where x.ProjectId == projectid && x.Class.Contains("C") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -565,7 +567,7 @@ namespace BLL
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "1"
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "1" && x.CreateDate> Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -573,12 +575,12 @@ namespace BLL
|
||||
/// 获取关键工序验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetKeyProcessOKNum(string projectid)
|
||||
public static int GetKeyProcessOkNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "1" && z.IsOnceQualified == true
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "1" && z.IsOnceQualified == true && x.CreateDate>Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -590,7 +592,7 @@ namespace BLL
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "2"
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "2" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -598,12 +600,12 @@ namespace BLL
|
||||
/// 获取特殊过程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSpecialProcessOKNum(string projectid)
|
||||
public static int GetSpecialProcessOkNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "2" && z.IsOnceQualified == true
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "2" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -615,7 +617,7 @@ namespace BLL
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "3"
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "3" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -623,12 +625,12 @@ namespace BLL
|
||||
/// 获取隐蔽工程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetConcealedWorksOKNum(string projectid)
|
||||
public static int GetConcealedWorksOkNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "3" && z.IsOnceQualified == true
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "3" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -640,7 +642,7 @@ namespace BLL
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "4"
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "4" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -653,7 +655,7 @@ namespace BLL
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "4" && z.IsOnceQualified == true
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "4" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -665,7 +667,7 @@ namespace BLL
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "5"
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "5" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -678,7 +680,7 @@ namespace BLL
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "5" && z.IsOnceQualified == true
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -689,7 +691,7 @@ namespace BLL
|
||||
public static int GetSingleProjectNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Project_Installation
|
||||
where x.ProjectId == projectid && x.SuperInstallationId == "0"
|
||||
where x.ProjectId == projectid && x.SuperInstallationId == "0"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -733,7 +735,7 @@ namespace BLL
|
||||
public static int GetInspectionLotNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.IsSelected == true
|
||||
where x.ProjectId == projectid && x.IsSelected == true
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user