Fix ItemDTO

This commit is contained in:
Samuele Locatelli
2024-01-30 18:41:59 +01:00
parent f77e95c9b9
commit eb99ec5437
4 changed files with 39 additions and 21 deletions
+13 -5
View File
@@ -6,17 +6,25 @@ using System.Threading.Tasks;
namespace EgwProxy.MagMan.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class ItemDTO
{
/// <summary>
/// Ext Ref Key Materiale (DB) / CLOUD
/// </summary>
public int MatCloudId { get; set; } = 0;
/// <summary>
/// Ext Ref Key Materiale (DB) / istanza locale
/// </summary>
public int MatLocalId { get; set; } = 0;
/// <summary>
/// Codice Univoco (DB)
/// </summary>
public int ItemID { get; set; } = 0;
/// <summary>
/// Codice Materiale di provenienza
/// </summary>
public int MatID { get; set; } = 0;
public int RawItemCloudId { get; set; } = 0;
/// <summary>
/// Check if is a Remnant
+14 -6
View File
@@ -6,7 +6,10 @@ using System.Text;
using System.Threading.Tasks;
namespace MagMan.Core.DTO
{
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class ItemDTO
{
/// <summary>
@@ -44,6 +47,11 @@ namespace MagMan.Core.DTO
/// </summary>
public int QtyAvail { get; set; } = 0;
/// <summary>
/// Item's Thikness
/// </summary>
public decimal HMm { get; set; } = 0;
/// <summary>
/// Item's Lenght
/// </summary>
@@ -54,14 +62,14 @@ namespace MagMan.Core.DTO
/// </summary>
public decimal WMm { get; set; } = 0;
/// <summary>
/// Item's Thikness
/// </summary>
public decimal HMm { get; set; } = 0;
/// <summary>
/// Note (optional)
/// </summary>
public string Note { get; set; } = "";
/// <summary>
/// Codice QR/Matrix Item
/// </summary>
public string ItemDtmx { get; set; } = "";
}
}
@@ -377,13 +377,13 @@ namespace MagMan.Data.Tenant.Controllers
RawItemModel answ = new RawItemModel()
{
MatId = origItem.MatCloudId,
Note = origItem.Note,
LMm = origItem.LMm,
WMm = origItem.WMm,
HMm = origItem.HMm,
IsRemn = origItem.IsRemn,
Location = origItem.Location,
QtyAvail = origItem.QtyAvail,
HMm = origItem.HMm,
LMm = origItem.LMm,
WMm = origItem.WMm,
Note = origItem.Note,
IsActive = isActive
};
@@ -400,13 +400,15 @@ namespace MagMan.Data.Tenant.Controllers
ItemDTO answ = new ItemDTO()
{
MatCloudId = origItem.MatId,
Note = origItem.Note,
LMm = origItem.LMm,
WMm = origItem.WMm,
HMm = origItem.HMm,
RawItemCloudId = origItem.RawItemId,
IsRemn = origItem.IsRemn,
Location = origItem.Location,
QtyAvail = origItem.QtyAvail
QtyAvail = origItem.QtyAvail,
HMm = origItem.HMm,
LMm = origItem.LMm,
WMm = origItem.WMm,
Note = origItem.Note,
ItemDtmx = origItem.ItemDtmx
};
return answ;
+1 -1
View File
@@ -87,7 +87,7 @@ namespace DemoApp
foreach (var itemInv in itemMat.ItemList)
{
Console.WriteLine(sepShort);
Console.WriteLine($"ID: {itemInv.ItemID}");
Console.WriteLine($"ID: {itemInv.RawItemCloudId}");
Console.WriteLine($"Location: {itemInv.Location}");
Console.WriteLine($"Descript: {itemInv.Note}");
Console.WriteLine($"Giacenza: {itemInv.QtyAvail}");