班前会
This commit is contained in:
@@ -86,20 +86,31 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
DateTime startd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", startdate, "00:00:00"));
|
||||
DateTime endd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", enddate, "23:59:59"));
|
||||
var meet = (from x in Funs.DB.Meeting_ClassMeeting
|
||||
where x.ProjectId == ProjectId && x.ClassMeetingDate >= startd && x.ClassMeetingDate <= endd
|
||||
select new Model.MeetingItem
|
||||
{
|
||||
AttentPersonNum = x.AttentPersonNum ?? 0,
|
||||
ManagePersonNum = x.ManagePersonNum ?? 0,
|
||||
}).ToList();
|
||||
var m_count = 0;
|
||||
var job_count = 0;
|
||||
if (meet.Count() > 0)
|
||||
|
||||
var m_count = Funs.DB.Meeting_ClassMeeting
|
||||
.Where(mc => mc.ProjectId == ProjectId && mc.ClassMeetingDate >= startd &&
|
||||
mc.ClassMeetingDate <= endd)
|
||||
.GroupBy(mc => new
|
||||
{
|
||||
m_count = meet.Where(m => m.ManagePersonNum != null).Max(m => m.ManagePersonNum);
|
||||
job_count = meet.Sum(s => s.AttentPersonNum);
|
||||
}
|
||||
MeetingDate = mc.ClassMeetingDate.Value.Date,
|
||||
mc.ProjectId
|
||||
})
|
||||
.Select(g => new
|
||||
{
|
||||
MeetingDate = g.Key.MeetingDate,
|
||||
ProjectId = g.Key.ProjectId,
|
||||
DailyMaxManagePersonNum = g.Max(mc => mc.ManagePersonNum ?? 0)
|
||||
})
|
||||
.OrderBy(r => r.MeetingDate)
|
||||
.ThenBy(r => r.ProjectId)
|
||||
.ToList().Sum(x => x.DailyMaxManagePersonNum);
|
||||
var job_count = (from x in Funs.DB.Meeting_ClassMeeting
|
||||
where x.ProjectId == ProjectId && x.ClassMeetingDate >= startd && x.ClassMeetingDate <= endd
|
||||
select new Model.MeetingItem
|
||||
{
|
||||
AttentPersonNum = x.AttentPersonNum ?? 0,
|
||||
ManagePersonNum = x.ManagePersonNum ?? 0,
|
||||
}).ToList().Sum(s => s.AttentPersonNum);
|
||||
|
||||
|
||||
return new {
|
||||
@@ -217,23 +228,23 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
try
|
||||
{
|
||||
divHJ1.InnerHtml = environment.Tem.Value.ToString("#.##");
|
||||
divHJ2.InnerHtml = environment.Noise.Value.ToString("#.##");
|
||||
divHJ3.InnerHtml = environment.Hum.Value.ToString("#.##");
|
||||
divHJ4.InnerHtml = environment.Pm25.Value.ToString("#.##");
|
||||
divHJ5.InnerHtml = environment.Ws.Value.ToString("#.##");
|
||||
divHJ6.InnerHtml = environment.Pm10.Value.ToString("#.##");
|
||||
//divHJ1.InnerHtml = environment.Tem.Value.ToString("#.##");
|
||||
//divHJ2.InnerHtml = environment.Noise.Value.ToString("#.##");
|
||||
//divHJ3.InnerHtml = environment.Hum.Value.ToString("#.##");
|
||||
//divHJ4.InnerHtml = environment.Pm25.Value.ToString("#.##");
|
||||
//divHJ5.InnerHtml = environment.Ws.Value.ToString("#.##");
|
||||
//divHJ6.InnerHtml = environment.Pm10.Value.ToString("#.##");
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
}
|
||||
else
|
||||
{
|
||||
divHJ1.InnerHtml = "0";
|
||||
divHJ2.InnerHtml = "0";
|
||||
divHJ3.InnerHtml = "0";
|
||||
divHJ4.InnerHtml = "0";
|
||||
divHJ5.InnerHtml = "0";
|
||||
divHJ6.InnerHtml = "0";
|
||||
//divHJ1.InnerHtml = "0";
|
||||
//divHJ2.InnerHtml = "0";
|
||||
//divHJ3.InnerHtml = "0";
|
||||
//divHJ4.InnerHtml = "0";
|
||||
//divHJ5.InnerHtml = "0";
|
||||
//divHJ6.InnerHtml = "0";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -413,18 +424,18 @@ namespace FineUIPro.Web.common
|
||||
//this.divProjectMoney.InnerHtml = divProjectMoneyTitle = project.ProjectMoney.ToString();
|
||||
if (project.EndDate.HasValue)
|
||||
{
|
||||
this.divEndDate.InnerHtml = string.Format("{0:yyyy-MM-dd}", project.EndDate);
|
||||
//this.divEndDate.InnerHtml = string.Format("{0:yyyy-MM-dd}", project.EndDate);
|
||||
int endDays = (project.EndDate.Value - DateTime.Now).Days;
|
||||
if (endDays >= 0)
|
||||
{
|
||||
this.divRemainingDays.InnerHtml = endDays.ToString();
|
||||
//this.divRemainingDays.InnerHtml = endDays.ToString();
|
||||
}
|
||||
if (project.StartDate.HasValue)
|
||||
{
|
||||
int pdays = (project.EndDate.Value - project.StartDate.Value).Days;
|
||||
if (pdays >= 0)
|
||||
{
|
||||
this.divProjectDays.InnerHtml = pdays.ToString();
|
||||
//this.divProjectDays.InnerHtml = pdays.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -656,119 +667,119 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
var Pmodel = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == ProjectId);
|
||||
//开工日期
|
||||
if (Pmodel.StartDate != null)
|
||||
{
|
||||
scheDate0.InnerText = string.Format("{0:yyyy-MM-dd}", Pmodel.StartDate);
|
||||
if (!isBoolDates(Pmodel.StartDate))
|
||||
{
|
||||
scheline0.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
scheDate0.Style.Add("color", "#FF7474");
|
||||
scheName0.Style.Add("color", "#FF7474");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scheDate0.InnerText = "";
|
||||
}
|
||||
//if (Pmodel.StartDate != null)
|
||||
//{
|
||||
// scheDate0.InnerText = string.Format("{0:yyyy-MM-dd}", Pmodel.StartDate);
|
||||
// if (!isBoolDates(Pmodel.StartDate))
|
||||
// {
|
||||
// scheline0.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
// scheDate0.Style.Add("color", "#FF7474");
|
||||
// scheName0.Style.Add("color", "#FF7474");
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// scheDate0.InnerText = "";
|
||||
//}
|
||||
|
||||
//竣工日期
|
||||
if (Pmodel.EndDate != null)
|
||||
{
|
||||
scheDate7.InnerText = string.Format("{0:yyyy-MM-dd}", Pmodel.EndDate);
|
||||
if (!isBoolDates(Pmodel.EndDate))
|
||||
{
|
||||
scheline7.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
scheDate7.Style.Add("color", "#FF7474");
|
||||
scheName7.Style.Add("color", "#FF7474");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scheDate7.InnerText = "";
|
||||
}
|
||||
//if (Pmodel.EndDate != null)
|
||||
//{
|
||||
// scheDate7.InnerText = string.Format("{0:yyyy-MM-dd}", Pmodel.EndDate);
|
||||
// if (!isBoolDates(Pmodel.EndDate))
|
||||
// {
|
||||
// scheline7.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
// scheDate7.Style.Add("color", "#FF7474");
|
||||
// scheName7.Style.Add("color", "#FF7474");
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// scheDate7.InnerText = "";
|
||||
//}
|
||||
|
||||
if (scheduleList.Count > 0)
|
||||
{
|
||||
//节点1
|
||||
if (scheduleList.FirstOrDefault(x => x.SortId == 1) != null)
|
||||
{
|
||||
scheName1.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 1).ScheduleName;
|
||||
var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 1).ScheduleDate;
|
||||
scheDate1.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
//if (scheduleList.Count > 0)
|
||||
//{
|
||||
// //节点1
|
||||
// //if (scheduleList.FirstOrDefault(x => x.SortId == 1) != null)
|
||||
// //{
|
||||
// // scheName1.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 1).ScheduleName;
|
||||
// // var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 1).ScheduleDate;
|
||||
// // scheDate1.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
|
||||
if (!isBoolDates(NowDate))
|
||||
{
|
||||
scheline1.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
scheDate1.Style.Add("color", "#FF7474");
|
||||
scheName1.Style.Add("color", "#FF7474");
|
||||
}
|
||||
}
|
||||
//节点2
|
||||
if (scheduleList.FirstOrDefault(x => x.SortId == 2) != null)
|
||||
{
|
||||
scheName2.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 2).ScheduleName;
|
||||
var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 2).ScheduleDate;
|
||||
scheDate2.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
// // if (!isBoolDates(NowDate))
|
||||
// // {
|
||||
// // scheline1.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
// // scheDate1.Style.Add("color", "#FF7474");
|
||||
// // scheName1.Style.Add("color", "#FF7474");
|
||||
// // }
|
||||
// //}
|
||||
// //节点2
|
||||
// //if (scheduleList.FirstOrDefault(x => x.SortId == 2) != null)
|
||||
// //{
|
||||
// // scheName2.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 2).ScheduleName;
|
||||
// // var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 2).ScheduleDate;
|
||||
// // scheDate2.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
|
||||
if (!isBoolDates(NowDate))
|
||||
{
|
||||
scheline2.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
scheDate2.Style.Add("color", "#FF7474");
|
||||
scheName2.Style.Add("color", "#FF7474");
|
||||
}
|
||||
}
|
||||
//节点3
|
||||
if (scheduleList.FirstOrDefault(x => x.SortId == 3) != null)
|
||||
{
|
||||
scheName3.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 3).ScheduleName;
|
||||
var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 3).ScheduleDate;
|
||||
scheDate3.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
if (!isBoolDates(NowDate))
|
||||
{
|
||||
scheline3.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
scheDate3.Style.Add("color", "#FF7474");
|
||||
scheName3.Style.Add("color", "#FF7474");
|
||||
}
|
||||
}
|
||||
//节点4
|
||||
if (scheduleList.FirstOrDefault(x => x.SortId == 4) != null)
|
||||
{
|
||||
scheName4.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 4).ScheduleName;
|
||||
var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 4).ScheduleDate;
|
||||
scheDate4.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
if (!isBoolDates(NowDate))
|
||||
{
|
||||
scheline4.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
scheDate4.Style.Add("color", "#FF7474");
|
||||
scheName4.Style.Add("color", "#FF7474");
|
||||
}
|
||||
}
|
||||
//节点5
|
||||
if (scheduleList.FirstOrDefault(x => x.SortId == 5) != null)
|
||||
{
|
||||
scheName5.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 5).ScheduleName;
|
||||
var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 5).ScheduleDate;
|
||||
scheDate5.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
if (!isBoolDates(NowDate))
|
||||
{
|
||||
scheline5.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
scheDate5.Style.Add("color", "#FF7474");
|
||||
scheName5.Style.Add("color", "#FF7474");
|
||||
}
|
||||
}//节点6
|
||||
if (scheduleList.FirstOrDefault(x => x.SortId == 6) != null)
|
||||
{
|
||||
scheName6.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 6).ScheduleName;
|
||||
var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 6).ScheduleDate;
|
||||
scheDate6.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
if (!isBoolDates(NowDate))
|
||||
{
|
||||
scheline6.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
scheDate6.Style.Add("color", "#FF7474");
|
||||
scheName6.Style.Add("color", "#FF7474");
|
||||
}
|
||||
}
|
||||
}
|
||||
// // if (!isBoolDates(NowDate))
|
||||
// // {
|
||||
// // scheline2.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
// // scheDate2.Style.Add("color", "#FF7474");
|
||||
// // scheName2.Style.Add("color", "#FF7474");
|
||||
// // }
|
||||
// //}
|
||||
// //节点3
|
||||
// if (scheduleList.FirstOrDefault(x => x.SortId == 3) != null)
|
||||
// {
|
||||
// scheName3.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 3).ScheduleName;
|
||||
// var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 3).ScheduleDate;
|
||||
// scheDate3.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
// if (!isBoolDates(NowDate))
|
||||
// {
|
||||
// scheline3.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
// scheDate3.Style.Add("color", "#FF7474");
|
||||
// scheName3.Style.Add("color", "#FF7474");
|
||||
// }
|
||||
// }
|
||||
// //节点4
|
||||
// if (scheduleList.FirstOrDefault(x => x.SortId == 4) != null)
|
||||
// {
|
||||
// scheName4.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 4).ScheduleName;
|
||||
// var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 4).ScheduleDate;
|
||||
// scheDate4.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
// if (!isBoolDates(NowDate))
|
||||
// {
|
||||
// scheline4.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
// scheDate4.Style.Add("color", "#FF7474");
|
||||
// scheName4.Style.Add("color", "#FF7474");
|
||||
// }
|
||||
// }
|
||||
// //节点5
|
||||
// if (scheduleList.FirstOrDefault(x => x.SortId == 5) != null)
|
||||
// {
|
||||
// scheName5.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 5).ScheduleName;
|
||||
// var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 5).ScheduleDate;
|
||||
// scheDate5.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
// if (!isBoolDates(NowDate))
|
||||
// {
|
||||
// scheline5.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
// scheDate5.Style.Add("color", "#FF7474");
|
||||
// scheName5.Style.Add("color", "#FF7474");
|
||||
// }
|
||||
// }//节点6
|
||||
// if (scheduleList.FirstOrDefault(x => x.SortId == 6) != null)
|
||||
// {
|
||||
// scheName6.InnerText = scheduleList.FirstOrDefault(x => x.SortId == 6).ScheduleName;
|
||||
// var NowDate = scheduleList.FirstOrDefault(x => x.SortId == 6).ScheduleDate;
|
||||
// scheDate6.InnerText = string.Format("{0:yyyy-MM-dd}", NowDate);
|
||||
// if (!isBoolDates(NowDate))
|
||||
// {
|
||||
// scheline6.Attributes["class"] = "jd-line-dot flex-column flex-center jd-line-dot-red";
|
||||
// scheDate6.Style.Add("color", "#FF7474");
|
||||
// scheName6.Style.Add("color", "#FF7474");
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user