大屏看板

This commit is contained in:
2025-04-17 16:01:19 +08:00
parent 510b04d2fa
commit 163a94de69
27 changed files with 4902 additions and 20273 deletions
@@ -352,16 +352,16 @@ namespace BLL
public static HSSEData GetTheLastData()
{
HSSEData hSSEData = new HSSEData();
var dataHsse= (from x in Funs.DB.HSSEData_HSSE
orderby x.ReportDate descending
select x).FirstOrDefault();
var dataHsse = (from x in Funs.DB.HSSEData_HSSE
orderby x.ReportDate descending
select x).FirstOrDefault();
var hSseDataHiddens = Project_HSSEData_HiddenDangerDetailService.GetModelByDate(dataHsse.ReportDate.Value);
hSSEData = GetItemByHSSEData_HSSE(dataHsse, hSseDataHiddens);
return hSSEData;
}
public static HSSEData_HSSE GetTodayData()
{
var q = (from x in Funs.DB.HSSEData_HSSE
@@ -1818,30 +1818,33 @@ namespace BLL
}
/// <summary>
/// 获取项目班前会
/// 获取项目班前会
/// </summary>
/// <returns></returns>
public static List<MeetingOutput> GetProjectClassMeeting(string projectId)
{
var result =
(
from x in Funs.DB.Meeting_ClassMeeting
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
where x.ProjectId == projectId && x.CompileDate > Const.DtmarkTime && BeUnderConstructionList.Contains(p.ProjectId)
select new MeetingOutput()
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
Id = x.ClassMeetingId,
MeetingName = x.ClassMeetingName,
MeetingDate = x.ClassMeetingDate,
MeetingHours = x.MeetingHours,
HostMan = x.MeetingHostMan,
AttentPerson = x.AttentPerson,
AttentPersonNum = x.AttentPersonNum,
}).ToList();
return result.ToList();
var list = (from x in Funs.DB.Meeting_ClassMeeting
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
where x.CompileDate > Const.DtmarkTime && BeUnderConstructionList.Contains(p.ProjectId)
select new MeetingOutput()
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
Id = x.ClassMeetingId,
MeetingName = x.ClassMeetingName,
MeetingDate = x.ClassMeetingDate,
MeetingHours = x.MeetingHours,
HostMan = x.MeetingHostMan,
AttentPerson = x.AttentPerson,
AttentPersonNum = x.AttentPersonNum,
}).ToList();
if (!string.IsNullOrWhiteSpace(projectId))
{
list = list.Where(x => x.ProjectId == projectId).ToList();
}
return list.ToList();
}
///// <summary>
///// 获取项目班前会议(异步)
@@ -1852,6 +1855,36 @@ namespace BLL
// return await Task.Run(GetProjectClassMeeting);
//}
/// <summary>
/// 获取项目周前会
/// </summary>
/// <returns></returns>
public static List<MeetingOutput> GetProjectWeekMeeting(string projectId)
{
var list = (from x in Funs.DB.Meeting_WeekMeeting
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && x.CompileDate > Const.DtmarkTime
select new MeetingOutput()
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
Id = x.WeekMeetingId,
MeetingName = x.WeekMeetingName,
MeetingDate = x.WeekMeetingDate,
MeetingHours = x.MeetingHours,
HostMan = x.MeetingHostMan,
AttentPerson = x.AttentPerson,
AttentPersonNum = x.AttentPersonNum,
}).ToList();
if (!string.IsNullOrWhiteSpace(projectId))
{
list = list.Where(x => x.ProjectId == projectId).ToList();
}
return list.ToList();
}
/// <summary>
/// 获取项目专题会议
/// </summary>
+22 -1
View File
@@ -38,8 +38,18 @@ namespace BLL
{
_beUnderConstructionList = new List<string>() { "0" };
}
}
public MainSevice(string userid, string projectId)
{
var userModel = UserService.GetUserByUserId(userid);
int unitType = 3;
_unitId = userModel.UnitId;
_unitType = unitType;
_beUnderConstructionList = new List<string>() { projectId };
}
public async Task<HSSEData_HSSE> GetHsseDataAsync()
{
try
@@ -316,6 +326,17 @@ namespace BLL
table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
}
else if (_unitType ==3)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.ShutdownNum = shutdownList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) );
table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) );
}
_hsseData = table;
return _hsseData;