| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 数据库连接 |
| | |
| | | { |
| | | var path = System.IO.Path.Combine(IStation.DataFolderHelper.GetRootPath(), "AnaProject.db"); |
| | | if (!System.IO.File.Exists(path)) |
| | | { |
| | | { |
| | | throw new Exception($"缺少Project.db文件"); |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 插入指定对象到数据库中 |
| | | /// </summary> |
| | | public long Insert(IStation.CalcModel.AnaPrj result_prj, IStation.CalcModel.AnaRequest ana_request) |
| | | { |
| | | public long Insert(IStation.CalcModel.AnaPrj result_prj, IStation.CalcModel.AnaRequest ana_request) |
| | | { |
| | | IStation.Entity.AnaProjectEntity entity = new Entity.AnaProjectEntity(); |
| | | entity.PrjID = result_prj.ID; |
| | | entity.StartTime = result_prj.StartTime; |
| | |
| | | |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | | return db.Insertable(entity).ExecuteReturnSnowflakeId(); |
| | | return db.Insertable(entity).ExecuteReturnSnowflakeId(); |
| | | } |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 返回数据库所有的对象集合 |
| | | /// </summary> |
| | | public List<Entity.AnaProjectEntity> GetAll() |
| | | public List<Entity.AnaProjectEntity> GetAll() |
| | | { |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | |
| | | /// <summary> |
| | | /// 查询数据库,返回指定ID的对象 |
| | | /// </summary> |
| | | public Entity.AnaProjectEntity GetByPrjID(string prj_id) |
| | | public Entity.AnaProjectEntity GetByPrjID(string prj_id) |
| | | { |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public Entity.AnaProjectEntity GetLastRecord() |
| | | public Entity.AnaProjectEntity GetLastRecord() |
| | | { |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | | return db.Queryable<Entity.AnaProjectEntity>().OrderByDescending(i => i.ID).Take(1).First(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.ComponentModel.DataAnnotations" /> |
| | | <Reference Include="System.Configuration" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Data.SQLite, Version=1.0.116.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.116.0\lib\net46\System.Data.SQLite.dll</HintPath> |
| | |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="DAL\AnaProject.cs" /> |
| | | <Compile Include="DAL\WaterPredictRecord.cs" /> |
| | | <Compile Include="Entity\AnaProjectEntity.cs" /> |
| | | <Compile Include="Entity\WaterPredictRecord.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | <ProjectReference Include="..\..\Component\IStation.AutoMapper\IStation.AutoMapper.csproj"> |
| | | <Project>{3795f74b-15bf-4a4d-b151-3920d04ce47d}</Project> |
| | | <Name>IStation.AutoMapper</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\..\Model\IStation.Model.Basic\IStation.Model.Basic.csproj"> |
| | | <Project>{768dfba7-383a-4780-bb29-d3f73997ee6b}</Project> |
| | | <Name>IStation.Model.Basic</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\..\Settings\IStation.Settings\IStation.Settings.csproj"> |
| | | <Project>{37082337-850e-4dc9-9df5-da0218da6db8}</Project> |
| | |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
| | | </Target> |
| | | </Target> |
| | | <Import Project="..\..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" /> |
| | | <Import Project="..\..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" /> |
| | | <Import Project="..\..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" /> |
| | |
| | | {"RootPath":"D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\Entity\\IStation.Entity.Basic","ProjectFileName":"IStation.Entity.Basic.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"elec_price\\ElecPrice.cs"},{"SourceFile":"monitor\\MonitorPointMapping.cs"},{"SourceFile":"monitor\\MonitorPointGroup.cs"},{"SourceFile":"monitor\\MonitorPoint.cs"},{"SourceFile":"monitor\\Signal.cs"},{"SourceFile":"product\\Product.cs"},{"SourceFile":"product\\ProductGroup.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"pump_curve\\PumpCurve.cs"},{"SourceFile":"pump_curve\\PumpCurveMapping.cs"},{"SourceFile":"signal_type\\SignalType.cs"},{"SourceFile":"signal_type\\SignalTypeGroup.cs"},{"SourceFile":"station\\Station.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\out\\IStation.Entity.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":true,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\out\\IStation.Entity.Basic.dll","OutputItemRelativePath":"IStation.Entity.Basic.dll"},{"OutputItemFullPath":"D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\out\\IStation.Entity.Basic.pdb","OutputItemRelativePath":"IStation.Entity.Basic.pdb"}],"CopyToOutputEntries":[]} |
| | | {"RootPath":"D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\Entity\\IStation.Entity.Basic","ProjectFileName":"IStation.Entity.Basic.csproj","Configuration":"Release|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"elec_price\\ElecPrice.cs"},{"SourceFile":"monitor\\MonitorPointMapping.cs"},{"SourceFile":"monitor\\MonitorPointGroup.cs"},{"SourceFile":"monitor\\MonitorPoint.cs"},{"SourceFile":"monitor\\Signal.cs"},{"SourceFile":"WaterPredict\\WaterPredictRecord.cs"},{"SourceFile":"product\\Product.cs"},{"SourceFile":"product\\ProductGroup.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"pump_curve\\PumpCurve.cs"},{"SourceFile":"pump_curve\\PumpCurveMapping.cs"},{"SourceFile":"signal_type\\SignalType.cs"},{"SourceFile":"signal_type\\SignalTypeGroup.cs"},{"SourceFile":"station\\Station.cs"},{"SourceFile":"obj\\Release\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\out\\IStation.Entity.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":true,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\out\\IStation.Entity.Basic.dll","OutputItemRelativePath":"IStation.Entity.Basic.dll"},{"OutputItemFullPath":"D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\out\\IStation.Entity.Basic.pdb","OutputItemRelativePath":"IStation.Entity.Basic.pdb"}],"CopyToOutputEntries":[]} |
| | |
| | | <Compile Include="monitor\MonitorPointGroup.cs" /> |
| | | <Compile Include="monitor\MonitorPoint.cs" /> |
| | | <Compile Include="monitor\Signal.cs" /> |
| | | <Compile Include="WaterPredict\WaterPredictRecord.cs" /> |
| | | <Compile Include="product\Product.cs" /> |
| | | <Compile Include="product\ProductGroup.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | |
| | | <Compile Include="waterLevel\eTideSouce.cs" /> |
| | | <Compile Include="waterLevel\PumpRunParas.cs" /> |
| | | <Compile Include="waterLevel\TimeWaterLevel.cs" /> |
| | | <Compile Include="waterLevel\WaterPredictRecord.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\..\Component\IStation.Newtonsoft\IStation.Newtonsoft.csproj"> |
| | |
| | | /// </summary> |
| | | private static string _root_directory; |
| | | |
| | | public static bool IsExeExcute = true;//独立运行还是嵌入运行 |
| | | /// <summary> |
| | | /// 独立运行还是嵌入运行 |
| | | /// </summary> |
| | | public static bool IsExeExcute = true; |
| | | |
| | | /// <summary> |
| | | /// 查询数据文件夹路径 |
| | |
| | | |
| | | return new IStation.Dto.ApiResult<double>(d); |
| | | } |
| | | /// <summary> |
| | | /// 获取实时值 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("GetLastPredictValue")] |
| | | [HttpGet] |
| | | public IStation.Dto.ApiResult GetLastPredictValue() |
| | | { |
| | | try |
| | | { |
| | | IStation.DAL.WaterPredictRecord dal = new DAL.WaterPredictRecord(); |
| | | var records = dal.GetLast(1); |
| | | if(records == null || records.Count == 0) |
| | | { |
| | | return new IStation.Dto.ApiResult<string>() { Code = ApiResultCode.Error, Data = "数据为空" }; |
| | | } |
| | | return new IStation.Dto.ApiResult<string>() { Code = ApiResultCode.Error, Data = records.Last().PredictValueList }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return new IStation.Dto.ApiResult<string>() { Code = ApiResultCode.Error, Data = ex.Message }; |
| | | } |
| | | } |
| | | |
| | | |
| | | ///// <summary> |
| | | ///// 获取今日预测值(24点时) |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> |
| | | <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> |
| | | <UseIISExpress>true</UseIISExpress> |
| | | <Use64BitIISExpress>true</Use64BitIISExpress> |
| | | <IISExpressSSLPort>44318</IISExpressSSLPort> |
| | |
| | | 2024-04-25 17:10:52,334|初始化成功| |
| | | 2024-04-25 17:10:58,153|debug:66| |
| | | 2024-04-29 14:23:21,795|初始化成功| |
| | | 2024-05-12 16:40:38,359|初始化成功| |
| | | 2024-05-12 16:41:10,073|初始化成功| |
| | | 2024-05-12 16:42:48,668|初始化成功| |
| | |
| | | <add key="webpages:Enabled" value="false" /> |
| | | <add key="ClientValidationEnabled" value="true" /> |
| | | <add key="UnobtrusiveJavaScriptEnabled" value="true" /> |
| | | <add key="WaterPredictDsPath" value="D:\WorkData\IStation\ChEq\CodeV1.3\WaterPredict\IStation.ChEr.Entry.Predict\bin\Debug\net6.0\Data" /> |
| | | |
| | | </appSettings> |
| | | <system.web> |
| | | <compilation debug="true" targetFramework="4.7.2" /> |