This commit is contained in:
2025-03-27 09:47:01 +08:00
9 changed files with 44 additions and 18 deletions
+29 -8
View File
@@ -173,7 +173,29 @@ namespace FineUIPro.Web.common
.SelectMany(x => x.persons.DefaultIfEmpty(),
(x, person) => new { x.post, person })
.Where(x => pids.Contains(x.person.ProjectId));
divCqmsManageNum.InnerText = qualityQuery.Count().ToString();
//企业总部人员和分支机构人员
var query = (from person in db.Person_CompanyBranchPerson
join unit in db.Base_Unit on person.UnitId equals unit.UnitId into unitJoin
from unit in unitJoin.DefaultIfEmpty() // 左连接
join workPost in db.Base_WorkPost on person.WorkPostId equals workPost.WorkPostId into workPostJoin
from workPost in workPostJoin.DefaultIfEmpty() // 左连接
where person.IsOnJob == true && workPost.IsCQMS == true
select new
{
ID = person.CompanyBranchPersonId,
UnitName = unit.UnitName,
PersonName = person.PersonName,
SexStr = person.Sex == "1" ? "男" : "女",
IdentityCard = person.IdentityCard,
WorkPostName = workPost.WorkPostName,
Telephone = person.Telephone,
IsOnJob = person.IsOnJob,
Remark = person.Remark,
ProjectName = ""
}).ToList();
divCqmsManageNum.InnerText = (qualityQuery.Count() + query.Count()).ToString();
// 质量培训人员
divCqmsPxNum.InnerText = db.Comprehensive_InspectionPerson
.Where(x => pids.Contains(x.ProjectId))
@@ -674,16 +696,15 @@ namespace FineUIPro.Web.common
if (pids == null)
{
zlallNumber = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now
select x).Count().ToString();
var num2 = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && x.State == "7"
where x.State == "7"
select x).Count();
zlfinishNumber = num2.ToString();
var num3 = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && x.State != "7"
where x.State != "7"
select x).Count();
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
@@ -695,16 +716,16 @@ namespace FineUIPro.Web.common
else
{
zlallNumber = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId)
where pids.Contains(x.ProjectId)
select x).Count().ToString();
var num2 = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && x.State == "7" && pids.Contains(x.ProjectId)
where x.State == "7" && pids.Contains(x.ProjectId)
select x).Count();
zlfinishNumber = num2.ToString();
var num3 = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && x.State != "7" && pids.Contains(x.ProjectId)
where x.State != "7" && pids.Contains(x.ProjectId)
select x).Count();
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
@@ -778,7 +799,7 @@ namespace FineUIPro.Web.common
List<double> listdata = new List<double>();
double result = 0;
Model.SGGLDB db = Funs.DB;
var ndtLists = from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" select x;
var ndtLists = from x in db.ProcessControl_NondestructiveTest_New select x;
if (pids != null)
{
ndtLists = ndtLists.Where(x=>pids.Contains(x.ProjectId));