This commit is contained in:
2024-05-07 16:20:40 +08:00
parent 0ede39d15e
commit a041fdd85d
18 changed files with 737 additions and 304 deletions
+55 -41
View File
@@ -27,6 +27,8 @@ namespace FineUIPro.Web.common
getCQMSProblem();
/// 获取施工产值
getOutputValue(getProjectLists);
///危大工程
getSolutionLargerHazard();
}
}
@@ -62,12 +64,12 @@ namespace FineUIPro.Web.common
{
newS.value = new[] { Funs.GetNewDecimalOrZero(strMap[0]), Funs.GetNewDecimalOrZero(strMap[1]) };
list.Add(newS);
}
}
}
ProjectInfo = JsonConvert.SerializeObject(list);
ProjectInfo = JsonConvert.SerializeObject(list);
}
return getProjects.ToList();
return getProjects.ToList();
}
#endregion
@@ -122,20 +124,20 @@ namespace FineUIPro.Web.common
var ProjectTotal1 = (from x in Funs.DB.HSSE_MonthReportItem
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
//where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year
where ("成达公司现场人数" == x.ReportItem ) && y.Years == DateTime.Now.Year
where ("成达公司现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
select x.YearTotal).Sum();
if (ProjectTotal1.HasValue)
{
this.divGLPerson.InnerHtml = ProjectTotal1.Value.ToString();
this.divGLPerson.InnerHtml = ProjectTotal1.Value.ToString();
}
var ProjectTotal2 = (from x in Funs.DB.HSSE_MonthReportItem
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
//where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
where ( "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
where ("分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
select x.YearTotal).Sum();
//if (ProjectTotal2.HasValue && ProjectTotal1.HasValue)
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.common
this.divSafeWorkTime.InnerHtml = "0000000000";
var ProjectTotal = (from x in Funs.DB.HSSE_MonthReportItem
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
where "安全生产人工时数" == x.ReportItem && y.Years== DateTime.Now.Year
where "安全生产人工时数" == x.ReportItem && y.Years == DateTime.Now.Year
select x.YearTotal).Sum();
if (ProjectTotal.HasValue)
@@ -207,7 +209,7 @@ namespace FineUIPro.Web.common
DateTime time = DateTime.Parse(DateTime.Now.ToString("yyyy-01-01"));
var getRectify = from x in Funs.DB.View_Hazard_HazardRegister
where x.States != Const.State_0 && x.States != Const.State_R && x.States != null && x.RegisterDate>= time
where x.States != Const.State_0 && x.States != Const.State_R && x.States != null && x.RegisterDate >= time
group x by x.States into g
select new { g.Key, Count = g.Count() };
var allcout = getRectify.ToList();
@@ -226,7 +228,7 @@ namespace FineUIPro.Web.common
this.divAllRectify.InnerHtml = total.ToString();
//this.divUCRectify.InnerHtml = (total - finish).ToString();
this.divRectifyRate.InnerHtml = Math.Round(finish * 1.0 / total * 100, 1).ToString() ;
this.divRectifyRate.InnerHtml = Math.Round(finish * 1.0 / total * 100, 1).ToString();
}
}
@@ -234,33 +236,33 @@ namespace FineUIPro.Web.common
#region
private void getHTContract()
{
var ConstructionNum = Funs.DB.Base_Project.Sum(x => x.ConstructionNum);
var ConstructionMoney = Funs.DB.Base_Project.Sum(x => x.ConstructionMoney);
//var getC = (from x in Funs.DB.PHTGL_ContractReview
// join y in Funs.DB.PHTGL_Approve on x.ContractReviewId equals y.ContractId
// join z in Funs.DB.PHTGL_Contract on x.ContractId equals z.ContractId
// where x.State == 5 && Convert.ToDateTime(y.ApproveDate).Year == DateTime.Now.Year
// select new { x.ContractReviewId, z.ContractAmount }).Distinct();
this.divHTNum.InnerHtml ="0";
if (ConstructionNum.HasValue)
{
this.divHTNum.InnerHtml = ConstructionNum.Value.ToString();
{
var ConstructionNum = Funs.DB.Base_Project.Sum(x => x.ConstructionNum);
var ConstructionMoney = Funs.DB.Base_Project.Sum(x => x.ConstructionMoney);
//var getC = (from x in Funs.DB.PHTGL_ContractReview
// join y in Funs.DB.PHTGL_Approve on x.ContractReviewId equals y.ContractId
// join z in Funs.DB.PHTGL_Contract on x.ContractId equals z.ContractId
// where x.State == 5 && Convert.ToDateTime(y.ApproveDate).Year == DateTime.Now.Year
// select new { x.ContractReviewId, z.ContractAmount }).Distinct();
this.divHTNum.InnerHtml = "0";
if (ConstructionNum.HasValue)
{
this.divHTNum.InnerHtml = ConstructionNum.Value.ToString();
}
decimal d = 0;
//foreach (var item in getC)
//{
// d += item.ContractAmount ?? 0;
//}
if (ConstructionMoney.HasValue)
{
this.divHTAmount.InnerHtml = ConstructionMoney.Value.ToString("0.####");
}
else
{
this.divHTAmount.InnerHtml = Math.Round((d / 100000000), 4).ToString();
}
}
decimal d = 0;
//foreach (var item in getC)
//{
// d += item.ContractAmount ?? 0;
//}
if (ConstructionMoney.HasValue)
{
this.divHTAmount.InnerHtml = ConstructionMoney.Value.ToString("0.####");
}
else
{
this.divHTAmount.InnerHtml = Math.Round((d / 100000000), 4).ToString();
}
}
#endregion
@@ -281,7 +283,7 @@ namespace FineUIPro.Web.common
where x.CreateDate >= time
select x;
var getCheckControl = from x in Funs.DB.Check_CheckControl
where x.CheckDate >= time
where x.CheckDate >= time
select x;
///问题总数
int AllCount = getJointCheckDetail.Count() + getCheckControl.Count();
@@ -300,7 +302,7 @@ namespace FineUIPro.Web.common
CRectificationRate = Math.Round(CCount * 1.0 / AllCount * 100, 1);
}
}
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.CheckDate>=time select x;
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.CheckDate >= time select x;
if (inspectionManagements.Count() > 0)
{
int okInspectionManagements = inspectionManagements.Where(x => x.IsOnceQualified == true).Count();
@@ -349,13 +351,13 @@ namespace FineUIPro.Web.common
var getOutputValue = Funs.DB.Sys_OutputValueProject.Where(x => x.Year > date.Year || (x.Year == date.Year && x.Month >= date.Month));
if (getOutputValue.Count() > 0)
{
this.divYearPlanOutPutValue.InnerHtml = (getOutputValue.Sum(x=>x.PlanOutPutValue ?? 0)).ToString();
this.divYearPlanOutPutValue.InnerHtml = (getOutputValue.Sum(x => x.PlanOutPutValue ?? 0)).ToString();
this.divYearActualOutPutValue.InnerHtml = (getOutputValue.Sum(x => x.ActualOutPutValue ?? 0)).ToString();
}
decimal[] monthValues = new decimal[12];
decimal[] monthValues2 = new decimal[12];
// var getOutYearValues = Funs.DB.Sys_OutputValueProject.Where(x => x.Year == DateTime.Now.Year);
// var getOutYearValues = Funs.DB.Sys_OutputValueProject.Where(x => x.Year == DateTime.Now.Year);
if (getOutputValue.Count() > 0)
{
for (int i = 0; i < 12; i++)
@@ -405,5 +407,17 @@ namespace FineUIPro.Web.common
}
}
}
private void getSolutionLargerHazard()
{
var num1 = Funs.DB.Solution_LargerHazard.Where(x => x.States == "2").Count();
var num2 = Funs.DB.Solution_LargerHazard.Where(x => x.States == "3").Count();
LargerHazard1.InnerText = "" + (num1 + num2);
LargerHazard2.InnerText = "" + (num1);
LargerHazard3.InnerText = "" + (num2);
}
}
}