This commit is contained in:
高飞 2025-11-11 17:10:46 +08:00
parent 7fb0ad59ab
commit 2337b2e0b2
1 changed files with 155 additions and 1 deletions

View File

@ -3865,7 +3865,8 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<LicenseOutput> GetLicenses() public static List<LicenseOutput> GetLicenses()
{ {
var result = (from x in Funs.DB.View_License_LicenseManager List<LicenseOutput> result = new List<LicenseOutput>();
var result1 = (from x in Funs.DB.View_License_LicenseManager
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsHighRisk == true && where BeUnderConstructionList.Contains(x.ProjectId) && x.IsHighRisk == true &&
x.CompileDate > Const.DtmarkTime x.CompileDate > Const.DtmarkTime
select new Model.LicenseOutput select new Model.LicenseOutput
@ -3884,6 +3885,159 @@ namespace BLL
EndDate = x.EndDate, EndDate = x.EndDate,
WorkStatesStr = "" WorkStatesStr = ""
}).ToList(); }).ToList();
var result2 = (from x in Funs.DB.License_FireWork
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseOutput
{
Id = x.FireWorkId,
ProjectId = x.ProjectId,
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
UnitId = x.ApplyUnitId,
UnitName = UnitService.GetUnitNameByUnitId(x.ApplyUnitId),
LicenseTypeName = "动火作业票",
UnitTypeName = "",
IsHighRisk = false,
WorkAreaName = "",
CompileDate = x.ApplyDate,
StartDate = x.ValidityStartTime,
EndDate = x.ValidityEndTime,
WorkStatesStr = ""
}).ToList();
var result3 = (from x in Funs.DB.License_HeightWork
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseOutput
{
Id = x.HeightWorkId,
ProjectId = x.ProjectId,
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
UnitId = x.ApplyUnitId,
UnitName = UnitService.GetUnitNameByUnitId(x.ApplyUnitId),
LicenseTypeName = "高处作业票",
UnitTypeName = "",
IsHighRisk = false,
WorkAreaName = "",
CompileDate = x.ApplyDate,
StartDate = x.ValidityStartTime,
EndDate = x.ValidityEndTime,
WorkStatesStr = ""
}).ToList();
var result4 = (from x in Funs.DB.License_LimitedSpace
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseOutput
{
Id = x.LimitedSpaceId,
ProjectId = x.ProjectId,
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
UnitId = x.ApplyUnitId,
UnitName = UnitService.GetUnitNameByUnitId(x.ApplyUnitId),
LicenseTypeName = "受限空间作业票",
UnitTypeName = "",
IsHighRisk = false,
WorkAreaName = "",
CompileDate = x.ApplyDate,
StartDate = x.ValidityStartTime,
EndDate = x.ValidityEndTime,
WorkStatesStr = ""
}).ToList();
var result5 = (from x in Funs.DB.License_RadialWork
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseOutput
{
Id = x.RadialWorkId,
ProjectId = x.ProjectId,
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
UnitId = x.ApplyUnitId,
UnitName = UnitService.GetUnitNameByUnitId(x.ApplyUnitId),
LicenseTypeName = "射线作业票",
UnitTypeName = "",
IsHighRisk = false,
WorkAreaName = "",
CompileDate = x.ApplyDate,
StartDate = x.ValidityStartTime,
EndDate = x.ValidityEndTime,
WorkStatesStr = ""
}).ToList();
var result6 = (from x in Funs.DB.License_OpenCircuit
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseOutput
{
Id = x.OpenCircuitId,
ProjectId = x.ProjectId,
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
UnitId = x.ApplyUnitId,
UnitName = UnitService.GetUnitNameByUnitId(x.ApplyUnitId),
LicenseTypeName = "断路(占道)作业票",
UnitTypeName = "",
IsHighRisk = false,
WorkAreaName = "",
CompileDate = x.ApplyDate,
StartDate = x.ValidityStartTime,
EndDate = x.ValidityEndTime,
WorkStatesStr = ""
}).ToList();
var result7 = (from x in Funs.DB.License_BreakGround
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseOutput
{
Id = x.BreakGroundId,
ProjectId = x.ProjectId,
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
UnitId = x.ApplyUnitId,
UnitName = UnitService.GetUnitNameByUnitId(x.ApplyUnitId),
LicenseTypeName = "动土作业票",
UnitTypeName = "",
IsHighRisk = false,
WorkAreaName = "",
CompileDate = x.ApplyDate,
StartDate = x.ValidityStartTime,
EndDate = x.ValidityEndTime,
WorkStatesStr = ""
}).ToList();
var result8 = (from x in Funs.DB.License_NightWork
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseOutput
{
Id = x.NightWorkId,
ProjectId = x.ProjectId,
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
UnitId = x.ApplyUnitId,
UnitName = UnitService.GetUnitNameByUnitId(x.ApplyUnitId),
LicenseTypeName = "夜间施工作业票",
UnitTypeName = "",
IsHighRisk = false,
WorkAreaName = "",
CompileDate = x.ApplyDate,
StartDate = x.ValidityStartTime,
EndDate = x.ValidityEndTime,
WorkStatesStr = ""
}).ToList();
var result9 = (from x in Funs.DB.License_LiftingWork
where BeUnderConstructionList.Contains(x.ProjectId)
select new Model.LicenseOutput
{
Id = x.LiftingWorkId,
ProjectId = x.ProjectId,
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
UnitId = x.ApplyUnitId,
UnitName = UnitService.GetUnitNameByUnitId(x.ApplyUnitId),
LicenseTypeName = "吊装作业票",
UnitTypeName = "",
IsHighRisk = false,
WorkAreaName = "",
CompileDate = x.ApplyDate,
StartDate = x.ValidityStartTime,
EndDate = x.ValidityEndTime,
WorkStatesStr = ""
}).ToList();
result.AddRange(result1);
result.AddRange(result2);
result.AddRange(result3);
result.AddRange(result4);
result.AddRange(result5);
result.AddRange(result6);
result.AddRange(result7);
result.AddRange(result8);
result.AddRange(result9);
return result; return result;
} }
public static async Task<List<LicenseOutput>> GetLicensesAsync() public static async Task<List<LicenseOutput>> GetLicensesAsync()