|
@@ -12,6 +12,7 @@ using StackExchange.Redis;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Dynamic;
|
|
|
+using System.Globalization;
|
|
|
using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Net;
|
|
@@ -2294,6 +2295,8 @@ namespace TEAMModelOS.Controllers
|
|
|
schIot.Add(school.id, new IotStatisticsSch());
|
|
|
schIot[school.id].schId = school.id;
|
|
|
schIot[school.id].schName = schName;
|
|
|
+ schIot[school.id].sdate = $"{dateFromYear}-{dateFromMonth}-{dateFromDay}";
|
|
|
+ schIot[school.id].edate = $"{dateToYear}-{dateToMonth}-{dateToDay}";
|
|
|
}
|
|
|
|
|
|
//教室數(今年)
|
|
@@ -2386,6 +2389,8 @@ namespace TEAMModelOS.Controllers
|
|
|
//學校
|
|
|
schoolIotResult.Add(schIotData);
|
|
|
//學區
|
|
|
+ areaIot.sdate = (string.IsNullOrWhiteSpace(areaIot.sdate)) ? schIotData.sdate : (DateTime.Parse(schIotData.sdate, CultureInfo.InvariantCulture) < DateTime.Parse(areaIot.sdate, CultureInfo.InvariantCulture)) ? schIotData.sdate : areaIot.sdate;
|
|
|
+ areaIot.edate = (string.IsNullOrWhiteSpace(areaIot.edate)) ? schIotData.edate : (DateTime.Parse(schIotData.edate, CultureInfo.InvariantCulture) > DateTime.Parse(areaIot.edate, CultureInfo.InvariantCulture)) ? schIotData.edate : areaIot.edate;
|
|
|
areaIot.tmidList = areaIot.tmidList.Union(schIotData.tmidList).ToList();
|
|
|
areaIot.tmidCnt = areaIot.tmidList.Count;
|
|
|
areaIot.stuShow += schIotData.stuShow;
|