合并最新

This commit is contained in:
2022-12-20 09:32:32 +08:00
parent 844e9f1488
commit 1abdaa9476
654 changed files with 73563 additions and 9746 deletions
+42 -21
View File
@@ -79,16 +79,27 @@ namespace FineUIPro.Web.common
}
///整改单
var getRectify = from x in Funs.DB.Check_RectifyNotices
var getRectify = from x in Funs.DB.View_Hazard_HazardRegister
where x.ProjectId == this.ProjectId && x.States != Const.State_0 && x.States != null
select x;
int allcout = getRectify.Count();
if (allcout > 0)
group x by x.States into g
select new { g.Key,Count = g.Count()};
var allcout = getRectify.ToList();
if (allcout.Count > 0)
{
this.divAllRectify.InnerHtml = allcout.ToString();
int ccount = getRectify.Where(x => x.States == Const.State_5).Count();
this.divCRectify.InnerHtml = ccount.ToString();
this.divUCRectify.InnerHtml = (allcout - ccount).ToString();
int total = 0;
int finish = 0;
foreach(var item in allcout)
{
total += item.Count;
if (item.Key.ToString() == "3")
{
finish += item.Count;
}
}
this.divAllRectify.InnerHtml = total.ToString();
this.divUCRectify .InnerHtml = (total - finish).ToString();
this.divCRectify.InnerHtml = finish.ToString();
}
}
#endregion
@@ -122,7 +133,7 @@ namespace FineUIPro.Web.common
List<int> InPostCountList = new List<int>();
List<int> InDutyCountList = new List<int>();
List<string> worksList = new List<string>();
var getPersons = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == this.ProjectId && x.IsUsed == true && x.InTime <= DateTime.Now
var getPersons = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == this.ProjectId && x.IsUsed == 1 && x.InTime <= DateTime.Now
&& !x.OutTime.HasValue && x.CardNo.Length > 1);
if (getPersons.Count() > 0)
{
@@ -290,20 +301,30 @@ namespace FineUIPro.Web.common
}
}
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
// join z in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals z.SpotCheckCode
join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where y.ProjectId == this.ProjectId && x.IsOK != null
&& y.ControlPoint != "C" && y.ControlPoint != "CR"
//&& z.ProjectId == this.ProjectId
select x;
int AllSpotCount = getSpotCheckDetail.Count();
if (AllSpotCount > 0)
//var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
// // join z in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals z.SpotCheckCode
// join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
// where y.ProjectId == this.ProjectId && x.IsOK != null
// && y.ControlPoint != "C" && y.ControlPoint != "CR"
// //&& z.ProjectId == this.ProjectId
// select x;
//int AllSpotCount = getSpotCheckDetail.Count();
//if (AllSpotCount > 0)
//{
// int okSpotCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count();
// if (okSpotCount > 0)
// {
// CQualifiedRate = Math.Round(okSpotCount * 1.0 / AllSpotCount * 100, 1);
// }
//}
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.ProjectId == this.ProjectId select x;
if (inspectionManagements.Count() > 0)
{
int okSpotCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count();
if (okSpotCount > 0)
int okInspectionManagements = inspectionManagements.Where(x => x.IsOnceQualified == true).Count();
if (okInspectionManagements > 0)
{
CQualifiedRate = Math.Round(okSpotCount * 1.0 / AllSpotCount * 100, 1);
CQualifiedRate = Math.Round(okInspectionManagements * 1.0 / inspectionManagements.Count() * 100, 1);
}
}