1
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -152,7 +153,8 @@ namespace FineUIPro.Web.common
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where y.IsCQMS == true && x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now) && pids.Contains(x.ProjectId)
|
||||
@@ -175,7 +177,8 @@ namespace FineUIPro.Web.common
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where x.IsOnSite == true && x.InspectionType.Contains("计量") && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
@@ -196,7 +199,8 @@ namespace FineUIPro.Web.common
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
@@ -223,7 +227,8 @@ namespace FineUIPro.Web.common
|
||||
result = num2;
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = 0;
|
||||
//过期提醒记录数
|
||||
var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now
|
||||
@@ -247,7 +252,8 @@ namespace FineUIPro.Web.common
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.IsTrain == true && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
@@ -268,7 +274,8 @@ namespace FineUIPro.Web.common
|
||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||
return q;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||
where pids.Contains(x.ProjectId)
|
||||
select x.JoinPersonNum ?? 0).ToList().Sum();
|
||||
@@ -285,19 +292,30 @@ namespace FineUIPro.Web.common
|
||||
if (pids == null)
|
||||
{
|
||||
int allCount = 0;
|
||||
var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true
|
||||
var getPersonQualitys = from x in Funs.DB.QualityAudit_PersonQuality
|
||||
join y in Funs.DB.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId
|
||||
where x.LimitDate.HasValue && x.LimitDate < DateTime.Now && y.OutTime == null && z.PostType == Const.PostType_2
|
||||
select x;
|
||||
//var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
// where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true
|
||||
// select x;
|
||||
//// 预警人数
|
||||
allCount = getPersonQualitys.Count();
|
||||
this.spanQualityChartAnalysis.InnerHtml = allCount.ToString();
|
||||
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int allCount = 0;
|
||||
var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true && pids.Contains(x.ProjectId)
|
||||
var getPersonQualitys = from x in Funs.DB.QualityAudit_PersonQuality
|
||||
join y in Funs.DB.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId
|
||||
where x.LimitDate.HasValue && x.LimitDate < DateTime.Now && y.OutTime == null && z.PostType == Const.PostType_2 && pids.Contains(y.ProjectId)
|
||||
select x;
|
||||
//var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
// where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true && pids.Contains(x.ProjectId)
|
||||
// select x;
|
||||
//// 预警人数
|
||||
allCount = getPersonQualitys.Count();
|
||||
this.spanQualityChartAnalysis.InnerHtml = allCount.ToString();
|
||||
@@ -326,7 +344,8 @@ namespace FineUIPro.Web.common
|
||||
// select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = 0;
|
||||
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where pids.Contains(x.ProjectId)
|
||||
@@ -337,7 +356,7 @@ namespace FineUIPro.Web.common
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 次合格数量
|
||||
/// 一次合格数量
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int getIsOnceInspectionManagement()
|
||||
@@ -350,7 +369,7 @@ namespace FineUIPro.Web.common
|
||||
// BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
|
||||
// null, null, DateTime.Parse("2001-01-01"), DateTime.Now, true);
|
||||
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.IsOnceQualified == true
|
||||
where (x.IsOnceQualified == null || x.IsOnceQualified == true)
|
||||
select x).Count();
|
||||
result = num2;
|
||||
|
||||
@@ -359,11 +378,12 @@ namespace FineUIPro.Web.common
|
||||
// select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||
where (x.IsOnceQualified == null || x.IsOnceQualified == true) && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
result = num2;
|
||||
|
||||
@@ -398,7 +418,8 @@ namespace FineUIPro.Web.common
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && x.State == "7" && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
@@ -418,7 +439,8 @@ namespace FineUIPro.Web.common
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && x.State != "7" && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
@@ -463,7 +485,8 @@ namespace FineUIPro.Web.common
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
@@ -583,7 +606,8 @@ namespace FineUIPro.Web.common
|
||||
}
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
||||
@@ -708,7 +732,7 @@ namespace FineUIPro.Web.common
|
||||
private void getInspectionManagementInfo()
|
||||
{
|
||||
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId && 1 == 2)
|
||||
{
|
||||
//var q=(from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||
var q = (from x in Funs.DB.Control_PointCropping where x.ParentId == null || x.ParentId == "" orderby x.OperateTime select x).ToList();
|
||||
@@ -731,7 +755,7 @@ namespace FineUIPro.Web.common
|
||||
where x.CNProfessionalId == item.ControlId
|
||||
select x).Count();
|
||||
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true
|
||||
where x.CNProfessionalId == item.ControlId && (x.IsOnceQualified == null || x.IsOnceQualified == true)
|
||||
select x).Count();
|
||||
}
|
||||
else
|
||||
@@ -740,7 +764,7 @@ namespace FineUIPro.Web.common
|
||||
where x.CNProfessionalId == item.ControlId && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||
where x.CNProfessionalId == item.ControlId && (x.IsOnceQualified == null || x.IsOnceQualified == true) && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
}
|
||||
|
||||
@@ -767,7 +791,7 @@ namespace FineUIPro.Web.common
|
||||
else
|
||||
{
|
||||
var q = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||
|
||||
|
||||
foreach (var item in q)
|
||||
{
|
||||
//获取专业
|
||||
@@ -785,7 +809,7 @@ namespace FineUIPro.Web.common
|
||||
where x.CNProfessionalId == item.CNProfessionalId
|
||||
select x).Count();
|
||||
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true
|
||||
where x.CNProfessionalId == item.CNProfessionalId && (x.IsOnceQualified == null || x.IsOnceQualified == true)
|
||||
select x).Count();
|
||||
}
|
||||
else
|
||||
@@ -794,7 +818,7 @@ namespace FineUIPro.Web.common
|
||||
where x.CNProfessionalId == item.CNProfessionalId && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||
where x.CNProfessionalId == item.CNProfessionalId && (x.IsOnceQualified == null || x.IsOnceQualified == true) && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
}
|
||||
|
||||
@@ -839,7 +863,7 @@ namespace FineUIPro.Web.common
|
||||
protected string ncrCount;
|
||||
private void getNcrInfo()
|
||||
{
|
||||
if (pids==null)
|
||||
if (pids == null)
|
||||
{
|
||||
//闭环项 有完成日期的
|
||||
//var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate != null).Count();
|
||||
@@ -888,7 +912,7 @@ namespace FineUIPro.Web.common
|
||||
ncrZy = ncrZy.TrimEnd(',');
|
||||
ncrCount = ncrCount.TrimEnd(',');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user