DTO Proxy:

- fix progetto
This commit is contained in:
Samuele Locatelli
2024-01-30 19:00:12 +01:00
parent ec1854844a
commit 77ac2c6d1b
4 changed files with 40 additions and 44 deletions
+25 -23
View File
@@ -1,14 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgwProxy.MagMan.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class ProjectDTO
{
#region Public Properties
/// <summary>
/// Key progetto (DB) / CLOUD
/// </summary>
public int ProjCloudId { get; set; }
/// <summary>
/// ID del DB EgtBW, univoco con KeyNum, (DB) / istanza locale
/// </summary>
public int ProjLocalId { get; set; } = 0;
/// <summary>
/// ID esterno (da EgtBW)
/// </summary>
public int ProjExtId { get; set; } = 0;
/// <summary>
/// Descrizione progetto (copiata da BTLFileName inizialmente)
/// </summary>
public string ProjDescription { get; set; } = "";
/// <summary>
/// Nome file BTL originale
@@ -61,9 +79,9 @@ namespace EgwProxy.MagMan.DTO
public string Machine { get; set; } = "";
/// <summary>
/// Id macchina (MagMan)
/// Id macchina (MagMan) DB / CLOUD
/// </summary>
public int MachineID { get; set; } = 0;
public int MachineCloudId { get; set; } = 0;
/// <summary>
/// Tempo lavorazione previsto (stima) in minuti
@@ -75,26 +93,10 @@ namespace EgwProxy.MagMan.DTO
/// </summary>
public double ProcTimeReal { get; set; } = 0;
/// <summary>
/// Descrizione progetto (copiata da BTLFileName inizialmente)
/// </summary>
public string ProjDescription { get; set; } = "";
/// <summary>
/// ID del DB EgtBW, univoco con KeyNum
/// </summary>
public int ProjExtDbId { get; set; } = 0;
/// <summary>
/// ID esterno (da EgtBW)
/// </summary>
public int ProjExtId { get; set; } = 0;
/// <summary>
/// Tipologia del progetto (Travi, Pareti, ...)
/// </summary>
public BWType PType { get; set; } = BWType.NULL;
#endregion Public Properties
}
}
+11 -17
View File
@@ -1,16 +1,12 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static MagMan.Core.Enums;
using static MagMan.Core.Enums;
namespace MagMan.Core.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class ProjectDTO
{
#region Public Properties
/// <summary>
/// Key progetto (DB) / CLOUD
@@ -27,6 +23,11 @@ namespace MagMan.Core.DTO
/// </summary>
public int ProjExtId { get; set; } = 0;
/// <summary>
/// Descrizione progetto (copiata da BTLFileName inizialmente)
/// </summary>
public string ProjDescription { get; set; } = "";
/// <summary>
/// Nome file BTL originale
/// </summary>
@@ -78,9 +79,9 @@ namespace MagMan.Core.DTO
public string Machine { get; set; } = "";
/// <summary>
/// Id macchina (MagMan)
/// Id macchina (MagMan) DB / CLOUD
/// </summary>
public int MachineID { get; set; } = 0;
public int MachineCloudId { get; set; } = 0;
/// <summary>
/// Tempo lavorazione previsto (stima) in minuti
@@ -91,18 +92,11 @@ namespace MagMan.Core.DTO
/// Tempo lavorazione reale in minuti (parziale o totale se chiuso/completato/archiviato)
/// </summary>
public double ProcTimeReal { get; set; } = 0;
/// <summary>
/// Descrizione progetto (copiata da BTLFileName inizialmente)
/// </summary>
public string ProjDescription { get; set; } = "";
/// <summary>
/// Tipologia del progetto (Travi, Pareti, ...)
/// </summary>
public BWType PType { get; set; } = BWType.NULL;
#endregion Public Properties
}
}
+2 -2
View File
@@ -678,7 +678,7 @@ namespace MagMan.Data.Tenant.Services
{
ProjModel answ = new ProjModel()
{
MachineID = origItem.MachineID,
MachineID = origItem.MachineCloudId,
KeyNum = origItem.KeyNum,
ProjExtDbId = origItem.ProjLocalId,
ProjExtId = origItem.ProjExtId,
@@ -813,7 +813,7 @@ namespace MagMan.Data.Tenant.Services
ProjCloudId = origItem.ProjDbId,
ProjLocalId = origItem.ProjExtDbId,
ProjExtId = origItem.ProjExtId,
MachineID = origItem.MachineID,
MachineCloudId = origItem.MachineID,
KeyNum = origItem.KeyNum,
BTLFileName = origItem.BTLFileName,
PType = origItem.PType,
+2 -2
View File
@@ -110,9 +110,9 @@ namespace DemoApp
foreach (var itemMat in projList)
{
Console.WriteLine(sep);
Console.WriteLine($"MachineId: {itemMat.MachineID}");
Console.WriteLine($"MachineId: {itemMat.MachineCloudId}");
Console.WriteLine($"Key: {itemMat.KeyNum}");
Console.WriteLine($"ProjExtDbId: {itemMat.ProjExtDbId}");
Console.WriteLine($"ProjLocalId: {itemMat.ProjLocalId}");
Console.WriteLine($"ProjExtId: {itemMat.ProjExtId}");
Console.WriteLine($"BTL filename: {itemMat.BTLFileName}");
Console.WriteLine($"PType: {itemMat.PType}");