improvements, etc

This commit is contained in:
Loretta 2025-10-11 12:52:50 +02:00
parent 0f1ed24631
commit 5d86807bab
14 changed files with 97 additions and 10 deletions

View File

@ -0,0 +1,7 @@
using FruitBank.Common.Interfaces;
namespace FruitBank.Common.Server.Interfaces;
public interface ICustomOrderSignalREndpointServer : ICustomOrderSignalREndpointCommon
{
}

View File

@ -0,0 +1,9 @@
using FruitBank.Common.Interfaces;
using Mango.Nop.Core.Models;
namespace FruitBank.Common.Server.Interfaces;
public interface IFruitBankDataControllerServer : IFruitBankDataControllerCommon
{
}

View File

@ -3,6 +3,7 @@ using AyCode.Models.Server.DynamicMethods;
using AyCode.Services.SignalRs;
using FruitBank.Common.Interfaces;
using FruitBank.Common.Loggers;
using FruitBank.Common.Server.Interfaces;
using FruitBank.Common.SignalRs;
using Mango.Nop.Core.Loggers;
using Microsoft.Extensions.Configuration;
@ -27,10 +28,12 @@ namespace FruitBank.Common.Server.Services.SignalRs;
public class DevAdminSignalRHub : AcWebSignalRHubWithSessionBase<SignalRTags, Logger<DevAdminSignalRHub>>
{
public DevAdminSignalRHub(IConfiguration configuration, IFruitBankDataControllerServer fruitBankDataController/*, SessionService sessionService*/, IEnumerable<IAcLogWriterBase> logWriters)
public DevAdminSignalRHub(IConfiguration configuration, IFruitBankDataControllerServer fruitBankDataController/*, SessionService sessionService*/,
ICustomOrderSignalREndpointServer customOrderSignalREndpoint, IEnumerable<IAcLogWriterBase> logWriters)
: base(configuration, new Logger<DevAdminSignalRHub>(logWriters.ToArray()))
{
DynamicMethodCallModels.Add(new AcDynamicMethodCallModel<SignalRAttribute>(fruitBankDataController));
DynamicMethodCallModels.Add(new AcDynamicMethodCallModel<SignalRAttribute>(customOrderSignalREndpoint));
}
//public override Task OnReceiveMessage(int messageTag, byte[]? message, int? requestId)

View File

@ -0,0 +1,15 @@
using FruitBank.Common.Interfaces;
using Mango.Nop.Core.Dtos;
using Nop.Core.Domain.Orders;
namespace FruitBank.Common.Dtos;
public class OrderDto : MgOrderDto, IOrderDto
{
public OrderDto() :base()
{ }
public OrderDto(int orderId) : base(orderId)
{ }
public OrderDto(Order order) : base(order)
{ }
}

View File

@ -0,0 +1,15 @@
using FruitBank.Common.Interfaces;
using Mango.Nop.Core.Dtos;
using Nop.Core.Domain.Catalog;
namespace FruitBank.Common.Dtos;
public class ProductDto : MgProductDto, IProductDto
{
public ProductDto() :base()
{ }
public ProductDto(int productId) : base(productId)
{ }
public ProductDto(Product product) : base(product)
{ }
}

View File

@ -13,6 +13,8 @@ public abstract class MeasuringItemPalletBase : MgEntityBase, IMeasuringItemPall
[NotColumn]
protected int ForeignItemId;
[NotColumn]
public int ForeignKey => ForeignItemId;
public int Quantity { get; set; }

View File

@ -0,0 +1,5 @@
namespace FruitBank.Common.Interfaces;
public interface ICustomOrderSignalREndpointClient : ICustomOrderSignalREndpointCommon
{
}

View File

@ -0,0 +1,8 @@
using Mango.Nop.Core.Models;
namespace FruitBank.Common.Interfaces;
public interface ICustomOrderSignalREndpointCommon
{
//Task<OrderListModelExtended> GetPendingOrderModels();
}

View File

@ -1,7 +0,0 @@
using Mango.Nop.Core.Models;
namespace FruitBank.Common.Interfaces;
public interface IFruitBankDataControllerServer : IFruitBankDataControllerCommon
{
}

View File

@ -1,10 +1,11 @@
using AyCode.Interfaces.Entities;
using AyCode.Interfaces;
using AyCode.Interfaces.Entities;
using AyCode.Interfaces.TimeStampInfo;
using FruitBank.Common.Entities;
namespace FruitBank.Common.Interfaces;
public interface IMeasuringItemPalletBase : IEntityInt, IMeasuringQuantity, IMeasuringGrossWeight, IMeasured, ITimeStampInfo
public interface IMeasuringItemPalletBase : IEntityInt, IMeasuringQuantity, IMeasuringGrossWeight, IMeasured, ITimeStampInfo, ICustomForeignKeyInt
{
public double TareWeight { get; set; }
public double PalletWeight { get; set; }

View File

@ -0,0 +1,8 @@
using Mango.Nop.Core.Interfaces;
namespace FruitBank.Common.Interfaces;
public interface IOrderDto : IMgOrderDto
{
}

View File

@ -0,0 +1,8 @@
using Mango.Nop.Core.Interfaces;
namespace FruitBank.Common.Interfaces;
public interface IProductDto : IMgProductDto
{
}

View File

@ -0,0 +1,11 @@
//using Nop.Web.Areas.Admin.Models.Orders;
//using Nop.Web.Framework.Models;
//namespace FruitBank.Common.Models
//{
// public partial record OrderListModelExtended : BasePagedListModel<OrderModelExtended>, IOrderListModelExtended<OrderModelExtended>
// {
// public bool? NeedsMeasurement { get; set; }
// }
//}

View File

@ -45,6 +45,8 @@ public class SignalRTags : AcSignalRTags
public const int AddOrUpdateMeasuredShippingItemPallet = 97;
public const int AddOrUpdateMeasuredShippingItemPallets = 98;
public const int GetPendingOrderModels = 115;
public const int AuthenticateUser = 160;
public const int RefreshToken = 200;