ÎļþÃû´Ó WaterPredict/Station.ChEr.Application.WaterPredict/01-map-info/PredictOut_Controller.cs ÐÞ¸Ä |
| | |
| | | using IStation; |
| | | using ISupply.DAL; |
| | | using IStation.ChEr.DAL; |
| | | using Microsoft.Extensions.Configuration.UserSecrets; |
| | | using System; |
| | | using static Yw.Application.ConnectHelper; |
| | | using static Yw.Service.SSAPredictHelper; |
| | | using static IStation.Application.ConnectHelper; |
| | | using static IStation.Service.SSAPredictHelper; |
| | | |
| | | namespace Yw.Application |
| | | namespace IStation.Application |
| | | { |
| | | /// <summary> |
| | | /// æ¶é´æ®µèªå®ä¹é¢æµ |
| | | /// </summary> |
| | | [Route("Predict/user")] |
| | | [ApiDescriptionSettings("OutWater", Name = "æ¶é´å颿µ", Order = 9900)] |
| | | [ApiDescriptionSettings("OutWater", Name = "æ¶é´å颿µ(ä½åº)", Order = 9900)] |
| | | public class PredictOutWater_Controller : IDynamicApiController |
| | | { |
| | | /// <summary> |
| | |
| | | tupleList = totalSumByTimePoint |
| | | .Select(x => Tuple.Create(x.DateTime, x.Total)) |
| | | .ToList(); |
| | | Yw.Service.SSAPredictHelper sSAPredictHelper = new Service.SSAPredictHelper(); |
| | | IStation.Service.SSAPredictHelper sSAPredictHelper = new Service.SSAPredictHelper(); |
| | | var a = tupleList.Where(x => x.Item1.Hour == 1).ToList(); |
| | | var predictdata = sSAPredictHelper.Predict(tupleList, 3600, 24, 2880, (float)0.99, 48); |
| | | var predictdataday = sSAPredictHelper.Predict(a, 86400, 2, 86400, (float)0.99, 2); |
| | |
| | | [HttpGet] |
| | | public List<TotalOneDay> SaveDB() |
| | | { |
| | | var db = new MainDbContext(); |
| | | db.InitTables(); |
| | | var bll = new ISupply.BLL.PredictData(); |
| | | bll.GetAll(); |
| | | //var db = new MainDbContext(); |
| | | //db.InitTables(); |
| | | //var bll = new IStation.BLL.PredictData(); |
| | | //bll.GetAll(); |
| | | return null; |
| | | } |
| | | } |