已删除2个文件
已重命名6个文件
已修改63个文件
已添加29个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | {"RootPath":"D:\\WorkData\\AStation\\Client.V1.2\\DAL\\AStation.DAL.Basic","ProjectFileName":"AStation.DAL.Basic.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[],"References":[],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"D:\\WorkData\\AStation\\Client.V1.2\\DAL\\AStation.DAL.Basic\\bin\\Debug\\AStation.DAL.Basic.dll","OutputItemRelativePath":"AStation.DAL.Basic.dll"},{"OutputItemFullPath":"D:\\WorkData\\AStation\\Client.V1.2\\DAL\\AStation.DAL.Basic\\bin\\Debug\\AStation.DAL.Basic.pdb","OutputItemRelativePath":"AStation.DAL.Basic.pdb"}],"CopyToOutputEntries":[]} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <Import Project="..\..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" /> |
| | | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProjectGuid>{19C07AAE-4019-47DB-8ED5-E7CFC7F05CAF}</ProjectGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>AStation.DAL</RootNamespace> |
| | | <AssemblyName>AStation.DAL.Basic</AssemblyName> |
| | | <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <Deterministic>true</Deterministic> |
| | | <NuGetPackageImportStamp> |
| | | </NuGetPackageImportStamp> |
| | | <TargetFrameworkProfile /> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>pdbonly</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="SqlSugar, Version=5.1.4.143, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\packages\SqlSugar.5.1.4.143\lib\SqlSugar.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.ComponentModel.DataAnnotations" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Data.SQLite, Version=1.0.118.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\lib\net46\System.Data.SQLite.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Data.SQLite.EF6, Version=1.0.118.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.118.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Data.SQLite.Linq, Version=1.0.118.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.118.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Numerics" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="Microsoft.CSharp" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Net.Http" /> |
| | | <Reference Include="System.Xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="DB\ConnectionFactory.cs" /> |
| | | <Compile Include="DB\DbInitial.cs" /> |
| | | <Compile Include="ElecPrice\ElecPrice.cs" /> |
| | | <Compile Include="Equipment\EquipmentChartMapping.cs" /> |
| | | <Compile Include="Equipment\EquipmentMonitorMapping.cs" /> |
| | | <Compile Include="MonitorPoint\MonitorPoint.cs" /> |
| | | <Compile Include="MonitorPoint\MonitorPointGroup.cs" /> |
| | | <Compile Include="MonitorPoint\Signal.cs" /> |
| | | <Compile Include="Equipment\Equipment.cs" /> |
| | | <Compile Include="Equipment\EquipmentGroup.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | <Compile Include="SignalType\SignalType.cs" /> |
| | | <Compile Include="SignalType\SignalTypeGroup.cs" /> |
| | | <Compile Include="MonitorDataSources\MonitorDataSources.cs" /> |
| | | <Compile Include="Station\Station.cs" /> |
| | | <Compile Include="LoginUser\LoginUser.cs" /> |
| | | <Compile Include="SoftSetting\SoftSetting.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="packages.config" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\..\Component\AStation.Log4Net\AStation.Log4Net.csproj"> |
| | | <Project>{11e16cab-6f98-494c-b5a6-cb0ea120819e}</Project> |
| | | <Name>AStation.Log4Net</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\..\Component\AStation.SharpZipLib\AStation.SharpZipLib.csproj"> |
| | | <Project>{a6174f86-d56b-4226-97e1-4010ed45cab0}</Project> |
| | | <Name>AStation.SharpZipLib</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\..\Component\AStation.SnowflakeId\AStation.SnowflakeId.csproj"> |
| | | <Project>{320bb67d-7a08-4147-b0ed-62a377ba8128}</Project> |
| | | <Name>AStation.SnowflakeId</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\..\Configs\AStation.Configs\AStation.Configs.csproj"> |
| | | <Project>{37d4dcea-932e-4628-b245-14c679a2773e}</Project> |
| | | <Name>AStation.Configs</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\..\Entity\AStation.Entity.Basic\AStation.Entity.Basic.csproj"> |
| | | <Project>{6578c9c4-658c-46fb-86d4-d9195ce4d453}</Project> |
| | | <Name>AStation.Entity.Basic</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\..\Entity\AStation.Entity.Core\AStation.Entity.Core.csproj"> |
| | | <Project>{088cba0c-851c-4df5-a977-5cb2e36edf00}</Project> |
| | | <Name>AStation.Entity.Core</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\AStation.DAL.Core\AStation.DAL.Core.csproj"> |
| | | <Project>{c29ff6ec-8600-4e53-bd75-9be8b7d6773f}</Project> |
| | | <Name>AStation.DAL.Core</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
| | | <PropertyGroup> |
| | | <ErrorText>è¿å°è®¡ç®æºä¸ç¼ºå°æ¤é¡¹ç®å¼ç¨ç NuGet ç¨åºå
ã使ç¨âNuGet ç¨åºå
è¿åâå¯ä¸è½½è¿äºç¨åºå
ãæå
³æ´å¤ä¿¡æ¯ï¼è¯·åè§ http://go.microsoft.com/fwlink/?LinkID=322105ã缺å°çæä»¶æ¯ {0}ã</ErrorText> |
| | | </PropertyGroup> |
| | | <Error Condition="!Exists('..\..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" /> |
| | | <Error Condition="!Exists('..\..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" /> |
| | | <Error Condition="!Exists('..\..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" /> |
| | | </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.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')" /> |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <ProjectView>ShowAllFiles</ProjectView> |
| | | </PropertyGroup> |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// æ°æ®åºè¿æ¥è¾
å©ç±» |
| | | /// </summary> |
| | | internal class ConnectionFactory |
| | | { |
| | | private static ConnectionConfig _config = null; |
| | | |
| | | /// <summary> |
| | | /// åå»ºè¿æ¥å¯¹è±¡ |
| | | /// </summary> |
| | | public static ConnectionConfig BuildConnection() |
| | | { |
| | | try |
| | | { |
| | | var dbName = "Db4Basic.db"; |
| | | var filePath = System.IO.Path.Combine(AStation.DataFolderParas.FullPath, AStation.UserConfig.File.DataSetFolderName, dbName); |
| | | if (!System.IO.File.Exists(filePath)) |
| | | { |
| | | throw new System.Exception($"{dbName}æä»¶ä¸åå¨!Path:{filePath}"); |
| | | } |
| | | |
| | | _config = new ConnectionConfig() |
| | | { |
| | | ConnectionString = $"DataSource={filePath}", |
| | | IsAutoCloseConnection = true, |
| | | DbType = SqlSugar.DbType.Sqlite |
| | | }; |
| | | return _config; |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Data.SQLite; |
| | | using System.Linq; |
| | | |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | public class DbInitialT |
| | | { |
| | | /// <summary> |
| | | /// åå§æ°æ®åº |
| | | /// </summary> |
| | | /// <param name="backup"></param> |
| | | /// <param name="stringDefaultLength"></param> |
| | | /// <returns></returns> |
| | | public static bool InitTables(bool backup = false, int stringDefaultLength = 250) |
| | | { |
| | | var db = GetDb(); |
| | | if (db == null) |
| | | return false; |
| | | |
| | | Type[] types = new Type[] { |
| | | typeof(Entity.SignalType), |
| | | typeof(Entity.SignalTypeGroup), |
| | | typeof(Entity.ElecPrice), |
| | | |
| | | typeof(Entity.Station), |
| | | |
| | | typeof(Entity.Equipment), |
| | | typeof(Entity.EquipmentGroup), |
| | | typeof(Entity.EquipmentMonitorMapping), |
| | | typeof(Entity.EquipmentChartMapping), |
| | | |
| | | typeof(Entity.LoginUser), |
| | | |
| | | |
| | | typeof(Entity.MonitorPoint), |
| | | typeof(Entity.MonitorPointGroup), |
| | | typeof(Entity.Signal), |
| | | |
| | | typeof(Entity.MonitorDataSources), |
| | | typeof(Entity.SoftSetting), |
| | | |
| | | }; |
| | | |
| | | //Db.CodeFirst.SetStringDefaultLength(StringDefaultLength); |
| | | db.DbMaintenance.CreateDatabase(); |
| | | if (backup) |
| | | { |
| | | db.CodeFirst.BackupTable().InitTables(types); |
| | | } |
| | | else |
| | | { |
| | | db.CodeFirst.InitTables(types); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | private static SqlSugarClient GetDb() |
| | | { |
| | | var dbName = "Db4Basic.db"; |
| | | var filePath = $"{FileHelper.GetWorkFolder()}\\{dbName}"; |
| | | if (!System.IO.File.Exists(filePath)) |
| | | { |
| | | try |
| | | { |
| | | SQLiteConnection.CreateFile(filePath); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | var errMsg = $"{dbName}æä»¶ä¸åå¨!Path:{filePath}\r\n{ex.Message}"; |
| | | LogHelper.Debug(errMsg); |
| | | throw new Exception(errMsg); |
| | | } |
| | | } |
| | | |
| | | var config = new ConnectionConfig(); |
| | | config.ConnectionString = $"DataSource={filePath}"; |
| | | config.IsAutoCloseConnection = true; |
| | | config.DbType = SqlSugar.DbType.Sqlite; |
| | | config.ConfigureExternalServices = new ConfigureExternalServices() |
| | | { |
| | | EntityService = (property, column) => |
| | | { |
| | | //é¤ä¸»é®å¤é½å¯ç©º |
| | | if (!column.IsPrimarykey) |
| | | { |
| | | column.IsNullable = true; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | var db = new SqlSugarClient(config); |
| | | db.Aop.OnLogExecuting = (sql, pars) => |
| | | { |
| | | Console.WriteLine(sql + "\r\n" + db.Utilities.SerializeObject |
| | | (pars.ToDictionary(it => it.ParameterName, it => it.Value))); |
| | | Console.WriteLine(); |
| | | }; |
| | | |
| | | return db; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// çµåä»·æ ¼ |
| | | /// </summary> |
| | | public class ElecPrice : BaseDAL<Entity.ElecPrice> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// è®¾å¤ |
| | | /// </summary> |
| | | public class Equipment : BaseDAL_TreeSorter_Flags_TagName_UseStatus<Entity.Equipment> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// 设å¤å¾è¡¨æ å° |
| | | /// </summary> |
| | | public class EquipmentChartMapping : BaseDAL<Entity.EquipmentChartMapping> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éè¿ EquipmentID è·å |
| | | /// </summary> |
| | | public List<Entity.EquipmentChartMapping> GetByEquipmentID(long equipmentId) |
| | | { |
| | | if (equipmentId < 1) |
| | | return default; |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Queryable<Entity.EquipmentChartMapping>() |
| | | .Where(x => x.EquipmentID == equipmentId) |
| | | .ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ° ChartOtherName |
| | | /// </summary> |
| | | public bool UpdateChartOtherName(long id, string chartOtherName) |
| | | { |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Updateable<Entity.EquipmentChartMapping>() |
| | | .SetColumns(x => x.OtherName == chartOtherName) |
| | | .Where(x => x.ID == id).ExecuteCommandHasChange(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ° SortCode |
| | | /// </summary> |
| | | public bool UpdateSortCode(long id, int sortCode) |
| | | { |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Updateable<Entity.EquipmentChartMapping>() |
| | | .SetColumns(x => x.SortCode == sortCode) |
| | | .Where(x => x.ID == id).ExecuteCommandHasChange(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置 |
| | | /// </summary> |
| | | public bool SetOfObject(long equipmentId, List<Entity.EquipmentChartMapping> list) |
| | | { |
| | | if (equipmentId < 1) |
| | | return default; |
| | | |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | try |
| | | { |
| | | db.Ado.BeginTran(); |
| | | var existList = db.Queryable<Entity.EquipmentChartMapping>() |
| | | .Where(x => x.EquipmentID == equipmentId) |
| | | .ToList(); |
| | | if (existList.Count > 0) |
| | | { |
| | | var bol = db.Deleteable(existList).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | if (list != null && list.Any()) |
| | | { |
| | | var bol = db.Insertable(list).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | return false; |
| | | } |
| | | } |
| | | db.Ado.CommitTran(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | throw ex; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è®¾ç½®å·¥ä½æ²çº¿ |
| | | /// </summary> |
| | | public bool SetWorking(long equipmentId, long id) |
| | | { |
| | | if (equipmentId < 1) |
| | | return default; |
| | | if (id < 1) |
| | | return default; |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | try |
| | | { |
| | | db.Ado.BeginTran(); |
| | | |
| | | db.Updateable<Entity.EquipmentChartMapping>() |
| | | .SetColumns(x => x.IsWorking == false) |
| | | .Where(x => x.EquipmentID == equipmentId) |
| | | .ExecuteCommand(); |
| | | |
| | | var bol = db.Updateable<Entity.EquipmentChartMapping>() |
| | | .SetColumns(x => x.IsWorking == true) |
| | | .Where(x => x.ID == id) |
| | | .ExecuteCommandHasChange(); |
| | | if (!bol) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | return false; |
| | | } |
| | | |
| | | db.Ado.CommitTran(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | throw ex; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// éè¿ EquipmentID å é¤ |
| | | /// </summary> |
| | | public bool DeleteByEquipmentID(long equipmentId) |
| | | { |
| | | if (equipmentId < 1) |
| | | return default; |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Deleteable<Entity.EquipmentChartMapping>().Where(x => x.EquipmentID == equipmentId).ExecuteCommand() > 0; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ EquipmentIs å é¤ |
| | | /// </summary> |
| | | public bool DeleteByEquipmentIds(List<long> equipmentIds) |
| | | { |
| | | if (equipmentIds == null || equipmentIds.Count() < 1) |
| | | return false; |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Deleteable<Entity.EquipmentChartMapping>().Where(x => equipmentIds.Contains(x.ID)).ExecuteCommand() > 0; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// 设å¤ç» |
| | | /// </summary> |
| | | public class EquipmentGroup : BaseDAL_TreeSorter_Flags_TagName<Entity.EquipmentGroup> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// 设å¤çæµæ å° |
| | | /// </summary> |
| | | public class EquipmentMonitorMapping : BaseDAL<Entity.EquipmentMonitorMapping> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éè¿ EquipmentID è·å |
| | | /// </summary> |
| | | public List<Entity.EquipmentMonitorMapping> GetByEquipmentID(long equipmentId) |
| | | { |
| | | if (equipmentId < 1) |
| | | return default; |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Queryable<Entity.EquipmentMonitorMapping>() |
| | | .Where(x => x.EquipmentID == equipmentId) |
| | | .ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置 |
| | | /// </summary> |
| | | public bool SetOfObject(long equipmentId, List<Entity.EquipmentMonitorMapping> list) |
| | | { |
| | | if (equipmentId < 1) |
| | | return default; |
| | | |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | try |
| | | { |
| | | db.Ado.BeginTran(); |
| | | var existList = db.Queryable<Entity.EquipmentMonitorMapping>() |
| | | .Where(x => x.EquipmentID == equipmentId) |
| | | .ToList(); |
| | | if (existList.Count > 0) |
| | | { |
| | | var bol = db.Deleteable(existList).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | if (list != null && list.Any()) |
| | | { |
| | | var bol = db.Insertable(list).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | return false; |
| | | } |
| | | } |
| | | db.Ado.CommitTran(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | throw ex; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éè¿ EquipmentID å é¤ |
| | | /// </summary> |
| | | public bool DeleteByEquipmentID(long equipmentId) |
| | | { |
| | | if (equipmentId < 1) |
| | | return default; |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Deleteable<Entity.EquipmentMonitorMapping>().Where(x => x.EquipmentID == equipmentId).ExecuteCommand() > 0; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ EquipmentIs å é¤ |
| | | /// </summary> |
| | | public bool DeleteByEquipmentIds(List<long> equipmentIds) |
| | | { |
| | | if (equipmentIds == null || equipmentIds.Count() < 1) |
| | | return false; |
| | | using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | return db.Deleteable<Entity.EquipmentMonitorMapping>().Where(x => equipmentIds.Contains(x.ID)).ExecuteCommand() > 0; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AStation.HttpClient; |
| | | using SqlSugar; |
| | | using System; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// ç»å½ç¨æ· |
| | | /// </summary> |
| | | public class LoginUser : BaseDAL<Entity.LoginUser> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç»å½åæ¯å¦åå¨ |
| | | /// </summary> |
| | | public bool IsLoginName(string LoginName) |
| | | { |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | | return db.Queryable<Entity.LoginUser>().Where(x => x.LoginName == LoginName).Any(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ç»å½åè·åç»å½ä¿¡æ¯ |
| | | /// </summary> |
| | | public Entity.LoginUser GetByLoginName(string LoginName) |
| | | { |
| | | if (string.IsNullOrEmpty(LoginName)) |
| | | return default; |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | | return db.Queryable<Entity.LoginUser>().Single(x => x.LoginName.Contains(LoginName)); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ° SetValue |
| | | /// </summary> |
| | | public bool UpdateLastLoginTime(long ID) |
| | | { |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | | var result = db.Updateable<Entity.LoginUser>() |
| | | .SetColumns("LastLoginTime", DateTime.Now) |
| | | .Where(x => x.ID == ID).ExecuteCommandHasChange(); |
| | | |
| | | if (result && AStation.CorpConfig.Instance.RealTimeRemoteService.IsSynMainData) |
| | | { |
| | | var dto = GetByID(ID); |
| | | HttpClientHelper.Build(this.TableName, "Update@V1.0").Put<bool>(dto); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System.IO; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// æ°æ®æ¥æº |
| | | /// </summary> |
| | | public class MonitorDataSources : BaseDAL_Sorter_Flags_TagName<Entity.MonitorDataSources> |
| | | { |
| | | /*public override string FileName |
| | | { |
| | | get { return FileHelper.GetFilePath<Entity.MonitorDataSources>(); } |
| | | } |
| | | */ |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | public override bool DeleteByID(long id) |
| | | { |
| | | var bol = base.DeleteByID(id); |
| | | if (bol) |
| | | { |
| | | var folder = FileHelper.GetWorkFolder(); |
| | | var monitorDataSourcesFolder = Path.Combine(folder, id.ToString()); |
| | | if (Directory.Exists(monitorDataSourcesFolder)) |
| | | { |
| | | Directory.Delete(monitorDataSourcesFolder, true); |
| | | } |
| | | } |
| | | return bol; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// æµç¹ |
| | | /// </summary> |
| | | public class MonitorPoint : BaseDAL_Sorter_Flags_TagName_UseStatus<Entity.MonitorPoint> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// æµç¹ç» |
| | | /// </summary> |
| | | public class MonitorPointGroup : BaseDAL_TreeSorter_Flags_TagName<Entity.MonitorPointGroup> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// ä¿¡å· |
| | | /// </summary> |
| | | public class Signal : BaseDAL_Sorter_Flags_TagName<Entity.Signal> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.InteropServices; |
| | | |
| | | // æå
³ç¨åºéçä¸è¬ä¿¡æ¯ç±ä»¥ä¸ |
| | | // æ§å¶ãæ´æ¹è¿äºç¹æ§å¼å¯ä¿®æ¹ |
| | | // ä¸ç¨åºéå
³èçä¿¡æ¯ã |
| | | [assembly: AssemblyTitle("AStation.Entity.Logic")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("AStation.Entity.Logic")] |
| | | [assembly: AssemblyCopyright("Copyright © 2023")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | |
| | | // å° ComVisible 设置为 false ä¼ä½¿æ¤ç¨åºéä¸çç±»å |
| | | //对 COM ç»ä»¶ä¸å¯è§ã妿éè¦ä» COM è®¿é®æ¤ç¨åºéä¸çç±»å |
| | | //è¯·å°æ¤ç±»åç ComVisible ç¹æ§è®¾ç½®ä¸º trueã |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // 妿æ¤é¡¹ç®å COM å
¬å¼ï¼åä¸å GUID ç¨äºç±»ååºç ID |
| | | [assembly: Guid("919fc11f-c7d4-4426-a805-6849450d2593")] |
| | | |
| | | // ç¨åºéççæ¬ä¿¡æ¯ç±ä¸åå个å¼ç»æ: |
| | | // |
| | | // ä¸»çæ¬ |
| | | // æ¬¡çæ¬ |
| | | // çæå· |
| | | // ä¿®è®¢å· |
| | | // |
| | | //å¯ä»¥æå®ææè¿äºå¼ï¼ä¹å¯ä»¥ä½¿ç¨âçæå·âåâ修订å·âçé»è®¤å¼ |
| | | //æ ¹æ® ä½¿ç¨ "*"ï¼å¦ä¸æç¤º: |
| | | // [assembly: AssemblyVersion("1.0.*")] |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// ä¿¡å·ç±»å |
| | | /// </summary> |
| | | public class SignalType : BaseDAL_Sorter<Entity.SignalType> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// ä¿¡å·ç±»åç» |
| | | /// </summary> |
| | | public class SignalTypeGroup : BaseDAL_TreeSorter<Entity.SignalTypeGroup> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AStation.HttpClient; |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | public class SoftSetting : BaseDAL<Entity.SoftSetting> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ SetName è·å |
| | | /// </summary> |
| | | public Entity.SoftSetting GetBySetName(string Type, string SetName) |
| | | { |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | | return db.Queryable<Entity.SoftSetting>().Single(x => x.Name == SetName && x.Type == Type); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ° SetValue |
| | | /// </summary> |
| | | public bool UpdateSetValue(string Type, string Name, string SetValue) |
| | | { |
| | | using (ISqlSugarClient db = Connection) |
| | | { |
| | | var result = db.Updateable<Entity.SoftSetting>() |
| | | .SetColumns("Value", SetValue) |
| | | .Where(x => x.Type == Type && x.Name == Name).ExecuteCommandHasChange(); |
| | | |
| | | if (result && AStation.CorpConfig.Instance.RealTimeRemoteService.IsSynMainData) |
| | | { |
| | | var dtos = db.Queryable<Entity.SoftSetting>().Where(x => x.Type == Type && x.Name == Name); |
| | | HttpClientHelper.Build(this.TableName, "Updates@V1.0").Put<bool>(dtos); |
| | | } |
| | | return result; |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace AStation.DAL |
| | | { |
| | | /// <summary> |
| | | /// æ³µç« |
| | | /// </summary> |
| | | public class Station : BaseDAL_Sorter_Flags_TagName<Entity.Station> |
| | | { |
| | | public override ConnectionConfig ConnectionConfig |
| | | { |
| | | get { return ConnectionFactory.BuildConnection(); } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <packages> |
| | | <package id="EntityFramework" version="6.4.4" targetFramework="net472" /> |
| | | <package id="SqlSugar" version="5.1.4.143" targetFramework="net472" /> |
| | | <package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.118.0" targetFramework="net472" /> |
| | | <package id="System.Data.SQLite" version="1.0.118.0" targetFramework="net472" /> |
| | | <package id="System.Data.SQLite.Core" version="1.0.118.0" targetFramework="net472" /> |
| | | <package id="System.Data.SQLite.EF6" version="1.0.118.0" targetFramework="net472" /> |
| | | <package id="System.Data.SQLite.Linq" version="1.0.118.0" targetFramework="net472" /> |
| | | </packages> |
| | |
| | | |
| | | if (isopen.Count < 5) |
| | | { |
| | | return null; |
| | | error = "Error 260"; |
| | | return null; |
| | | } |
| | | |
| | | var allRunstatus = getPumpIsOpen(isopen);//è¿è¡åæ° |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace IStation.CalcModel |
| | | { |
| | | public class AnaPrj |
| | | { |
| | | public AnaPrj() { } |
| | | public AnaPrj(AnaPrj prj) { |
| | | this.ID = prj.ID; |
| | | this.Name = prj.Name; |
| | | this.IsFixed = prj.IsFixed; |
| | | this.SumMoney = prj.SumMoney; |
| | | this.SumFlow = prj.SumFlow; |
| | | this.SumPower = prj.SumPower; |
| | | this.Note = prj.Note; |
| | | this.StartTime = prj.StartTime; |
| | | this.EndTime = prj.EndTime; |
| | | this.CalcSpaceMinute = prj.CalcSpaceMinute; |
| | | if (prj.BlockTimes != null) |
| | | { |
| | | this.BlockTimes = new List<AnaPrjBlockTime>(); |
| | | foreach (var item in prj.BlockTimes) |
| | | { |
| | | this.BlockTimes.Add(new AnaPrjBlockTime(item)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public DateTime StartTime { get; set; } |
| | | public DateTime EndTime { get; set; } |
| | | |
| | | public string ID { get; set; } |
| | | public string Name { get; set; } |
| | | public string WaterLevelInfo { get; set; } |
| | | public double SumFlow { get; set; } |
| | | public double SumPower { get; set; } |
| | | public double SumMoney { get; set; } |
| | | |
| | | public double SumFlow4Disp { get { return Math.Round(SumFlow / 10000, 2); } } |
| | | public double SumPower4Disp { get { return Math.Round(SumPower, 0); } } |
| | | |
| | | public int CalcSpaceMinute { get; set; } |
| | | |
| | | //å卿°´è½è |
| | | public double QDSLN |
| | | { |
| | | get |
| | | { |
| | | if (SumFlow == 0) |
| | | return 0; |
| | | return Math.Round(SumPower * 1000 / SumFlow, 1); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public List<AnaPrjBlockTime> BlockTimes { get; set; } |
| | | public List<AnaPrjPointTime> PointTimes { get; set; } |
| | | public AnaPrjPointTime FingPointTime(DateTime time) |
| | | { |
| | | return PointTimes.Find(x => x.Time == time); |
| | | } |
| | | public bool IsFixed { get; set; } = false; |
| | | |
| | | public string Note { get;set; } |
| | | public int Type { get; set; }//0 表示åæå¾åº 1 表示æå¨æ·»å |
| | | //æåºä¸æ¯è¾ |
| | | public class Comparer : IComparer<AnaPrj> |
| | | { |
| | | private eCalcOptType sortType; |
| | | public Comparer(eCalcOptType type) |
| | | { |
| | | sortType = type; |
| | | } |
| | | |
| | | #region IComparer<FeatPoint> æå |
| | | int IComparer<AnaPrj>.Compare(AnaPrj obj1, AnaPrj obj2) |
| | | { |
| | | if (sortType == eCalcOptType.åç) |
| | | { |
| | | if (Math.Abs(obj1.SumPower - obj2.SumPower) < 0.1) |
| | | { |
| | | return 0; |
| | | } |
| | | else if (obj1.SumPower > obj2.SumPower) |
| | | { |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | return -1; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (Math.Abs(obj1.SumMoney- obj2.SumMoney) < 0.1) |
| | | { |
| | | return 0; |
| | | } |
| | | else if (obj1.SumMoney > obj2.SumMoney) |
| | | { |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | return -1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | | |
| | | public class AnaPrjBlockTime |
| | | { |
| | | public AnaPrjBlockTime() { } |
| | | public AnaPrjBlockTime(AnaPrjBlockTime item) { |
| | | this.StartTime = item.StartTime; |
| | | this.EndTime = item.EndTime; |
| | | this.OpenPumpCount = item.OpenPumpCount; |
| | | } |
| | | public DateTime StartTime { get; set; } |
| | | public DateTime EndTime { get; set; } |
| | | public int OpenPumpCount { get; set; } |
| | | |
| | | public double SumFlow { get; set; }//å·²ç»èèæ¶é´æ®µ (累计å¼) |
| | | public double SumPower { get; set; }//å·²ç»èèæ¶é´æ®µ (ç´¯è®¡å¼ åº¦) |
| | | public double SumMoney { get; set; }//å·²ç»èèæ¶é´æ®µ (累计å¼) |
| | | |
| | | public double SumFlow4Disp { get { return Math.Round(SumFlow / 10000, 2); } } |
| | | public double SumPower4Disp { get { return Math.Round(SumPower, 0); } } |
| | | |
| | | |
| | | |
| | | //å卿°´è½è |
| | | public double QDSLN |
| | | { |
| | | get |
| | | { |
| | | if(SumFlow == 0) |
| | | return 0; |
| | | return Math.Round(SumPower * 1000 / SumFlow, 1); |
| | | } |
| | | } |
| | | |
| | | public static AnaPrjBlockTime Find( |
| | | List<AnaPrjBlockTime> items, |
| | | DateTime start) |
| | | { |
| | | if (items == null || items.Count == 0) |
| | | return null; |
| | | if(items.Count == 1) |
| | | { |
| | | return items[0]; |
| | | } |
| | | foreach(var item in items) |
| | | { |
| | | if(item.StartTime >= start ) |
| | | { |
| | | return item; |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public class AnaPrjPointTime |
| | | { |
| | | public AnaPrjPointTime() { } |
| | | public AnaPrjPointTime(AnaPrjPointTime rhs) |
| | | { |
| | | this.Time = rhs.Time; |
| | | this.ReservoirDropFlowTotal = rhs.ReservoirDropFlowTotal; |
| | | this.RealHead = rhs.RealHead; |
| | | this.RealFlow = rhs.RealFlow; |
| | | this.SumMoney = rhs.SumMoney; |
| | | this.RealPower = rhs.RealPower; |
| | | this.SumPower = rhs.SumPower; |
| | | this.SumFlow = rhs.SumFlow; |
| | | this.WaterLevelQ = rhs.WaterLevelQ; |
| | | this.WaterLevelH = rhs.WaterLevelH; |
| | | this.OpenPumpCount = rhs.OpenPumpCount; |
| | | this.WaterLevelC = rhs.WaterLevelC; |
| | | } |
| | | public AnaPrjPointTime( |
| | | IStation.CalcModel.TimePoint t, |
| | | IStation.CalcModel.StationTimeData td, |
| | | int openPumpCount) { |
| | | this.Time = t.Time; |
| | | this.ReservoirDropFlowTotal = t.ReservoirDropFlowTotal; |
| | | this.OpenPumpCount = openPumpCount; |
| | | |
| | | |
| | | this.RealHead = td.Head; |
| | | this.RealFlow = td.Flow; |
| | | this.RealPower = td.Power; |
| | | |
| | | this.SumMoney = td.SumMoney; |
| | | this.SumPower = td.SumPower; |
| | | this.SumFlow = td.SumFlow; |
| | | |
| | | this.WaterLevelC = t.WaterLevelC; |
| | | this.WaterLevelQ = Math.Round(td.WaterLevelQ, 2); |
| | | this.WaterLevelH = Math.Round(td.WaterLevelH, 4); |
| | | |
| | | |
| | | |
| | | //this.PumpDatas = td.PumpDatas; |
| | | } |
| | | public AnaPrjPointTime(IStation.CalcModel.TimePoint t ) |
| | | { |
| | | this.Time = t.Time; |
| | | this.ReservoirDropFlowTotal = t.ReservoirDropFlowTotal; |
| | | this.WaterLevelC = t.WaterLevelC ; |
| | | this.WaterLevelQ = t.WaterLevelC ; |
| | | } |
| | | // |
| | | public DateTime Time { get; set; } |
| | | public int OpenPumpCount { get; set; } |
| | | |
| | | public double RealHead { get; set; } |
| | | public double RealFlow { get; set; }//ç¬æ¶å¼, ä¸èèæ¶é´æ®µ |
| | | public double RealPower { get; set; }//ç¬æ¶å¼, ä¸èèæ¶é´æ®µ |
| | | |
| | | public double SumFlow { get; set; }//æµé , èèæ¶é´æ®µ |
| | | public double SumPower { get; set; }//ç¨çµé , èèæ¶é´æ®µ |
| | | public double SumMoney { get; set; }//è´¹çµ , èèæ¶é´æ®µ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public double WaterLevelQ { get; set; }//åæ± æ¶²ä½ |
| | | public double WaterLevelH { get; set; }//æ°´åºæ¶²ä½ |
| | | public double WaterLevelC { get; set; }//é¿æ±æ°´ä½ |
| | | |
| | | public double ReservoirDropFlowTotal { get; set; }//æ°´åºæ»ä¾æ°´é |
| | | |
| | | |
| | | //public List<IStation.CalcModel.PumpTimeData> PumpDatas { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "Version": 1, |
| | | "WorkspaceRootPath": "D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\WaterPredict\\", |
| | | "Documents": [ |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7F121352-C49D-4A68-84F3-401FAF2CDB37}|Station.ChEr.Application.WaterPredict\\IStation.ChEr.Application.WaterPredict.csproj|d:\\workdata\\istation\\cheq\\codev1.3\\waterpredict\\station.cher.application.waterpredict\\01-info\\predictwater_controller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7F121352-C49D-4A68-84F3-401FAF2CDB37}|Station.ChEr.Application.WaterPredict\\IStation.ChEr.Application.WaterPredict.csproj|solutionrelative:station.cher.application.waterpredict\\01-info\\predictwater_controller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7F121352-C49D-4A68-84F3-401FAF2CDB37}|Station.ChEr.Application.WaterPredict\\IStation.ChEr.Application.WaterPredict.csproj|d:\\workdata\\istation\\cheq\\codev1.3\\waterpredict\\station.cher.application.waterpredict\\01-info\\predictout_controller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7F121352-C49D-4A68-84F3-401FAF2CDB37}|Station.ChEr.Application.WaterPredict\\IStation.ChEr.Application.WaterPredict.csproj|solutionrelative:station.cher.application.waterpredict\\01-info\\predictout_controller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{D22E9C61-B11E-4AAC-B260-CF31871BB23D}|IStation.ChEr.WebApi.Predict\\IStation.ChEr.WebApi.Predict.csproj|d:\\workdata\\istation\\cheq\\codev1.3\\waterpredict\\istation.cher.webapi.predict\\startup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{D22E9C61-B11E-4AAC-B260-CF31871BB23D}|IStation.ChEr.WebApi.Predict\\IStation.ChEr.WebApi.Predict.csproj|solutionrelative:istation.cher.webapi.predict\\startup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | } |
| | | ], |
| | | "DocumentGroupContainers": [ |
| | | { |
| | | "Orientation": 0, |
| | | "VerticalTabListWidth": 256, |
| | | "DocumentGroups": [ |
| | | { |
| | | "DockedWidth": 200, |
| | | "SelectedChildIndex": 8, |
| | | "Children": [ |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:130:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:130:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:131:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:132:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:133:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:134:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 1, |
| | | "Title": "PredictOut_Controller.cs", |
| | | "DocumentMoniker": "D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\WaterPredict\\Station.ChEr.Application.WaterPredict\\01-info\\PredictOut_Controller.cs", |
| | | "RelativeDocumentMoniker": "Station.ChEr.Application.WaterPredict\\01-info\\PredictOut_Controller.cs", |
| | | "ToolTip": "D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\WaterPredict\\Station.ChEr.Application.WaterPredict\\01-info\\PredictOut_Controller.cs", |
| | | "RelativeToolTip": "Station.ChEr.Application.WaterPredict\\01-info\\PredictOut_Controller.cs", |
| | | "ViewState": "AQIAAAAAAAAAAAAAAAAAAA0AAAA1AAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2024-04-30T06:56:15.848Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "Title": "Startup.cs", |
| | | "DocumentMoniker": "D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\WaterPredict\\IStation.ChEr.WebApi.Predict\\Startup.cs", |
| | | "RelativeDocumentMoniker": "IStation.ChEr.WebApi.Predict\\Startup.cs", |
| | | "ToolTip": "D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\WaterPredict\\IStation.ChEr.WebApi.Predict\\Startup.cs", |
| | | "RelativeToolTip": "IStation.ChEr.WebApi.Predict\\Startup.cs", |
| | | "ViewState": "AQIAACEAAAAAAAAAAAAAACkAAAAAAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2024-04-30T06:55:34.155Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "Title": "PredictWater_Controller.cs", |
| | | "DocumentMoniker": "D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\WaterPredict\\Station.ChEr.Application.WaterPredict\\01-info\\PredictWater_Controller.cs", |
| | | "RelativeDocumentMoniker": "Station.ChEr.Application.WaterPredict\\01-info\\PredictWater_Controller.cs", |
| | | "ToolTip": "D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\WaterPredict\\Station.ChEr.Application.WaterPredict\\01-info\\PredictWater_Controller.cs", |
| | | "RelativeToolTip": "Station.ChEr.Application.WaterPredict\\01-info\\PredictWater_Controller.cs", |
| | | "ViewState": "AQIAAAAAAAAAAAAAAAAAAAsAAAA4AAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2024-04-30T06:54:40.337Z", |
| | | "EditorCaption": "" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "DockedWidth": 1176, |
| | | "SelectedChildIndex": -1, |
| | | "Children": [ |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{a80febb4-e7e0-4147-b476-21aaf2453969}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{ca8cc5c7-0231-406a-95cd-aa5ed6ac0190}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{0ad07096-bba9-4900-a651-0598d26f6d24}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:2:0:{e8034f19-ab72-4f06-83fd-f6832b41aa63}" |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "Version": 1, |
| | | "WorkspaceRootPath": "D:\\WorkData\\IStation\\ChEq\\CodeV1.3\\\u9884\u6D4B\u7B97\u6CD5\\", |
| | | "Documents": [], |
| | | "DocumentGroupContainers": [ |
| | | { |
| | | "Orientation": 0, |
| | | "VerticalTabListWidth": 256, |
| | | "DocumentGroups": [ |
| | | { |
| | | "DockedWidth": 200, |
| | | "SelectedChildIndex": -1, |
| | | "Children": [ |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:130:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:130:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:131:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:132:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:133:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:134:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "DockedWidth": 1176, |
| | | "SelectedChildIndex": -1, |
| | | "Children": [ |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{a80febb4-e7e0-4147-b476-21aaf2453969}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{ca8cc5c7-0231-406a-95cd-aa5ed6ac0190}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{0ad07096-bba9-4900-a651-0598d26f6d24}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:0:0:{a0c5197d-0ac7-4b63-97cd-8872a789d233}" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:2:0:{e8034f19-ab72-4f06-83fd-f6832b41aa63}" |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// Respresents the setting state of a cache item whilst a write operation is being attempted on it via a consumer supplied function |
| | |
| | | using System; |
| | | using System.Threading; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal class GetSetOperation |
| | | { |
| | |
| | | using System.Threading; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal class SetOperation |
| | | { |
| | |
| | | using System; |
| | | using System.Collections.Concurrent; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// å¾
ç¼å |
| | |
| | | using System; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache : IMemoryCacheDirect |
| | | { |
| | |
| | | using System; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using Microsoft.Extensions.Caching.Memory; |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using System.Collections.Generic; |
| | | using System.Reflection; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using System; |
| | | using System.Threading; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using Microsoft.Extensions.Options; |
| | | using System.Collections.Concurrent; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using System; |
| | | using System.Threading; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal sealed partial class SharedMemoryCache |
| | | { |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace ISupply.Entity |
| | | namespace IStation.ChEr.Entity |
| | | { |
| | | /// <summary> |
| | | /// åºç¡å®ä½ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | |
| | | namespace ISupply.Entity |
| | | namespace IStation.ChEr.Entity |
| | | { |
| | | /// <summary> |
| | | /// åºç¡å®ä½ï¼å
嫿ä½çè¿¹ï¼ |
| | |
| | | namespace ISupply.BLL |
| | | namespace IStation.ChEr.BLL |
| | | { |
| | | /// <summary> |
| | | /// ç¼åè¾
å©ç±» |
| | |
| | | using ISupply.Untity; |
| | | using IStation.ChEr.Untity; |
| | | |
| | | namespace ISupply.BLL |
| | | namespace IStation.ChEr.BLL |
| | | { |
| | | /// <summary> |
| | | /// é
ç½®è¾
å©ç±» |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace ISupply.DAL |
| | | namespace IStation.ChEr.DAL |
| | | { |
| | | /// <summary> |
| | | /// æ°æ®åºè®¿é®åºç±» |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace ISupply.DAL |
| | | namespace IStation.ChEr.DAL |
| | | { |
| | | /// <summary> |
| | | /// å¾
ä¿®æ¹ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace ISupply.DAL |
| | | namespace IStation.ChEr.DAL |
| | | { |
| | | /// <summary> |
| | | /// æ°æ®åºè¿æ¥è¾
å©ç±» |
| | |
| | | using System.IO; |
| | | using System.Linq; |
| | | |
| | | namespace ISupply.DAL |
| | | namespace IStation.ChEr.DAL |
| | | { |
| | | public class MainDbContext |
| | | { |
| | |
| | | using System; |
| | | using System.Reflection; |
| | | |
| | | namespace ISupply.Entity |
| | | namespace IStation.ChEr.Entity |
| | | { |
| | | /// <summary> |
| | | /// ç³»ç»ç±»å |
| | |
| | | using System.Collections.Generic; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// interface used to call operations directly on the wrapped memory cache |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// å
åç¼åè¾
å©ç±» |
| | |
| | | namespace ISupply.Model |
| | | namespace IStation.ChEr.Model |
| | | { |
| | | /// <summary> |
| | | /// åºç¡Model |
| | |
| | | using System; |
| | | |
| | | namespace ISupply.Model |
| | | namespace IStation.ChEr.Model |
| | | { |
| | | /// <summary> |
| | | /// åºç¡å®ä½ï¼å
嫿ä½çè¿¹ï¼ |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace ISupply.Model |
| | | namespace IStation.ChEr.Model |
| | | { |
| | | public class PredictData : Model.BaseTraceModel, System.ICloneable |
| | | { |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal class Paras |
| | | { |
| | |
| | | using System; |
| | | using System.IO; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// æä»¶åæ° |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// å
åç¼ååæ° |
| | |
| | | using System; |
| | | using System.IO; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// SQLiteåæ° |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// ç¨æ· |
| | |
| | | using System; |
| | | |
| | | namespace ISupply.Untity |
| | | namespace IStation.ChEr.Untity |
| | | { |
| | | /// <summary> |
| | | /// éæºè¾
å©ç±» |
| | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | /// <summary> |
| | | /// Settings |
| | |
| | | using System.Text; |
| | | using Yw; |
| | | |
| | | namespace ISupply |
| | | namespace IStation.ChEr |
| | | { |
| | | internal class SettingsHelper |
| | | { |
| | |
| | | using ISupply.Entity; |
| | | using IStation.ChEr.Entity; |
| | | using SqlSugar; |
| | | |
| | | namespace ISupply.DAL |
| | | namespace IStation.ChEr.DAL |
| | | { |
| | | /// <summary> |
| | | /// 建çç±»å |
| | |
| | | namespace ISupply.BLL |
| | | namespace IStation.ChEr.BLL |
| | | { |
| | | /// <summary> |
| | | /// BuildingType |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace ISupply.BLL |
| | | namespace IStation.ChEr.BLL |
| | | { |
| | | /// <summary> |
| | | /// BuildingType ç¼åè¾
å©ç±» |
| | |
| | | using AutoMapper; |
| | | using ISupply.Untity; |
| | | using IStation.ChEr.Untity; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace ISupply.BLL |
| | | namespace IStation.ChEr.BLL |
| | | { |
| | | public partial class PredictData |
| | | { |
| | |
| | | <ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\Yw.WebApi.Predict.Core\Yw.WebApi.Predict.Core.csproj" /> |
| | | <ProjectReference Include="..\IStation.ChEr.WebApi.Predict\IStation.ChEr.WebApi.Predict.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | # Visual Studio Version 17 |
| | | VisualStudioVersion = 17.1.32328.378 |
| | | MinimumVisualStudioVersion = 10.0.40219.1 |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yw.Application.Predict.Core", "Yw.Application.Predict.Core\Yw.Application.Predict.Core.csproj", "{C5530420-8261-426D-ACA3-13DC1B30852D}" |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IStation.ChEr.DAL.WaterPredict", "IStation.ChEr.DAL.WaterPredict\IStation.ChEr.DAL.WaterPredict.csproj", "{B1B5A52D-F878-4F76-A8BF-C963C8CFA15A}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yw.WebApi.Predict.Core", "Yw.WebApi.Predict.Core\Yw.WebApi.Predict.Core.csproj", "{001B23ED-42E4-4936-B178-1023B6B9B09E}" |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IStation.ChEr.Application.WaterPredict", "Station.ChEr.Application.WaterPredict\IStation.ChEr.Application.WaterPredict.csproj", "{7F121352-C49D-4A68-84F3-401FAF2CDB37}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yw.Entry.Predict.Core", "Yw.Entry.Predict.Core\Yw.Entry.Predict.Core.csproj", "{C2F6D1D5-11AB-4C6E-82EC-F2E85316A503}" |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IStation.ChEr.WebApi.Predict", "IStation.ChEr.WebApi.Predict\IStation.ChEr.WebApi.Predict.csproj", "{D22E9C61-B11E-4AAC-B260-CF31871BB23D}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dto.Core", "Dto.Core\Dto.Core.csproj", "{BE5778F4-96C6-469E-AF55-00B7D890FED3}" |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IStation.ChEr.Entry.Predict", "IStation.ChEr.Entry.Predict\IStation.ChEr.Entry.Predict.csproj", "{52DC0038-7975-4B0A-A8F4-A415B007730F}" |
| | | EndProject |
| | | Global |
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| | |
| | | Release|Any CPU = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
| | | {C5530420-8261-426D-ACA3-13DC1B30852D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {C5530420-8261-426D-ACA3-13DC1B30852D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {C5530420-8261-426D-ACA3-13DC1B30852D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {C5530420-8261-426D-ACA3-13DC1B30852D}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {001B23ED-42E4-4936-B178-1023B6B9B09E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {001B23ED-42E4-4936-B178-1023B6B9B09E}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {001B23ED-42E4-4936-B178-1023B6B9B09E}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {001B23ED-42E4-4936-B178-1023B6B9B09E}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {C2F6D1D5-11AB-4C6E-82EC-F2E85316A503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {C2F6D1D5-11AB-4C6E-82EC-F2E85316A503}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {C2F6D1D5-11AB-4C6E-82EC-F2E85316A503}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {C2F6D1D5-11AB-4C6E-82EC-F2E85316A503}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {BE5778F4-96C6-469E-AF55-00B7D890FED3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {BE5778F4-96C6-469E-AF55-00B7D890FED3}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {BE5778F4-96C6-469E-AF55-00B7D890FED3}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {BE5778F4-96C6-469E-AF55-00B7D890FED3}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {B1B5A52D-F878-4F76-A8BF-C963C8CFA15A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {B1B5A52D-F878-4F76-A8BF-C963C8CFA15A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {B1B5A52D-F878-4F76-A8BF-C963C8CFA15A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {B1B5A52D-F878-4F76-A8BF-C963C8CFA15A}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {7F121352-C49D-4A68-84F3-401FAF2CDB37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {7F121352-C49D-4A68-84F3-401FAF2CDB37}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {7F121352-C49D-4A68-84F3-401FAF2CDB37}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {7F121352-C49D-4A68-84F3-401FAF2CDB37}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {D22E9C61-B11E-4AAC-B260-CF31871BB23D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {D22E9C61-B11E-4AAC-B260-CF31871BB23D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {D22E9C61-B11E-4AAC-B260-CF31871BB23D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {D22E9C61-B11E-4AAC-B260-CF31871BB23D}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {52DC0038-7975-4B0A-A8F4-A415B007730F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {52DC0038-7975-4B0A-A8F4-A415B007730F}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {52DC0038-7975-4B0A-A8F4-A415B007730F}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {52DC0038-7975-4B0A-A8F4-A415B007730F}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(SolutionProperties) = preSolution |
| | | HideSolutionNode = FALSE |
| | |
| | | using System.Text.Json; |
| | | using System.Text.Json.Serialization; |
| | | |
| | | namespace Yw.WebApi |
| | | namespace IStation.WebApi |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | using System.Text.Json; |
| | | using System.Text.Json.Serialization; |
| | | |
| | | namespace Yw.WebApi |
| | | namespace IStation.WebApi |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | using System.Text.Json; |
| | | using System.Text.Json.Serialization; |
| | | |
| | | namespace Yw.WebApi |
| | | namespace IStation.WebApi |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | |
| | | namespace Yw.WebApi |
| | | namespace IStation.WebApi |
| | | { |
| | | /// <summary> |
| | | /// JWT ææèªå®ä¹å¤çç¨åº |
| | |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>disable</Nullable> |
| | | <AssemblyName>$(MSBuildProjectName)</AssemblyName> |
| | | <RootNamespace>Yw.WebApi</RootNamespace> |
| | | <RootNamespace>IStation.WebApi</RootNamespace> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | <Version>1.0.1</Version> |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\Yw.Application.Predict.Core\Yw.Application.Predict.Core.csproj" /> |
| | | <ProjectReference Include="..\Station.ChEr.Application.WaterPredict\IStation.ChEr.Application.WaterPredict.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | |
| | |
| | | using Furion.DependencyInjection; |
| | | |
| | | namespace Yw.WebApi |
| | | namespace IStation.WebApi |
| | | { |
| | | /// <summary> |
| | | /// RESTful飿 ¼---XIAONUOè¿åæ ¼å¼ |
| | |
| | | namespace Yw.WebApi |
| | | namespace IStation.WebApi |
| | | { |
| | | /// <summary> |
| | | /// Restfulç»æç¼ç |
| | |
| | | using System.Net; |
| | | using Yw.Untity; |
| | | |
| | | namespace Yw.WebApi |
| | | namespace IStation.WebApi |
| | | { |
| | | /// <summary> |
| | | /// è§èåRESTful飿 ¼è¿åå¼ |
| | |
| | | using Microsoft.AspNetCore.Mvc.Controllers; |
| | | using Furion.Authorization; |
| | | |
| | | namespace Yw.WebApi |
| | | namespace IStation.WebApi |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | options.MaxRequestBodySize = int.MaxValue; |
| | | }); |
| | | |
| | | //æ£æ¥ æé |
| | | //services.AddJwt<JwtHandler>(enableGlobalAuthorize: true); |
| | | |
| | | services.AddCorsAccessor(); |
| | |
| | | |
| | | //app.UseStaticFiles(); |
| | | string path = AppContext.BaseDirectory; |
| | | path = Path.Combine(path, Settings.ServiceParasHelper.Service.DataFolder); |
| | | path = Path.Combine(path, "Data"); |
| | | if (!Directory.Exists(path)) |
| | | { |
| | | Directory.CreateDirectory(path); |
| | |
| | | namespace Yw.Application.Map |
| | | namespace IStation.ChEr.Application.Map |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | namespace Yw.Application.Map |
| | | namespace IStation.ChEr.Application.Map |
| | | { |
| | | /// <summary> |
| | | /// |
ÎļþÃû´Ó WaterPredict/Station.ChEr.Application.WaterPredict/01-map-info/ConnectHelper.cs ÐÞ¸Ä |
| | |
| | | using System.Net; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using static Yw.Service.SSAPredictHelper; |
| | | using static IStation.Service.SSAPredictHelper; |
| | | |
| | | namespace Yw.Application |
| | | namespace IStation.Application |
| | | { |
| | | public class ConnectHelper |
| | | { |
| | |
| | | return null; |
| | | } |
| | | string Text = File.ReadAllText(filepath); |
| | | var outwater = JsonHelper.Json2Object<List<TotalOneDay>>(Text); |
| | | var outwater = Yw.JsonHelper.Json2Object<List<TotalOneDay>>(Text); |
| | | outTotalDayLists.Add(new OutTotalDayList() { pumpOutWater = outwater, DateTime = outwater[0].DateTime }); |
| | | } |
| | | return outTotalDayLists; |
| | |
| | | else |
| | | { |
| | | string Text = File.ReadAllText(filepath); |
| | | var outwater = JsonHelper.Json2Object<List<TotalOneDay>>(Text); |
| | | var outwater = Yw.JsonHelper.Json2Object<List<TotalOneDay>>(Text); |
| | | outTotalDayLists.Add(new OutTotalDayList() { pumpOutWater = outwater, DateTime = outwater[0].DateTime }); |
| | | } |
| | | } |
| | |
| | | // error = "å©ç¨StreamReaderå°±å¯ä»¥ä»ååºå
容ä»å¤´è¯»å°å°¾"; |
| | | return null; |
| | | } |
| | | var ret = JsonHelper.Json2Object<IStation.Dto.ApiResult<List<TotalOneDay>>>(returnData); |
| | | var ret = Yw.JsonHelper.Json2Object<IStation.Dto.ApiResult<List<TotalOneDay>>>(returnData); |
| | | reader.Close(); |
| | | myResponse.Close(); |
| | | // error = null; |
ÎļþÃû´Ó 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; |
| | | } |
| | | } |
ÎļþÃû´Ó WaterPredict/Station.ChEr.Application.WaterPredict/01-map-info/PredictWater_Controller.cs ÐÞ¸Ä |
| | |
| | | using IStation; |
| | | using Microsoft.Extensions.Configuration.UserSecrets; |
| | | 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> |
| | | /// SSAç®æ³é¢æµ |
| | | /// </summary> |
| | | [Route("Predict")] |
| | | [ApiDescriptionSettings("OutWater", Name = "颿µæ°´ä½", Order = 10000)] |
| | | [ApiDescriptionSettings("OutWater", Name = "颿µæ°´ä½(ä½åº)", Order = 10000)] |
| | | public class PredictWater_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 predictdata = sSAPredictHelper.Predict(tupleList, 300, 288, 300, (float)0.99, DataNumber); |
| | | return predictdata; |
| | |
| | | { |
| | | if (PredictData == null) |
| | | return "DataNull"; |
| | | var json=JsonHelper.Object2Json(PredictData); |
| | | var json= Yw.JsonHelper.Object2Json(PredictData); |
| | | string savepath = Path.Combine(DataFolderHelper.GetRootPath(), "便°´åæ°"); |
| | | if (!System.IO.Directory.Exists(savepath)) |
| | | { |
| | |
| | | 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 predictdata = sSAPredictHelper.Predict(tupleList, 3600, 24, 2880, (float)0.99, DataNumber); |
| | | return predictdata; |
ÎļþÃû´Ó WaterPredict/Station.ChEr.Application.WaterPredict/01-map-info/SSAPredictHelper.cs ÐÞ¸Ä |
| | |
| | | using Microsoft.ML; |
| | | using Microsoft.ML.Transforms.TimeSeries; |
| | | using static Yw.Application.ConnectHelper; |
| | | using static IStation.Application.ConnectHelper; |
| | | |
| | | namespace Yw.Service |
| | | namespace IStation.Service |
| | | { |
| | | /// <summary> |
| | | /// åè°±åæï¼.Netï¼ |
| | |
| | | global using Mapster; |
| | | global using Microsoft.AspNetCore.Mvc; |
| | | global using System.ComponentModel.DataAnnotations; |
| | | global using System.Text; |
| | | global using Yw.Untity; |
| | | global using Yw.Application.Map; |
| | | global using Yw.JWT; |
| | | global using System.Text; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>disable</Nullable> |
| | | <RootNamespace>IStation.ChEr.Application</RootNamespace> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | <Version>3.0.2</Version> |
| | | <Description>å¼ç¨å级</Description> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <Compile Remove="01-info\SignalTypeGroup_Controller.cs" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Content Update="C:\Users\admin\.nuget\packages\yw.jwt.core\1.0.1\contentFiles\any\net6.0\JWT.json"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | | <Content Update="C:\Users\admin\.nuget\packages\yw.jwt.core\1.0.2\contentFiles\any\net6.0\JWT.json"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | | <Content Update="C:\Users\admin\.nuget\packages\yw.service.unit.core\1.0.1\contentFiles\any\net6.0\paras_unit_settings.json"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </Content> |
| | | <Content Update="C:\Users\admin\.nuget\packages\yw.yitter.core\1.0.0\contentFiles\any\net6.0\paras_yitter_settings.json"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Microsoft.ML.FastTree" Version="2.0.1" /> |
| | | <PackageReference Include="Microsoft.ML.TimeSeries" Version="2.0.1" /> |
| | | <PackageReference Include="IStation.ChEr.Application.Core" Version="3.0.5" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\IStation.ChEr.DAL.WaterPredict\IStation.ChEr.DAL.WaterPredict.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>disable</Nullable> |
| | | <RootNamespace>Yw.Application</RootNamespace> |
| | | <RootNamespace>IStation.ChEr.Application</RootNamespace> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | <Version>3.0.2</Version> |
| | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <Compile Remove="01-map-info\SignalTypeGroup_Controller.cs" /> |
| | | <Compile Remove="01-info\SignalTypeGroup_Controller.cs" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\Dto.Core\Dto.Core.csproj" /> |
| | | <ProjectReference Include="..\IStation.ChEr.DAL.WaterPredict\IStation.ChEr.DAL.WaterPredict.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | .WithIdentity("UserInfoLogTrigger", JOB_GROUP_NAME) |
| | | .StartNow() |
| | | //Cron çæå¨ https://cron.qqe2.com/ |
| | | .WithCronSchedule("0 59 16 ? * *")// 0 5 3 ? * * æ¯å¤©ä¸å3 : 5触å |
| | | .WithCronSchedule("0 59 16 ? * *")// 0 5 3 ? * * æ¯å¤©ä¸å 16 : 59 触å |
| | | .Build(); |
| | | |
| | | scheduler.ScheduleJob(detailUserInfoLog, triggerUserInfoLog); |
| | |
| | | // LogHelper.Info("æµè¯"); |
| | | PumpRunParasHelper pumpRunParasHelper = new PumpRunParasHelper(); |
| | | // Model.RunParasData runParasData = new Model.RunParasData(); |
| | | var NowData = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day,0,0,0); |
| | | var PumpState = await ZyConnectHelper.GetPumpOpenStatusBySingleDay(NowData.AddDays(-1)); //è·åæ³µç弿ºæ
åµ |
| | | var TotalWater = await ZyConnectHelper.GetTotalWaterByDayTimeRange_In(NowData.AddDays(-1), NowData.AddDays(-1)); //åæ°´é |
| | | var PumpTotalElecty = await ZyConnectHelper.GetPumpTotalElectricity(NowData.AddDays(-1), NowData.AddDays(-1)); //è·åææ®µæ¶é´çç¨çµé |
| | | var yesterDay = DateTime.Today.AddDays(-1); |
| | | var PumpState = await ZyConnectHelper.GetPumpOpenStatusBySingleDay(yesterDay); //è·åæ³µç弿ºæ
åµ |
| | | var TotalWater = await ZyConnectHelper.GetTotalWaterByDayTimeRange_In(yesterDay, yesterDay); //åæ°´é |
| | | var PumpTotalElecty = await ZyConnectHelper.GetPumpTotalElectricity(yesterDay, yesterDay); //è·åææ®µæ¶é´çç¨çµé |
| | | string geterror = null; |
| | | var result = pumpRunParasHelper.GetRunParasDatas(PumpState, TotalWater, PumpTotalElecty, NowData.AddDays(-1), out geterror); |
| | | var result = pumpRunParasHelper.GetRunParasDatas(PumpState, TotalWater, PumpTotalElecty, yesterDay, out geterror); |
| | | string error=null; |
| | | if (result != null) |
| | | { |