日常提交

main
xiaoguo 2 years ago
parent e9185112ab
commit 33b1d8dceb

Binary file not shown.

@ -27,116 +27,116 @@ namespace PVDEMCS.Common.Devices
/// </summary>
/// <param name="address"></param>
/// <param name="port"></param>
PLCResult Connection(string address, int port = 0);
Result Connection(string address, int port = 0);
/// <summary>
/// 关闭连接PLC长连接
/// </summary>
PLCResult ColseConnection();
Result ColseConnection();
/// <summary>
/// 读取指定地址的byte[]值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
PLCResult<byte[]> ReadBytes(string address, ushort length);
Result<byte[]> ReadBytes(string address, ushort length);
/// <summary>
/// 读取指定地址的bool值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
PLCResult<bool> ReadBool(string address);
Result<bool> ReadBool(string address);
/// <summary>
/// 读取指定地址的byte值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
PLCResult<byte> ReadByte(string address);
Result<byte> ReadByte(string address);
/// <summary>
/// 读取指定地址的Int16值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
PLCResult<short> ReadInt16(string address);
Result<short> ReadInt16(string address);
/// <summary>
/// 读取指定地址的Int32值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
PLCResult<int> ReadInt32(string address);
Result<int> ReadInt32(string address);
/// <summary>
/// 读取指定地址的long值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
PLCResult<long> ReadLong(string address);
Result<long> ReadLong(string address);
/// <summary>
/// 读取指定地址的Float值
/// </summary>
/// <returns></returns>
PLCResult<float> ReadFloat(string address);
Result<float> ReadFloat(string address);
/// <summary>
/// 读取指定地址的double值
/// </summary>
/// <returns></returns>
PLCResult<double> ReadDouble(string address);
Result<double> ReadDouble(string address);
/// <summary>
/// 写入bool值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
PLCResult Write(string address, bool value);
Result Write(string address, bool value);
/// <summary>
/// 写入byte值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
PLCResult Write(string address, byte value);
Result Write(string address, byte value);
/// <summary>
/// 写入Int16值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
PLCResult Write(string address, Int16 value);
Result Write(string address, Int16 value);
/// <summary>
/// 写入Int32值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
PLCResult Write(string address, Int32 value);
Result Write(string address, Int32 value);
/// <summary>
/// 写入float值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
PLCResult Write(string address, float value);
Result Write(string address, float value);
/// <summary>
/// 写入double值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
PLCResult Write(string address, double value);
Result Write(string address, double value);
/// <summary>
/// 写入long值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
PLCResult Write(string address, long value);
Result Write(string address, long value);
#endregion
@ -146,115 +146,115 @@ namespace PVDEMCS.Common.Devices
/// </summary>
/// <param name="address"></param>
/// <param name="port"></param>
Task<PLCResult> ConnectionAsync(string address, int port = 0);
Task<Result> ConnectionAsync(string address, int port = 0);
/// <summary>
/// 关闭连接PLC长连接
/// </summary>
Task<PLCResult> ColseConnectionAsyn();
Task<Result> ColseConnectionAsyn();
/// <summary>
/// 读取指定地址的byte[]值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
Task<PLCResult<byte[]>> ReadBytesAsync(string address, ushort length);
Task<Result<byte[]>> ReadBytesAsync(string address, ushort length);
/// <summary>
/// 读取指定地址的bool值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
Task<PLCResult<bool>> ReadBoolAsync(string address);
Task<Result<bool>> ReadBoolAsync(string address);
/// <summary>
/// 读取指定地址的byte值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
Task<PLCResult<byte>> ReadByteAsync(string address);
Task<Result<byte>> ReadByteAsync(string address);
/// <summary>
/// 读取指定地址的Int16值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
Task<PLCResult<short>> ReadInt16Async(string address);
Task<Result<short>> ReadInt16Async(string address);
/// <summary>
/// 读取指定地址的Int32值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
Task<PLCResult<int>> ReadInt32Async(string address);
Task<Result<int>> ReadInt32Async(string address);
/// <summary>
/// 读取指定地址的long值
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
Task<PLCResult<long>> ReadLongAsync(string address);
Task<Result<long>> ReadLongAsync(string address);
/// <summary>
/// 读取指定地址的Float值
/// </summary>
/// <returns></returns>
Task<PLCResult<float>> ReadFloatAsync(string address);
Task<Result<float>> ReadFloatAsync(string address);
/// <summary>
/// 读取指定地址的double值
/// </summary>
/// <returns></returns>
Task<PLCResult<double>> ReadDoubleAsync(string address);
Task<Result<double>> ReadDoubleAsync(string address);
/// <summary>
/// 写入bool值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
Task<PLCResult> WriteAsync(string address, bool value);
Task<Result> WriteAsync(string address, bool value);
/// <summary>
/// 写入byte值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
Task<PLCResult> WriteAsync(string address, byte value);
Task<Result> WriteAsync(string address, byte value);
/// <summary>
/// 写入Int16值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
Task<PLCResult> WriteAsync(string address, Int16 value);
Task<Result> WriteAsync(string address, Int16 value);
/// <summary>
/// 写入Int32值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
Task<PLCResult> WriteAsync(string address, Int32 value);
Task<Result> WriteAsync(string address, Int32 value);
/// <summary>
/// 写入float值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
Task<PLCResult> WriteAsync(string address, float value);
Task<Result> WriteAsync(string address, float value);
/// <summary>
/// 写入double值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
Task<PLCResult> WriteAsync(string address, double value);
Task<Result> WriteAsync(string address, double value);
/// <summary>
/// 写入long值
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
Task<PLCResult> WriteAsync(string address, long value);
Task<Result> WriteAsync(string address, long value);
#endregion
}

@ -12,7 +12,6 @@ using HslCommunication.Core;
using HslCommunication;
using HslCommunication.Profinet.Siemens;
using HslCommunication.Reflection;
using PVDEMCS.Common.Devices;
using PVDEMCS.Common.Tools;
namespace PVDEMCS.Common.Devices.Impl
@ -62,7 +61,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <param name="port"></param>
public PLCResult Connection(string address, int port = 0)
public Result Connection(string address, int port = 0)
{
siemensS7Net.IpAddress = address;
if (port > 0)
@ -81,7 +80,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// <summary>
/// 关闭连接PLC长连接
/// </summary>
public PLCResult ColseConnection()
public Result ColseConnection()
{
var operateResult = siemensS7Net.ConnectClose();
var result = ConvertResult(operateResult);
@ -96,7 +95,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public PLCResult<byte[]> ReadBytes(string address, ushort length)
public Result<byte[]> ReadBytes(string address, ushort length)
{
var operateResult = siemensS7Net.Read(address, length);
var result = ConvertResult(operateResult);
@ -107,7 +106,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public PLCResult<bool> ReadBool(string address)
public Result<bool> ReadBool(string address)
{
var operateResult = siemensS7Net.ReadBool(address);
var result = ConvertResult(operateResult);
@ -119,7 +118,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public PLCResult<byte> ReadByte(string address)
public Result<byte> ReadByte(string address)
{
var operateResult = siemensS7Net.ReadByte(address);
var result = ConvertResult(operateResult);
@ -131,7 +130,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public PLCResult<short> ReadInt16(string address)
public Result<short> ReadInt16(string address)
{
var operateResult = siemensS7Net.ReadInt16(address);
var result = ConvertResult(operateResult);
@ -143,7 +142,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public PLCResult<int> ReadInt32(string address)
public Result<int> ReadInt32(string address)
{
var operateResult = siemensS7Net.ReadInt32(address);
var result = ConvertResult(operateResult);
@ -155,7 +154,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public PLCResult<long> ReadLong(string address)
public Result<long> ReadLong(string address)
{
var operateResult = siemensS7Net.ReadInt64(address);
var result = ConvertResult(operateResult);
@ -166,7 +165,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// 读取指定地址的Float值
/// </summary>
/// <returns></returns>
public PLCResult<float> ReadFloat(string address)
public Result<float> ReadFloat(string address)
{
var operateResult = siemensS7Net.ReadFloat(address);
var result = ConvertResult(operateResult);
@ -177,7 +176,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// 读取指定地址的double值
/// </summary>
/// <returns></returns>
public PLCResult<double> ReadDouble(string address)
public Result<double> ReadDouble(string address)
{
var operateResult = siemensS7Net.ReadDouble(address);
var result = ConvertResult(operateResult);
@ -189,7 +188,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public PLCResult Write(string address, bool value)
public Result Write(string address, bool value)
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
@ -201,7 +200,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public PLCResult Write(string address, byte value)
public Result Write(string address, byte value)
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
@ -214,7 +213,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public PLCResult Write(string address, Int16 value)
public Result Write(string address, Int16 value)
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
@ -226,7 +225,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public PLCResult Write(string address, Int32 value)
public Result Write(string address, Int32 value)
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
@ -238,7 +237,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public PLCResult Write(string address, float value)
public Result Write(string address, float value)
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
@ -250,7 +249,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public PLCResult Write(string address, double value)
public Result Write(string address, double value)
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
@ -262,7 +261,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public PLCResult Write(string address, long value)
public Result Write(string address, long value)
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
@ -277,7 +276,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <param name="port"></param>
public async Task<PLCResult> ConnectionAsync(string address, int port = 0)
public async Task<Result> ConnectionAsync(string address, int port = 0)
{
siemensS7Net.IpAddress = address;
if (port > 0)
@ -296,7 +295,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// <summary>
/// 关闭连接PLC长连接
/// </summary>
public async Task<PLCResult> ColseConnectionAsyn()
public async Task<Result> ColseConnectionAsyn()
{
var operateResult = await siemensS7Net.ConnectCloseAsync();
var result = ConvertResult(operateResult);
@ -311,7 +310,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public async Task<PLCResult<byte[]>> ReadBytesAsync(string address, ushort length)
public async Task<Result<byte[]>> ReadBytesAsync(string address, ushort length)
{
var operateResult = await siemensS7Net.ReadAsync(address, length);
var result = ConvertResult(operateResult);
@ -322,7 +321,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public async Task<PLCResult<bool>> ReadBoolAsync(string address)
public async Task<Result<bool>> ReadBoolAsync(string address)
{
var operateResult = await siemensS7Net.ReadBoolAsync(address);
var result = ConvertResult(operateResult);
@ -334,7 +333,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public async Task<PLCResult<byte>> ReadByteAsync(string address)
public async Task<Result<byte>> ReadByteAsync(string address)
{
var operateResult = await siemensS7Net.ReadByteAsync(address);
var result = ConvertResult(operateResult);
@ -346,7 +345,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public async Task<PLCResult<short>> ReadInt16Async(string address)
public async Task<Result<short>> ReadInt16Async(string address)
{
var operateResult = await siemensS7Net.ReadInt16Async(address);
var result = ConvertResult(operateResult);
@ -358,7 +357,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public async Task<PLCResult<int>> ReadInt32Async(string address)
public async Task<Result<int>> ReadInt32Async(string address)
{
var operateResult = await siemensS7Net.ReadInt32Async(address);
var result = ConvertResult(operateResult);
@ -370,7 +369,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public async Task<PLCResult<long>> ReadLongAsync(string address)
public async Task<Result<long>> ReadLongAsync(string address)
{
var operateResult = await siemensS7Net.ReadInt64Async(address);
var result = ConvertResult(operateResult);
@ -381,7 +380,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// 读取指定地址的Float值
/// </summary>
/// <returns></returns>
public async Task<PLCResult<float>> ReadFloatAsync(string address)
public async Task<Result<float>> ReadFloatAsync(string address)
{
var operateResult = await siemensS7Net.ReadFloatAsync(address);
var result = ConvertResult(operateResult);
@ -392,7 +391,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// 读取指定地址的double值
/// </summary>
/// <returns></returns>
public async Task<PLCResult<double>> ReadDoubleAsync(string address)
public async Task<Result<double>> ReadDoubleAsync(string address)
{
var operateResult = await siemensS7Net.ReadDoubleAsync(address);
var result = ConvertResult(operateResult);
@ -404,7 +403,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public async Task<PLCResult> WriteAsync(string address, bool value)
public async Task<Result> WriteAsync(string address, bool value)
{
var operateResult = await siemensS7Net.WriteAsync(address, value);
var result = ConvertResult(operateResult);
@ -416,7 +415,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public async Task<PLCResult> WriteAsync(string address, byte value)
public async Task<Result> WriteAsync(string address, byte value)
{
var operateResult = await siemensS7Net.WriteAsync(address, value);
@ -429,7 +428,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public async Task<PLCResult> WriteAsync(string address, Int16 value)
public async Task<Result> WriteAsync(string address, Int16 value)
{
var operateResult = await siemensS7Net.WriteAsync(address, value);
var result = ConvertResult(operateResult);
@ -441,7 +440,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public async Task<PLCResult> WriteAsync(string address, Int32 value)
public async Task<Result> WriteAsync(string address, Int32 value)
{
var operateResult = await siemensS7Net.WriteAsync(address, value);
var result = ConvertResult(operateResult);
@ -453,7 +452,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public async Task<PLCResult> WriteAsync(string address, float value)
public async Task<Result> WriteAsync(string address, float value)
{
var operateResult = await siemensS7Net.WriteAsync(address, value);
var result = ConvertResult(operateResult);
@ -465,7 +464,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public async Task<PLCResult> WriteAsync(string address, double value)
public async Task<Result> WriteAsync(string address, double value)
{
var operateResult = await siemensS7Net.WriteAsync(address, value);
var result = ConvertResult(operateResult);
@ -477,7 +476,7 @@ namespace PVDEMCS.Common.Devices.Impl
/// </summary>
/// <param name="address">写入地址</param>
/// <param name="value"></param>
public async Task<PLCResult> WriteAsync(string address, long value)
public async Task<Result> WriteAsync(string address, long value)
{
var operateResult = await siemensS7Net.WriteAsync(address, value);
var result = ConvertResult(operateResult);
@ -493,9 +492,9 @@ namespace PVDEMCS.Common.Devices.Impl
/// <param name="result"></param>
/// <returns></returns>
private PLCResult ConvertResult(OperateResult result)
private Result ConvertResult(OperateResult result)
{
var retResult = ModelTools.PubClone<OperateResult, PLCResult>.Trans(result);
var retResult = ModelTools.PubClone<OperateResult, Result>.Trans(result);
return retResult;
}
@ -505,9 +504,9 @@ namespace PVDEMCS.Common.Devices.Impl
/// <param name="result"></param>
/// <returns></returns>
private PLCResult<T> ConvertResult<T>(OperateResult<T> result)
private Result<T> ConvertResult<T>(OperateResult<T> result)
{
var retResult = ModelTools.PubClone<OperateResult<T>, PLCResult<T>>.Trans(result);
var retResult = ModelTools.PubClone<OperateResult<T>, Result<T>>.Trans(result);
retResult.Content = result.Content;
return retResult;
}

@ -5,29 +5,29 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PVDEMCS.Common.Devices
namespace PVDEMCS.Common
{
public class PLCResult
public class Result
{
//
// 摘要:
// 指示本次操作是否成功。
// Indicates whether this operation was successful.
public bool IsSuccess { get; set; }
public bool IsSuccess { get; set; } = true;
//
// 摘要:
// 具体的错误描述。
// Specific error description.
public string Message { get; set; }
public string Message { get; set; }
public int ErrorCode { get; set; }
public int ErrorCode { get; set; }
//
// 摘要:
// 实例化一个默认的结果对象
public PLCResult()
public Result()
{
}
@ -38,8 +38,9 @@ namespace PVDEMCS.Common.Devices
// 参数:
// msg:
// 错误消息
public PLCResult(string msg)
public Result(string msg)
{
IsSuccess = false;
Message = msg;
}
@ -53,23 +54,24 @@ namespace PVDEMCS.Common.Devices
//
// msg:
// 错误消息
public PLCResult(int err, string msg)
public Result(int err, string msg)
{
IsSuccess = false;
ErrorCode = err;
Message = msg;
}
}
public class PLCResult<T> : PLCResult
public class Result<T> : Result
{
public T Content { get; set; }
public PLCResult()
public Result()
{
}
public PLCResult(T content)
public Result(T content)
{
Content = content;
}

@ -1,4 +1,5 @@
using System;
using AngleSharp.Dom;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
@ -65,5 +66,31 @@ namespace PVDEMCS.Common.Tools
return result;
}
}
public static void SetUpdateModel<TEntity>(TEntity entity)
{
foreach (var item in typeof(TEntity).GetProperties())
{
if (!item.CanWrite)
{
continue;
}
var _Property = typeof(TEntity).GetProperty(item.Name);
if (_Property == null)
{
continue;
}
if (item.PropertyType.FullName != _Property.PropertyType.FullName)
{
continue;
}
if (item.Name == "")
{
}
}
}
}
}

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using PVDEMCS.Services.Repositories.Entities;
namespace PVDEMCS.Controllers
{
@ -21,6 +22,10 @@ namespace PVDEMCS.Controllers
[HttpGet(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
using (var context = new EFContext())
{
var list = context.DeviceInfos.ToList();
}
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),

@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="7.1.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Masuit.Tools.Core" Version="2.6.7.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.12">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="HslCommunication">
<HintPath>..\..\..\wisdomstation\guidescreen\GuideScreen\GuideScreen.Common\SDK\HslCommunication.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Services\Repositories\Entities\" />
<Folder Include="Services\Repositories\Impl\" />
<Folder Include="Services\Impl\" />
<Folder Include="Services\Models\" />
</ItemGroup>
</Project>

@ -11,6 +11,11 @@
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Masuit.Tools.Core" Version="2.6.7.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.12">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
@ -21,10 +26,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Services\Repositories\Entities\" />
<Folder Include="Services\Repositories\Impl\" />
<Folder Include="Services\Impl\" />
<Folder Include="Services\Models\" />
</ItemGroup>
</Project>

@ -1,4 +1,6 @@
using Microsoft.EntityFrameworkCore;
using PVDEMCS.Common.DI;
using System.Configuration;
var builder = WebApplication.CreateBuilder(args);
@ -8,7 +10,14 @@ builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
//×¢²á·þÎñ
builder.AddAutofacExt();
//
//builder.Services.AddDbContext<EFContext>(options =>
//{
// options.UseMySQL(builder.Configuration.GetConnectionString("MySqlConnection"));
//});
var app = builder.Build();
// Configure the HTTP request pipeline.

@ -0,0 +1,50 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace PVDEMCS.Services.Models;
/// <summary>
/// PLC控制器
/// </summary>
public partial class DeviceInfo
{
public string Id { get; set; }
/// <summary>
/// 控制器编号
/// </summary>
public string DeviceCode { get; set; }
/// <summary>
/// 控制器名称
/// </summary>
public string DeviceName { get; set; }
/// <summary>
/// 控制器状态,1启用0停用
/// </summary>
public ulong Activated { get; set; }
/// <summary>
/// 控制器协议:PLC,HTTP,Socket
/// </summary>
public string Protocol { get; set; }
/// <summary>
/// 控制器主机地址
/// </summary>
public string Host { get; set; }
/// <summary>
/// 控制器主机端口
/// </summary>
public string Port { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}

@ -0,0 +1,50 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace PVDEMCS.Services.Models;
/// <summary>
/// PLC点位
/// </summary>
public partial class DevicePoint
{
public string Id { get; set; }
/// <summary>
/// 控制器Id
/// </summary>
public string DeviceId { get; set; }
/// <summary>
/// 点位编号
/// </summary>
public string PointCode { get; set; }
/// <summary>
/// 点位名称
/// </summary>
public string PointName { get; set; }
/// <summary>
/// S7 数据存储地址,直连 存储区地址
/// </summary>
public string Address { get; set; }
/// <summary>
/// 字段类型
/// </summary>
public string Type { get; set; }
/// <summary>
/// PLC 点位是否启用 (1 启用, 0 禁用)
/// </summary>
public ulong Activated { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}

@ -0,0 +1,40 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace PVDEMCS.Services.Models;
/// <summary>
/// 设备信息
/// </summary>
public partial class EquipmentInfo
{
public string Id { get; set; }
/// <summary>
/// 设备编码
/// </summary>
public string EquipmentCode { get; set; }
/// <summary>
/// 设备名称
/// </summary>
public string EquipmentName { get; set; }
/// <summary>
/// 设备类型IonbondBalzersCemecon
/// </summary>
public string EquipmentType { get; set; }
/// <summary>
/// 设备状态,1启用0停用
/// </summary>
public ulong Activated { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}

@ -0,0 +1,35 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace PVDEMCS.Services.Models;
/// <summary>
/// 设备状态记录明显
/// </summary>
public partial class EquipmentRecord
{
public string Id { get; set; }
/// <summary>
/// 设备类型IonbondBalzersCemecon
/// </summary>
public string EquipmentId { get; set; }
/// <summary>
/// 设备编码
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 设备名称
/// </summary>
public string EndTime { get; set; }
/// <summary>
/// 设备状态,1运行2待机3报警
/// </summary>
public int State { get; set; }
}

@ -0,0 +1,46 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace PVDEMCS.Services.Models;
/// <summary>
/// 设备状态记录日统计
///
/// </summary>
public partial class EquipmentRecordTotal
{
public string Id { get; set; }
/// <summary>
/// 设备Id
/// </summary>
public string EquipmentId { get; set; }
/// <summary>
/// 开炉次数
/// </summary>
public int FurnaceNum { get; set; }
/// <summary>
/// 总运行时长
/// </summary>
public decimal TotalRunningTime { get; set; }
/// <summary>
/// 总报警时长
/// </summary>
public decimal TotalAlarmTime { get; set; }
/// <summary>
/// 总待机时长
/// </summary>
public decimal TotalAwaitTime { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime? TotalDay { get; set; }
}

@ -0,0 +1,77 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace PVDEMCS.Services.Models;
/// <summary>
/// 参数配置表
/// </summary>
public partial class SysConfig
{
/// <summary>
/// 参数主键
/// </summary>
public int ConfigId { get; set; }
/// <summary>
/// 参数名称
/// </summary>
public string ConfigName { get; set; }
/// <summary>
/// 参数键名
/// </summary>
public string ConfigKey { get; set; }
/// <summary>
/// 参数键值
/// </summary>
public string ConfigValue { get; set; }
/// <summary>
/// 系统内置Y是 N否
/// </summary>
public string ConfigType { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 创建者
/// </summary>
public string CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateAt { get; set; }
/// <summary>
/// 更新者
/// </summary>
public string UpdateBy { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime? UpdateAt { get; set; }
/// <summary>
/// 是否删除
/// </summary>
public ulong IsDelete { get; set; }
/// <summary>
/// 删除者
/// </summary>
public string DeleteBy { get; set; }
/// <summary>
/// 删除时间
/// </summary>
public DateTime? DeleteAt { get; set; }
}

@ -0,0 +1,117 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace PVDEMCS.Services.Models;
/// <summary>
/// 用户信息表
/// </summary>
public partial class SysUser
{
/// <summary>
/// 用户ID
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 部门ID
/// </summary>
public long? DeptId { get; set; }
/// <summary>
/// 用户账号
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 用户昵称
/// </summary>
public string NickName { get; set; }
/// <summary>
/// 用户类型00系统用户
/// </summary>
public string UserType { get; set; }
/// <summary>
/// 用户邮箱
/// </summary>
public string Email { get; set; }
/// <summary>
/// 手机号码
/// </summary>
public string Phonenumber { get; set; }
/// <summary>
/// 用户性别0男 1女 2未知
/// </summary>
public string Sex { get; set; }
/// <summary>
/// 头像地址
/// </summary>
public string Avatar { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 帐号状态0正常 1停用
/// </summary>
public string Status { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 最后登录IP
/// </summary>
public string LoginIp { get; set; }
/// <summary>
/// 最后登录时间
/// </summary>
public DateTime? LoginDate { get; set; }
/// <summary>
/// 创建者
/// </summary>
public string CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateAt { get; set; }
/// <summary>
/// 更新者
/// </summary>
public string UpdateBy { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime? UpdateAt { get; set; }
/// <summary>
/// 是否删除
/// </summary>
public ulong IsDelete { get; set; }
/// <summary>
/// 删除者
/// </summary>
public string DeleteBy { get; set; }
/// <summary>
/// 删除时间
/// </summary>
public DateTime? DeleteAt { get; set; }
}

@ -0,0 +1,92 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using Masuit.Tools.Systems;
namespace PVDEMCS.Services.Repositories.Entities.BaseEntity
{
public abstract class BaseEntity
{
[Key]
[Column("id")]
[StringLength(64)]
public string Id { get; set; }
}
public abstract class CUBaseEntity : BaseEntity
{
/// <summary>
/// 创建者
/// </summary>
[Column("create_by")]
[StringLength(32)]
[MySqlCollation("utf8mb4_bin")]
public string CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("create_at", TypeName = "datetime")]
public DateTime? CreateAt { get; set; }
/// <summary>
/// 修改者
/// </summary>
[Column("update_by")]
[StringLength(32)]
[MySqlCollation("utf8mb4_bin")]
public string UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
[Column("update_at", TypeName = "datetime")]
public DateTime? UpdateAt { get; set; }
public void Update()
{
UpdateAt = DateTime.Now;
UpdateBy = "1";
}
public void Create()
{
Id = SnowFlakeNew.NewId;
CreateAt = DateTime.Now;
CreateBy = "1";
Update();
}
}
public abstract class CUDBaseEntity: CUBaseEntity
{
/// <summary>
/// 删除者
/// </summary>
[Column("delete_by")]
[StringLength(32)]
[MySqlCollation("utf8mb4_bin")]
public string DeleteBy { get; set; }
/// <summary>
/// 删除时间
/// </summary>
[Column("delete_at", TypeName = "datetime")]
public DateTime? DeleteAt { get; set; }
/// <summary>
/// 是否删除
/// </summary>
[Column("is_delete", TypeName = "bit(1)")]
public bool IsDelete { get; set; }
public void Delete()
{
DeleteAt = DateTime.Now;
DeleteBy = "1";
IsDelete = true;
}
}
}

@ -0,0 +1,72 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;
namespace PVDEMCS.Services.Repositories.Entities;
/// <summary>
/// PLC控制器
/// </summary>
[Table("device_info")]
public partial class DeviceInfoEntity : CUDBaseEntity
{
/// <summary>
/// 控制器编号
/// </summary>
[Required]
[Column("device_code")]
[StringLength(32)]
public string DeviceCode { get; set; }
/// <summary>
/// 控制器名称
/// </summary>
[Required]
[Column("device_name")]
[StringLength(32)]
public string DeviceName { get; set; }
/// <summary>
/// 控制器状态,1启用0停用
/// </summary>
[Column("activated", TypeName = "bit(1)")]
public bool Activated { get; set; }
/// <summary>
/// 控制器协议:PLC,HTTP,Socket
/// </summary>
[Required]
[Column("protocol")]
[StringLength(32)]
public string Protocol { get; set; }
/// <summary>
/// 控制器主机地址
/// </summary>
[Required]
[Column("host")]
[StringLength(32)]
public string Host { get; set; }
/// <summary>
/// 控制器主机端口
/// </summary>
[Required]
[Column("port")]
[StringLength(32)]
public string Port { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("remark")]
[StringLength(255)]
public string Remark { get; set; }
}

@ -0,0 +1,72 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;
namespace PVDEMCS.Services.Repositories.Entities;
/// <summary>
/// PLC点位
/// </summary>
[Table("device_point")]
public partial class DevicePointEntity : CUDBaseEntity
{
/// <summary>
/// 控制器Id
/// </summary>
[Required]
[Column("device_id")]
[StringLength(64)]
public string DeviceId { get; set; }
/// <summary>
/// 点位编号
/// </summary>
[Required]
[Column("point_code")]
[StringLength(32)]
public string PointCode { get; set; }
/// <summary>
/// 点位名称
/// </summary>
[Required]
[Column("point_name")]
[StringLength(32)]
public string PointName { get; set; }
/// <summary>
/// S7 数据存储地址,直连 存储区地址
/// </summary>
[Required]
[Column("address")]
[StringLength(64)]
public string Address { get; set; }
/// <summary>
/// 字段类型
/// </summary>
[Required]
[Column("type")]
[StringLength(32)]
public string Type { get; set; }
/// <summary>
/// PLC 点位是否启用 (1 启用, 0 禁用)
/// </summary>
[Column("activated", TypeName = "bit(1)")]
public ulong Activated { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("remark")]
[StringLength(255)]
public string Remark { get; set; }
}

@ -0,0 +1,252 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using PVDEMCS.Services.Models;
namespace PVDEMCS.Services.Repositories.Entities;
public partial class EFContext : DbContext
{
private IConfiguration configuration;
public EFContext()
{
configuration = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json").Build();
}
public EFContext(DbContextOptions<EFContext> options)
: base(options)
{
}
public virtual DbSet<DeviceInfoEntity> DeviceInfos { get; set; }
public virtual DbSet<DevicePointEntity> DevicePoints { get; set; }
public virtual DbSet<EquipmentInfoEntity> EquipmentInfos { get; set; }
public virtual DbSet<EquipmentRecordEntity> EquipmentRecords { get; set; }
public virtual DbSet<EquipmentRecordTotalEntity> EquipmentRecordTotals { get; set; }
public virtual DbSet<SysConfigEntity> SysConfigs { get; set; }
public virtual DbSet<SysUserEntity> SysUsers { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
=> optionsBuilder.UseMySql(configuration.GetConnectionString("MySqlConnection"), Microsoft.EntityFrameworkCore.ServerVersion.Parse("8.0.34-mysql"));
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder
.UseCollation("utf8mb4_0900_ai_ci")
.HasCharSet("utf8mb4");
modelBuilder.Entity<DeviceInfoEntity>(entity =>
{
entity.HasKey(e => e.Id).HasName("PRIMARY");
entity.ToTable("device_info", tb => tb.HasComment("PLC控制器"));
entity.Property(e => e.Activated)
.HasDefaultValueSql("b'1'")
.HasComment("控制器状态,1启用0停用");
entity.Property(e => e.CreateAt).HasComment("创建时间");
entity.Property(e => e.CreateBy).HasComment("创建者");
entity.Property(e => e.DeleteAt).HasComment("删除时间");
entity.Property(e => e.DeleteBy).HasComment("删除者");
entity.Property(e => e.DeviceCode).HasComment("控制器编号");
entity.Property(e => e.DeviceName).HasComment("控制器名称");
entity.Property(e => e.Host).HasComment("控制器主机地址");
entity.Property(e => e.IsDelete)
.HasDefaultValueSql("b'0'")
.HasComment("是否删除");
entity.Property(e => e.Port).HasComment("控制器主机端口");
entity.Property(e => e.Protocol).HasComment("控制器协议:PLC,HTTP,Socket");
entity.Property(e => e.Remark).HasComment("备注");
entity.Property(e => e.UpdateAt).HasComment("修改时间");
entity.Property(e => e.UpdateBy).HasComment("修改者");
});
modelBuilder.Entity<DevicePointEntity>(entity =>
{
entity.HasKey(e => e.Id).HasName("PRIMARY");
entity.ToTable("device_point", tb => tb.HasComment("PLC点位"));
entity.Property(e => e.Activated)
.HasDefaultValueSql("b'1'")
.HasComment("PLC 点位是否启用 (1 启用, 0 禁用)");
entity.Property(e => e.Address).HasComment("S7 数据存储地址,直连 存储区地址");
entity.Property(e => e.CreateAt).HasComment("创建时间");
entity.Property(e => e.CreateBy).HasComment("创建者");
entity.Property(e => e.DeleteAt).HasComment("删除时间");
entity.Property(e => e.DeleteBy).HasComment("删除者");
entity.Property(e => e.DeviceId).HasComment("控制器Id");
entity.Property(e => e.IsDelete)
.HasDefaultValueSql("b'0'")
.HasComment("是否删除");
entity.Property(e => e.PointCode).HasComment("点位编号");
entity.Property(e => e.PointName).HasComment("点位名称");
entity.Property(e => e.Remark).HasComment("备注");
entity.Property(e => e.Type).HasComment("字段类型");
entity.Property(e => e.UpdateAt).HasComment("修改时间");
entity.Property(e => e.UpdateBy).HasComment("修改者");
});
modelBuilder.Entity<EquipmentInfoEntity>(entity =>
{
entity.HasKey(e => e.Id).HasName("PRIMARY");
entity.ToTable("equipment_info", tb => tb.HasComment("设备信息"));
entity.Property(e => e.Activated)
.HasDefaultValueSql("b'1'")
.HasComment("设备状态,1启用0停用");
entity.Property(e => e.CreateAt).HasComment("创建时间");
entity.Property(e => e.CreateBy).HasComment("创建者");
entity.Property(e => e.DeleteAt).HasComment("删除时间");
entity.Property(e => e.DeleteBy).HasComment("删除者");
entity.Property(e => e.EquipmentCode).HasComment("设备编码");
entity.Property(e => e.EquipmentName).HasComment("设备名称");
entity.Property(e => e.EquipmentType).HasComment("设备类型IonbondBalzersCemecon");
entity.Property(e => e.IsDelete)
.HasDefaultValueSql("b'0'")
.HasComment("是否删除");
entity.Property(e => e.Remark).HasComment("备注");
entity.Property(e => e.UpdateAt).HasComment("修改时间");
entity.Property(e => e.UpdateBy).HasComment("修改者");
});
modelBuilder.Entity<EquipmentRecordEntity>(entity =>
{
entity.HasKey(e => e.Id).HasName("PRIMARY");
entity.ToTable("equipment_record", tb => tb.HasComment("设备状态记录明显"));
entity.Property(e => e.CreateAt).HasComment("创建时间");
entity.Property(e => e.CreateBy).HasComment("创建者");
entity.Property(e => e.EndTime).HasComment("设备名称");
entity.Property(e => e.EquipmentId).HasComment("设备类型IonbondBalzersCemecon");
entity.Property(e => e.StartTime).HasComment("设备编码");
entity.Property(e => e.State).HasComment("设备状态,1运行2待机3报警");
entity.Property(e => e.UpdateAt).HasComment("修改时间");
entity.Property(e => e.UpdateBy).HasComment("修改者");
});
modelBuilder.Entity<EquipmentRecordTotalEntity>(entity =>
{
entity.HasKey(e => e.Id).HasName("PRIMARY");
entity.ToTable("equipment_record_total", tb => tb.HasComment("设备状态记录日统计\r\n"));
entity.Property(e => e.CreateAt).HasComment("创建时间");
entity.Property(e => e.CreateBy).HasComment("创建者");
entity.Property(e => e.EquipmentId).HasComment("设备Id");
entity.Property(e => e.FurnaceNum).HasComment("开炉次数");
entity.Property(e => e.TotalAlarmTime).HasComment("总报警时长");
entity.Property(e => e.TotalAwaitTime).HasComment("总待机时长");
entity.Property(e => e.TotalDay).HasComment("日期");
entity.Property(e => e.TotalRunningTime).HasComment("总运行时长");
entity.Property(e => e.UpdateAt).HasComment("修改时间");
entity.Property(e => e.UpdateBy).HasComment("修改者");
});
modelBuilder.Entity<SysConfigEntity>(entity =>
{
entity.HasKey(e => e.ConfigId).HasName("PRIMARY");
entity.ToTable("sys_config", tb => tb.HasComment("参数配置表"));
entity.Property(e => e.ConfigId).HasComment("参数主键");
entity.Property(e => e.ConfigKey)
.HasDefaultValueSql("''")
.HasComment("参数键名");
entity.Property(e => e.ConfigName)
.HasDefaultValueSql("''")
.HasComment("参数名称");
entity.Property(e => e.ConfigType)
.HasDefaultValueSql("'N'")
.IsFixedLength()
.HasComment("系统内置Y是 N否");
entity.Property(e => e.ConfigValue)
.HasDefaultValueSql("''")
.HasComment("参数键值");
entity.Property(e => e.CreateAt).HasComment("创建时间");
entity.Property(e => e.CreateBy)
.HasDefaultValueSql("''")
.HasComment("创建者");
entity.Property(e => e.DeleteAt).HasComment("删除时间");
entity.Property(e => e.DeleteBy).HasComment("删除者");
entity.Property(e => e.IsDelete)
.HasDefaultValueSql("b'0'")
.HasComment("是否删除");
entity.Property(e => e.Remark).HasComment("备注");
entity.Property(e => e.UpdateAt).HasComment("更新时间");
entity.Property(e => e.UpdateBy)
.HasDefaultValueSql("''")
.HasComment("更新者");
});
modelBuilder.Entity<SysUserEntity>(entity =>
{
entity.HasKey(e => e.UserId).HasName("PRIMARY");
entity.ToTable("sys_user", tb => tb.HasComment("用户信息表"));
entity.Property(e => e.UserId).HasComment("用户ID");
entity.Property(e => e.Avatar)
.HasDefaultValueSql("''")
.HasComment("头像地址");
entity.Property(e => e.CreateAt).HasComment("创建时间");
entity.Property(e => e.CreateBy)
.HasDefaultValueSql("''")
.HasComment("创建者");
entity.Property(e => e.DeleteAt).HasComment("删除时间");
entity.Property(e => e.DeleteBy).HasComment("删除者");
entity.Property(e => e.DeptId).HasComment("部门ID");
entity.Property(e => e.Email)
.HasDefaultValueSql("''")
.HasComment("用户邮箱");
entity.Property(e => e.IsDelete)
.HasDefaultValueSql("b'0'")
.HasComment("是否删除");
entity.Property(e => e.LoginDate).HasComment("最后登录时间");
entity.Property(e => e.LoginIp)
.HasDefaultValueSql("''")
.HasComment("最后登录IP");
entity.Property(e => e.NickName).HasComment("用户昵称");
entity.Property(e => e.Password)
.HasDefaultValueSql("''")
.HasComment("密码");
entity.Property(e => e.Phonenumber)
.HasDefaultValueSql("''")
.HasComment("手机号码");
entity.Property(e => e.Remark).HasComment("备注");
entity.Property(e => e.Sex)
.HasDefaultValueSql("'0'")
.IsFixedLength()
.HasComment("用户性别0男 1女 2未知");
entity.Property(e => e.Status)
.HasDefaultValueSql("'0'")
.IsFixedLength()
.HasComment("帐号状态0正常 1停用");
entity.Property(e => e.UpdateAt).HasComment("更新时间");
entity.Property(e => e.UpdateBy)
.HasDefaultValueSql("''")
.HasComment("更新者");
entity.Property(e => e.UserName).HasComment("用户账号");
entity.Property(e => e.UserType)
.HasDefaultValueSql("'00'")
.HasComment("用户类型00系统用户");
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}

@ -0,0 +1,54 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;
namespace PVDEMCS.Services.Repositories.Entities;
/// <summary>
/// 设备信息
/// </summary>
[Table("equipment_info")]
public partial class EquipmentInfoEntity : CUDBaseEntity
{
/// <summary>
/// 设备编码
/// </summary>
[Required]
[Column("equipment_code")]
[StringLength(32)]
public string EquipmentCode { get; set; }
/// <summary>
/// 设备名称
/// </summary>
[Required]
[Column("equipment_name")]
[StringLength(32)]
public string EquipmentName { get; set; }
/// <summary>
/// 设备类型IonbondBalzersCemecon
/// </summary>
[Required]
[Column("equipment_type")]
[StringLength(32)]
public string EquipmentType { get; set; }
/// <summary>
/// 设备状态,1启用0停用
/// </summary>
[Column("activated", TypeName = "bit(1)")]
public ulong Activated { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("remark")]
[StringLength(255)]
public string Remark { get; set; }
}

@ -0,0 +1,50 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;
namespace PVDEMCS.Services.Repositories.Entities;
/// <summary>
/// 设备状态记录明显
/// </summary>
[Table("equipment_record")]
public partial class EquipmentRecordEntity : CUBaseEntity
{
/// <summary>
/// 设备类型IonbondBalzersCemecon
/// </summary>
[Required]
[Column("equipment_id")]
[StringLength(32)]
public string EquipmentId { get; set; }
/// <summary>
/// 设备编码
/// </summary>
[Required]
[Column("start_time")]
[StringLength(32)]
public string StartTime { get; set; }
/// <summary>
/// 设备名称
/// </summary>
[Required]
[Column("end_time")]
[StringLength(32)]
public string EndTime { get; set; }
/// <summary>
/// 设备状态,1运行2待机3报警
/// </summary>
[Column("state")]
public int State { get; set; }
}

@ -0,0 +1,62 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;
namespace PVDEMCS.Services.Repositories.Entities;
/// <summary>
/// 设备状态记录日统计
///
/// </summary>
[Table("equipment_record_total")]
public partial class EquipmentRecordTotalEntity : CUBaseEntity
{
/// <summary>
/// 设备Id
/// </summary>
[Required]
[Column("equipment_id")]
[StringLength(32)]
public string EquipmentId { get; set; }
/// <summary>
/// 开炉次数
/// </summary>
[Column("furnace_num")]
public int FurnaceNum { get; set; }
/// <summary>
/// 总运行时长
/// </summary>
[Column("total_running_time")]
[Precision(32, 2)]
public decimal TotalRunningTime { get; set; }
/// <summary>
/// 总报警时长
/// </summary>
[Column("total_alarm_time")]
[Precision(32, 2)]
public decimal TotalAlarmTime { get; set; }
/// <summary>
/// 总待机时长
/// </summary>
[Column("total_await_time")]
[Precision(32, 2)]
public decimal TotalAwaitTime { get; set; }
/// <summary>
/// 日期
/// </summary>
[Column("total_day", TypeName = "datetime")]
public DateTime? TotalDay { get; set; }
}

@ -0,0 +1,55 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;
namespace PVDEMCS.Services.Repositories.Entities;
/// <summary>
/// 参数配置表
/// </summary>
[Table("sys_config")]
[MySqlCollation("utf8mb4_bin")]
public partial class SysConfigEntity:CUDBaseEntity
{
/// <summary>
/// 参数名称
/// </summary>
[Column("config_name")]
[StringLength(100)]
public string ConfigName { get; set; }
/// <summary>
/// 参数键名
/// </summary>
[Column("config_key")]
[StringLength(100)]
public string ConfigKey { get; set; }
/// <summary>
/// 参数键值
/// </summary>
[Column("config_value")]
[StringLength(500)]
public string ConfigValue { get; set; }
/// <summary>
/// 系统内置Y是 N否
/// </summary>
[Column("config_type")]
[StringLength(1)]
public string ConfigType { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("remark")]
[StringLength(500)]
public string Remark { get; set; }
}

@ -0,0 +1,110 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;
namespace PVDEMCS.Services.Repositories.Entities;
/// <summary>
/// 用户信息表
/// </summary>
[Table("sys_user")]
[MySqlCollation("utf8mb4_bin")]
public partial class SysUserEntity : CUDBaseEntity
{
/// <summary>
/// 部门ID
/// </summary>
[Column("dept_id")]
public long? DeptId { get; set; }
/// <summary>
/// 用户账号
/// </summary>
[Required]
[Column("user_name")]
[StringLength(30)]
public string UserName { get; set; }
/// <summary>
/// 用户昵称
/// </summary>
[Required]
[Column("nick_name")]
[StringLength(30)]
public string NickName { get; set; }
/// <summary>
/// 用户类型00系统用户
/// </summary>
[Column("user_type")]
[StringLength(2)]
public string UserType { get; set; }
/// <summary>
/// 用户邮箱
/// </summary>
[Column("email")]
[StringLength(50)]
public string Email { get; set; }
/// <summary>
/// 手机号码
/// </summary>
[Column("phonenumber")]
[StringLength(11)]
public string Phonenumber { get; set; }
/// <summary>
/// 用户性别0男 1女 2未知
/// </summary>
[Column("sex")]
[StringLength(1)]
public string Sex { get; set; }
/// <summary>
/// 头像地址
/// </summary>
[Column("avatar")]
[StringLength(100)]
public string Avatar { get; set; }
/// <summary>
/// 密码
/// </summary>
[Column("password")]
[StringLength(100)]
public string Password { get; set; }
/// <summary>
/// 帐号状态0正常 1停用
/// </summary>
[Column("status")]
[StringLength(1)]
public string Status { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("remark")]
[StringLength(500)]
public string Remark { get; set; }
/// <summary>
/// 最后登录IP
/// </summary>
[Column("login_ip")]
[StringLength(128)]
public string LoginIp { get; set; }
/// <summary>
/// 最后登录时间
/// </summary>
[Column("login_date", TypeName = "datetime")]
public DateTime? LoginDate { get; set; }
}

@ -0,0 +1,114 @@
using Masuit.Tools.Models;
using Masuit.Tools;
using PVDEMCS.Common;
using PVDEMCS.Common.DI;
using PVDEMCS.Services.Repositories.Entities;
namespace PVDEMCS.Services.Repositories
{
/*
* PLC
*/
public interface IDeviceRepository: IDependency
{
#region PLC控制器
/// <summary>
/// 获取PLC控制器分页列表
/// </summary>
/// <param name="deviceCode">控制器编号</param>
/// <param name="deviceName">控制器名称</param>
/// <param name="page">当前页</param>
/// <param name="size">页大小</param>
/// <returns></returns>
Result<PagedList<DeviceInfoEntity>> GetDevicePageList(string deviceCode, string deviceName, bool? activated, int page, int size);
/// <summary>
/// 获取PLC控制器列表
/// </summary>
/// <param name="deviceCode">控制器编号</param>
/// <param name="deviceName">控制器名称</param>
/// <returns></returns>
Result<List<DeviceInfoEntity>> GetDeviceInfoList(string deviceCode, string deviceName, bool? activated = false);
/// <summary>
/// 获取PLC控制器明细
/// </summary>
/// <param name="id">主键Id</param>
/// <returns></returns>
Result<DeviceInfoEntity> GetDeviceDetail(string id);
/// <summary>
/// 添加PLC控制器
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
Result<string> AddDevice(DeviceInfoEntity entity);
/// <summary>
/// 更新PLC控制器
/// </summary>
/// <param name="entity"></param>
Result UpdateDevice(DeviceInfoEntity entity);
/// <summary>
/// 删除PLC控制器
/// </summary>
/// <param name="id"></param>
Result DeleteDevice(string id);
#endregion
#region PLC点位
/// <summary>
/// 获取PLC控制器点位分页列表
/// </summary>
/// <param name="deviceId">控制器Id</param>
/// <param name="pointCode">点位编号</param>
/// <param name="pointName">点位列表</param>
/// <param name="page">当前页</param>
/// <param name="size">页大小</param>
/// <returns></returns>
Result<PagedList<DevicePointEntity>> GetDevicePointPageList(string deviceId, string pointCode, string pointName, int page, int size);
/// <summary>
/// 获取PLC控制器点位分页列表
/// </summary>
/// <param name="deviceId">控制器Id</param>
/// <param name="pointCode">点位编号</param>
/// <param name="pointName">点位列表</param>
/// <returns></returns>
List<DevicePointEntity> GetDevicePointList(string deviceId, string pointCode, string pointName);
/// <summary>
/// 获取PLC控制器点位明细
/// </summary>
/// <param name="id">Id</param>
/// <returns></returns>
Result<DevicePointEntity> GetDevicePointDetail(string id);
/// <summary>
/// 添加PLC控制器点位
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
Result<string> AddDevicePoint(DevicePointEntity entity);
/// <summary>
/// 更新PLC控制器点位
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
Result UpdateDevicePoint(DevicePointEntity entity);
/// <summary>
/// 删除PLC控制器点位
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Result DeleteDevicePoint(string id);
#endregion
}
}

@ -0,0 +1,13 @@
using PVDEMCS.Common.DI;
namespace PVDEMCS.Services.Repositories
{
/*
*
*/
public interface IEquipmentRecordRepository : IDependency
{
}
}

@ -0,0 +1,12 @@
using PVDEMCS.Common.DI;
namespace PVDEMCS.Services.Repositories
{
/*
*
*/
public interface IEquipmentRepository : IDependency
{
}
}

@ -0,0 +1,12 @@
using PVDEMCS.Common.DI;
namespace PVDEMCS.Services.Repositories
{
/*
*
*/
public interface ISysConfigRepository : IDependency
{
}
}

@ -0,0 +1,12 @@
using PVDEMCS.Common.DI;
namespace PVDEMCS.Services.Repositories
{
/*
*
*/
public interface ISysUserRepository: IDependency
{
}
}

@ -0,0 +1,393 @@
using AngleSharp.Dom;
using Masuit.Tools;
using Masuit.Tools.Models;
using Microsoft.AspNetCore.Mvc.RazorPages;
using PVDEMCS.Common;
using PVDEMCS.Common.DI;
using PVDEMCS.Services.Repositories.Entities;
using SharpCompress.Common;
using System;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace PVDEMCS.Services.Repositories.Impl
{
/*
* PLC
*/
internal class DeviceRepository : IDeviceRepository
{
#region PLC控制器
/// <summary>
/// 获取PLC控制器分页列表
/// </summary>
/// <param name="deviceCode">控制器编号</param>
/// <param name="deviceName">控制器名称</param>
/// <param name="page">当前页</param>
/// <param name="size">页大小</param>
/// <returns></returns>
public Result<PagedList<DeviceInfoEntity>> GetDevicePageList(string deviceCode, string deviceName, bool? activated, int page, int size)
{
using (var context = new EFContext())
{
var query = context.DeviceInfos.Where(f => !f.IsDelete);
if (!deviceCode.IsNullOrEmpty())
{
query = query.Where(f => f.DeviceCode.StartsWith(deviceCode));
}
if (!deviceName.IsNullOrEmpty())
{
query = query.Where(f => f.DeviceName.StartsWith(deviceName));
}
if (activated.HasValue)
{
query = query.Where(f => f.Activated == activated.Value);
}
var result = query.OrderBy(f => f.CreateAt).ToPagedList(page, size);
return new Result<PagedList<DeviceInfoEntity>>(result);
}
}
/// <summary>
/// 获取PLC控制器列表
/// </summary>
/// <param name="deviceCode">控制器编号</param>
/// <param name="deviceName">控制器名称</param>
/// <returns></returns>
public Result<List<DeviceInfoEntity>> GetDeviceInfoList(string deviceCode, string deviceName, bool? activated = false)
{
using (var context = new EFContext())
{
var query = context.DeviceInfos.Where(f => !f.IsDelete);
if (!deviceCode.IsNullOrEmpty())
{
query = query.Where(f => f.DeviceCode.StartsWith(deviceCode));
}
if (!deviceName.IsNullOrEmpty())
{
query = query.Where(f => f.DeviceName.StartsWith(deviceName));
}
if (activated.HasValue)
{
query = query.Where(f => f.Activated == activated.Value);
}
var result = query.OrderBy(f => f.CreateAt).ToList();
return new Result<List<DeviceInfoEntity>>(result);
}
}
/// <summary>
/// 获取PLC控制器明细
/// </summary>
/// <param name="id">主键Id</param>
/// <returns></returns>
public Result<DeviceInfoEntity> GetDeviceDetail(string id)
{
using (var context = new EFContext())
{
var result = new Result<DeviceInfoEntity>();
var detail = context.DeviceInfos.Where(f => f.Id == id).FirstOrDefault();
if (detail == null)
{
result.Message = $"没有找到Id:{id}的数据";
return result;
}
result.Content= detail;
return result;
}
}
/// <summary>
/// 添加PLC控制器
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public Result<string> AddDevice(DeviceInfoEntity entity)
{
using (var context = new EFContext())
{
var result = new Result<string>();
var query = context.DeviceInfos.Where(f => !f.IsDelete);
if (query.Where(f => f.DeviceName == entity.DeviceName).FirstOrDefault() != null)
{
result.Message = $"已存在名称为:{entity.DeviceName}的PLC控制器";
return result;
}
if (query.Where(f => f.DeviceCode == entity.DeviceCode).FirstOrDefault() != null)
{
result.Message = $"已存在编号为:{entity.DeviceCode}的PLC控制器";
return result;
}
entity.Create();
context.DeviceInfos.Add(entity);
context.SaveChanges();
return new Result<string>(entity.Id);
}
}
/// <summary>
/// 更新PLC控制器
/// </summary>
/// <param name="entity"></param>
public Result UpdateDevice(DeviceInfoEntity entity)
{
using (var context = new EFContext())
{
var result = new Result();
var query = context.DeviceInfos.Where(f => !f.IsDelete);
var update = query.Where(f => f.Id == entity.Id).FirstOrDefault();
if (update == null)
{
result.Message = $"没有找到Id:{entity.Id}的数据";
return result;
}
if (query.Where(f => f.DeviceName == entity.DeviceName && f.Id != entity.Id).FirstOrDefault() != null)
{
result.Message = $"已存在名称为:{entity.DeviceName}的PLC控制器";
return result;
}
if (query.Where(f => f.DeviceCode == entity.DeviceCode && f.Id != entity.Id).FirstOrDefault() != null)
{
result.Message = $"已存在编号为:{entity.DeviceCode}的PLC控制器";
return result;
}
update.DeviceCode = entity.DeviceCode;
update.DeviceName = entity.DeviceName;
update.Activated = entity.Activated;
update.Host = entity.Host;
update.Port = entity.Port;
update.Protocol = entity.Protocol;
update.Remark = entity.Remark;
entity.Update();
context.SaveChanges();
return result;
}
}
/// <summary>
/// 删除PLC控制器
/// </summary>
/// <param name="id"></param>
public Result DeleteDevice(string id)
{
using (var context = new EFContext())
{
var result = new Result();
var entity = context.DeviceInfos.Where(f => f.Id == id).FirstOrDefault();
if (entity == null)
{
result.Message = $"没有找到Id:{id}的数据";
return result;
}
entity.Delete();
context.SaveChanges();
return result;
}
}
#endregion
#region PLC点位
/// <summary>
/// 获取PLC控制器点位分页列表
/// </summary>
/// <param name="deviceId">控制器Id</param>
/// <param name="pointCode">点位编号</param>
/// <param name="pointName">点位列表</param>
/// <param name="page">当前页</param>
/// <param name="size">页大小</param>
/// <returns></returns>
public Result<PagedList<DevicePointEntity>> GetDevicePointPageList(string deviceId, string pointCode, string pointName, int page, int size)
{
using (var context = new EFContext())
{
var query = context.DevicePoints.Where(f => !f.IsDelete);
if (!deviceId.IsNullOrEmpty())
{
query = query.Where(f => f.DeviceId == deviceId);
}
if (!pointCode.IsNullOrEmpty())
{
query = query.Where(f => f.PointCode.StartsWith(pointCode));
}
if (!pointName.IsNullOrEmpty())
{
query = query.Where(f => f.PointName.StartsWith(pointName));
}
var pageList = query.OrderBy(f => f.CreateAt).ToPagedList(page, size);
return new Result<PagedList<DevicePointEntity>>(pageList);
}
}
/// <summary>
/// 获取PLC控制器点位分页列表
/// </summary>
/// <param name="deviceId">控制器Id</param>
/// <param name="pointCode">点位编号</param>
/// <param name="pointName">点位列表</param>
/// <returns></returns>
public List<DevicePointEntity> GetDevicePointList(string deviceId, string pointCode, string pointName)
{
using (var context = new EFContext())
{
var query = context.DevicePoints.Where(f => !f.IsDelete);
if (!deviceId.IsNullOrEmpty())
{
query = query.Where(f => f.DeviceId == deviceId);
}
if (!pointCode.IsNullOrEmpty())
{
query = query.Where(f => f.PointCode.StartsWith(pointCode));
}
if (!pointName.IsNullOrEmpty())
{
query = query.Where(f => f.PointName.StartsWith(pointName));
}
var list = query.ToList();
return list;
}
}
/// <summary>
/// 获取PLC控制器点位明细
/// </summary>
/// <param name="id">Id</param>
/// <returns></returns>
public Result<DevicePointEntity> GetDevicePointDetail(string id)
{
using (var context = new EFContext())
{
var result = new Result<DevicePointEntity>();
var entity = context.DevicePoints.Where(f => f.Id == id).FirstOrDefault();
if (entity == null)
{
result.Message = $"没有找到Id:{id}的数据";
return result;
}
result.Content = entity;
return result;
}
}
/// <summary>
/// 添加PLC控制器点位
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public Result<string> AddDevicePoint(DevicePointEntity entity)
{
using (var context = new EFContext())
{
var result = new Result<string>();
var query = context.DevicePoints.Where(f => !f.IsDelete);
if (query.Where(f => f.PointName == entity.PointName).FirstOrDefault() != null)
{
result.Message = $"已存在名称为:{entity.PointName}的PLC控制器点位";
return result;
}
if (query.Where(f => f.PointCode == entity.PointCode).FirstOrDefault() != null)
{
result.Message = $"已存在编号为:{entity.PointCode}的PLC控制器点位";
return result;
}
entity.Create();
context.DevicePoints.Add(entity);
context.SaveChanges();
result.Content = entity.Id;
return result;
}
}
/// <summary>
/// 更新PLC控制器点位
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public Result UpdateDevicePoint(DevicePointEntity entity)
{
using (var context = new EFContext())
{
var result = new Result();
var query = context.DevicePoints.Where(f => !f.IsDelete);
var update = query.Where(f => f.Id == entity.Id).FirstOrDefault();
if (update == null)
{
result.Message = $"没有找到Id:{entity.Id}的数据";
return result;
}
if (query.Where(f => f.PointName == entity.PointName && f.Id != entity.Id).FirstOrDefault() != null)
{
result.Message = $"已存在名称为:{entity.PointName}的PLC控制器点位";
return result;
}
if (query.Where(f => f.PointCode == entity.PointCode && f.Id != entity.Id).FirstOrDefault() != null)
{
result.Message = $"已存在编号为:{entity.PointCode}的PLC控制器点位";
return result;
}
update.DeviceId = entity.DeviceId;
update.PointCode = entity.PointCode;
update.PointName = entity.PointName;
update.Activated = entity.Activated;
update.Address= entity.Address;
update.Type = entity.Type;
update.Remark= entity.Remark;
entity.Update();
context.SaveChanges();
return result;
}
}
/// <summary>
/// 删除PLC控制器点位
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Result DeleteDevicePoint(string id)
{
using (var context = new EFContext())
{
var result = new Result();
var entity = context.DevicePoints.Where(f => f.Id == id).FirstOrDefault();
if (entity == null)
{
result.Message = $"没有找到Id:{id}的数据";
return result;
}
entity.Delete();
context.SaveChanges();
return result;
}
}
#endregion
}
}

@ -0,0 +1,12 @@
using PVDEMCS.Common.DI;
namespace PVDEMCS.Services.Repositories.Impl
{
/*
*
*/
internal class EquipmentRecordRepository : IEquipmentRecordRepository
{
}
}

@ -0,0 +1,12 @@
using PVDEMCS.Common.DI;
namespace PVDEMCS.Services.Repositories
{
/*
*
*/
internal class EquipmentRepository : IEquipmentRepository
{
}
}

@ -0,0 +1,12 @@
using PVDEMCS.Common.DI;
namespace PVDEMCS.Services.Repositories.Impl
{
/*
*
*/
internal class SysConfigRepository : ISysConfigRepository
{
}
}

@ -0,0 +1,12 @@
using PVDEMCS.Common.DI;
namespace PVDEMCS.Services.Repositories
{
/*
*
*/
internal class SysUserRepository: ISysUserRepository
{
}
}

@ -1,4 +1,7 @@
{
"ConnectionStrings": {
"MySqlConnection": "Server=127.0.0.1;Port=3306;Database=pvdemcs;Uid=root;Pwd=123456;"
},
"Logging": {
"LogLevel": {
"Default": "Information",

@ -12,6 +12,8 @@
"Autofac.Extensions.DependencyInjection": "8.0.0",
"Masuit.Tools.Core": "2.6.7.3",
"Microsoft.EntityFrameworkCore": "7.0.12",
"Microsoft.EntityFrameworkCore.Tools": "7.0.12",
"Pomelo.EntityFrameworkCore.MySql": "7.0.0",
"Swashbuckle.AspNetCore": "6.5.0",
"HslCommunication": "11.0.6.0"
},
@ -100,6 +102,14 @@
}
}
},
"Humanizer.Core/2.14.1": {
"runtime": {
"lib/net6.0/Humanizer.dll": {
"assemblyVersion": "2.14.0.0",
"fileVersion": "2.14.1.48190"
}
}
},
"Masuit.Tools.Abstractions/2.6.7.3": {
"dependencies": {
"Castle.Core": "5.1.1",
@ -159,6 +169,37 @@
}
},
"Microsoft.EntityFrameworkCore.Analyzers/7.0.12": {},
"Microsoft.EntityFrameworkCore.Design/7.0.12": {
"dependencies": {
"Humanizer.Core": "2.14.1",
"Microsoft.EntityFrameworkCore.Relational": "7.0.12",
"Microsoft.Extensions.DependencyModel": "7.0.0",
"Mono.TextTemplating": "2.2.1"
},
"runtime": {
"lib/net6.0/Microsoft.EntityFrameworkCore.Design.dll": {
"assemblyVersion": "7.0.12.0",
"fileVersion": "7.0.1223.47811"
}
}
},
"Microsoft.EntityFrameworkCore.Relational/7.0.12": {
"dependencies": {
"Microsoft.EntityFrameworkCore": "7.0.12",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
},
"runtime": {
"lib/net6.0/Microsoft.EntityFrameworkCore.Relational.dll": {
"assemblyVersion": "7.0.12.0",
"fileVersion": "7.0.1223.47811"
}
}
},
"Microsoft.EntityFrameworkCore.Tools/7.0.12": {
"dependencies": {
"Microsoft.EntityFrameworkCore.Design": "7.0.12"
}
},
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {},
"Microsoft.Extensions.Caching.Abstractions/7.0.0": {
"dependencies": {
@ -258,6 +299,18 @@
}
}
},
"Microsoft.Extensions.DependencyModel/7.0.0": {
"dependencies": {
"System.Text.Encodings.Web": "7.0.0",
"System.Text.Json": "7.0.0"
},
"runtime": {
"lib/net6.0/Microsoft.Extensions.DependencyModel.dll": {
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.22.51805"
}
}
},
"Microsoft.Extensions.FileProviders.Abstractions/7.0.0": {
"dependencies": {
"Microsoft.Extensions.Primitives": "7.0.0"
@ -366,6 +419,25 @@
}
}
},
"Mono.TextTemplating/2.2.1": {
"dependencies": {
"System.CodeDom": "7.0.0"
},
"runtime": {
"lib/netstandard2.0/Mono.TextTemplating.dll": {
"assemblyVersion": "2.2.0.0",
"fileVersion": "2.2.1.1"
}
}
},
"MySqlConnector/2.2.5": {
"runtime": {
"lib/net6.0/MySqlConnector.dll": {
"assemblyVersion": "2.0.0.0",
"fileVersion": "2.2.5.0"
}
}
},
"Newtonsoft.Json/13.0.3": {
"runtime": {
"lib/net6.0/Newtonsoft.Json.dll": {
@ -374,6 +446,18 @@
}
}
},
"Pomelo.EntityFrameworkCore.MySql/7.0.0": {
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.12",
"MySqlConnector": "2.2.5"
},
"runtime": {
"lib/net6.0/Pomelo.EntityFrameworkCore.MySql.dll": {
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.0.0"
}
}
},
"SharpCompress/0.34.1": {
"dependencies": {
"ZstdSharp.Port": "0.7.2"
@ -706,6 +790,13 @@
"path": "htmlsanitizer/8.0.723",
"hashPath": "htmlsanitizer.8.0.723.nupkg.sha512"
},
"Humanizer.Core/2.14.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-lQKvtaTDOXnoVJ20ibTuSIOf2i0uO0MPbDhd1jm238I+U/2ZnRENj0cktKZhtchBMtCUSRQ5v4xBCUbKNmyVMw==",
"path": "humanizer.core/2.14.1",
"hashPath": "humanizer.core.2.14.1.nupkg.sha512"
},
"Masuit.Tools.Abstractions/2.6.7.3": {
"type": "package",
"serviceable": true,
@ -748,6 +839,27 @@
"path": "microsoft.entityframeworkcore.analyzers/7.0.12",
"hashPath": "microsoft.entityframeworkcore.analyzers.7.0.12.nupkg.sha512"
},
"Microsoft.EntityFrameworkCore.Design/7.0.12": {
"type": "package",
"serviceable": true,
"sha512": "sha512-5UoOLj+qJGkEoL379wi1cSq1bBCCZQZRO5w/wE89ZakQT6qx8juAlJLg4fFwfrg0tYWP12iUAholwcuDM38s7g==",
"path": "microsoft.entityframeworkcore.design/7.0.12",
"hashPath": "microsoft.entityframeworkcore.design.7.0.12.nupkg.sha512"
},
"Microsoft.EntityFrameworkCore.Relational/7.0.12": {
"type": "package",
"serviceable": true,
"sha512": "sha512-apLzFyjM3s/voBiaMCJPwIOk5SxA1N6GmSbhqthfbUDn8mX+kxZl4RXNdaoBLzPKfUg4EoqCtt0YON/g9YXruQ==",
"path": "microsoft.entityframeworkcore.relational/7.0.12",
"hashPath": "microsoft.entityframeworkcore.relational.7.0.12.nupkg.sha512"
},
"Microsoft.EntityFrameworkCore.Tools/7.0.12": {
"type": "package",
"serviceable": true,
"sha512": "sha512-4ZW43BJzV5aY8rkrSxhej1xiiDr1dLfFl/MitpHn4a5QJpQqctJ0kl/MF1U3CAIKnkeC4RaC9ZjJjODDbHtdeQ==",
"path": "microsoft.entityframeworkcore.tools/7.0.12",
"hashPath": "microsoft.entityframeworkcore.tools.7.0.12.nupkg.sha512"
},
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {
"type": "package",
"serviceable": true,
@ -811,6 +923,13 @@
"path": "microsoft.extensions.dependencyinjection.abstractions/7.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.7.0.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyModel/7.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-oONNYd71J3LzkWc4fUHl3SvMfiQMYUCo/mDHDEu76hYYxdhdrPYv6fvGv9nnKVyhE9P0h20AU8RZB5OOWQcAXg==",
"path": "microsoft.extensions.dependencymodel/7.0.0",
"hashPath": "microsoft.extensions.dependencymodel.7.0.0.nupkg.sha512"
},
"Microsoft.Extensions.FileProviders.Abstractions/7.0.0": {
"type": "package",
"serviceable": true,
@ -888,6 +1007,20 @@
"path": "microsoft.win32.systemevents/7.0.0",
"hashPath": "microsoft.win32.systemevents.7.0.0.nupkg.sha512"
},
"Mono.TextTemplating/2.2.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KZYeKBET/2Z0gY1WlTAK7+RHTl7GSbtvTLDXEZZojUdAPqpQNDL6tHv7VUpqfX5VEOh+uRGKaZXkuD253nEOBQ==",
"path": "mono.texttemplating/2.2.1",
"hashPath": "mono.texttemplating.2.2.1.nupkg.sha512"
},
"MySqlConnector/2.2.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-6sinY78RvryhHwpup3awdjYO7d5hhWahb5p/1VDODJhSxJggV/sBbYuKK5IQF9TuzXABiddqUbmRfM884tqA3Q==",
"path": "mysqlconnector/2.2.5",
"hashPath": "mysqlconnector.2.2.5.nupkg.sha512"
},
"Newtonsoft.Json/13.0.3": {
"type": "package",
"serviceable": true,
@ -895,6 +1028,13 @@
"path": "newtonsoft.json/13.0.3",
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
},
"Pomelo.EntityFrameworkCore.MySql/7.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Qk5WB/skSZet5Yrz6AN2ywjZaB1pxfAmvQ+5I4khTkLwwIamI4QJoH2NphCWLFQL+2ar8HvsNCTmwYk0qhqL0w==",
"path": "pomelo.entityframeworkcore.mysql/7.0.0",
"hashPath": "pomelo.entityframeworkcore.mysql.7.0.0.nupkg.sha512"
},
"SharpCompress/0.34.1": {
"type": "package",
"serviceable": true,

@ -1,4 +1,7 @@
{
"ConnectionStrings": {
"MySqlConnection": "Server=127.0.0.1;Port=3306;Database=pvdemcs;Uid=root;Pwd=123456;"
},
"Logging": {
"LogLevel": {
"Default": "Information",

@ -1 +1 @@
807f65fd541e025686a40f2bc21bd39c18ac4ab5
cac9563343eeada6c9db9ada7736b4da688f6f98

@ -83,3 +83,10 @@ D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\runtimes\win\lib\net6.0\Syste
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\HslCommunication.dll
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\HslCommunication.xml
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\Autofac.Extensions.DependencyInjection.dll
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\Humanizer.dll
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\Microsoft.EntityFrameworkCore.Design.dll
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\Microsoft.EntityFrameworkCore.Relational.dll
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\Microsoft.Extensions.DependencyModel.dll
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\Mono.TextTemplating.dll
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\MySqlConnector.dll
D:\Source\PVDEMCS\PVDEMCS\PVDEMCS\bin\Debug\net6.0\Pomelo.EntityFrameworkCore.MySql.dll

@ -56,6 +56,16 @@
"target": "Package",
"version": "[7.0.12, )"
},
"Microsoft.EntityFrameworkCore.Tools": {
"include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
"suppressParent": "All",
"target": "Package",
"version": "[7.0.12, )"
},
"Pomelo.EntityFrameworkCore.MySql": {
"target": "Package",
"version": "[7.0.0, )"
},
"Swashbuckle.AspNetCore": {
"target": "Package",
"version": "[6.5.0, )"
@ -80,7 +90,7 @@
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.401\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.403\\RuntimeIdentifierGraph.json"
}
}
}

@ -16,8 +16,10 @@
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props')" />
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\6.5.0\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\6.5.0\build\Swashbuckle.AspNetCore.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.entityframeworkcore\7.0.12\buildTransitive\net6.0\Microsoft.EntityFrameworkCore.props" Condition="Exists('$(NuGetPackageRoot)microsoft.entityframeworkcore\7.0.12\buildTransitive\net6.0\Microsoft.EntityFrameworkCore.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.entityframeworkcore.design\7.0.12\build\net6.0\Microsoft.EntityFrameworkCore.Design.props" Condition="Exists('$(NuGetPackageRoot)microsoft.entityframeworkcore.design\7.0.12\build\net6.0\Microsoft.EntityFrameworkCore.Design.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\xiaog\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5</PkgMicrosoft_Extensions_ApiDescription_Server>
<PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\xiaog\.nuget\packages\microsoft.entityframeworkcore.tools\7.0.12</PkgMicrosoft_EntityFrameworkCore_Tools>
</PropertyGroup>
</Project>

@ -118,6 +118,19 @@
}
}
},
"Humanizer.Core/2.14.1": {
"type": "package",
"compile": {
"lib/net6.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Humanizer.dll": {
"related": ".xml"
}
}
},
"Masuit.Tools.Abstractions/2.6.7.3": {
"type": "package",
"dependencies": {
@ -216,6 +229,57 @@
"lib/netstandard2.0/_._": {}
}
},
"Microsoft.EntityFrameworkCore.Design/7.0.12": {
"type": "package",
"dependencies": {
"Humanizer.Core": "2.14.1",
"Microsoft.EntityFrameworkCore.Relational": "7.0.12",
"Microsoft.Extensions.DependencyModel": "7.0.0",
"Mono.TextTemplating": "2.2.1"
},
"compile": {
"lib/net6.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Microsoft.EntityFrameworkCore.Design.dll": {
"related": ".xml"
}
},
"build": {
"build/net6.0/Microsoft.EntityFrameworkCore.Design.props": {}
}
},
"Microsoft.EntityFrameworkCore.Relational/7.0.12": {
"type": "package",
"dependencies": {
"Microsoft.EntityFrameworkCore": "7.0.12",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
},
"compile": {
"lib/net6.0/Microsoft.EntityFrameworkCore.Relational.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Microsoft.EntityFrameworkCore.Relational.dll": {
"related": ".xml"
}
}
},
"Microsoft.EntityFrameworkCore.Tools/7.0.12": {
"type": "package",
"dependencies": {
"Microsoft.EntityFrameworkCore.Design": "7.0.12"
},
"compile": {
"lib/net6.0/_._": {}
},
"runtime": {
"lib/net6.0/_._": {}
}
},
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {
"type": "package",
"build": {
@ -389,6 +453,26 @@
"buildTransitive/net6.0/_._": {}
}
},
"Microsoft.Extensions.DependencyModel/7.0.0": {
"type": "package",
"dependencies": {
"System.Text.Encodings.Web": "7.0.0",
"System.Text.Json": "7.0.0"
},
"compile": {
"lib/net6.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Microsoft.Extensions.DependencyModel.dll": {
"related": ".xml"
}
},
"build": {
"buildTransitive/net6.0/_._": {}
}
},
"Microsoft.Extensions.FileProviders.Abstractions/7.0.0": {
"type": "package",
"dependencies": {
@ -589,6 +673,31 @@
}
}
},
"Mono.TextTemplating/2.2.1": {
"type": "package",
"dependencies": {
"System.CodeDom": "4.4.0"
},
"compile": {
"lib/netstandard2.0/_._": {}
},
"runtime": {
"lib/netstandard2.0/Mono.TextTemplating.dll": {}
}
},
"MySqlConnector/2.2.5": {
"type": "package",
"compile": {
"lib/net6.0/MySqlConnector.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/MySqlConnector.dll": {
"related": ".xml"
}
}
},
"Newtonsoft.Json/13.0.3": {
"type": "package",
"compile": {
@ -602,6 +711,23 @@
}
}
},
"Pomelo.EntityFrameworkCore.MySql/7.0.0": {
"type": "package",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.2",
"MySqlConnector": "2.2.5"
},
"compile": {
"lib/net6.0/Pomelo.EntityFrameworkCore.MySql.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Pomelo.EntityFrameworkCore.MySql.dll": {
"related": ".xml"
}
}
},
"SharpCompress/0.34.1": {
"type": "package",
"dependencies": {
@ -1266,6 +1392,24 @@
"lib/netstandard2.0/HtmlSanitizer.xml"
]
},
"Humanizer.Core/2.14.1": {
"sha512": "lQKvtaTDOXnoVJ20ibTuSIOf2i0uO0MPbDhd1jm238I+U/2ZnRENj0cktKZhtchBMtCUSRQ5v4xBCUbKNmyVMw==",
"type": "package",
"path": "humanizer.core/2.14.1",
"files": [
".nupkg.metadata",
".signature.p7s",
"humanizer.core.2.14.1.nupkg.sha512",
"humanizer.core.nuspec",
"lib/net6.0/Humanizer.dll",
"lib/net6.0/Humanizer.xml",
"lib/netstandard1.0/Humanizer.dll",
"lib/netstandard1.0/Humanizer.xml",
"lib/netstandard2.0/Humanizer.dll",
"lib/netstandard2.0/Humanizer.xml",
"logo.png"
]
},
"Masuit.Tools.Abstractions/2.6.7.3": {
"sha512": "XySzP6Nbl4tkbOAoR/KC9tKCnOYsrsgWQcHw5avlOKWrKrz7uk4n1VFZ7OkU/N57GDGE19jXR6cG1WaKlo5aHw==",
"type": "package",
@ -1424,6 +1568,60 @@
"microsoft.entityframeworkcore.analyzers.nuspec"
]
},
"Microsoft.EntityFrameworkCore.Design/7.0.12": {
"sha512": "5UoOLj+qJGkEoL379wi1cSq1bBCCZQZRO5w/wE89ZakQT6qx8juAlJLg4fFwfrg0tYWP12iUAholwcuDM38s7g==",
"type": "package",
"path": "microsoft.entityframeworkcore.design/7.0.12",
"files": [
".nupkg.metadata",
".signature.p7s",
"Icon.png",
"build/net6.0/Microsoft.EntityFrameworkCore.Design.props",
"lib/net6.0/Microsoft.EntityFrameworkCore.Design.dll",
"lib/net6.0/Microsoft.EntityFrameworkCore.Design.xml",
"microsoft.entityframeworkcore.design.7.0.12.nupkg.sha512",
"microsoft.entityframeworkcore.design.nuspec"
]
},
"Microsoft.EntityFrameworkCore.Relational/7.0.12": {
"sha512": "apLzFyjM3s/voBiaMCJPwIOk5SxA1N6GmSbhqthfbUDn8mX+kxZl4RXNdaoBLzPKfUg4EoqCtt0YON/g9YXruQ==",
"type": "package",
"path": "microsoft.entityframeworkcore.relational/7.0.12",
"files": [
".nupkg.metadata",
".signature.p7s",
"Icon.png",
"lib/net6.0/Microsoft.EntityFrameworkCore.Relational.dll",
"lib/net6.0/Microsoft.EntityFrameworkCore.Relational.xml",
"microsoft.entityframeworkcore.relational.7.0.12.nupkg.sha512",
"microsoft.entityframeworkcore.relational.nuspec"
]
},
"Microsoft.EntityFrameworkCore.Tools/7.0.12": {
"sha512": "4ZW43BJzV5aY8rkrSxhej1xiiDr1dLfFl/MitpHn4a5QJpQqctJ0kl/MF1U3CAIKnkeC4RaC9ZjJjODDbHtdeQ==",
"type": "package",
"path": "microsoft.entityframeworkcore.tools/7.0.12",
"hasTools": true,
"files": [
".nupkg.metadata",
".signature.p7s",
"Icon.png",
"lib/net6.0/_._",
"microsoft.entityframeworkcore.tools.7.0.12.nupkg.sha512",
"microsoft.entityframeworkcore.tools.nuspec",
"tools/EntityFrameworkCore.PS2.psd1",
"tools/EntityFrameworkCore.PS2.psm1",
"tools/EntityFrameworkCore.psd1",
"tools/EntityFrameworkCore.psm1",
"tools/about_EntityFrameworkCore.help.txt",
"tools/init.ps1",
"tools/net461/any/ef.exe",
"tools/net461/win-arm64/ef.exe",
"tools/net461/win-x86/ef.exe",
"tools/netcoreapp2.0/any/ef.dll",
"tools/netcoreapp2.0/any/ef.runtimeconfig.json"
]
},
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {
"sha512": "Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw==",
"type": "package",
@ -1877,6 +2075,34 @@
"useSharedDesignerContext.txt"
]
},
"Microsoft.Extensions.DependencyModel/7.0.0": {
"sha512": "oONNYd71J3LzkWc4fUHl3SvMfiQMYUCo/mDHDEu76hYYxdhdrPYv6fvGv9nnKVyhE9P0h20AU8RZB5OOWQcAXg==",
"type": "package",
"path": "microsoft.extensions.dependencymodel/7.0.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"Icon.png",
"LICENSE.TXT",
"README.md",
"THIRD-PARTY-NOTICES.TXT",
"buildTransitive/net461/Microsoft.Extensions.DependencyModel.targets",
"buildTransitive/net462/_._",
"buildTransitive/net6.0/_._",
"buildTransitive/netcoreapp2.0/Microsoft.Extensions.DependencyModel.targets",
"lib/net462/Microsoft.Extensions.DependencyModel.dll",
"lib/net462/Microsoft.Extensions.DependencyModel.xml",
"lib/net6.0/Microsoft.Extensions.DependencyModel.dll",
"lib/net6.0/Microsoft.Extensions.DependencyModel.xml",
"lib/net7.0/Microsoft.Extensions.DependencyModel.dll",
"lib/net7.0/Microsoft.Extensions.DependencyModel.xml",
"lib/netstandard2.0/Microsoft.Extensions.DependencyModel.dll",
"lib/netstandard2.0/Microsoft.Extensions.DependencyModel.xml",
"microsoft.extensions.dependencymodel.7.0.0.nupkg.sha512",
"microsoft.extensions.dependencymodel.nuspec",
"useSharedDesignerContext.txt"
]
},
"Microsoft.Extensions.FileProviders.Abstractions/7.0.0": {
"sha512": "NyawiW9ZT/liQb34k9YqBSNPLuuPkrjMgQZ24Y/xXX1RoiBkLUdPMaQTmxhZ5TYu8ZKZ9qayzil75JX95vGQUg==",
"type": "package",
@ -2223,6 +2449,46 @@
"useSharedDesignerContext.txt"
]
},
"Mono.TextTemplating/2.2.1": {
"sha512": "KZYeKBET/2Z0gY1WlTAK7+RHTl7GSbtvTLDXEZZojUdAPqpQNDL6tHv7VUpqfX5VEOh+uRGKaZXkuD253nEOBQ==",
"type": "package",
"path": "mono.texttemplating/2.2.1",
"files": [
".nupkg.metadata",
".signature.p7s",
"lib/net472/Mono.TextTemplating.dll",
"lib/netstandard2.0/Mono.TextTemplating.dll",
"mono.texttemplating.2.2.1.nupkg.sha512",
"mono.texttemplating.nuspec"
]
},
"MySqlConnector/2.2.5": {
"sha512": "6sinY78RvryhHwpup3awdjYO7d5hhWahb5p/1VDODJhSxJggV/sBbYuKK5IQF9TuzXABiddqUbmRfM884tqA3Q==",
"type": "package",
"path": "mysqlconnector/2.2.5",
"files": [
".nupkg.metadata",
".signature.p7s",
"README.md",
"lib/net461/MySqlConnector.dll",
"lib/net461/MySqlConnector.xml",
"lib/net471/MySqlConnector.dll",
"lib/net471/MySqlConnector.xml",
"lib/net6.0/MySqlConnector.dll",
"lib/net6.0/MySqlConnector.xml",
"lib/net7.0/MySqlConnector.dll",
"lib/net7.0/MySqlConnector.xml",
"lib/netcoreapp3.1/MySqlConnector.dll",
"lib/netcoreapp3.1/MySqlConnector.xml",
"lib/netstandard2.0/MySqlConnector.dll",
"lib/netstandard2.0/MySqlConnector.xml",
"lib/netstandard2.1/MySqlConnector.dll",
"lib/netstandard2.1/MySqlConnector.xml",
"logo.png",
"mysqlconnector.2.2.5.nupkg.sha512",
"mysqlconnector.nuspec"
]
},
"Newtonsoft.Json/13.0.3": {
"sha512": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
"type": "package",
@ -2253,6 +2519,23 @@
"packageIcon.png"
]
},
"Pomelo.EntityFrameworkCore.MySql/7.0.0": {
"sha512": "Qk5WB/skSZet5Yrz6AN2ywjZaB1pxfAmvQ+5I4khTkLwwIamI4QJoH2NphCWLFQL+2ar8HvsNCTmwYk0qhqL0w==",
"type": "package",
"path": "pomelo.entityframeworkcore.mysql/7.0.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"README.md",
"icon.png",
"lib/net6.0/Pomelo.EntityFrameworkCore.MySql.dll",
"lib/net6.0/Pomelo.EntityFrameworkCore.MySql.xml",
"lib/net7.0/Pomelo.EntityFrameworkCore.MySql.dll",
"lib/net7.0/Pomelo.EntityFrameworkCore.MySql.xml",
"pomelo.entityframeworkcore.mysql.7.0.0.nupkg.sha512",
"pomelo.entityframeworkcore.mysql.nuspec"
]
},
"SharpCompress/0.34.1": {
"sha512": "WttRM/J/ktUwM3hRPxRYux1AOT+TGLqab34ZNBGTZRChHtpkJXFGHJ/cZCyNOH0OqpCNDdOsHhzxOVYkx4WoGw==",
"type": "package",
@ -3109,6 +3392,8 @@
"Autofac.Extensions.DependencyInjection >= 8.0.0",
"Masuit.Tools.Core >= 2.6.7.3",
"Microsoft.EntityFrameworkCore >= 7.0.12",
"Microsoft.EntityFrameworkCore.Tools >= 7.0.12",
"Pomelo.EntityFrameworkCore.MySql >= 7.0.0",
"Swashbuckle.AspNetCore >= 6.5.0"
]
},
@ -3167,6 +3452,16 @@
"target": "Package",
"version": "[7.0.12, )"
},
"Microsoft.EntityFrameworkCore.Tools": {
"include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
"suppressParent": "All",
"target": "Package",
"version": "[7.0.12, )"
},
"Pomelo.EntityFrameworkCore.MySql": {
"target": "Package",
"version": "[7.0.0, )"
},
"Swashbuckle.AspNetCore": {
"target": "Package",
"version": "[6.5.0, )"
@ -3191,7 +3486,7 @@
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.401\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.403\\RuntimeIdentifierGraph.json"
}
}
},

@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "isYhD8nl1VKUhgS8TXHkuMb6+6nbA90q4QUNutzPkN4OpLMFKVjNoJu9yBOn5Q7VKuQuDH1Yu9aQqFI0fLPRTA==",
"dgSpecHash": "u+XZFKvOa5x5287c3setKwoFNwezabW5RpGt2lKpnZCgwlaBKZ6hVHjG9OxTgCm30QK8wC6uwBi3u1WQ2kYzTQ==",
"success": true,
"projectFilePath": "D:\\Source\\PVDEMCS\\PVDEMCS\\PVDEMCS\\PVDEMCS.csproj",
"expectedPackageFiles": [
@ -11,12 +11,16 @@
"C:\\Users\\xiaog\\.nuget\\packages\\castle.core\\5.1.1\\castle.core.5.1.1.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\dnsclient\\1.7.0\\dnsclient.1.7.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\htmlsanitizer\\8.0.723\\htmlsanitizer.8.0.723.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\humanizer.core\\2.14.1\\humanizer.core.2.14.1.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\masuit.tools.abstractions\\2.6.7.3\\masuit.tools.abstractions.2.6.7.3.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\masuit.tools.core\\2.6.7.3\\masuit.tools.core.2.6.7.3.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.entityframeworkcore\\7.0.12\\microsoft.entityframeworkcore.7.0.12.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\7.0.12\\microsoft.entityframeworkcore.abstractions.7.0.12.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\7.0.12\\microsoft.entityframeworkcore.analyzers.7.0.12.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.entityframeworkcore.design\\7.0.12\\microsoft.entityframeworkcore.design.7.0.12.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.entityframeworkcore.relational\\7.0.12\\microsoft.entityframeworkcore.relational.7.0.12.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.entityframeworkcore.tools\\7.0.12\\microsoft.entityframeworkcore.tools.7.0.12.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.apidescription.server\\6.0.5\\microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\7.0.0\\microsoft.extensions.caching.abstractions.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.caching.memory\\7.0.0\\microsoft.extensions.caching.memory.7.0.0.nupkg.sha512",
@ -26,6 +30,7 @@
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.configuration.json\\7.0.0\\microsoft.extensions.configuration.json.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\7.0.0\\microsoft.extensions.dependencyinjection.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\7.0.0\\microsoft.extensions.dependencyinjection.abstractions.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.dependencymodel\\7.0.0\\microsoft.extensions.dependencymodel.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\7.0.0\\microsoft.extensions.fileproviders.abstractions.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\7.0.0\\microsoft.extensions.fileproviders.physical.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\7.0.0\\microsoft.extensions.filesystemglobbing.7.0.0.nupkg.sha512",
@ -37,7 +42,10 @@
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.openapi\\1.2.3\\microsoft.openapi.1.2.3.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.win32.registry\\5.0.0\\microsoft.win32.registry.5.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\microsoft.win32.systemevents\\7.0.0\\microsoft.win32.systemevents.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\mono.texttemplating\\2.2.1\\mono.texttemplating.2.2.1.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\mysqlconnector\\2.2.5\\mysqlconnector.2.2.5.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\newtonsoft.json\\13.0.3\\newtonsoft.json.13.0.3.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\pomelo.entityframeworkcore.mysql\\7.0.0\\pomelo.entityframeworkcore.mysql.7.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\sharpcompress\\0.34.1\\sharpcompress.0.34.1.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\sixlabors.fonts\\2.0.0\\sixlabors.fonts.2.0.0.nupkg.sha512",
"C:\\Users\\xiaog\\.nuget\\packages\\sixlabors.imagesharp\\3.0.2\\sixlabors.imagesharp.3.0.2.nupkg.sha512",

Loading…
Cancel
Save