看板修改
This commit is contained in:
@@ -426,15 +426,21 @@ namespace FineUIPro.Web.common
|
||||
join y in db.Sys_Const on x.AccidentTypeId equals y.ConstValue
|
||||
where y.ConstText.Contains("未遂")
|
||||
select x;
|
||||
foreach (var province in provinces)
|
||||
var allProvinceProjectList = (from x in allProjects
|
||||
join y in provinceDic on x.Province equals y.ProvinceCode
|
||||
where provinces.Contains(y.CnShortName )
|
||||
select new { x,y.CnShortName}).ToList();
|
||||
var allProvinces= allProvinceProjectList.Select(x =>x.CnShortName ).Distinct().ToList();
|
||||
foreach (var province in allProvinces)
|
||||
{
|
||||
int accidentNum = 0;
|
||||
DateTime date = DateTime.Now;
|
||||
decimal money1 = 0, money2 = 0;
|
||||
var projects = from x in allProjects
|
||||
join y in provinceDic on x.Province equals y.ProvinceCode
|
||||
where y.CnShortName == province
|
||||
select x;
|
||||
/* var projects = from x in allProjects
|
||||
join y in provinceDic on x.Province equals y.ProvinceCode
|
||||
where y.CnShortName == province
|
||||
select x;*/
|
||||
var projects = allProvinceProjectList.Where(x => x.CnShortName == province);
|
||||
listdata.Add(projects.Count());
|
||||
decimal progress = 0;
|
||||
if (projects.Any())
|
||||
@@ -443,22 +449,22 @@ namespace FineUIPro.Web.common
|
||||
foreach (var item in projects)
|
||||
{
|
||||
//未遂事故
|
||||
var accidentListProject1 = accidentList1.Where(x => x.ProjectId == item.ProjectId);
|
||||
var accidentListProject2 = accidentList2.Where(x => x.ProjectId == item.ProjectId);
|
||||
var accidentListProject1 = accidentList1.Where(x => x.ProjectId == item.x.ProjectId);
|
||||
var accidentListProject2 = accidentList2.Where(x => x.ProjectId == item.x.ProjectId);
|
||||
accidentNum = accidentListProject1.Count() + accidentListProject2.Count();
|
||||
//时间
|
||||
if (item.StartDate != null && item.StartDate < date)
|
||||
if (item.x.StartDate != null && item.x.StartDate < date)
|
||||
{
|
||||
date = Convert.ToDateTime(item.StartDate);
|
||||
date = Convert.ToDateTime(item.x.StartDate);
|
||||
}
|
||||
//合同额
|
||||
if (item.ConstructionMoney != null)
|
||||
if (item.x.ConstructionMoney != null)
|
||||
{
|
||||
money1 += item.ConstructionMoney.Value;
|
||||
money1 += item.x.ConstructionMoney.Value;
|
||||
}
|
||||
if (item.Progress != null)
|
||||
if (item.x.Progress != null)
|
||||
{
|
||||
progress = item.Progress.Value;
|
||||
progress = item.x.Progress.Value;
|
||||
}
|
||||
}
|
||||
jd.Add("进度:" + progress.ToString("0.##") + "%");
|
||||
|
||||
Reference in New Issue
Block a user