修改上报接口
This commit is contained in:
parent
97207481b2
commit
cdf073a097
|
@ -322,8 +322,8 @@ namespace BLL
|
|||
TechnicalDisclosePersonNum = ProjectData.Sum(x => x.TechnicalDisclosePersonNum),
|
||||
UseNum = ProjectData.Sum(x => x.UseNum),
|
||||
OKNum = ProjectData.Sum(x => x.OKNum),
|
||||
CompanyPersonNum = ProjectData.Sum(x => x.CompanyPersonNum),
|
||||
BranchPersonNum = ProjectData.Sum(x => x.BranchPersonNum),
|
||||
CompanyPersonNum = GetCompanyPersonNum(),
|
||||
BranchPersonNum = GetBranchPersonNum(),
|
||||
ProjectPersonNum = ProjectData.Sum(x => x.ProjectPersonNum),
|
||||
ProblemNum = ProjectData.Sum(x => x.ProblemNum),
|
||||
ProblemCompletedNum = ProjectData.Sum(x => x.ProblemCompletedNum),
|
||||
|
@ -460,5 +460,9 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
/// 获取企业总部人数
/// </summary>
/// <returns></returns>
public static int GetCompanyPersonNum()
{
string unitId = BLL.Const.UnitId_CWCEC;
int result = (from x in Funs.DB.Person_CompanyBranchPerson
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.IsOnJob == true && y.IsCQMS == true && x.UnitId == unitId
select x).Count();
return result;
}
|
||||
|
||||
/// <summary>
/// 获取分支机构人数
/// </summary>
/// <returns></returns>
public static int GetBranchPersonNum()
{
string unitId = BLL.Const.UnitId_CWCEC;
int result = (from x in Funs.DB.Person_CompanyBranchPerson
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.IsOnJob == true && y.IsCQMS == true && x.UnitId != unitId
select x).Count();
return result;
}
|
||||
}
|
||||
}
|
|
@ -538,9 +538,9 @@ namespace BLL
|
|||
var ProjectData = (from x in Funs.DB.Project_HSSEData_HSSE
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).ToList();
|
||||
//int TotalEnergyConsumption= Information_EnvironmentalDataService.GetLatstTimeTotalEnergyConsumption();
|
||||
//int IncomeComprehensiveEnergyConsumption = Information_EnvironmentalDataService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
|
||||
//int NewWaterConsumption = Information_EnvironmentalDataService.GetLatstTimeNewWaterConsumption();
|
||||
decimal TotalEnergyConsumption = GetLatstTimeTotalEnergyConsumption();
|
||||
decimal IncomeComprehensiveEnergyConsumption = GetLatstTimeIncomeComprehensiveEnergyConsumption();
|
||||
decimal NewWaterConsumption = GetLatstTimeNewWaterConsumption();
|
||||
|
||||
Model.HSSEData_HSSE table = new Model.HSSEData_HSSE
|
||||
{
|
||||
|
@ -801,9 +801,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetSafetyCommitteeMeetingNum()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Meeting_CompanySafetyMeeting where x.CompanySafetyMeetingDate.Value.Year == date.Year && x.CompanySafetyMeetingDate.Value.Month == date.Month && x.CompanySafetyMeetingDate.Value.Day == date.Day select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Meeting_CompanySafetyMeeting select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取企业专题会议数
|
||||
|
@ -811,9 +810,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetEnterpriseTopicsMeetingNum()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Meeting_CompanySpecialMeeting where x.CompanySpecialMeetingDate.Value.Year == date.Year && x.CompanySpecialMeetingDate.Value.Month == date.Month && x.CompanySpecialMeetingDate.Value.Day == date.Day select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Meeting_CompanySpecialMeeting select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -822,9 +820,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetCompanyLeadShiftCheckNum()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "1" && x.CheckDate.Value.Year == date.Year && x.CheckDate.Value.Month == date.Month && x.CheckDate.Value.Day == date.Day select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "1" select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取企业综合检查次数
|
||||
|
@ -832,9 +829,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetCompanyComprehensiveCheckNum()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "2" && x.CheckDate.Value.Year == date.Year && x.CheckDate.Value.Month == date.Month && x.CheckDate.Value.Day == date.Day select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "2" select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取企业专项检查次数
|
||||
|
@ -842,9 +838,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetCompanySpecialCheckNum()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "3" && x.CheckDate.Value.Year == date.Year && x.CheckDate.Value.Month == date.Month && x.CheckDate.Value.Day == date.Day select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "3" select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取企业级综合预案数
|
||||
|
@ -852,13 +847,11 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetCompanyComprehensivePlanNum()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
// join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
// where x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
|
||||
// && x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("综合")
|
||||
// select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("综合")
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取企业级专项预案数
|
||||
|
@ -866,13 +859,11 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetCompanySpecialPlanNum()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
// join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
// where x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
|
||||
// && x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("专项")
|
||||
// select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("专项")
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取企业级现场处置预案
|
||||
|
@ -880,13 +871,11 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetCompanyOnSiteDisposalPlan()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
// join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
// where x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
|
||||
// && x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("现场处置")
|
||||
// select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("现场处置")
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取企业级演练次数
|
||||
|
@ -894,12 +883,54 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetCompanyDrillNum()
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Emergency_DrillRecordList_Unit
|
||||
// where x.DrillRecordDate.Value.Year == date.Year && x.DrillRecordDate.Value.Month == date.Month
|
||||
// && x.DrillRecordDate.Value.Day == date.Day
|
||||
// select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Emergency_DrillRecordList_Unit
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static decimal GetLatstTimeTotalEnergyConsumption()
|
||||
{
|
||||
var q1 = (from x in db.Environmental_ChemicalReportItem where x.SortIndex == "01" select x);
|
||||
decimal d1 = 0;
|
||||
foreach (var item in q1)
|
||||
{
|
||||
d1 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
|
||||
}
|
||||
var q2 = (from x in db.Environmental_ArchitectureReportItem where x.SortIndex == "01" select x);
|
||||
decimal d2 = 0;
|
||||
foreach (var item in q2)
|
||||
{
|
||||
d2 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
|
||||
}
|
||||
return d1 + d2;
|
||||
}
|
||||
public static decimal GetLatstTimeIncomeComprehensiveEnergyConsumption()
|
||||
{
|
||||
var q2 = (from x in db.Environmental_ArchitectureReportItem where x.SortIndex == "15" select x);
|
||||
decimal d2 = 0;
|
||||
foreach (var item in q2)
|
||||
{
|
||||
d2 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
|
||||
}
|
||||
return d2;
|
||||
|
||||
}
|
||||
public static decimal GetLatstTimeNewWaterConsumption()
|
||||
{
|
||||
var q1 = (from x in db.Environmental_ChemicalReportItem where x.SortIndex == "70" select x);
|
||||
decimal d1 = 0;
|
||||
foreach (var item in q1)
|
||||
{
|
||||
d1 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
|
||||
}
|
||||
var q2 = (from x in db.Environmental_ArchitectureReportItem where x.SortIndex == "38" select x);
|
||||
decimal d2 = 0;
|
||||
foreach (var item in q2)
|
||||
{
|
||||
d2 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
|
||||
}
|
||||
return d1 + d2;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -411,9 +411,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetTrainPersonNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.ProjectId == projectid && x.IsTrain == true && x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month && x.CompileDate.Value.Day == date.Day
|
||||
where x.ProjectId == projectid && x.IsTrain == true
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -423,9 +422,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetTechnicalDisclosePersonNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||
where x.ProjectId == projectid && x.DetailsDate.Value.Year == date.Year && x.DetailsDate.Value.Month == date.Month && x.DetailsDate.Value.Day == date.Day
|
||||
where x.ProjectId == projectid
|
||||
select x.JoinPersonNum).ToList().Sum(x => x.Value);
|
||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||
return q;
|
||||
|
|
|
@ -301,10 +301,32 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetTotalDineNum(string projectid)
|
||||
{
|
||||
//int result = Convert.ToInt32((from x in Funs.DB.PW_JointInfo
|
||||
// where x.ProjectId == projectid
|
||||
// select x.JOT_Size).ToList().Sum());
|
||||
return 0;
|
||||
int result = 0;
|
||||
if (projectid != null)
|
||||
{
|
||||
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
||||
where x.ProjectId == projectid.ToString()
|
||||
select x;
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
foreach (var item in getD1)
|
||||
{
|
||||
result += Funs.GetNewIntOrZero(item.TotalWeldQuantity.Split('.')[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
where x.ProjectId == projectid.ToString()
|
||||
orderby x.CompileDate descending
|
||||
select x).FirstOrDefault();
|
||||
if (getD2 != null)
|
||||
{
|
||||
result = Funs.GetNewIntOrZero(getD2.TotalWeldQuantity.Split('.')[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取完成达因数
|
||||
|
@ -312,10 +334,32 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetCompleteDineNum(string projectid)
|
||||
{
|
||||
//int result = Convert.ToInt32((from x in Funs.DB.PW_JointInfo
|
||||
// where x.ProjectId == projectid
|
||||
// select x.JOT_DoneDin ).ToList().Sum());
|
||||
return 0;
|
||||
int result = 0;
|
||||
if (projectid != null)
|
||||
{
|
||||
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
||||
where x.ProjectId == projectid.ToString()
|
||||
select x;
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
foreach (var item in getD1)
|
||||
{
|
||||
result += Funs.GetNewIntOrZero(item.TotalCompleted.Split('.')[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
where x.ProjectId == projectid.ToString()
|
||||
orderby x.CompileDate descending
|
||||
select x).FirstOrDefault();
|
||||
if (getD2 != null)
|
||||
{
|
||||
result = Funs.GetNewIntOrZero(getD2.TotalCompleted.Split('.')[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取总片数
|
||||
|
@ -323,11 +367,32 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetTotalFilmNum(string projectid)
|
||||
{
|
||||
//int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
|
||||
// join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
|
||||
// where y.ProjectId == projectid
|
||||
// select x.CHT_TotalFilm ).ToList().Sum());
|
||||
return 0;
|
||||
int result = 0;
|
||||
if (projectid != null)
|
||||
{
|
||||
var getD1 = from x in Funs.DB.HJGL_FL_NdtList
|
||||
where x.ProjectId == projectid.ToString()
|
||||
select x;
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
foreach (var item in getD1)
|
||||
{
|
||||
result += Funs.GetNewIntOrZero(item.OneTimeFilmAmount.Split('.')[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
where x.ProjectId == projectid.ToString()
|
||||
orderby x.CompileDate descending
|
||||
select x).FirstOrDefault();
|
||||
if (getD2 != null)
|
||||
{
|
||||
result = Funs.GetNewIntOrZero(getD2.OneTimeFilmAmount.Split('.')[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取合格片数
|
||||
|
@ -335,11 +400,32 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetOKFilmNum(string projectid)
|
||||
{
|
||||
//int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
|
||||
// join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
|
||||
// where y.ProjectId == projectid
|
||||
// select x.CHT_PassFilm).ToList().Sum());
|
||||
return 0;
|
||||
int result = 0;
|
||||
if (projectid != null)
|
||||
{
|
||||
var getD1 = from x in Funs.DB.HJGL_FL_NdtList
|
||||
where x.ProjectId == projectid.ToString()
|
||||
select x;
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
foreach (var item in getD1)
|
||||
{
|
||||
result += Funs.GetNewIntOrZero(item.OneTimeFilmQualifiedAmount.Split('.')[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
where x.ProjectId == projectid.ToString()
|
||||
orderby x.CompileDate descending
|
||||
select x).FirstOrDefault();
|
||||
if (getD2 != null)
|
||||
{
|
||||
result = Funs.GetNewIntOrZero(getD2.OneTimeFilmQualifiedAmount.Split('.')[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -682,11 +682,10 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetTotalWorkingHour(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
var result = (from x in Funs.DB.SitePerson_DayReportDetail
|
||||
join y in Funs.DB.SitePerson_DayReport on x.DayReportId equals y.DayReportId
|
||||
where y.ProjectId == projectid && y.CompileDate.Value.Year == date.Year && y.CompileDate.Value.Month == date.Month && y.CompileDate.Value.Day == date.Day
|
||||
select x.PersonWorkTime ).ToList().Sum(x=>x.Value);
|
||||
where y.ProjectId == projectid
|
||||
select x.PersonWorkTime).ToList().Sum(x => x.Value);
|
||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||
return q;
|
||||
}
|
||||
|
@ -696,9 +695,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetLostWorkingHour(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
var result = (from x in Funs.DB.Accident_AccidentHandle where x.ProjectId == projectid && x.AccidentDate.Year == date.Year && x.AccidentDate.Month == date.Month && x.AccidentDate.Day == date.Day select x.WorkHoursLoss).ToList().Sum(x => x.Value)
|
||||
+ (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDate.Value.Year == date.Year && x.AccidentDate.Value.Month == date.Month && x.AccidentDate.Value.Day == date.Day select x.WorkingHoursLoss).ToList().Sum(x => x.Value);
|
||||
var result = (from x in Funs.DB.Accident_AccidentHandle where x.ProjectId == projectid select x.WorkHoursLoss).ToList().Sum(x => x.Value)
|
||||
+ (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid select x.WorkingHoursLoss).ToList().Sum(x => x.Value);
|
||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||
|
||||
return q;
|
||||
|
@ -709,13 +707,12 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetSafeWorkingHour(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
var result1 = (from x in Funs.DB.SitePerson_DayReportDetail
|
||||
join y in Funs.DB.SitePerson_DayReport on x.DayReportId equals y.DayReportId
|
||||
where y.ProjectId == projectid && y.CompileDate.Value.Year == date.Year && y.CompileDate.Value.Month == date.Month && y.CompileDate.Value.Day == date.Day
|
||||
where y.ProjectId == projectid
|
||||
select x.PersonWorkTime).ToList().Sum(x => x.Value);
|
||||
var result2 = (from x in Funs.DB.Accident_AccidentHandle where x.ProjectId == projectid && x.AccidentDate.Year == date.Year && x.AccidentDate.Month == date.Month && x.AccidentDate.Day == date.Day select x.WorkHoursLoss).ToList().Sum(x => x.Value)
|
||||
+ (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDate.Value.Year == date.Year && x.AccidentDate.Value.Month == date.Month && x.AccidentDate.Value.Day == date.Day select x.WorkingHoursLoss).ToList().Sum(x => x.Value);
|
||||
var result2 = (from x in Funs.DB.Accident_AccidentHandle where x.ProjectId == projectid select x.WorkHoursLoss).ToList().Sum(x => x.Value)
|
||||
+ (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid select x.WorkingHoursLoss).ToList().Sum(x => x.Value);
|
||||
var result = result1 - result2;
|
||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||
|
||||
|
@ -727,10 +724,9 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetSafeTrainNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.EduTrain_TrainRecord
|
||||
join y in Funs.DB.Base_TrainType on x.TrainTypeId equals y.TrainTypeId
|
||||
where x.ProjectId == projectid && x.TrainStartDate.Value.Year == date.Year && x.TrainStartDate.Value.Month == date.Month && x.TrainStartDate.Value.Day == date.Day && y.TrainType == "1"
|
||||
where x.ProjectId == projectid && y.TrainType == "1"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -740,10 +736,9 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetSpecialTrainNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.EduTrain_TrainRecord
|
||||
join y in Funs.DB.Base_TrainType on x.TrainTypeId equals y.TrainTypeId
|
||||
where x.ProjectId == projectid && x.TrainStartDate.Value.Year == date.Year && x.TrainStartDate.Value.Month == date.Month && x.TrainStartDate.Value.Day == date.Day && y.TrainType == "2"
|
||||
where x.ProjectId == projectid && y.TrainType == "2"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -753,10 +748,9 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetSpecialOperationTrainNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.EduTrain_TrainRecord
|
||||
join y in Funs.DB.Base_TrainType on x.TrainTypeId equals y.TrainTypeId
|
||||
where x.ProjectId == projectid && x.TrainStartDate.Value.Year == date.Year && x.TrainStartDate.Value.Month == date.Month && x.TrainStartDate.Value.Day == date.Day && y.TrainType == "3"
|
||||
where x.ProjectId == projectid && y.TrainType == "3"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -929,9 +923,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectSafetyLeadingGroupMeetingNum(string projectid)
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.ProjectId == projectid && x.SafetyLeaderGroupMeetingDate.Value.Year == date.Year && x.SafetyLeaderGroupMeetingDate.Value.Month == date.Month && x.SafetyLeaderGroupMeetingDate.Value.Day == date.Day select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.ProjectId == projectid select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取项目安全例会数
|
||||
|
@ -939,9 +932,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectSafetyMeetingNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Meeting_WeekMeeting where x.ProjectId == projectid && x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day select x).Count()
|
||||
+ (from x in Funs.DB.Meeting_MonthMeeting where x.ProjectId == projectid && x.MonthMeetingDate.Value.Year == date.Year && x.MonthMeetingDate.Value.Month == date.Month && x.MonthMeetingDate.Value.Day == date.Day select x).Count();
|
||||
int result = (from x in Funs.DB.Meeting_WeekMeeting where x.ProjectId == projectid select x).Count()
|
||||
+ (from x in Funs.DB.Meeting_MonthMeeting where x.ProjectId == projectid select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -977,9 +969,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectLeadShiftCheckNum(string projectid)
|
||||
{
|
||||
//DateTime date = DateTime.Now;
|
||||
//int result = (from x in Funs.DB.Check_ProjectLeaderCheck where x.ProjectId == projectid && x.CheckDate.Value.Year == date.Year && x.CheckDate.Value.Month == date.Month && x.CheckDate.Value.Day == date.Day select x).Count();
|
||||
return 0;
|
||||
int result = (from x in Funs.DB.Check_ProjectLeaderCheck where x.ProjectId == projectid select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取项目专项检查次数
|
||||
|
@ -987,8 +978,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectSpecialCheckNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Check_CheckSpecial where x.ProjectId == projectid && x.CheckTime.Value.Year == date.Year && x.CheckTime.Value.Month == date.Month && x.CheckTime.Value.Day == date.Day select x).Count();
|
||||
int result = (from x in Funs.DB.Check_CheckSpecial where x.ProjectId == projectid select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -997,8 +987,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectMajorCheckNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.HSSE_Hazard_HazardRegister where x.ProjectId == projectid && x.CheckTime.Value.Year == date.Year && x.CheckTime.Value.Month == date.Month && x.CheckTime.Value.Day == date.Day select x).Count();
|
||||
int result = (from x in Funs.DB.HSSE_Hazard_HazardRegister where x.ProjectId == projectid select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -1007,10 +996,9 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetNearMissNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Accident_AccidentPersonRecord
|
||||
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
|
||||
where x.ProjectId == projectid && x.AccidentDate.Year == date.Year && x.AccidentDate.Month == date.Month && x.AccidentDate.Day == date.Day && x.IsAttempt=="1"
|
||||
where x.ProjectId == projectid && x.IsAttempt == "1"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -1020,10 +1008,9 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetRecordableEventNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Accident_AccidentPersonRecord
|
||||
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
|
||||
where x.ProjectId == projectid && x.AccidentDate.Year == date.Year && x.AccidentDate.Month == date.Month && x.AccidentDate.Day == date.Day && x.IsAttempt != "1"
|
||||
where x.ProjectId == projectid
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -1033,8 +1020,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetGeneralAccidentNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDate.Value.Year == date.Year && x.AccidentDate.Value.Month == date.Month && x.AccidentDate.Value.Day == date.Day && x.AccidentDegree == "1" select x).Count();
|
||||
int result = (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDegree == "1" select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -1043,8 +1029,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetMajorAccidentNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDate.Value.Year == date.Year && x.AccidentDate.Value.Month == date.Month && x.AccidentDate.Value.Day == date.Day && x.AccidentDegree == "2" select x).Count();
|
||||
int result = (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDegree == "2" select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -1053,8 +1038,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetSeriousAccidentNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDate.Value.Year == date.Year && x.AccidentDate.Value.Month == date.Month && x.AccidentDate.Value.Day == date.Day && x.AccidentDegree == "3" select x).Count();
|
||||
int result = (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDegree == "3" select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -1063,8 +1047,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetSpecialSeriousAccidentNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDate.Value.Year == date.Year && x.AccidentDate.Value.Month == date.Month && x.AccidentDate.Value.Day == date.Day && x.AccidentDegree == "4" select x).Count();
|
||||
int result = (from x in Funs.DB.Accident_AccidentReport where x.ProjectId == projectid && x.AccidentDegree == "4" select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -1109,11 +1092,9 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectComprehensivePlanNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Emergency_EmergencyList
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where x.ProjectId == projectid && x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
|
||||
&& x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("综合")
|
||||
where x.ProjectId == projectid && y.EmergencyTypeName.Contains("综合")
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -1123,11 +1104,9 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectSpecialPlanNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Emergency_EmergencyList
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where x.ProjectId == projectid && x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
|
||||
&& x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("专项")
|
||||
where x.ProjectId == projectid && y.EmergencyTypeName.Contains("专项")
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -1137,11 +1116,9 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectOnSiteDisposalPlan(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Emergency_EmergencyList
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where x.ProjectId == projectid && x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
|
||||
&& x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("现场处置")
|
||||
where x.ProjectId == projectid && y.EmergencyTypeName.Contains("现场处置")
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -1151,10 +1128,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int GetProjectDrillNum(string projectid)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
int result = (from x in Funs.DB.Emergency_DrillRecordList
|
||||
where x.ProjectId == projectid && x.DrillRecordDate.Value.Year == date.Year && x.DrillRecordDate.Value.Month == date.Month
|
||||
&& x.DrillRecordDate.Value.Day == date.Day
|
||||
where x.ProjectId == projectid
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -1174,6 +1149,12 @@ namespace BLL
|
|||
public static int GetCostUse(string projectid)
|
||||
{
|
||||
int result = 0;
|
||||
var costs = (from x in Funs.DB.CostGoods_CostSmallDetailItem
|
||||
join y in Funs.DB.CostGoods_CostSmallDetail
|
||||
on x.CostSmallDetailId equals y.CostSmallDetailId
|
||||
where y.ProjectId == projectid
|
||||
select x.CostMoney ?? 0).ToList().Sum();
|
||||
result = Funs.GetNewIntOrZero(costs.ToString().Split('.')[0]);
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -1341,7 +1322,7 @@ namespace BLL
|
|||
{
|
||||
int result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.IsSuperLargerHazard == false
|
||||
select x.TrainPersonNum ).ToList().Sum(x=>x.Value);
|
||||
select x.TrainPersonNum).ToList().Sum(x => x.Value);
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue