diff --git a/Admin.Bodk.Device/Entities/Dto/SupportDto.cs b/Admin.Bodk.Device/Entities/Dto/SupportDto.cs index c654d7b..faeac4a 100644 --- a/Admin.Bodk.Device/Entities/Dto/SupportDto.cs +++ b/Admin.Bodk.Device/Entities/Dto/SupportDto.cs @@ -27,6 +27,7 @@ public class SupportOutput public class CellOutput { + public string Code { get; set; } public string Activity { get; set; } public double Temperature { get; set; } public string Humidity { get; set; } diff --git a/Admin.Bodk.Device/Services/DeviceService.cs b/Admin.Bodk.Device/Services/DeviceService.cs index db6488e..629191c 100644 --- a/Admin.Bodk.Device/Services/DeviceService.cs +++ b/Admin.Bodk.Device/Services/DeviceService.cs @@ -7,6 +7,8 @@ using Furion.DependencyInjection; using Furion.DynamicApiController; using Furion.FriendlyException; using Mapster; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using NewLife.Caching; using SqlSugar; @@ -40,6 +42,8 @@ public class DeviceService : IDynamicApiController, ITransient /// /// [DisplayName("获取设备列表")] + + [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] public async Task> PostList(DeviceInpt input) { return await _repository.AsQueryable() diff --git a/Admin.Bodk.Device/Services/SupportService.cs b/Admin.Bodk.Device/Services/SupportService.cs index 4608126..b1ece11 100644 --- a/Admin.Bodk.Device/Services/SupportService.cs +++ b/Admin.Bodk.Device/Services/SupportService.cs @@ -1,4 +1,3 @@ - using System.ComponentModel; using Admin.Bodk.Device.Entities.Dto; using Admin.Bodk.Device.Entities.equipment; @@ -11,61 +10,75 @@ using Mapster; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using NewLife.Caching; using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; namespace Admin.Bodk.Device.Services; + /// /// 服务管理 /// [ApiDescriptionSettings(Order = 2)] -public class SupportService: IDynamicApiController, ITransient +public class SupportService : IDynamicApiController, ITransient { private readonly SqlSugarRepository _baseRep; private readonly SqlSugarRepository _supportRep; - public SupportService(SqlSugarRepository baseRep, SqlSugarRepository supportRep) + private readonly ICache _cache; + + public SupportService(SqlSugarRepository baseRep, SqlSugarRepository supportRep, + ICache cache) { _baseRep = baseRep; _supportRep = supportRep; + _cache = cache; } - + /// /// 获取检测信息列表 /// /// /// [DisplayName("获取检测信息列表")] - [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] + [Authorize(AuthenticationSchemes = + JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] public async Task> PostGetDetectionList(BaseInput input) { List items = new List(); - items.Add( new SupportOutput() {State="检测中",Name = "检测1",DetectionServiceId = "dd123323",DetectionServiceType=0}); - items.Add( new SupportOutput() {State="已完成",Name = "检测2",DetectionServiceId = "dd1233213",DetectionServiceType=1}); - items.Add( new SupportOutput() {State="已完成",Name = "检测3",DetectionServiceId = "dd1233213",DetectionServiceType=1}); + items.Add(new SupportOutput() + { State = "检测中", Name = "检测1", DetectionServiceId = "dd123323", DetectionServiceType = 0 }); + items.Add(new SupportOutput() + { State = "已完成", Name = "检测2", DetectionServiceId = "dd1233213", DetectionServiceType = 1 }); + items.Add(new SupportOutput() + { State = "已完成", Name = "检测3", DetectionServiceId = "dd1233213", DetectionServiceType = 1 }); return new SqlSugarPagedList() { Page = 1, PageSize = 20, Items = items, Total = 3 }; } - + /// /// 获取细胞服务列表 /// /// /// [DisplayName("获取细胞服务列表")] - [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] + [Authorize(AuthenticationSchemes = + JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] public async Task> PostGetCellList(BaseInput input) { List items = new List(); - items.Add( new CellOutput() {Activity="51%",Temperature = -192.5, Humidity = "12.1%", - Density="20个/ml", Capacity="200ml", Type= 1, Location="松山湖",LastOperationTime=null, - DeviceInfo=new DeviceInfo() + var cache = _cache.Get("bodk:device:M9hjashdfkj863478236478:summary"); + items.Add(new CellOutput() + { + Code = "BT00D0015314A", Activity = "98%", Temperature = -192.5, Humidity = "0.5%", + Density = "1*10^7个/ml", Capacity = "1.8ml", Type = 1, Location = "松山湖", LastOperationTime = null, + DeviceInfo = new DeviceInfo() { - DeviceId=23223232,PicUrl="",LiquidNitrogenHeight=302,Temperature=-195.2, - Humidity="10%",Address="广东省东莞市科技二路与科技一路交叉口西北角宏远·新智汇1栋", - Name="M9_01",CellBaseInfo=new CellBaseInfo(){BaseName="松山湖",BaseId=13545} + DeviceId = 23223232, PicUrl = "", LiquidNitrogenHeight = cache?.LiquidHeight, Temperature = cache?.TankTopTemperature, + Humidity = $"{cache?.CavityHumidity.ToString("0.0")}%", Address = "广东省东莞市松山湖园区科技二路宏远新智汇1栋", + Name = "M9_01", CellBaseInfo = new CellBaseInfo() { BaseName = "松山湖", BaseId = 13545 } } }); return new SqlSugarPagedList() { Page = 1, PageSize = 20, Items = items, Total = 3 }; } - + /// /// 增加服务 /// @@ -76,7 +89,7 @@ public class SupportService: IDynamicApiController, ITransient [DisplayName("增加服务")] public async Task AddSupport(SupportAddInput input) { - if(input is null) throw Oops.Oh("参数不能为空"); + if (input is null) throw Oops.Oh("参数不能为空"); var equipment = input.Adapt(); var newEquipment = await _supportRep.AsInsertable(equipment).ExecuteReturnEntityAsync(); // if (input?.TaskChainList is { Count: > 0 }) diff --git a/Admin.NET.Bodk.Cells/Admin.NET.Bodk.Cells.csproj b/Admin.NET.Bodk.Cells/Admin.NET.Bodk.Cells.csproj new file mode 100644 index 0000000..619669c --- /dev/null +++ b/Admin.NET.Bodk.Cells/Admin.NET.Bodk.Cells.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + enable + enable + + + + + + + diff --git a/Admin.NET.Bodk.Cells/CellService.cs b/Admin.NET.Bodk.Cells/CellService.cs new file mode 100644 index 0000000..c4b38d6 --- /dev/null +++ b/Admin.NET.Bodk.Cells/CellService.cs @@ -0,0 +1,117 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using System.ComponentModel; +using Admin.NET.Bodk.Cells.Entities; +using Admin.NET.Bodk.Cells.Models; +using Admin.NET.Core; +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using Furion.DynamicApiController; +using Microsoft.AspNetCore.Mvc; + +namespace Admin.NET.Bodk.Cells; + +[ApiDescriptionSettings(Groups = new[] { "Bodk Groups" }, Name = "Cell", Description = "细胞服务")] +public class CellService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _repository; + + private readonly UserManager _userManager; + + public CellService(SqlSugarRepository repository, UserManager userManager) + { + _repository = repository; + _userManager = userManager; + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + [DisplayName("GetList")] + public async Task> GetList(CellQueryInput queryInput) + { + return await _repository.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(queryInput.BoxBarCode), + m => queryInput.BoxBarCode != null && m.BoxBarCode.Contains(queryInput.BoxBarCode)) + .WhereIF(!string.IsNullOrWhiteSpace(queryInput.TubeBarcode), + m => queryInput.TubeBarcode != null && m.BoxBarCode.Contains(queryInput.TubeBarcode)) + .WhereIF(queryInput.CustomerId is not null, m => m.CustomerId == queryInput.CustomerId) + .WhereIF(queryInput.DeviceId is not null, m => m.DeviceId == queryInput.DeviceId) + .WhereIF(queryInput.CellType is not null, m => m.CellType == queryInput.CellType) + .Where(m => _userManager.OrgId == m.OrgId) + .Select((u) => new Models.Cell() + { + Id = u.Id, + TubeBarcode = u.TubeBarcode, + BoxBarCode = u.BoxBarCode, + CellType = u.CellType, + CustomerId = u.CustomerId, + DeviceId = u.DeviceId, + Circle = u.Circle, + Column = u.Column, + Layer = u.Layer, + DepositTime = u.DepositTime, + ExpirationTime = u.ExpirationTime, + Activity = u.Activity, + Density = u.Density, + Capacity = u.Capacity + }) + .ToPagedListAsync(queryInput.Page, queryInput.PageSize); + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + [DisplayName("Add")] + public async Task AddCell(CellInput input) + { + return await _repository.InsertReturnBigIdentityAsync(new CellEntity() + { + TubeBarcode = input.TubeBarcode, + BoxBarCode = input.BoxBarCode, + CellType = input.CellType, + CustomerId = input.CustomerId, + DeviceId = input.DeviceId, + Circle = input.Circle, + Column = input.Column, + Layer = input.Layer, + DepositTime = input.DepositTime, + ExpirationTime = input.ExpirationTime, + Activity = input.Activity, + Density = input.Density, + Capacity = input.Capacity + }); + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + [DisplayName("Update")] + public async Task UpdateCell(CellInput input) + { + await _repository.UpdateAsync(new CellEntity() + { + Id = input.Id, + TubeBarcode = input.TubeBarcode, + BoxBarCode = input.BoxBarCode, + CellType = input.CellType, + CustomerId = input.CustomerId, + DeviceId = input.DeviceId, + Circle = input.Circle, + Column = input.Column, + Layer = input.Layer, + DepositTime = input.DepositTime, + ExpirationTime = input.ExpirationTime, + Activity = input.Activity, + Density = input.Density, + Capacity = input.Capacity + }); + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + [DisplayName("Delete")] + public async Task DeleteCell(long? id) + { + await _repository.DeleteByIdAsync(id); + } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Cells/Entities/CellEntity.cs b/Admin.NET.Bodk.Cells/Entities/CellEntity.cs new file mode 100644 index 0000000..2f84e0e --- /dev/null +++ b/Admin.NET.Bodk.Cells/Entities/CellEntity.cs @@ -0,0 +1,46 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Core; +using SqlSugar; + +namespace Admin.NET.Bodk.Cells.Entities; + +[SugarTable("bodk_cell")] +public class CellEntity : EntityBase +{ + public long CustomerId { get; set; } + + public CellType CellType { get; set; } + + public long DeviceId { get; set; } + + public int Circle { get; set; } + + public int Column { get; set; } + + public int Layer { get; set; } + + public string BoxBarCode { get; set; } + + public string TubeBarcode { get; set; } + + public DateTime DepositTime { get; set; } + + public DateTime ExpirationTime { get; set; } + + public float Activity { get; set; } + + public string Density { get; set; } + + public float Capacity { get; set; } + + public long OrgId { get; set; } +} + +public enum CellType +{ + Immune, + Stem +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Cells/Models/Cell.cs b/Admin.NET.Bodk.Cells/Models/Cell.cs new file mode 100644 index 0000000..d21bd20 --- /dev/null +++ b/Admin.NET.Bodk.Cells/Models/Cell.cs @@ -0,0 +1,80 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Bodk.Cells.Entities; +using Admin.NET.Core; + +namespace Admin.NET.Bodk.Cells.Models; + +public class CellQueryInput : BasePageInput +{ + public long? CustomerId { get; set; } + + public CellType? CellType { get; set; } + + public long? DeviceId { get; set; } + + public string? BoxBarCode { get; set; } + + public string? TubeBarcode { get; set; } +} + +public class CellInput : BaseIdInput +{ + public long CustomerId { get; set; } + + public CellType CellType { get; set; } + + public long DeviceId { get; set; } + + public int Circle { get; set; } + + public int Column { get; set; } + + public int Layer { get; set; } + + public string BoxBarCode { get; set; } + + public string TubeBarcode { get; set; } + + public DateTime DepositTime { get; set; } + + public DateTime ExpirationTime { get; set; } + + public float Activity { get; set; } + + public string Density { get; set; } + + public float Capacity { get; set; } +} + +public class Cell +{ + public long Id { get; set; } + public long CustomerId { get; set; } + + public CellType CellType { get; set; } + + public long DeviceId { get; set; } + + public int Circle { get; set; } + + public int Column { get; set; } + + public int Layer { get; set; } + + public string BoxBarCode { get; set; } + + public string TubeBarcode { get; set; } + + public DateTime DepositTime { get; set; } + + public DateTime ExpirationTime { get; set; } + + public float Activity { get; set; } + + public string Density { get; set; } + + public float Capacity { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Core/Admin.NET.Bodk.Core.csproj b/Admin.NET.Bodk.Core/Admin.NET.Bodk.Core.csproj index 619669c..1ca29dd 100644 --- a/Admin.NET.Bodk.Core/Admin.NET.Bodk.Core.csproj +++ b/Admin.NET.Bodk.Core/Admin.NET.Bodk.Core.csproj @@ -10,4 +10,8 @@ + + + + diff --git a/Admin.NET.Bodk.Core/Devices/IDevice.cs b/Admin.NET.Bodk.Core/Devices/IDevice.cs deleted file mode 100644 index d039a28..0000000 --- a/Admin.NET.Bodk.Core/Devices/IDevice.cs +++ /dev/null @@ -1,19 +0,0 @@ -// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 -// -// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 - -namespace Admin.NET.Bodk.Core.Devices; - -public interface IDevice -{ - long? Id { get; } - DeviceType Type { get; } - - string SerialNumber { get; } - - object Summary { get; } - - public long? ProjectId { get; } - - string Name { get; } -} \ No newline at end of file diff --git a/Admin.NET.Bodk.Core/Devices/DeviceType.cs b/Admin.NET.Bodk.Core/Entities/OrgEntityBase.cs similarity index 55% rename from Admin.NET.Bodk.Core/Devices/DeviceType.cs rename to Admin.NET.Bodk.Core/Entities/OrgEntityBase.cs index 5fb61c7..9b74ceb 100644 --- a/Admin.NET.Bodk.Core/Devices/DeviceType.cs +++ b/Admin.NET.Bodk.Core/Entities/OrgEntityBase.cs @@ -2,9 +2,11 @@ // // 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 -namespace Admin.NET.Bodk.Core.Devices; +using Admin.NET.Core; -public enum DeviceType +namespace Admin.NET.Bodk.Core.Entities; + +public abstract class OrgEntityBase : EntityBase { - M9 = 1, + public long OrgId { get; set; } } \ No newline at end of file diff --git a/Admin.NET.Bodk.Core/ServiceBase.cs b/Admin.NET.Bodk.Core/ServiceBase.cs new file mode 100644 index 0000000..9dfd09a --- /dev/null +++ b/Admin.NET.Bodk.Core/ServiceBase.cs @@ -0,0 +1,69 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Bodk.Core.Entities; +using Admin.NET.Core; +using Admin.NET.Core.Service; +using Furion.DynamicApiController; +using SqlSugar; + +namespace Admin.NET.Bodk.Core; + +public abstract class ServiceBase(UserManager userManager, SysOrgService sysOrgService, SysUserService sysUserService) + : IDynamicApiController +{ + protected readonly UserManager UserManager = userManager; + + protected readonly SysOrgService SysOrgService = sysOrgService; + + protected async Task> GetDataOutOfOrg(ISugarQueryable queryable, long orgId = 0) + where T : OrgEntityBase + { + var userOrgIdList = await SysOrgService.GetUserOrgIdList(); + List? orgList; + if (orgId > 0) // 指定机构查询时 + { + orgList = await SysOrgService.GetChildIdListWithSelfById(orgId); + orgList = UserManager.SuperAdmin ? orgList : orgList.Where(u => userOrgIdList.Contains(u)).ToList(); + } + else // 各管理员只能看到自己机构下的用户列表 + { + orgList = UserManager.SuperAdmin ? null : userOrgIdList; + } + + return queryable.WhereIF(orgList != null, u => orgList != null && orgList.Contains(u.OrgId)); + } + + //新增前置步骤 + protected async Task AddBefore(T entity) where T : EntityBase + { + var user = await sysUserService.GetBaseInfo(); + entity.CreateUser = user; + entity.CreateTime = DateTime.Now; + entity.CreateUserName = user.NickName; + entity.CreateUserId = user.Id; + return entity; + } + + protected async Task AddOrgBefore(T entity) where T : OrgEntityBase + { + var user = await sysUserService.GetBaseInfo(); + entity.CreateUser = user; + entity.CreateTime = DateTime.Now; + entity.CreateUserName = user.NickName; + entity.CreateUserId = user.Id; + entity.OrgId = UserManager.OrgId; + return entity; + } + + protected async Task UpdateBefore(T entity) where T : EntityBase + { + var user = await sysUserService.GetBaseInfo(); + entity.UpdateUser = user; + entity.UpdateTime = DateTime.Now; + entity.UpdateUserName = user.NickName; + entity.UpdateUserId = user.Id; + return entity; + } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Customer/Admin.NET.Bodk.Customer.csproj b/Admin.NET.Bodk.Customer/Admin.NET.Bodk.Customer.csproj index 619669c..802c845 100644 --- a/Admin.NET.Bodk.Customer/Admin.NET.Bodk.Customer.csproj +++ b/Admin.NET.Bodk.Customer/Admin.NET.Bodk.Customer.csproj @@ -7,6 +7,7 @@ + diff --git a/Admin.NET.Bodk.Customer/CustomerService.cs b/Admin.NET.Bodk.Customer/CustomerService.cs index 0fbab2a..29bace9 100644 --- a/Admin.NET.Bodk.Customer/CustomerService.cs +++ b/Admin.NET.Bodk.Customer/CustomerService.cs @@ -2,14 +2,125 @@ // // 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 +using System.ComponentModel; +using Admin.NET.Bodk.Core; +using Admin.NET.Bodk.Customer.Entities; +using Admin.NET.Bodk.Customer.Models; +using Admin.NET.Core; +using Admin.NET.Core.Service; +using Furion.DatabaseAccessor; using Furion.DependencyInjection; -using Furion.DynamicApiController; +using Mapster; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace Admin.NET.Bodk.Customer; -[ApiDescriptionSettings(GroupName = "Bodk Groups",Description = "客户接口服务")] -public class CustomerService: IDynamicApiController, ITransient +[ApiDescriptionSettings(Groups = new[] { "Bodk Groups" }, Name = "Customer", Description = "客户接口服务")] +public class CustomerService( + UserManager userManager, + SysOrgService sysOrgService, + SysUserService sysUserService, + SqlSugarRepository repository) : ServiceBase(userManager, sysOrgService, sysUserService) { - + /// + /// 获取客户信息 + /// + /// + /// + [UnitOfWork] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + [DisplayName("GetList")] + [Authorize(AuthenticationSchemes = + JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] + public async Task> GetList(QueryCustomerInput input) + { + var queryable = repository.AsQueryable(); + var userOrgIdList = await SysOrgService.GetUserOrgIdList(); + List? orgList; + + orgList = UserManager.SuperAdmin ? null : userOrgIdList; + // queryable = queryable + // .Includes(u => u.OrgIds) + // .WhereIF(orgList != null, + // u => orgList != null && u.OrgIds != null && u.OrgIds.Intersect(orgList).Any()); + return await queryable + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), + m => input.Name != null && m.Name.Contains(input.Name)) + .WhereIF(input.Id is not null, u => u.Id == input.Id) + .WhereIF(input.Phone is not null, m => m.Phone == input.Phone) + .WhereIF(!string.IsNullOrWhiteSpace(input.IdCard), + m => input.IdCard != null && m.IdCard.Contains(input.IdCard)) + .Mapper(u => + { + Console.WriteLine(u.IsMale); + }) + .Select(u => new Models.Customer() + { + Id = u.Id, + Name = u.Name, + Phone = u.Phone, + IdCard = u.IdCard, + CreateTime = u.CreateTime, + UpdateTime = u.UpdateTime, + CreateUserName = u.CreateUserName, + OrgIds = u.OrgIds, + IsMale = u.IsMale, + IsDelete = u.IsDelete, + CreateUserId = u.CreateUserId, + UpdateUserId = u.UpdateUserId, + UpdateUserName = u.UpdateUserName + }) + .ToPagedListAsync(input.Page, input.PageSize); + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + [DisplayName("Add")] + [Authorize(AuthenticationSchemes = + JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] + public async Task AddCustomer(AddCustomerInput input) + { + var entity = new CustomerEntity() + { + IdCard = input.IdCard, + Name = input.Name, + Phone = input.Phone, + IsMale = input.IsMale, + ImageUrl = input.ImageUrl, + VoiceUrl = input.VoiceUrl, + }; + entity = await AddBefore(entity); + return await repository.InsertReturnSnowflakeIdAsync(entity); + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + [DisplayName("Update")] + [Authorize(AuthenticationSchemes = + JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] + public async Task UpdateCustomer(UpdateCustomerInput input) + { + var entity = new CustomerEntity() + { + Id = input.Id, + IdCard = input.IdCard, + Name = input.Name, + Phone = input.Phone, + IsMale = input.IsMale, + ImageUrl = input.ImageUrl, + VoiceUrl = input.VoiceUrl + }; + entity = await UpdateBefore(entity); + var result= await repository.UpdateAsync(entity); + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + [DisplayName("Delete")] + public async Task DeleteCustomer(long? id) + { + await repository.DeleteByIdAsync(id); + } } \ No newline at end of file diff --git a/Admin.NET.Bodk.Customer/Entities/CustomerEntity.cs b/Admin.NET.Bodk.Customer/Entities/CustomerEntity.cs index 11b2513..4f812df 100644 --- a/Admin.NET.Bodk.Customer/Entities/CustomerEntity.cs +++ b/Admin.NET.Bodk.Customer/Entities/CustomerEntity.cs @@ -4,9 +4,11 @@ using Admin.NET.Core; using Nest; +using SqlSugar; namespace Admin.NET.Bodk.Customer.Entities; +[SugarTable("bodk_base_customer")] public class CustomerEntity : EntityBase, IRepositorySettings { public string Name { get; set; } @@ -16,4 +18,11 @@ public class CustomerEntity : EntityBase, IRepositorySettings public string Phone { get; set; } public bool IsMale { get; set; } + + [SugarColumn(IsJson = true, ColumnDataType = "TEXT", IsNullable = true)] + public List? OrgIds { get; set; } + + [SugarColumn(IsNullable = true)] public string? ImageUrl { get; set; } + + [SugarColumn(IsNullable = true)] public string? VoiceUrl { get; set; } } \ No newline at end of file diff --git a/Admin.NET.Bodk.Customer/Models/Customer.cs b/Admin.NET.Bodk.Customer/Models/Customer.cs new file mode 100644 index 0000000..79c419b --- /dev/null +++ b/Admin.NET.Bodk.Customer/Models/Customer.cs @@ -0,0 +1,56 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using System.ComponentModel.DataAnnotations; +using Admin.NET.Bodk.Customer.Entities; +using Admin.NET.Core; + +namespace Admin.NET.Bodk.Customer.Models; + +public class QueryCustomerInput : BasePageInput +{ + public long? Id { get; set; } + public string? Name { get; set; } + + public string? IdCard { get; set; } + + public string? Phone { get; set; } +} + +public class AddCustomerInput +{ + [Required(ErrorMessage = "客户姓名不能为空")] public string Name { get; set; } + + [Required(ErrorMessage = "客户身份证号不能为空")] + public string IdCard { get; set; } + + [Required(ErrorMessage = "客户手机号码不能为空")] + public string Phone { get; set; } + + [Required(ErrorMessage = "客户性别不能为空")] public bool IsMale { get; set; } + + public string? ImageUrl { get; set; } + + public string? VoiceUrl { get; set; } +} + +public class UpdateCustomerInput : BaseIdInput +{ + public string Name { get; set; } + + public string IdCard { get; set; } + + public string Phone { get; set; } + + public bool IsMale { get; set; } + + public string? ImageUrl { get; set; } + + public string? VoiceUrl { get; set; } +} + +public class Customer : CustomerEntity +{ + public new List? OrgIds = null; +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Device/Admin.NET.Bodk.Device.csproj b/Admin.NET.Bodk.Device/Admin.NET.Bodk.Device.csproj index b2772ff..7eb4e87 100644 --- a/Admin.NET.Bodk.Device/Admin.NET.Bodk.Device.csproj +++ b/Admin.NET.Bodk.Device/Admin.NET.Bodk.Device.csproj @@ -7,6 +7,7 @@ + diff --git a/Admin.NET.Bodk.Device/Controllers/DeviceController.cs b/Admin.NET.Bodk.Device/Controllers/DeviceController.cs index a5f3881..f0f703a 100644 --- a/Admin.NET.Bodk.Device/Controllers/DeviceController.cs +++ b/Admin.NET.Bodk.Device/Controllers/DeviceController.cs @@ -14,7 +14,7 @@ using NewLife.Caching; namespace Admin.NET.Bodk.Device.Controllers; -[ApiDescriptionSettings(Groups = new[] { "Bodk Groups" },Name = "DeviceController",Description = "设备接口服务")] +[ApiDescriptionSettings(Groups = new[] { "Bodk Groups" },Name = "DeviceOld",Description = "设备接口服务")] public class DeviceController : IDynamicApiController, ITransient { private readonly ICache _cache; diff --git a/Admin.NET.Bodk.Device/Controllers/Dto/DeviceDto.cs b/Admin.NET.Bodk.Device/Controllers/Dto/DeviceDto.cs index 9a45ded..b140c26 100644 --- a/Admin.NET.Bodk.Device/Controllers/Dto/DeviceDto.cs +++ b/Admin.NET.Bodk.Device/Controllers/Dto/DeviceDto.cs @@ -13,6 +13,6 @@ public class DeviceInput public string Name { get; set; } - public DeviceType DeviceType { get; set; } + public DeviceTypes DeviceType { get; set; } public object? Summary { get; set; } } \ No newline at end of file diff --git a/Admin.NET.Bodk.Device/DeviceService.cs b/Admin.NET.Bodk.Device/DeviceService.cs new file mode 100644 index 0000000..559cf18 --- /dev/null +++ b/Admin.NET.Bodk.Device/DeviceService.cs @@ -0,0 +1,79 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using System.ComponentModel; +using Admin.NET.Bodk.Core; +using Admin.NET.Bodk.Device.Entities; +using Admin.NET.Bodk.Device.Models; +using Admin.NET.Core; +using Admin.NET.Core.Service; +using Furion.DependencyInjection; +using Furion.FriendlyException; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using NewLife.Caching; + +namespace Admin.NET.Bodk.Device; + +[ApiDescriptionSettings(Groups = new[] { "Bodk Groups" }, Name = "Device", Description = "设备服务")] +public class DeviceService( + UserManager userManager, + SysOrgService sysOrgService, + SysUserService sysUserService, + SqlSugarRepository repository, + ICache cache) + : ServiceBase(userManager, sysOrgService, sysUserService), ITransient +{ + [ApiDescriptionSettings(Name = "Page"), HttpPost] + [DisplayName("获取设备分页列表")] + public async Task> Page(DeviceQueryInput queryInput) + { + var queryable = await GetDataOutOfOrg(repository.AsQueryable()); + return await queryable.WhereIF(!string.IsNullOrWhiteSpace(queryInput.SerialNumber), + u => queryInput.SerialNumber != null && u.SerialNumber.Contains(queryInput.SerialNumber)) + .WhereIF(!string.IsNullOrWhiteSpace(queryInput.Name), + u => queryInput.Name != null && u.Name.Contains(queryInput.Name)) + .WhereIF(!string.IsNullOrWhiteSpace(queryInput.Name), + u => queryInput.Name != null && u.Name.Contains(queryInput.Name)) + .WhereIF(queryInput.Id is not null, u => u.Id == queryInput.Id) + .WhereIF(queryInput.DeviceType is not null, u => u.DeviceType == queryInput.DeviceType) + .Select(u => u.Adapt()) + .Mapper(u => u.Online = cache.Get($"bodk:device:{u.SerialNumber}:summary:online")) + .WhereIF(queryInput.Online is not null, u => u.Online == queryInput.Online) + .ToPagedListAsync(queryInput.Page, queryInput.PageSize); + } + + [ApiDescriptionSettings(Name = "Add"), HttpPost] + [DisplayName("新增设备")] + public async Task AddDevice(AddDeviceInput input) + { + var isExist = await repository.AsQueryable().AnyAsync(u => u.SerialNumber == input.SerialNumber); + if (isExist) throw Oops.Oh(ErrorCodeEnum.Device1000); + var entity = input.Adapt(); + entity.OrgId = UserManager.OrgId; + return await repository.InsertReturnBigIdentityAsync(entity); + } + + [ApiDescriptionSettings(Name = "Update"), HttpPost] + [DisplayName("更新设备")] + public async Task UpdateDevice(UpdateDeviceInput input) + { + var isExist = await repository.AsQueryable().AnyAsync(u => u.Id == input.Id); + if (!isExist) throw Oops.Oh("要更新的设备不存在"); + var entity = await repository.GetByIdAsync(input.Id); + entity.DeviceType = input.DeviceType ?? entity.DeviceType; + entity.Name = input.Name ?? entity.Name; + entity.OrgId = input.OrgId ?? entity.OrgId; + await repository.UpdateAsync(entity); + } + + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + [DisplayName("删除设备")] + public async Task DeleteDevice(long id) + { + var isExist = await repository.AsQueryable().AnyAsync(u => u.Id == id); + if (!isExist) throw Oops.Oh("要删除的设备不存在"); + await repository.DeleteByIdAsync(id); + } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Device/Devices/DeviceType.cs b/Admin.NET.Bodk.Device/Devices/DeviceType.cs index 8bed4bb..6eac6b8 100644 --- a/Admin.NET.Bodk.Device/Devices/DeviceType.cs +++ b/Admin.NET.Bodk.Device/Devices/DeviceType.cs @@ -4,7 +4,7 @@ namespace Admin.NET.Bodk.Device.Devices; -public enum DeviceType +public enum DeviceTypes { M9 = 1 } \ No newline at end of file diff --git a/Admin.NET.Bodk.Device/Entities/DeviceEntity.cs b/Admin.NET.Bodk.Device/Entities/DeviceEntity.cs new file mode 100644 index 0000000..b257b0c --- /dev/null +++ b/Admin.NET.Bodk.Device/Entities/DeviceEntity.cs @@ -0,0 +1,36 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Bodk.Core.Entities; +using Admin.NET.Core; +using SqlSugar; + +namespace Admin.NET.Bodk.Device.Entities; + +[SugarTable("bodk_device")] +public class DeviceEntity : OrgEntityBase +{ + + public DeviceType DeviceType { get; set; } + + public string SerialNumber { get; set; } + + public string Name { get; set; } + +} + +public enum DeviceType +{ + M9 = 1, + Agv = 2, + + //离心机 + Lidar = 3, + + //培养箱 + Plate = 4, + + //工业机器人 + Robot = 5, +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Device/Models/Device.cs b/Admin.NET.Bodk.Device/Models/Device.cs new file mode 100644 index 0000000..1782e37 --- /dev/null +++ b/Admin.NET.Bodk.Device/Models/Device.cs @@ -0,0 +1,43 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using System.ComponentModel.DataAnnotations; +using Admin.NET.Bodk.Device.Entities; +using Admin.NET.Core; + +namespace Admin.NET.Bodk.Device.Models; + +public class DeviceQueryInput : BasePageInput +{ + public long? Id { get; set; } + + public string? SerialNumber { get; set; } + + public DeviceType? DeviceType { get; set; } + + public string? Name { get; set; } + + public bool? Online { get; set; } +} + +public class AddDeviceInput : DeviceEntity +{ +} + +public class UpdateDeviceInput +{ + [Required(ErrorMessage = "更新时,设备Id不能为空")] + public long Id { get; set; } + + public long? OrgId { get; set; } + + public string? Name { get; set; } + + public DeviceType? DeviceType { get; set; } +} + +public class DeviceOutput : DeviceEntity +{ + public bool Online { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Genetic/Admin.NET.Bodk.Genetic.csproj b/Admin.NET.Bodk.Genetic/Admin.NET.Bodk.Genetic.csproj index 619669c..e255044 100644 --- a/Admin.NET.Bodk.Genetic/Admin.NET.Bodk.Genetic.csproj +++ b/Admin.NET.Bodk.Genetic/Admin.NET.Bodk.Genetic.csproj @@ -7,6 +7,7 @@ + diff --git a/Admin.NET.Bodk.Genetic/Entities/GeneticItemTestResultEntity.cs b/Admin.NET.Bodk.Genetic/Entities/GeneticItemTestResultEntity.cs new file mode 100644 index 0000000..d69a250 --- /dev/null +++ b/Admin.NET.Bodk.Genetic/Entities/GeneticItemTestResultEntity.cs @@ -0,0 +1,27 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Core; +using SqlSugar; + +namespace Admin.NET.Bodk.Genetic.Entities; + +[SugarTable("bodk_genetic_item_test_result")] +public class GeneticItemTestResultEntity : EntityBase +{ + public long GeneticTestResultId { get; set; } + + public string Name { get; set; } + + public float Growth { get; set; } + + public float AverageRiskScore { get; set; } + + public float RiskScore { get; set; } + + public int RiskLevel { get; set; } + + [SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "TEXT")] + public List? Genetics { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Genetic/Entities/GeneticTestResultEntity.cs b/Admin.NET.Bodk.Genetic/Entities/GeneticTestResultEntity.cs index e7d14ae..af9c8b9 100644 --- a/Admin.NET.Bodk.Genetic/Entities/GeneticTestResultEntity.cs +++ b/Admin.NET.Bodk.Genetic/Entities/GeneticTestResultEntity.cs @@ -2,9 +2,42 @@ // // 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 +using Admin.NET.Core; +using SqlSugar; + namespace Admin.NET.Bodk.Genetic.Entities; -public class GeneticTestResultEntity +[SugarTable("bodk_genetic_test_result")] +public class GeneticTestResultEntity : EntityBase +{ + public long CustomerId { get; set; } + + public string Code { get; set; } + + public string TestType { get; set; } + + public string Barcode { get; set; } + + public GeneticTestStatus Status { get; set; } + + public DateTime GenerationTime { get; set; } + + public DateTime CollectionTime { get; set; } +} + +public enum GeneticTestStatus { - + Sampled = 1, + Sent, + Resampling, + Received, + Analyzing, + ReAnalyzing, + UnderReview, + UnderReviewComplete, + NotPassed, + Completed, + Terminated, + Paused, + Failed } \ No newline at end of file diff --git a/Admin.NET.Bodk.Genetic/GeneticTestService.cs b/Admin.NET.Bodk.Genetic/GeneticTestService.cs new file mode 100644 index 0000000..fcea783 --- /dev/null +++ b/Admin.NET.Bodk.Genetic/GeneticTestService.cs @@ -0,0 +1,159 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using System.ComponentModel; +using Admin.NET.Bodk.Genetic.Entities; +using Admin.NET.Bodk.Genetic.Models; +using Admin.NET.Core; +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using Furion.DynamicApiController; +using Microsoft.AspNetCore.Mvc; +using Nest; +using SqlSugar; + +namespace Admin.NET.Bodk.Genetic; + +[ApiDescriptionSettings(Groups = new[] { "Bodk Groups" }, Name = "Genetic", Description = "基因检测服务")] +public class GeneticTestService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _resultRepository; + + private readonly SqlSugarRepository _itemRepository; + + public GeneticTestService(SqlSugarRepository resultRepository, + SqlSugarRepository itemRepository) + { + _resultRepository = resultRepository; + _itemRepository = itemRepository; + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + [DisplayName("GetList")] + public async Task> GetList(GeneticTestResultQueryInput queryInput) + { + return await _resultRepository.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(queryInput.Code), + m => queryInput.Code != null && m.Code.Contains(queryInput.Code)) + .WhereIF(!string.IsNullOrWhiteSpace(queryInput.Barcode), + m => queryInput.Barcode != null && m.Code.Contains(queryInput.Barcode)) + .WhereIF(queryInput.CustomerId is not null, m => m.CustomerId == queryInput.CustomerId) + .WhereIF(queryInput.Status is not null, + m => m.Status == queryInput.Status) + .Select((u) => new Models.GeneticTestResultOutput() + { + Id = u.Id, + CustomerId = u.CustomerId, + Code = u.Code, + Status = u.Status, + Barcode = u.Barcode, + GenerationTime = u.GenerationTime, + CollectionTime = u.CollectionTime, + CreateTime = u.CreateTime, + CreateUserId = u.CreateUserId, + CreateUserName = u.CreateUserName, + UpdateTime = u.UpdateTime, + UpdateUserId = u.UpdateUserId, + UpdateUserName = u.UpdateUserName, + TestType = u.TestType, + IsDelete = u.IsDelete + }) + .Mapper(r => + { + r.Items = _itemRepository.AsQueryable().Where(i => i.GeneticTestResultId == r.Id) + .Select(i => new GeneticItemOutput() + { + RiskLevel = i.RiskLevel, + CreateUserId = i.CreateUserId, + CreateUserName = i.CreateUserName, + CreateTime = i.CreateTime, + UpdateUserId = i.UpdateUserId, + UpdateUserName = i.UpdateUserName, + UpdateTime = i.UpdateTime, + GeneticTestResultId = i.GeneticTestResultId, + IsDelete = i.IsDelete, + RiskScore = i.RiskScore, + Growth = i.Growth, + AverageRiskScore = i.AverageRiskScore, + Genetics = i.Genetics, + Name = i.Name + }).ToList(); + }) + .ToPagedListAsync(queryInput.Page, queryInput.PageSize); + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + [DisplayName("Add")] + public async Task AddGeneticTestResult(GeneticTestResultInput input) + { + var id = await _resultRepository.InsertReturnSnowflakeIdAsync(new GeneticTestResultEntity() + { + CustomerId = input.CustomerId, + Code = input.Code, + Status = input.Status, + Barcode = input.Barcode, + GenerationTime = input.GenerationTime, + CollectionTime = input.CollectionTime, + TestType = input.TestType + }); + if (input.Items is not null) + { + await _itemRepository.InsertRangeAsync(input.Items.Select(i => new GeneticItemTestResultEntity() + { + Name = i.Name, + RiskScore = i.RiskScore, + RiskLevel = i.RiskLevel, + AverageRiskScore = i.AverageRiskScore, + Genetics = i.Genetics, + Growth = i.Growth, + GeneticTestResultId = id + }).ToArray()); + } + + return id; + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + [DisplayName("Update")] + public async Task UpdateGeneticTestResult(GeneticTestResultUpdateInput input) + { + await _resultRepository.UpdateAsync(new GeneticTestResultEntity() + { + Id = input.Id, + CustomerId = input.CustomerId, + Code = input.Code, + Status = input.Status, + Barcode = input.Barcode, + GenerationTime = input.GenerationTime, + TestType = input.TestType, + CollectionTime = input.CollectionTime + }); + if (input.Items is not null) + { + await _itemRepository.DeleteAsync(i => i.GeneticTestResultId == input.Id); + await _itemRepository.InsertRangeAsync(input.Items.Select(i => new GeneticItemTestResultEntity() + { + Name = i.Name, + RiskScore = i.RiskScore, + RiskLevel = i.RiskLevel, + AverageRiskScore = i.AverageRiskScore, + Genetics = i.Genetics, + Growth = i.Growth, + GeneticTestResultId =input.Id + }).ToArray()); + } + } + + [UnitOfWork] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + [DisplayName("Delete")] + public async Task DeleteGeneticTestResult(long? id) + { + await _resultRepository.DeleteByIdAsync(id); + await _itemRepository.DeleteAsync(i => i.GeneticTestResultId == id); + } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Genetic/Models/Genetic.cs b/Admin.NET.Bodk.Genetic/Models/Genetic.cs new file mode 100644 index 0000000..4cb4559 --- /dev/null +++ b/Admin.NET.Bodk.Genetic/Models/Genetic.cs @@ -0,0 +1,18 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +namespace Admin.NET.Bodk.Genetic.Models; + +public class Genetic +{ + public string Name { get; set; } + + public string Postion { get; set; } + + public bool Risk { get; set; } + + public string Type { get; set; } + + public string Description { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Genetic/Models/GeneticItem.cs b/Admin.NET.Bodk.Genetic/Models/GeneticItem.cs new file mode 100644 index 0000000..5b0f743 --- /dev/null +++ b/Admin.NET.Bodk.Genetic/Models/GeneticItem.cs @@ -0,0 +1,26 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Bodk.Genetic.Entities; + +namespace Admin.NET.Bodk.Genetic.Models; + +public class GeneticItemOutput : GeneticItemTestResultEntity +{ +} + +public class GeneticItemInput +{ + public string Name { get; set; } + + public float Growth { get; set; } + + public float AverageRiskScore { get; set; } + + public float RiskScore { get; set; } + + public int RiskLevel { get; set; } + + public List? Genetics { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Genetic/Models/GeneticTestResult.cs b/Admin.NET.Bodk.Genetic/Models/GeneticTestResult.cs new file mode 100644 index 0000000..84b7967 --- /dev/null +++ b/Admin.NET.Bodk.Genetic/Models/GeneticTestResult.cs @@ -0,0 +1,62 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Bodk.Genetic.Entities; +using Admin.NET.Core; + +namespace Admin.NET.Bodk.Genetic.Models; + +public class GeneticTestResultQueryInput : BasePageInput +{ + public long? CustomerId { get; set; } + + public string? Code { get; set; } + + public string? Barcode { get; set; } + + public GeneticTestStatus? Status { get; set; } +} + +public class GeneticTestResultInput +{ + public long CustomerId { get; set; } + + public string Code { get; set; } + + public string Barcode { get; set; } + + public string TestType { get; set; } + + public GeneticTestStatus Status { get; set; } + + public DateTime GenerationTime { get; set; } + + public DateTime CollectionTime { get; set; } + + public List? Items { get; set; } +} + +public class GeneticTestResultUpdateInput : BaseIdInput +{ + public long CustomerId { get; set; } + + public string Code { get; set; } + + public string Barcode { get; set; } + + public string TestType { get; set; } + + public GeneticTestStatus Status { get; set; } + + public DateTime GenerationTime { get; set; } + + public DateTime CollectionTime { get; set; } + + public List? Items { get; set; } +} + +public class GeneticTestResultOutput : GeneticTestResultEntity +{ + public List? Items { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/Admin.NET.Bodk.Project.csproj b/Admin.NET.Bodk.Project/Admin.NET.Bodk.Project.csproj index 2967119..802c845 100644 --- a/Admin.NET.Bodk.Project/Admin.NET.Bodk.Project.csproj +++ b/Admin.NET.Bodk.Project/Admin.NET.Bodk.Project.csproj @@ -7,11 +7,8 @@ + - - - - diff --git a/Admin.NET.Bodk.Project/Controllers/ProjectController.cs b/Admin.NET.Bodk.Project/Controllers/ProjectController.cs deleted file mode 100644 index 7c703f6..0000000 --- a/Admin.NET.Bodk.Project/Controllers/ProjectController.cs +++ /dev/null @@ -1,87 +0,0 @@ -// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 -// -// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 - -using System.ComponentModel; -using Admin.NET.Bodk.Project.Entities; -using Admin.NET.Bodk.Project.Models; -using Admin.NET.Core; -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Microsoft.AspNetCore.Mvc; - -namespace Admin.NET.Bodk.Project.Controllers; - -[ApiDescriptionSettings(GroupName = "Bodk Groups", Description = "项目接口服务")] -public class ProjectController : IDynamicApiController, ITransient -{ - private readonly SqlSugarRepository _repository; - - public ProjectController(SqlSugarRepository repository) - { - _repository = repository; - } - - [ApiDescriptionSettings(Name = "GetList"), HttpPost] - [DisplayName("获取项目列表")] - public async Task> GetList(ProjectQueryInput input) - { - return await _repository.AsQueryable() - .WhereIF(!string.IsNullOrWhiteSpace(input.Name), - m => input.Name != null && m.Name.Contains(input.Name)) - .WhereIF(input.Id is not null, m => m.Id == input.Id) - .WhereIF(!string.IsNullOrWhiteSpace(input.Manager), - m => input.Manager != null && m.Manager.Contains(input.Manager)) - .WhereIF(!string.IsNullOrWhiteSpace(input.Phone), - m => input.Phone != null && m.Phone.Contains(input.Phone)) - .WhereIF(!string.IsNullOrWhiteSpace(input.Position), - m => input.Position != null && m.Position.Contains(input.Position)) - .WhereIF(input.IsDeleted is not null, - m => m.IsDelete == input.IsDeleted) - .Select((u) => new Models.Project() - { - Id = u.Id, - Name = u.Name, - Manager = u.Manager, - Position = u.Position, - Phone = u.Phone, - IsDeleted = u.IsDelete, - CreateTime = u.CreateTime, - }) - .ToPagedListAsync(input.Page, input.PageSize); - } - - [ApiDescriptionSettings(Name = "Add"), HttpPost] - [DisplayName("新增项目")] - public async Task AddProject(ProjectInput project) - { - await _repository.InsertAsync(new ProjectEntity() - { - Name = project.Name, - Position = project.Position, - Manager = project.Manager, - Phone = project.Phone - }); - } - - [ApiDescriptionSettings(Name = "Delete"), HttpPost] - [DisplayName("删除项目")] - public async Task DeleteProject(long id) - { - var project = await _repository.GetSingleAsync(d => d.Id == id); - project.IsDelete = true; - await _repository.UpdateAsync(project); - } - - [ApiDescriptionSettings(Name = "Update"), HttpPost] - [DisplayName("修改项目")] - public async Task UpdateProject(ProjectInput projectInput) - { - var project = await _repository.GetSingleAsync(d => d.Id == projectInput.Id); - project.Manager = projectInput.Manager; - project.Name = projectInput.Name; - project.Phone = projectInput.Phone; - project.Position = projectInput.Position; - await _repository.UpdateAsync(project); - } -} \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/Entities/AreaExtEntity.cs b/Admin.NET.Bodk.Project/Entities/AreaExtEntity.cs new file mode 100644 index 0000000..13c6aac --- /dev/null +++ b/Admin.NET.Bodk.Project/Entities/AreaExtEntity.cs @@ -0,0 +1,14 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Core; +using SqlSugar; + +namespace Admin.NET.Bodk.Project.Entities; + +[SugarTable("bodk_org_area_ext")] +public class AreaExtEntity : EntityBase +{ + public long OrgId { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/Entities/ProjectEntity.cs b/Admin.NET.Bodk.Project/Entities/FactoryExtEntity.cs similarity index 56% rename from Admin.NET.Bodk.Project/Entities/ProjectEntity.cs rename to Admin.NET.Bodk.Project/Entities/FactoryExtEntity.cs index 865c781..a8bbd40 100644 --- a/Admin.NET.Bodk.Project/Entities/ProjectEntity.cs +++ b/Admin.NET.Bodk.Project/Entities/FactoryExtEntity.cs @@ -3,19 +3,16 @@ // 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 using Admin.NET.Core; -using Nest; using SqlSugar; namespace Admin.NET.Bodk.Project.Entities; -[SugarTable("bodk_project", "项目表")] -public class ProjectEntity : EntityTenant, IRepositorySettings +[SugarTable("bodk_org_factory_ext")] +public class FactoryExtEntity : EntityBase { - public string Name { get; set; } - public string Position { get; set; } - - public string Manager { get; set; } - - public string Phone { get; set; } + + public long AreaId { get; set; } + + public long OrgId { get; set; } } \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/Entities/StationExtEntity.cs b/Admin.NET.Bodk.Project/Entities/StationExtEntity.cs new file mode 100644 index 0000000..e1ea052 --- /dev/null +++ b/Admin.NET.Bodk.Project/Entities/StationExtEntity.cs @@ -0,0 +1,19 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Core; +using SqlSugar; + +namespace Admin.NET.Bodk.Project.Entities; + +[SugarTable("bodk_org_station_ext")] +public class StationExtEntity : EntityBase +{ + public long FactoryId { get; set; } + + public long OrgId { get; set; } + + [SugarColumn(IsArray = true, ColumnDataType = "long", Length = 1000, IsNullable = true)] + public long[]? ServiceIds { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/Entities/StationServiceEntity.cs b/Admin.NET.Bodk.Project/Entities/StationServiceEntity.cs new file mode 100644 index 0000000..1de31f1 --- /dev/null +++ b/Admin.NET.Bodk.Project/Entities/StationServiceEntity.cs @@ -0,0 +1,16 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Core; + +namespace Admin.NET.Bodk.Project.Entities; + +public class StationServiceEntity : EntityBase +{ + public string Name { get; set; } + + public string Icon { get; set; } + + public string Description { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Core/IRuntime.cs b/Admin.NET.Bodk.Project/Models/Area.cs similarity index 54% rename from Admin.NET.Bodk.Core/IRuntime.cs rename to Admin.NET.Bodk.Project/Models/Area.cs index 0c4c15e..e2b5ebb 100644 --- a/Admin.NET.Bodk.Core/IRuntime.cs +++ b/Admin.NET.Bodk.Project/Models/Area.cs @@ -2,9 +2,11 @@ // // 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 -namespace Admin.NET.Bodk.Core; +using Admin.NET.Core; -public interface IRuntime +namespace Admin.NET.Bodk.Project.Models; + +public class AreaOutput : SysOrg { - + public List? Factories { get; set; } } \ No newline at end of file diff --git a/Admin.NET.Bodk.Genetic/Entities/GeneticTestAgencyEntity.cs b/Admin.NET.Bodk.Project/Models/Factory.cs similarity index 53% rename from Admin.NET.Bodk.Genetic/Entities/GeneticTestAgencyEntity.cs rename to Admin.NET.Bodk.Project/Models/Factory.cs index 578d262..4c31cc3 100644 --- a/Admin.NET.Bodk.Genetic/Entities/GeneticTestAgencyEntity.cs +++ b/Admin.NET.Bodk.Project/Models/Factory.cs @@ -2,9 +2,11 @@ // // 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 -namespace Admin.NET.Bodk.Genetic.Entities; +using Admin.NET.Core; -public class GeneticTestAgencyEntity +namespace Admin.NET.Bodk.Project.Models; + +public class FactoryOutput : SysOrg { - + public List? Stations { get; set; } } \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/Models/Project.cs b/Admin.NET.Bodk.Project/Models/Project.cs deleted file mode 100644 index 08c7974..0000000 --- a/Admin.NET.Bodk.Project/Models/Project.cs +++ /dev/null @@ -1,50 +0,0 @@ -// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 -// -// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 - -using Admin.NET.Core; - -namespace Admin.NET.Bodk.Project.Models; - -public class Project -{ - public long? Id { get; set; } - - public string Name { get; set; } - - public string Position { get; set; } - - public string Manager { get; set; } - - public string Phone { get; set; } - - public bool IsDeleted { get; set; } - - public DateTime CreateTime { get; set; } -} - -public class ProjectQueryInput : BasePageInput -{ - public long? Id { get; set; } - - public string? Name { get; set; } - - public string? Position { get; set; } - - public string? Manager { get; set; } - - public string? Phone { get; set; } - - public bool? IsDeleted { get; set; } -} - -public class ProjectInput : BaseIdInput -{ - public string Name { get; set; } - - public string Position { get; set; } - - public string Manager { get; set; } - - public string Phone { get; set; } -} \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/Models/Station.cs b/Admin.NET.Bodk.Project/Models/Station.cs new file mode 100644 index 0000000..fe8d27b --- /dev/null +++ b/Admin.NET.Bodk.Project/Models/Station.cs @@ -0,0 +1,12 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Core; + +namespace Admin.NET.Bodk.Project.Models; + +public class StationOutput : SysOrg +{ + public List? Services { get; set; } +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/Models/StationService.cs b/Admin.NET.Bodk.Project/Models/StationService.cs new file mode 100644 index 0000000..88f08bc --- /dev/null +++ b/Admin.NET.Bodk.Project/Models/StationService.cs @@ -0,0 +1,21 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +namespace Admin.NET.Bodk.Project.Models; + +public class StationServiceOutput +{ + public long Id { get; set; } + + public string Name { get; set; } + + public string Icon { get; set; } + + public string Description { get; set; } +} + +public class AddStationServiceInput +{ + +} \ No newline at end of file diff --git a/Admin.NET.Bodk.Project/ProjectService.cs b/Admin.NET.Bodk.Project/ProjectService.cs new file mode 100644 index 0000000..fa3f76f --- /dev/null +++ b/Admin.NET.Bodk.Project/ProjectService.cs @@ -0,0 +1,14 @@ +// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 +// +// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 + +using Admin.NET.Bodk.Core; +using Admin.NET.Core; +using Admin.NET.Core.Service; + +namespace Admin.NET.Bodk.Project; + +public class ProjectService(UserManager userManager, SysOrgService sysOrgService, SysUserService sysUserService) + : ServiceBase(userManager, sysOrgService, sysUserService) +{ +} \ No newline at end of file diff --git a/Admin.NET.Core/Enum/ErrorCodeEnum.cs b/Admin.NET.Core/Enum/ErrorCodeEnum.cs index 8960363..8485188 100644 --- a/Admin.NET.Core/Enum/ErrorCodeEnum.cs +++ b/Admin.NET.Core/Enum/ErrorCodeEnum.cs @@ -14,44 +14,37 @@ public enum ErrorCodeEnum /// /// 验证码错误 /// - [ErrorCodeItemMetadata("验证码错误")] - D0008, + [ErrorCodeItemMetadata("验证码错误")] D0008, /// /// 账号不存在 /// - [ErrorCodeItemMetadata("账号不存在")] - D0009, + [ErrorCodeItemMetadata("账号不存在")] D0009, /// /// 密码不正确 /// - [ErrorCodeItemMetadata("密码不正确")] - D1000, + [ErrorCodeItemMetadata("密码不正确")] D1000, /// /// 非法操作!禁止删除自己 /// - [ErrorCodeItemMetadata("非法操作,禁止删除自己")] - D1001, + [ErrorCodeItemMetadata("非法操作,禁止删除自己")] D1001, /// /// 记录不存在 /// - [ErrorCodeItemMetadata("记录不存在")] - D1002, + [ErrorCodeItemMetadata("记录不存在")] D1002, /// /// 账号已存在 /// - [ErrorCodeItemMetadata("账号已存在")] - D1003, + [ErrorCodeItemMetadata("账号已存在")] D1003, /// /// 旧密码不匹配 /// - [ErrorCodeItemMetadata("旧密码输入错误")] - D1004, + [ErrorCodeItemMetadata("旧密码输入错误")] D1004, /// /// 测试数据禁止更改admin密码 @@ -62,8 +55,7 @@ public enum ErrorCodeEnum /// /// 数据已存在 /// - [ErrorCodeItemMetadata("数据已存在")] - D1006, + [ErrorCodeItemMetadata("数据已存在")] D1006, /// /// 数据不存在或含有关联引用,禁止删除 @@ -74,8 +66,7 @@ public enum ErrorCodeEnum /// /// 禁止为管理员分配角色 /// - [ErrorCodeItemMetadata("禁止为管理员分配角色")] - D1008, + [ErrorCodeItemMetadata("禁止为管理员分配角色")] D1008, /// /// 重复数据或记录含有不存在数据 @@ -92,62 +83,52 @@ public enum ErrorCodeEnum /// /// 非法操作,未登录 /// - [ErrorCodeItemMetadata("非法操作,未登录")] - D1011, + [ErrorCodeItemMetadata("非法操作,未登录")] D1011, /// /// Id不能为空 /// - [ErrorCodeItemMetadata("Id不能为空")] - D1012, + [ErrorCodeItemMetadata("Id不能为空")] D1012, /// /// 所属机构不在自己的数据范围内 /// - [ErrorCodeItemMetadata("没有权限操作该数据")] - D1013, + [ErrorCodeItemMetadata("没有权限操作该数据")] D1013, /// /// 禁止删除超级管理员 /// - [ErrorCodeItemMetadata("禁止删除超级管理员")] - D1014, + [ErrorCodeItemMetadata("禁止删除超级管理员")] D1014, /// /// 禁止修改超级管理员状态 /// - [ErrorCodeItemMetadata("禁止修改超级管理员状态")] - D1015, + [ErrorCodeItemMetadata("禁止修改超级管理员状态")] D1015, /// /// 没有权限 /// - [ErrorCodeItemMetadata("没有权限")] - D1016, + [ErrorCodeItemMetadata("没有权限")] D1016, /// /// 账号已冻结 /// - [ErrorCodeItemMetadata("账号已冻结")] - D1017, + [ErrorCodeItemMetadata("账号已冻结")] D1017, /// /// 禁止删除管理员 /// - [ErrorCodeItemMetadata("禁止删除管理员")] - D1018, + [ErrorCodeItemMetadata("禁止删除管理员")] D1018, /// /// 禁止删除系统管理员角色 /// - [ErrorCodeItemMetadata("禁止删除系统管理员角色")] - D1019, + [ErrorCodeItemMetadata("禁止删除系统管理员角色")] D1019, /// /// 禁止修改系统管理员角色 /// - [ErrorCodeItemMetadata("禁止修改系统管理员角色")] - D1020, + [ErrorCodeItemMetadata("禁止修改系统管理员角色")] D1020, /// /// 禁止为系统管理员角色分配权限 @@ -164,8 +145,7 @@ public enum ErrorCodeEnum /// /// 禁止删除默认租户 /// - [ErrorCodeItemMetadata("禁止删除默认租户")] - D1023, + [ErrorCodeItemMetadata("禁止删除默认租户")] D1023, /// /// 已将其他地方登录账号下线 @@ -182,8 +162,7 @@ public enum ErrorCodeEnum /// /// 禁止修改本人账号状态 /// - [ErrorCodeItemMetadata("禁止修改本人账号状态")] - D1026, + [ErrorCodeItemMetadata("禁止修改本人账号状态")] D1026, /// /// 密码错误次数过多,账号已锁定,请半小时后重试! @@ -194,14 +173,12 @@ public enum ErrorCodeEnum /// /// 新密码不能与旧密码相同 /// - [ErrorCodeItemMetadata("新密码不能与旧密码相同")] - D1028, + [ErrorCodeItemMetadata("新密码不能与旧密码相同")] D1028, /// /// 父机构不存在 /// - [ErrorCodeItemMetadata("父机构不存在")] - D2000, + [ErrorCodeItemMetadata("父机构不存在")] D2000, /// /// 当前机构Id不能与父机构Id相同 @@ -218,14 +195,12 @@ public enum ErrorCodeEnum /// /// 没有权限操作机构 /// - [ErrorCodeItemMetadata("没有权限操作机构")] - D2003, + [ErrorCodeItemMetadata("没有权限操作机构")] D2003, /// /// 该机构下有用户禁止删除 /// - [ErrorCodeItemMetadata("该机构下有用户禁止删除")] - D2004, + [ErrorCodeItemMetadata("该机构下有用户禁止删除")] D2004, /// /// 附属机构下有用户禁止删除 @@ -236,8 +211,7 @@ public enum ErrorCodeEnum /// /// 只能增加下级机构 /// - [ErrorCodeItemMetadata("只能增加下级机构")] - D2006, + [ErrorCodeItemMetadata("只能增加下级机构")] D2006, /// /// 下级机构下有用户禁止删除 @@ -248,20 +222,17 @@ public enum ErrorCodeEnum /// /// 租户默认机构禁止删除 /// - [ErrorCodeItemMetadata("租户默认机构禁止删除")] - D2008, + [ErrorCodeItemMetadata("租户默认机构禁止删除")] D2008, /// /// 禁止增加根节点机构 /// - [ErrorCodeItemMetadata("禁止增加根节点机构")] - D2009, + [ErrorCodeItemMetadata("禁止增加根节点机构")] D2009, /// /// 字典类型不存在 /// - [ErrorCodeItemMetadata("字典类型不存在")] - D3000, + [ErrorCodeItemMetadata("字典类型不存在")] D3000, /// /// 字典类型已存在 @@ -284,38 +255,32 @@ public enum ErrorCodeEnum /// /// 字典值不存在 /// - [ErrorCodeItemMetadata("字典值不存在")] - D3004, + [ErrorCodeItemMetadata("字典值不存在")] D3004, /// /// 字典状态错误 /// - [ErrorCodeItemMetadata("字典状态错误")] - D3005, + [ErrorCodeItemMetadata("字典状态错误")] D3005, /// /// 菜单已存在 /// - [ErrorCodeItemMetadata("菜单已存在")] - D4000, + [ErrorCodeItemMetadata("菜单已存在")] D4000, /// /// 路由地址为空 /// - [ErrorCodeItemMetadata("路由地址为空")] - D4001, + [ErrorCodeItemMetadata("路由地址为空")] D4001, /// /// 打开方式为空 /// - [ErrorCodeItemMetadata("打开方式为空")] - D4002, + [ErrorCodeItemMetadata("打开方式为空")] D4002, /// /// 权限标识格式为空 /// - [ErrorCodeItemMetadata("权限标识格式为空")] - D4003, + [ErrorCodeItemMetadata("权限标识格式为空")] D4003, /// /// 权限标识格式错误 @@ -326,8 +291,7 @@ public enum ErrorCodeEnum /// /// 权限不存在 /// - [ErrorCodeItemMetadata("权限不存在")] - D4005, + [ErrorCodeItemMetadata("权限不存在")] D4005, /// /// 父级菜单不能为当前节点,请重新选择父级菜单 @@ -338,86 +302,72 @@ public enum ErrorCodeEnum /// /// 不能移动根节点 /// - [ErrorCodeItemMetadata("不能移动根节点")] - D4007, + [ErrorCodeItemMetadata("不能移动根节点")] D4007, /// /// 禁止本节点与父节点相同 /// - [ErrorCodeItemMetadata("禁止本节点与父节点相同")] - D4008, + [ErrorCodeItemMetadata("禁止本节点与父节点相同")] D4008, /// /// 路由名称重复 /// - [ErrorCodeItemMetadata("路由名称重复")] - D4009, + [ErrorCodeItemMetadata("路由名称重复")] D4009, /// /// 父节点不能为按钮类型 /// - [ErrorCodeItemMetadata("父节点不能为按钮类型")] - D4010, + [ErrorCodeItemMetadata("父节点不能为按钮类型")] D4010, /// /// 已存在同名或同编码应用 /// - [ErrorCodeItemMetadata("已存在同名或同编码应用")] - D5000, + [ErrorCodeItemMetadata("已存在同名或同编码应用")] D5000, /// /// 默认激活系统只能有一个 /// - [ErrorCodeItemMetadata("默认激活系统只能有一个")] - D5001, + [ErrorCodeItemMetadata("默认激活系统只能有一个")] D5001, /// /// 该应用下有菜单禁止删除 /// - [ErrorCodeItemMetadata("该应用下有菜单禁止删除")] - D5002, + [ErrorCodeItemMetadata("该应用下有菜单禁止删除")] D5002, /// /// 已存在同名或同编码应用 /// - [ErrorCodeItemMetadata("已存在同名或同编码应用")] - D5003, + [ErrorCodeItemMetadata("已存在同名或同编码应用")] D5003, /// /// 已存在同名或同编码职位 /// - [ErrorCodeItemMetadata("已存在同名或同编码职位")] - D6000, + [ErrorCodeItemMetadata("已存在同名或同编码职位")] D6000, /// /// 该职位下有用户禁止删除 /// - [ErrorCodeItemMetadata("该职位下有用户禁止删除")] - D6001, + [ErrorCodeItemMetadata("该职位下有用户禁止删除")] D6001, /// /// 无权修改本职位 /// - [ErrorCodeItemMetadata("无权修改本职位")] - D6002, + [ErrorCodeItemMetadata("无权修改本职位")] D6002, /// /// 职位不存在 /// - [ErrorCodeItemMetadata("职位不存在")] - D6003, + [ErrorCodeItemMetadata("职位不存在")] D6003, /// /// 通知公告状态错误 /// - [ErrorCodeItemMetadata("通知公告状态错误")] - D7000, + [ErrorCodeItemMetadata("通知公告状态错误")] D7000, /// /// 通知公告删除失败 /// - [ErrorCodeItemMetadata("通知公告删除失败")] - D7001, + [ErrorCodeItemMetadata("通知公告删除失败")] D7001, /// /// 通知公告编辑失败 @@ -434,32 +384,27 @@ public enum ErrorCodeEnum /// /// 文件不存在 /// - [ErrorCodeItemMetadata("文件不存在")] - D8000, + [ErrorCodeItemMetadata("文件不存在")] D8000, /// /// 不允许的文件类型 /// - [ErrorCodeItemMetadata("不允许的文件类型")] - D8001, + [ErrorCodeItemMetadata("不允许的文件类型")] D8001, /// /// 文件超过允许大小 /// - [ErrorCodeItemMetadata("文件超过允许大小")] - D8002, + [ErrorCodeItemMetadata("文件超过允许大小")] D8002, /// /// 文件后缀错误 /// - [ErrorCodeItemMetadata("文件后缀错误")] - D8003, + [ErrorCodeItemMetadata("文件后缀错误")] D8003, /// /// 文件已存在 /// - [ErrorCodeItemMetadata("文件已存在")] - D8004, + [ErrorCodeItemMetadata("文件已存在")] D8004, /// /// 已存在同名或同编码参数配置 @@ -470,86 +415,72 @@ public enum ErrorCodeEnum /// /// 禁止删除系统参数 /// - [ErrorCodeItemMetadata("禁止删除系统参数")] - D9001, + [ErrorCodeItemMetadata("禁止删除系统参数")] D9001, /// /// 已存在同名任务调度 /// - [ErrorCodeItemMetadata("已存在同名任务调度")] - D1100, + [ErrorCodeItemMetadata("已存在同名任务调度")] D1100, /// /// 任务调度不存在 /// - [ErrorCodeItemMetadata("任务调度不存在")] - D1101, + [ErrorCodeItemMetadata("任务调度不存在")] D1101, /// /// 演示环境禁止修改数据 /// - [ErrorCodeItemMetadata("演示环境禁止修改数据")] - D1200, + [ErrorCodeItemMetadata("演示环境禁止修改数据")] D1200, /// /// 已存在同名的租户 /// - [ErrorCodeItemMetadata("已存在同名的租户")] - D1300, + [ErrorCodeItemMetadata("已存在同名的租户")] D1300, /// /// 已存在同名的租户管理员 /// - [ErrorCodeItemMetadata("已存在同名的租户管理员")] - D1301, + [ErrorCodeItemMetadata("已存在同名的租户管理员")] D1301, /// /// 租户从库配置错误 /// - [ErrorCodeItemMetadata("租户从库配置错误")] - D1302, + [ErrorCodeItemMetadata("租户从库配置错误")] D1302, /// /// 该表代码模板已经生成过 /// - [ErrorCodeItemMetadata("该表代码模板已经生成过")] - D1400, + [ErrorCodeItemMetadata("该表代码模板已经生成过")] D1400, /// /// 该类型不存在 /// - [ErrorCodeItemMetadata("该类型不存在")] - D1501, + [ErrorCodeItemMetadata("该类型不存在")] D1501, /// /// 该字段不存在 /// - [ErrorCodeItemMetadata("该字段不存在")] - D1502, + [ErrorCodeItemMetadata("该字段不存在")] D1502, /// /// 该类型不是枚举类型 /// - [ErrorCodeItemMetadata("该类型不是枚举类型")] - D1503, + [ErrorCodeItemMetadata("该类型不是枚举类型")] D1503, /// /// 该实体不存在 /// - [ErrorCodeItemMetadata("该实体不存在")] - D1504, + [ErrorCodeItemMetadata("该实体不存在")] D1504, /// /// 父菜单不存在 /// - [ErrorCodeItemMetadata("父菜单不存在")] - D1505, + [ErrorCodeItemMetadata("父菜单不存在")] D1505, /// /// 父资源不存在 /// - [ErrorCodeItemMetadata("父资源不存在")] - D1600, + [ErrorCodeItemMetadata("父资源不存在")] D1600, /// /// 当前资源Id不能与父资源Id相同 @@ -560,14 +491,12 @@ public enum ErrorCodeEnum /// /// 已有相同编码或名称 /// - [ErrorCodeItemMetadata("已有相同编码或名称")] - D1602, + [ErrorCodeItemMetadata("已有相同编码或名称")] D1602, /// /// 脚本代码不能为空 /// - [ErrorCodeItemMetadata("脚本代码不能为空")] - D1701, + [ErrorCodeItemMetadata("脚本代码不能为空")] D1701, /// /// 脚本代码中的作业类,需要定义 [JobDetail] 特性 @@ -584,20 +513,17 @@ public enum ErrorCodeEnum /// /// 禁止修改作业编号 /// - [ErrorCodeItemMetadata("禁止修改作业编号")] - D1704, + [ErrorCodeItemMetadata("禁止修改作业编号")] D1704, /// /// 执行作业失败 /// - [ErrorCodeItemMetadata("执行作业失败")] - D1705, + [ErrorCodeItemMetadata("执行作业失败")] D1705, /// /// 已存在同名打印模板 /// - [ErrorCodeItemMetadata("已存在同名打印模板")] - D1800, + [ErrorCodeItemMetadata("已存在同名打印模板")] D1800, /// /// 已存在同名功能或同名程序及插件 @@ -608,44 +534,37 @@ public enum ErrorCodeEnum /// /// 已存在同名或同编码项目 /// - [ErrorCodeItemMetadata("已存在同名或同编码项目")] - xg1000, + [ErrorCodeItemMetadata("已存在同名或同编码项目")] xg1000, /// /// 已存在相同证件号码人员 /// - [ErrorCodeItemMetadata("已存在相同证件号码人员")] - xg1001, + [ErrorCodeItemMetadata("已存在相同证件号码人员")] xg1001, /// /// 检测数据不存在 /// - [ErrorCodeItemMetadata("检测数据不存在")] - xg1002, + [ErrorCodeItemMetadata("检测数据不存在")] xg1002, /// /// 请添加数据列 /// - [ErrorCodeItemMetadata("请添加数据列")] - db1000, + [ErrorCodeItemMetadata("请添加数据列")] db1000, /// /// 数据表不存在 /// - [ErrorCodeItemMetadata("数据表不存在")] - db1001, + [ErrorCodeItemMetadata("数据表不存在")] db1001, /// /// 数据表不存在 /// - [ErrorCodeItemMetadata("不允许添加相同字段名")] - db1002, + [ErrorCodeItemMetadata("不允许添加相同字段名")] db1002, /// /// 父节点不存在 /// - [ErrorCodeItemMetadata("父节点不存在")] - R2000, + [ErrorCodeItemMetadata("父节点不存在")] R2000, /// /// 当前节点Id不能与父节点Id相同 @@ -656,36 +575,31 @@ public enum ErrorCodeEnum /// /// 已有相同编码或名称 /// - [ErrorCodeItemMetadata("已有相同编码或名称")] - R2002, + [ErrorCodeItemMetadata("已有相同编码或名称")] R2002, /// /// 默认租户状态禁止修改 /// - [ErrorCodeItemMetadata("默认租户状态禁止修改")] - Z1001, + [ErrorCodeItemMetadata("默认租户状态禁止修改")] Z1001, /// /// 禁止创建此类型的数据库 /// - [ErrorCodeItemMetadata("禁止创建此类型的数据库")] - Z1002, + [ErrorCodeItemMetadata("禁止创建此类型的数据库")] Z1002, /// /// 租户已禁用 /// - [ErrorCodeItemMetadata("租户已禁用")] - Z1003, + [ErrorCodeItemMetadata("租户已禁用")] Z1003, /// /// 租户库连接不能为空 /// - [ErrorCodeItemMetadata("租户库连接不能为空")] - Z1004, + [ErrorCodeItemMetadata("租户库连接不能为空")] Z1004, /// /// 身份标识已存在 /// - [ErrorCodeItemMetadata("身份标识已存在")] - O1000, + [ErrorCodeItemMetadata("身份标识已存在")] O1000, + [ErrorCodeItemMetadata("设备已存在")] Device1000, } \ No newline at end of file diff --git a/Admin.NET.Core/SeedData/SysOrgSeedData.cs b/Admin.NET.Core/SeedData/SysOrgSeedData.cs index 1121645..38aa0b5 100644 --- a/Admin.NET.Core/SeedData/SysOrgSeedData.cs +++ b/Admin.NET.Core/SeedData/SysOrgSeedData.cs @@ -17,20 +17,11 @@ public class SysOrgSeedData : ISqlSugarEntitySeedData { return new[] { - new SysOrg{ Id=1300000000101, Pid=0, Name="松山湖基地", Code="1001", Type="101", Level=1, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="松山湖基地", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000102, Pid=1300000000101, Name="市场部", Code="100101", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000103, Pid=1300000000101, Name="研发部", Code="100102", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="研发部", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000104, Pid=1300000000101, Name="财务部", Code="100103", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部", TenantId=1300000000001 }, - - new SysOrg{ Id=1300000000201, Pid=0, Name="佛山基地", Code="1002", Type="201", Level=1, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="佛山基地", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000202, Pid=1300000000201, Name="市场部", Code="100201", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000203, Pid=1300000000201, Name="研发部", Code="100202", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="研发部", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000204, Pid=1300000000201, Name="财务部", Code="100203", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部", TenantId=1300000000001 }, - - new SysOrg{ Id=1300000000301, Pid=0, Name="广州基地", Code="1003", Type="201", Level=1, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="广州基地", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000302, Pid=1300000000301, Name="市场部", Code="100301", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000303, Pid=1300000000301, Name="研发部", Code="100302", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 }, - new SysOrg{ Id=1300000000304, Pid=1300000000301, Name="财务部", Code="100303", Level=2, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 }, + new SysOrg + { + Id = 1300000000101, Pid = 0, Name = "博工科技", Code = "1", Type = "101", Level = 1, + CreateTime = DateTime.Parse("2022-02-10 00:00:00"), Remark = "松山湖基地", TenantId = 1300000000001 + } }; } } \ No newline at end of file diff --git a/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs b/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs index a3ce2a6..a91d1e9 100644 --- a/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs +++ b/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs @@ -15,9 +15,10 @@ public class SysRoleMenuSeedData : ISqlSugarEntitySeedData return new[] { // 数据面板【admin/1300000000101】 - new SysRoleMenu{ Id=1300000000101, RoleId=1300000000101, MenuId=1300000000101 }, + new SysRoleMenu{ Id=1300000000101, RoleId=1300000000101, MenuId=35482331532101 }, new SysRoleMenu{ Id=1300000000102, RoleId=1300000000101, MenuId=1300000000111 }, - new SysRoleMenu{ Id=1300000000103, RoleId=1300000000101, MenuId=1300000000121 }, + new SysRoleMenu{ Id=1300000000103, RoleId=1300000000101, MenuId=35397279041861 }, + new SysRoleMenu{ Id=1300000000104, RoleId=1300000000101, MenuId=35571166242117 }, // 系统管理 new SysRoleMenu{ Id=1300000000111, RoleId=1300000000101, MenuId=1310000000101 }, diff --git a/Admin.NET.Core/SeedData/SysUserSeedData.cs b/Admin.NET.Core/SeedData/SysUserSeedData.cs index d2207d7..40005cf 100644 --- a/Admin.NET.Core/SeedData/SysUserSeedData.cs +++ b/Admin.NET.Core/SeedData/SysUserSeedData.cs @@ -1,13 +1,10 @@ -// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995 -// -// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证 namespace Admin.NET.Core; /// /// 系统用户表种子数据 /// -public class SysUserSeedData : ISqlSugarEntitySeedData +public class SysUserSeedData { /// /// 种子数据 @@ -16,6 +13,7 @@ public class SysUserSeedData : ISqlSugarEntitySeedData public IEnumerable HasData() { var encryptPassword = CryptogramUtil.Encrypt("123456"); + var encryptPassword2 = CryptogramUtil.Encrypt("liuzhaoqiang"); return new[] { @@ -25,6 +23,7 @@ public class SysUserSeedData : ISqlSugarEntitySeedData new SysUser{ Id=1300000000113, Account="zhangzhuo", Password=encryptPassword, NickName="张卓", RealName="部门职员", Phone="18020030720", Birthday=DateTime.Parse("2000-01-01"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.NormalUser, Remark="部门职员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000103, PosId=1300000000110, TenantId=1300000000001 }, new SysUser{ Id=1300000000114, Account="huangzhifeng", Password=encryptPassword, NickName="黄志风", RealName="普通用户", Phone="18020030720", Birthday=DateTime.Parse("2000-01-01"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.NormalUser, Remark="普通用户", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000104, PosId=1300000000115, TenantId=1300000000001 }, new SysUser{ Id=1300000000115, Account="shikunpeng", Password=encryptPassword, NickName="史鲲鹏", RealName="其他", Phone="18020030720", Birthday=DateTime.Parse("2000-01-01"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.Member, Remark="会员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000105, PosId=1300000000116, TenantId=1300000000001 }, + new SysUser{ Id=1300000000116, Account="liuzhaoqiang", Password=encryptPassword2, NickName="刘总", RealName="刘照强", Phone="18020030720", Birthday=DateTime.Parse("2000-01-01"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.Member, Remark="超级管理员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=1300000000106, PosId=1300000000117, TenantId=1300000000001 }, }; } } \ No newline at end of file diff --git a/Admin.NET.Core/Service/Dict/SysDictDataService.cs b/Admin.NET.Core/Service/Dict/SysDictDataService.cs index c5270e8..e96e328 100644 --- a/Admin.NET.Core/Service/Dict/SysDictDataService.cs +++ b/Admin.NET.Core/Service/Dict/SysDictDataService.cs @@ -56,8 +56,8 @@ public class SysDictDataService : IDynamicApiController, ITransient var isExist = await _sysDictDataRep.IsAnyAsync(u => u.Code == input.Code && u.DictTypeId == input.DictTypeId); if (isExist) throw Oops.Oh(ErrorCodeEnum.D3003); - - await _sysDictDataRep.InsertAsync(input.Adapt()); + var obj = input.Adapt(); + await _sysDictDataRep.InsertAsync(obj); } /// diff --git a/Admin.NET.Core/Service/Role/SysRoleService.cs b/Admin.NET.Core/Service/Role/SysRoleService.cs index 3955eec..bd369c2 100644 --- a/Admin.NET.Core/Service/Role/SysRoleService.cs +++ b/Admin.NET.Core/Service/Role/SysRoleService.cs @@ -56,10 +56,13 @@ public class SysRoleService : IDynamicApiController, ITransient public async Task> GetList() { // 当前用户已拥有的角色集合 - var roleIdList = _userManager.SuperAdmin ? null : await _sysUserRoleService.GetUserRoleIdList(_userManager.UserId); + var roleIdList = _userManager.SuperAdmin + ? null + : await _sysUserRoleService.GetUserRoleIdList(_userManager.UserId); return await _sysRoleRep.AsQueryable() - .WhereIF(roleIdList != null, u => u.CreateUserId == _userManager.UserId || roleIdList.Contains(u.Id)) // 若非超管,则只显示自己创建和已拥有的角色 + .WhereIF(roleIdList != null, + u => u.CreateUserId == _userManager.UserId || roleIdList.Contains(u.Id)) // 若非超管,则只显示自己创建和已拥有的角色 .OrderBy(u => u.OrderNo).Select().ToListAsync(); } @@ -91,12 +94,16 @@ public class SysRoleService : IDynamicApiController, ITransient return; // 将父节点为0的菜单排除,防止前端全选异常 - var pMenuIds = await _sysRoleRep.ChangeRepository>().AsQueryable().Where(u => input.MenuIdList.Contains(u.Id) && u.Pid == 0).ToListAsync(u => u.Id); - var menuIds = input.MenuIdList.Except(pMenuIds); // 差集 + //var pMenuIds = await _sysRoleRep.ChangeRepository>().AsQueryable().Where(u => input.MenuIdList.Contains(u.Id) && u.Pid == 0).ToListAsync(u => u.Id); + var pMenuIds = await _sysRoleRep.ChangeRepository>() + .AsQueryable() + .Where(u => input.MenuIdList.Contains(u.Id) && u.Pid == 0 && u.Type == MenuTypeEnum.Dir) + .ToListAsync(u => u.Id); + var menuIds = input.MenuIdList.Except(pMenuIds).ToList(); // 差集 await GrantMenu(new RoleMenuInput() { Id = input.Id, - MenuIdList = menuIds.ToList() + MenuIdList = menuIds }); } @@ -149,7 +156,7 @@ public class SysRoleService : IDynamicApiController, ITransient // 级联删除角色菜单数据 await _sysRoleMenuService.DeleteRoleMenuByRoleId(sysRole.Id); } - + /// /// 删除角色 1112 /// @@ -232,6 +239,7 @@ public class SysRoleService : IDynamicApiController, ITransient } } } + role.DataScope = (DataScopeEnum)dataScope; await _sysRoleRep.AsUpdateable(role).UpdateColumns(u => new { u.DataScope }).ExecuteCommandAsync(); await _sysRoleOrgService.GrantRoleOrg(input); diff --git a/Admin.NET.Core/Service/User/SysUserService.cs b/Admin.NET.Core/Service/User/SysUserService.cs index eca12d9..78d843b 100644 --- a/Admin.NET.Core/Service/User/SysUserService.cs +++ b/Admin.NET.Core/Service/User/SysUserService.cs @@ -73,13 +73,12 @@ public class SysUserService : IDynamicApiController, ITransient DateTime startOfMonth = today.StartOfMonth(); DateTime endOfMonth = today.EndOfMonth(); var dailyNewUsers = users - .Where(u => u.CreateTime >= today && u.CreateTime < today.AddDays(1)) - .Count(); + .Count(u => u.CreateTime >= today && u.CreateTime < today.AddDays(1)); // 获取本周新增用户数 - int newUsersThisWeek = users.Where(u => u.CreateTime >= startOfWeek && u.CreateTime < endOfWeek) - .Count(); - int newUsersThisMonth = users.Where(u => u.CreateTime >= startOfMonth && u.CreateTime < endOfMonth) - .Count(); + int newUsersThisWeek = users + .Count(u => u.CreateTime >= startOfWeek && u.CreateTime < endOfWeek); + int newUsersThisMonth = users + .Count(u => u.CreateTime >= startOfMonth && u.CreateTime < endOfMonth); return new UserAddInfo{ total = total, dailyNewUsers=dailyNewUsers, newUsersThisWeek=newUsersThisWeek, newUsersThisMonth=newUsersThisMonth diff --git a/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs b/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs index 10948f2..293d9eb 100644 --- a/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs +++ b/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs @@ -1,4 +1,6 @@ +using System.Text.Json; + namespace Admin.NET.Core; public static class SqlSugarSetup diff --git a/Admin.NET.Web.Entry/Admin.NET.Web.Entry.csproj b/Admin.NET.Web.Entry/Admin.NET.Web.Entry.csproj index 618be92..97740f8 100644 --- a/Admin.NET.Web.Entry/Admin.NET.Web.Entry.csproj +++ b/Admin.NET.Web.Entry/Admin.NET.Web.Entry.csproj @@ -40,9 +40,10 @@ - - + + + diff --git a/Admin.NET.Web.Entry/Admin.NET.db b/Admin.NET.Web.Entry/Admin.NET.db index 4d9893e..4f7b3f8 100644 Binary files a/Admin.NET.Web.Entry/Admin.NET.db and b/Admin.NET.Web.Entry/Admin.NET.db differ diff --git a/Admin.NET.sln b/Admin.NET.sln index 3cdd97d..8e8da6e 100644 --- a/Admin.NET.sln +++ b/Admin.NET.sln @@ -30,8 +30,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bodk.Extensions.Modbus", "B EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.Bodk.Customer", "Admin.Bodk.Customer\Admin.Bodk.Customer.csproj", "{6A073364-6552-4CDB-861A-4BD8B51E0FF6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Bodk.Core", "Admin.NET.Bodk.Core\Admin.NET.Bodk.Core.csproj", "{C7CEFE53-6599-4249-B107-2912415660BD}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Bodk.Genetic", "Admin.NET.Bodk.Genetic\Admin.NET.Bodk.Genetic.csproj", "{BA340773-EEAA-430C-A0FC-AB6C3B35BA6D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Bodk.Device", "Admin.NET.Bodk.Device\Admin.NET.Bodk.Device.csproj", "{35FB5A4D-4C35-4AF4-9719-1392707F9FF5}" @@ -40,6 +38,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Bodk.Customer", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Bodk.Project", "Admin.NET.Bodk.Project\Admin.NET.Bodk.Project.csproj", "{51EDA0FA-0D80-4631-9A2E-9315E99BA3CC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Bodk.Cells", "Admin.NET.Bodk.Cells\Admin.NET.Bodk.Cells.csproj", "{8E9C2CA3-E6F7-4798-AF8C-C1E538DC6B12}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Bodk.Core", "Admin.NET.Bodk.Core\Admin.NET.Bodk.Core.csproj", "{0273F0C6-A22B-494D-AA0B-30628C537FEA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -86,10 +88,6 @@ Global {6A073364-6552-4CDB-861A-4BD8B51E0FF6}.Debug|Any CPU.Build.0 = Debug|Any CPU {6A073364-6552-4CDB-861A-4BD8B51E0FF6}.Release|Any CPU.ActiveCfg = Release|Any CPU {6A073364-6552-4CDB-861A-4BD8B51E0FF6}.Release|Any CPU.Build.0 = Release|Any CPU - {C7CEFE53-6599-4249-B107-2912415660BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7CEFE53-6599-4249-B107-2912415660BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7CEFE53-6599-4249-B107-2912415660BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7CEFE53-6599-4249-B107-2912415660BD}.Release|Any CPU.Build.0 = Release|Any CPU {BA340773-EEAA-430C-A0FC-AB6C3B35BA6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BA340773-EEAA-430C-A0FC-AB6C3B35BA6D}.Debug|Any CPU.Build.0 = Debug|Any CPU {BA340773-EEAA-430C-A0FC-AB6C3B35BA6D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -106,6 +104,14 @@ Global {51EDA0FA-0D80-4631-9A2E-9315E99BA3CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {51EDA0FA-0D80-4631-9A2E-9315E99BA3CC}.Release|Any CPU.ActiveCfg = Release|Any CPU {51EDA0FA-0D80-4631-9A2E-9315E99BA3CC}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9C2CA3-E6F7-4798-AF8C-C1E538DC6B12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9C2CA3-E6F7-4798-AF8C-C1E538DC6B12}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9C2CA3-E6F7-4798-AF8C-C1E538DC6B12}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9C2CA3-E6F7-4798-AF8C-C1E538DC6B12}.Release|Any CPU.Build.0 = Release|Any CPU + {0273F0C6-A22B-494D-AA0B-30628C537FEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0273F0C6-A22B-494D-AA0B-30628C537FEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0273F0C6-A22B-494D-AA0B-30628C537FEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0273F0C6-A22B-494D-AA0B-30628C537FEA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE