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