This commit is contained in:
parent
7795cf25f5
commit
8816de937f
|
|
@ -683,7 +683,7 @@ namespace BLL
|
||||||
BranchPersonNum = branchPersonNum,//
|
BranchPersonNum = branchPersonNum,//
|
||||||
ProjectPersonNum = projectPersonNumList.Count(x => x.IsOffice == true),
|
ProjectPersonNum = projectPersonNumList.Count(x => x.IsOffice == true),
|
||||||
ProjectSubPersonNum = projectPersonNumList.Count(x => x.IsOffice == false),
|
ProjectSubPersonNum = projectPersonNumList.Count(x => x.IsOffice == false),
|
||||||
TrainPersonNum = trainPersonNumList.Count(),
|
TrainPersonNum = trainPersonNumList.Sum(x => x.TrainPersonNum),
|
||||||
TechnicalDisclosePersonNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum),
|
TechnicalDisclosePersonNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum),
|
||||||
ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(),
|
ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(),
|
||||||
ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Sum(x => x.TrainPersonNum),
|
ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Sum(x => x.TrainPersonNum),
|
||||||
|
|
@ -694,7 +694,7 @@ namespace BLL
|
||||||
PersonInspectionNum = inspectionPersonList.Count(),
|
PersonInspectionNum = inspectionPersonList.Count(),
|
||||||
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(),
|
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(),
|
||||||
MachineInspectionNum = inspectionMachineList.Count(),
|
MachineInspectionNum = inspectionMachineList.Count(),
|
||||||
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(),
|
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckCertificate == true).Count(),
|
||||||
|
|
||||||
MaterialInspectionNum = 0,
|
MaterialInspectionNum = 0,
|
||||||
MaterialInspectionQualifiedNum = 0,
|
MaterialInspectionQualifiedNum = 0,
|
||||||
|
|
@ -757,7 +757,7 @@ namespace BLL
|
||||||
BranchPersonNum = branchPersonNum,//
|
BranchPersonNum = branchPersonNum,//
|
||||||
ProjectPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid && x.IsOffice == true),
|
ProjectPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid && x.IsOffice == true),
|
||||||
ProjectSubPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid && x.IsOffice == false),
|
ProjectSubPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid && x.IsOffice == false),
|
||||||
TrainPersonNum = trainPersonNumList.Count(x => x.ProjectId == projectid),
|
TrainPersonNum = trainPersonNumList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||||
TechnicalDisclosePersonNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
TechnicalDisclosePersonNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||||
ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(x => x.ProjectId == projectid),
|
ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(x => x.ProjectId == projectid),
|
||||||
ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||||
|
|
@ -767,7 +767,7 @@ namespace BLL
|
||||||
PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid),
|
PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid),
|
||||||
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true && x.ProjectId == projectid).Count(),
|
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true && x.ProjectId == projectid).Count(),
|
||||||
MachineInspectionNum = inspectionMachineList.Count(x => x.ProjectId == projectid),
|
MachineInspectionNum = inspectionMachineList.Count(x => x.ProjectId == projectid),
|
||||||
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true && x.ProjectId == projectid).Count(),
|
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckCertificate == true && x.ProjectId == projectid).Count(),
|
||||||
MaterialInspectionNum = 0,
|
MaterialInspectionNum = 0,
|
||||||
MaterialInspectionQualifiedNum = 0,
|
MaterialInspectionQualifiedNum = 0,
|
||||||
UseNum = useNum.Count(x => x.ProjectId == projectid),
|
UseNum = useNum.Count(x => x.ProjectId == projectid),
|
||||||
|
|
@ -949,7 +949,8 @@ namespace BLL
|
||||||
if (thisUnit != null) unitId = thisUnit.UnitId;
|
if (thisUnit != null) unitId = thisUnit.UnitId;
|
||||||
var result = (from x in Funs.DB.Person_Persons
|
var result = (from x in Funs.DB.Person_Persons
|
||||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
where x.IsPost == true && y.IsCQMS == true && x.UnitId != unitId
|
join z in Funs.DB.Base_Unit on x.UnitId equals z.UnitId
|
||||||
|
where x.IsPost == true && y.IsCQMS == true && z.IsBranch == true && x.UnitId != unitId
|
||||||
select x).Count();
|
select x).Count();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -1114,29 +1115,19 @@ namespace BLL
|
||||||
/// 获取质量培训人次数
|
/// 获取质量培训人次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.OfSafetySupervisorsOutput> GetTrainPersonNum()
|
public static List<Model.TrainPlanItem> GetTrainPersonNum()
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
var result = (from x in Funs.DB.Train_TrainPlan
|
||||||
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
|
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
|
||||||
from p in pGroup.DefaultIfEmpty()
|
from p in pGroup.DefaultIfEmpty()
|
||||||
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
|
where BeUnderConstructionList.Contains(p.ProjectId) && x.CompileDate > Const.DtmarkTime
|
||||||
from u in uGroup.DefaultIfEmpty()
|
select new Model.TrainPlanItem
|
||||||
join y in Funs.DB.Person_Persons on x.InspectionPersonId equals y.PersonId into yGroup
|
|
||||||
from y in yGroup.DefaultIfEmpty()
|
|
||||||
join m in Funs.DB.Base_WorkPost on y.WorkPostId equals m.WorkPostId into mGroup
|
|
||||||
from m in mGroup.DefaultIfEmpty()
|
|
||||||
where BeUnderConstructionList.Contains(p.ProjectId) && x.IsTrain == true && x.CompileDate > Const.DtmarkTime
|
|
||||||
select new Model.OfSafetySupervisorsOutput
|
|
||||||
{
|
{
|
||||||
ProjectId = x.ProjectId,
|
ProjectId = x.ProjectId,
|
||||||
ProjectName = p.ProjectName,
|
ProjectName = p.ProjectName,
|
||||||
UnitId = u.UnitId,
|
UnitId = BLL.Const.UnitId_SEDIN,
|
||||||
UnitName = u.UnitName,
|
UnitName = "赛鼎工程有限公司",
|
||||||
Name = x.PersonName,
|
TrainPersonNum = x.TrainPersonNum.HasValue ? x.TrainPersonNum.Value : 0
|
||||||
Sex = y.Sex == null ? "" : (y.Sex == "1" ? "男" : "女"),
|
|
||||||
IdentityCard = y.IdentityCard,
|
|
||||||
WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName,
|
|
||||||
Phone = y.Telephone
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -1144,7 +1135,7 @@ namespace BLL
|
||||||
/// 获取质量培训人次数(异步)
|
/// 获取质量培训人次数(异步)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetTrainPersonNumAsync()
|
public static async Task<List<Model.TrainPlanItem>> GetTrainPersonNumAsync()
|
||||||
{
|
{
|
||||||
return await Task.Run(GetTrainPersonNum);
|
return await Task.Run(GetTrainPersonNum);
|
||||||
}
|
}
|
||||||
|
|
@ -1240,9 +1231,9 @@ namespace BLL
|
||||||
/// 获取机具报验
|
/// 获取机具报验
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.Comprehensive_InspectionMachine> GetComprehensive_InspectionMachine()
|
public static List<Model.Check_CheckEquipment> GetComprehensive_InspectionMachine()
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
var result = (from x in Funs.DB.Check_CheckEquipment
|
||||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
|
where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -1252,7 +1243,7 @@ namespace BLL
|
||||||
/// 获取机具报验(异步)
|
/// 获取机具报验(异步)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static async Task<List<Comprehensive_InspectionMachine>> GetComprehensive_InspectionMachineAsync()
|
public static async Task<List<Check_CheckEquipment>> GetComprehensive_InspectionMachineAsync()
|
||||||
{
|
{
|
||||||
return await Task.Run(GetComprehensive_InspectionMachine);
|
return await Task.Run(GetComprehensive_InspectionMachine);
|
||||||
}
|
}
|
||||||
|
|
@ -1261,10 +1252,10 @@ namespace BLL
|
||||||
/// 获取在用计量器具数
|
/// 获取在用计量器具数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Comprehensive_InspectionMachine> GetUseNum()
|
public static List<Check_CheckEquipment> GetUseNum()
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
var result = (from x in Funs.DB.Check_CheckEquipment
|
||||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsOnSite == true && x.InspectionType.Contains("计量") && x.CompileDate > Const.DtmarkTime
|
where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -1273,7 +1264,7 @@ namespace BLL
|
||||||
/// 获取在用计量器具数(异步)
|
/// 获取在用计量器具数(异步)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static async Task<List<Comprehensive_InspectionMachine>> GetUseNumAsync()
|
public static async Task<List<Check_CheckEquipment>> GetUseNumAsync()
|
||||||
{
|
{
|
||||||
return await Task.Run(GetUseNum);
|
return await Task.Run(GetUseNum);
|
||||||
}
|
}
|
||||||
|
|
@ -1282,10 +1273,10 @@ namespace BLL
|
||||||
/// 获取校准合格数
|
/// 获取校准合格数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Comprehensive_InspectionMachine> GetOkNum()
|
public static List<Check_CheckEquipment> GetOkNum()
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
var result = (from x in Funs.DB.Check_CheckEquipment
|
||||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true
|
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsCheckCertificate == true
|
||||||
&& x.CompileDate > Const.DtmarkTime
|
&& x.CompileDate > Const.DtmarkTime
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -1295,7 +1286,7 @@ namespace BLL
|
||||||
/// 获取校准合格数(异步)
|
/// 获取校准合格数(异步)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static async Task<List<Comprehensive_InspectionMachine>> GetOkNumAsync()
|
public static async Task<List<Check_CheckEquipment>> GetOkNumAsync()
|
||||||
{
|
{
|
||||||
return await Task.Run(GetOkNum);
|
return await Task.Run(GetOkNum);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -536,9 +536,9 @@ namespace BLL
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetTrainPersonNum(string projectid)
|
public static int GetTrainPersonNum(string projectid)
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
var result = (from x in Funs.DB.Train_TrainPlan
|
||||||
where x.ProjectId == projectid && x.IsTrain == true && x.CompileDate > Const.DtmarkTime
|
where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
|
||||||
select x).Count();
|
select x).ToList().Sum(x => x.TrainPersonNum ?? 0);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 质量培训数据
|
||||||
|
/// </summary>
|
||||||
|
public class TrainPlanItem : BaseEntities
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 培训人数
|
||||||
|
/// </summary>
|
||||||
|
public int TrainPersonNum { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -78,6 +78,7 @@
|
||||||
<Compile Include="APIItem\ChemicalReport.cs" />
|
<Compile Include="APIItem\ChemicalReport.cs" />
|
||||||
<Compile Include="APIItem\ChemicalReportItem.cs" />
|
<Compile Include="APIItem\ChemicalReportItem.cs" />
|
||||||
<Compile Include="APIItem\CNCEC_MasterData_PcEp.cs" />
|
<Compile Include="APIItem\CNCEC_MasterData_PcEp.cs" />
|
||||||
|
<Compile Include="APIItem\CQMS\TrainPlanItem.cs" />
|
||||||
<Compile Include="APIItem\DCGLCheckRectifyItem.cs" />
|
<Compile Include="APIItem\DCGLCheckRectifyItem.cs" />
|
||||||
<Compile Include="APIItem\DigData\SafeLawItem.cs" />
|
<Compile Include="APIItem\DigData\SafeLawItem.cs" />
|
||||||
<Compile Include="APIItem\EnergyReport.cs" />
|
<Compile Include="APIItem\EnergyReport.cs" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue