Codebasis als Dateien ins Arbeitsrepo statt als Gitlink

QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142)
getrackt, ohne .gitmodules und ohne erreichbares Remote. Der
Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar
gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege
der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen.

Umstellung:
- Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert
  (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6)
- Gitlink aus dem Index entfernt
- Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB

Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte
bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
This commit is contained in:
Christoph Schwörer
2026-08-26 07:43:51 +02:00
parent 18edae75b6
commit f045b99a25
24664 changed files with 5846716 additions and 1 deletions
@@ -0,0 +1,56 @@
{
Data: {
ChangedByI3D: 22,
Comment: 'Was ist der Unterschied zwischen einer Berufsschule und Lidl? – Lidl lohnt sich.',
CreatedByI3D: 22,
I3D: 1,
IsActive: true,
ParentArticleProductionOrderI3D: null,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedArticleI3D: 11,
RelatedOrderItemI3D: null,
StepItems: [
{
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 1,
Comment: 'Schokomasse erstellen',
I3D: 1,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 0.000000,
State: 0
},
{
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 2,
Comment: 'Karamell aufspritzen',
I3D: 2,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 1.000000,
State: 0
},
{
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 3,
Comment: 'Mit Schokolade überziehen',
I3D: 3,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 2.000000,
State: 0
}
]
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,56 @@
{
Data: {
ChangedByI3D: 22,
Comment: 'Was steht auf dem Grabstein eines Mathematikers? - Damit hat er nicht gerechnet.',
CreatedByI3D: 22,
I3D: 2,
IsActive: true,
ParentArticleProductionOrderI3D: null,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedArticleI3D: 22,
RelatedOrderItemI3D: null,
StepItems: [
{
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 4,
Comment: 'Keks backen',
I3D: 4,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 0.000000,
State: 0
},
{
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 5,
Comment: 'Karamell aufspritzen',
I3D: 5,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 1.000000,
State: 0
},
{
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 6,
Comment: 'Mit Schokolade überziehen',
I3D: 6,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 2.000000,
State: 0
}
]
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,18 @@
{
Data: {
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 1,
Comment: 'Schokomasse erstellen',
I3D: 1,
IsActive: true,
MachineI3D: null,
ProducedAmount: 1,
RequiredAmount: 1,
SortOrder: 0.000000,
State: 1
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,18 @@
{
Data: {
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 4,
Comment: 'Keks backen',
I3D: 4,
IsActive: true,
MachineI3D: null,
ProducedAmount: 1,
RequiredAmount: 1,
SortOrder: 0.000000,
State: 2
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,84 @@
{
Data: [
{
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 2,
Comment: 'Karamell aufspritzen',
Description: 'Karamell aufspritzen',
DurationInMinutes: 10,
I3D: 2,
IsActive: true,
MachineI3D: null,
MachineKindI3D: 2,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedAmount: 0,
ProducedArticleI3D: 11,
ProductionMachineKindStepI3D: 2,
RelatedOrderItemI3D: null,
RequiredAmount: 1,
State: 0
},
{
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 3,
Comment: 'Mit Schokolade überziehen',
Description: 'Mit Schokolade überziehen',
DurationInMinutes: 10,
I3D: 3,
IsActive: true,
MachineI3D: null,
MachineKindI3D: 3,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedAmount: 0,
ProducedArticleI3D: 11,
ProductionMachineKindStepI3D: 3,
RelatedOrderItemI3D: null,
RequiredAmount: 1,
State: 0
},
{
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 5,
Comment: 'Karamell aufspritzen',
Description: 'Karamell aufspritzen',
DurationInMinutes: 10,
I3D: 5,
IsActive: true,
MachineI3D: null,
MachineKindI3D: 2,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedAmount: 0,
ProducedArticleI3D: 22,
ProductionMachineKindStepI3D: 2,
RelatedOrderItemI3D: null,
RequiredAmount: 1,
State: 0
},
{
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 6,
Comment: 'Mit Schokolade überziehen',
Description: 'Mit Schokolade überziehen',
DurationInMinutes: 10,
I3D: 6,
IsActive: true,
MachineI3D: null,
MachineKindI3D: 3,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedAmount: 0,
ProducedArticleI3D: 22,
ProductionMachineKindStepI3D: 3,
RelatedOrderItemI3D: null,
RequiredAmount: 1,
State: 0
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,65 @@
{
Data: [
{
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 1,
Comment: 'Schokomasse erstellen',
Description: 'Schokomasse erstellen',
DurationInMinutes: 5,
I3D: 1,
IsActive: true,
MachineI3D: null,
MachineKindI3D: 3,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedAmount: 1,
ProducedArticleI3D: 11,
ProductionMachineKindStepI3D: 1,
RelatedOrderItemI3D: null,
RequiredAmount: 1,
State: 1
},
{
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 3,
Comment: 'Mit Schokolade überziehen',
Description: 'Mit Schokolade überziehen',
DurationInMinutes: 10,
I3D: 3,
IsActive: true,
MachineI3D: null,
MachineKindI3D: 3,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedAmount: 0,
ProducedArticleI3D: 11,
ProductionMachineKindStepI3D: 3,
RelatedOrderItemI3D: null,
RequiredAmount: 1,
State: 0
},
{
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 6,
Comment: 'Mit Schokolade überziehen',
Description: 'Mit Schokolade überziehen',
DurationInMinutes: 10,
I3D: 6,
IsActive: true,
MachineI3D: null,
MachineKindI3D: 3,
PlannedFinishDate: DateTime,
PlannedStartDate: DateTime,
ProducedAmount: 0,
ProducedArticleI3D: 22,
ProductionMachineKindStepI3D: 3,
RelatedOrderItemI3D: null,
RequiredAmount: 1,
State: 0
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
CreatedByEmployeeI3D: 22,
EmployeeI3D: 22,
I3D: 1,
RfidToken: '12345678'
}
@@ -0,0 +1,50 @@
{
Data: [
{
ArticleProductionOrderStepItem: {
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 1,
Comment: 'Schokomasse erstellen',
I3D: 1,
IsActive: true,
MachineI3D: null,
ProducedAmount: 1,
RequiredAmount: 1,
SortOrder: 0.000000,
State: 1
},
ArticleProductionOrderTime: {
EmployeeI3D: 22,
EndTime: null,
I3D: 1,
StartTime: DateTime
},
I3D: 1
},
{
ArticleProductionOrderStepItem: {
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 3,
Comment: 'Mit Schokolade überziehen',
I3D: 3,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 2.000000,
State: 0
},
ArticleProductionOrderTime: {
EmployeeI3D: 22,
EndTime: null,
I3D: 1,
StartTime: DateTime
},
I3D: 2
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,71 @@
{
Data: [
{
ArticleProductionOrderStepItem: {
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 1,
Comment: 'Schokomasse erstellen',
I3D: 1,
IsActive: true,
MachineI3D: null,
ProducedAmount: 1,
RequiredAmount: 1,
SortOrder: 0.000000,
State: 1
},
ArticleProductionOrderTime: {
EmployeeI3D: 22,
EndTime: DateTime,
I3D: 1,
StartTime: DateTime
},
I3D: 1
},
{
ArticleProductionOrderStepItem: {
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 3,
Comment: 'Mit Schokolade überziehen',
I3D: 3,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 2.000000,
State: 0
},
ArticleProductionOrderTime: {
EmployeeI3D: 22,
EndTime: DateTime,
I3D: 1,
StartTime: DateTime
},
I3D: 2
},
{
ArticleProductionOrderStepItem: {
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 6,
Comment: 'Mit Schokolade überziehen',
I3D: 6,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 2.000000,
State: 0
},
ArticleProductionOrderTime: {
EmployeeI3D: 22,
EndTime: null,
I3D: 2,
StartTime: DateTime
},
I3D: 3
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,71 @@
{
Data: [
{
ArticleProductionOrderStepItem: {
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 1,
Comment: 'Schokomasse erstellen',
I3D: 1,
IsActive: true,
MachineI3D: null,
ProducedAmount: 1,
RequiredAmount: 1,
SortOrder: 0.000000,
State: 1
},
ArticleProductionOrderTime: {
EmployeeI3D: 22,
EndTime: DateTime,
I3D: 1,
StartTime: DateTime
},
I3D: 1
},
{
ArticleProductionOrderStepItem: {
ArticleProductionOrderI3D: 1,
ArticleProductionStepI3D: 3,
Comment: 'Mit Schokolade überziehen',
I3D: 3,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 2.000000,
State: 0
},
ArticleProductionOrderTime: {
EmployeeI3D: 22,
EndTime: DateTime,
I3D: 1,
StartTime: DateTime
},
I3D: 2
},
{
ArticleProductionOrderStepItem: {
ArticleProductionOrderI3D: 2,
ArticleProductionStepI3D: 6,
Comment: 'Mit Schokolade überziehen',
I3D: 6,
IsActive: true,
MachineI3D: null,
ProducedAmount: 0,
RequiredAmount: 1,
SortOrder: 2.000000,
State: 0
},
ArticleProductionOrderTime: {
EmployeeI3D: 22,
EndTime: DateTime,
I3D: 2,
StartTime: DateTime
},
I3D: 3
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
IsAvailable: true,
Message: null,
OperationSuccessful: true,
UserNotEnoughRights: false
}
@@ -0,0 +1,475 @@
using Centron.BusinessLogic;
using Centron.BusinessLogic.EmployeeArea;
using Centron.BusinessLogic.WebServices.Administration.CentronConfigDb;
using Centron.BusinessLogic.WebServices.Employee;
using Centron.BusinessLogic.WebServices.Production;
using Centron.BusinessLogic.WebServices.Warehousing;
using Centron.BusinessLogic.WebServices.Warehousing.ArticleProduction;
using Centron.Data.Entities.Administration.Logins;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.EmployeeArea;
using CentronSoftware.Centron.WebServices.Entities.Production;
using CentronSoftware.Centron.WebServices.Entities.Production.ArticleProductionOrder;
using CentronSoftware.Centron.WebServices.Entities.Production.ArticleProductionOrder.ArticleProductionOrderDataRecording;
using CentronSoftware.Centron.WebServices.Entities.Warehousing;
using System;
using System.Collections.Generic;
using System.Linq;
using Centron.BusinessLogic.WebServices.PasswordManager;
using CentronSoftware.Centron.WebServices.Entities.PasswordManager;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Production.ArticleProductionOrder
{
public class ArticleProductionOrderTest : EndToEndTest
{
public ArticleProductionOrderTest(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
this.Verifier.Settings.IgnoreProperty<ArticleProductionOrderDTO>(f => f.CreatedDate);
this.Verifier.Settings.IgnoreProperty<ArticleProductionOrderDTO>(f => f.CreatedThroughApplicationVersion);
this.Verifier.Settings.IgnoreProperty<ArticleProductionOrderDTO>(f => f.ChangedDate);
this.Verifier.Settings.IgnoreProperty<ArticleProductionOrderDTO>(f => f.ChangedThroughApplicationVersion);
this.Verifier.Settings.IgnoreProperty<EmployeeRfidTokenDTO>(f => f.CreatedAt);
}
public override void Execute()
{
this.PrepareDB();
this.CreateProductionMachineKinds();
this.CreateProductionMachineKindSteps();
this.CreateProductionMachineLocations();
this.CreateProducitonMachines();
this.CreateArticleProductionSteps();
this.CreateArticleProductionOrders();
this.GetArticleProductionOrderStepInfo();
this.StartArticleProductionOrderStepTime();
}
private void PrepareDB()
{
this.Sql("UPDATE dbo.ARTIK SET Fertigungsware = 1, Artikelbeschreibung = 'Mars' WHERE I3D = 11");
this.Sql("UPDATE dbo.ARTIK SET Fertigungsware = 1, Artikelbeschreibung = 'Twix' WHERE I3D = 22");
}
private void CreateProductionMachineKinds()
{
var machineKind1 = new ProductionMachineKindDTO()
{
Name = "Backstube",
IsActive = true,
I3D = -1
};
var machineKind2 = new ProductionMachineKindDTO()
{
Name = "Karamellmaschine",
IsActive = true,
I3D = -2
};
var machineKind3 = new ProductionMachineKindDTO()
{
Name = "Schokoschmelze",
IsActive = true,
I3D = -3
};
var kinds = new List<ProductionMachineKindDTO>()
{
machineKind1, machineKind2, machineKind3
};
WithSession(f => f.GetBL<ProductionWebServiceBL>().SaveProductionMachineKinds(kinds));
}
private void CreateProductionMachineKindSteps()
{
var machineKindStepDescription1 = new ProductionMachineKindStepsDescriptionDTO()
{
Description = "Schokomasse erstellen",
MachineKindI3D = 3,
IsActive = true,
I3D = -1
};
WithSession(f => f.GetBL<ProductionWebServiceBL>().SaveProductionMachineKindStepsDescriptionDTO(machineKindStepDescription1));
var machineKindStepDescription2 = new ProductionMachineKindStepsDescriptionDTO()
{
Description = "Karamell aufspritzen",
MachineKindI3D = 2,
IsActive = true,
I3D = -2
};
WithSession(f => f.GetBL<ProductionWebServiceBL>().SaveProductionMachineKindStepsDescriptionDTO(machineKindStepDescription2));
var machineKindStepDescription3 = new ProductionMachineKindStepsDescriptionDTO()
{
Description = "Mit Schokolade überziehen",
MachineKindI3D = 3,
IsActive = true,
I3D = -3
};
WithSession(f => f.GetBL<ProductionWebServiceBL>().SaveProductionMachineKindStepsDescriptionDTO(machineKindStepDescription3));
var machineKindStepDescription4 = new ProductionMachineKindStepsDescriptionDTO()
{
Description = "Keks backen",
MachineKindI3D = 1,
IsActive = true,
I3D = -4
};
WithSession(f => f.GetBL<ProductionWebServiceBL>().SaveProductionMachineKindStepsDescriptionDTO(machineKindStepDescription4));
}
private void CreateProductionMachineLocations()
{
var machineLocation1 = new ProductionMachineLocationDTO()
{
Name = "Mars-Produktionshalle",
IsActive = true,
ParentProductionMachineLocationI3D = null,
I3D = -1
};
var machineLocation2 = new ProductionMachineLocationDTO()
{
Name = "Twix-Keksfabrik",
IsActive = true,
ParentProductionMachineLocationI3D = -1,
I3D = -2
};
var locations = new List<ProductionMachineLocationDTO>()
{
machineLocation1, machineLocation2
};
WithSession(f => f.GetBL<ProductionWebServiceBL>().SaveProductionMachineLocations(locations));
}
private void CreateProducitonMachines()
{
// Runkind
// 0 => Einzelnd
// 1 => Volumen
var kinds = WithSession(f => f.GetBL<ProductionWebServiceBL>().GetProductionMachineKindByFilter(new ProductionMachineKindFilter()).Data);
var locations = WithSession(f => f.GetBL<ProductionWebServiceBL>().GetProductionMachineLocationByFilter(new ProductionMachineLocationFilter()).Data);
var machine1 = new ProductionMachineDTO()
{
Name = "Backstube1",
IsActive = true,
RunKind = 1,
AmountPerRun = 50,
ProductionMachineKind = kinds.First(f => f.I3D == 1),
ProductionMachineLocation = locations.First(f => f.I3D == 2),
RunsPerDay = 1
};
var machine2 = new ProductionMachineDTO()
{
Name = "Karamellmaschine1",
IsActive = true,
RunKind = 1,
AmountPerRun = 100,
ProductionMachineKind = kinds.First(f => f.I3D == 2),
ProductionMachineLocation = locations.First(f => f.I3D == 1)
};
var machine3 = new ProductionMachineDTO()
{
Name = "Schokoschmelze",
IsActive = true,
RunKind = 1,
AmountPerRun = 100,
ProductionMachineKind = kinds.First(f => f.I3D == 3),
ProductionMachineLocation = locations.First(f => f.I3D == 1)
};
var machines = new List<ProductionMachineDTO>()
{
machine1, machine2, machine3
};
}
private void CreateArticleProductionSteps()
{
var article = WithSession(f => f.GetBL<ArticleWebServiceBL>().GetArticlePreviewByArticleI3D(11));
using (var session = new BLSession())
{
var marsStep1 = new ArticleProductionStepDTO()
{
ProducedArticleI3D = 11,
IsActive = true,
Description = "Schokomasse erstellen",
DurationInMinutes = 5,
SortOrder = 0m,
MachineKindI3D = 3,
ProductionMachineKindStepI3D = 1,
RequiredAmount = 1
};
var marsStep2 = new ArticleProductionStepDTO()
{
ProducedArticleI3D = 11,
IsActive = true,
Description = "Karamell aufspritzen",
DurationInMinutes = 10,
SortOrder = 1m,
MachineKindI3D = 2,
ProductionMachineKindStepI3D = 2,
RequiredAmount = 1
};
var marsStep3 = new ArticleProductionStepDTO()
{
ProducedArticleI3D = 11,
IsActive = true,
Description = "Mit Schokolade überziehen",
DurationInMinutes = 10,
SortOrder = 2m,
MachineKindI3D = 3,
ProductionMachineKindStepI3D = 3,
RequiredAmount = 1
};
var twixStep1 = new ArticleProductionStepDTO()
{
ProducedArticleI3D = 22,
IsActive = true,
Description = "Keks backen",
DurationInMinutes = 5,
SortOrder = 0m,
MachineKindI3D = 1,
ProductionMachineKindStepI3D = 4,
RequiredAmount = 1
};
var twixStep2 = new ArticleProductionStepDTO()
{
ProducedArticleI3D = 22,
IsActive = true,
Description = "Karamell aufspritzen",
DurationInMinutes = 10,
SortOrder = 1m,
MachineKindI3D = 2,
ProductionMachineKindStepI3D = 2,
RequiredAmount = 1
};
var twixStep3 = new ArticleProductionStepDTO()
{
ProducedArticleI3D = 22,
IsActive = true,
Description = "Mit Schokolade überziehen",
DurationInMinutes = 10,
SortOrder = 2m,
MachineKindI3D = 3,
ProductionMachineKindStepI3D = 3,
RequiredAmount = 1
};
var articleProdcutionSteps = new List<ArticleProductionStepDTO>() { marsStep1, marsStep2, marsStep3, twixStep1, twixStep2, twixStep3 };
var result = session.GetBL<ArticleProductionWebServiceBL>().SaveArticleProductionSteps(articleProdcutionSteps);
}
}
private void CreateArticleProductionOrders()
{
var user = WithSession(f => f.GetBL<AppUserBL>().GetAppUser(f => f.I3D == 11));
using (var session = new BLSession())
{
var marsArticleProductionOrder = new ArticleProductionOrderDTO()
{
Comment = "Was ist der Unterschied zwischen einer Berufsschule und Lidl? – Lidl lohnt sich.",
IsActive = true,
ProducedArticleI3D = 11,
RelatedOrderItemI3D = null,
ParentArticleProductionOrderI3D = null,
PlannedStartDate = new DateTime(2023, 05, 15),
PlannedFinishDate = new DateTime(2023, 05, 16),
StepItems = new List<ArticleProductionOrderStepItemDTO>()
};
var filter1 = new ArticleProductionStepFilter() { ProducedArticleI3D = 11 };
var marsSteps = WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionStepsByFilter(filter1));
foreach (var step in marsSteps.Data.OrderBy(f => f.SortOrder))
{
var productionOrderStepItem = new ArticleProductionOrderStepItemDTO()
{
IsActive = true,
State = 0,
ArticleProductionStepI3D = step.I3D,
SortOrder = step.SortOrder,
MachineI3D = null, // Will be assigned dynamically
ProducedAmount = 0,
RequiredAmount = step.RequiredAmount,
Comment = step.Description
};
marsArticleProductionOrder.StepItems.Add(productionOrderStepItem);
}
var twixArticleProductionOrder = new ArticleProductionOrderDTO()
{
Comment = "Was steht auf dem Grabstein eines Mathematikers? - Damit hat er nicht gerechnet.",
IsActive = true,
ProducedArticleI3D = 22,
RelatedOrderItemI3D = null,
ParentArticleProductionOrderI3D = null,
PlannedStartDate = new DateTime(2023, 05, 15),
PlannedFinishDate = new DateTime(2023, 05, 16),
StepItems = new List<ArticleProductionOrderStepItemDTO>()
};
var filter2 = new ArticleProductionStepFilter() { ProducedArticleI3D = 22 };
var twixSteps = WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionStepsByFilter(filter2));
foreach (var step in twixSteps.Data.OrderBy(f => f.SortOrder))
{
var productionOrderStepItem = new ArticleProductionOrderStepItemDTO()
{
IsActive = true,
State = 0,
ArticleProductionStepI3D = step.I3D,
SortOrder = step.SortOrder,
MachineI3D = null, // Will be assigned dynamically
ProducedAmount = 0,
RequiredAmount = step.RequiredAmount,
Comment = step.Description
};
twixArticleProductionOrder.StepItems.Add(productionOrderStepItem);
}
var articleProductionOrderResult1 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().SaveOrUpdateArticleProductionOrders(
new List<ArticleProductionOrderDTO>() { marsArticleProductionOrder, twixArticleProductionOrder }, user));
var savedMarsArticleProductionOrderI3D = articleProductionOrderResult1.Data.FirstOrDefault(f => f.ProducedArticleI3D == 11);
var savedTwixArticleProductionOrderI3D = articleProductionOrderResult1.Data.FirstOrDefault(f => f.ProducedArticleI3D == 22);
var articleProductionOrder1 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrder(savedMarsArticleProductionOrderI3D.I3D));
var articleProductionOrder2 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrder(savedTwixArticleProductionOrderI3D.I3D));
this.Verifier.Verify("01_ArticleProductionOrder_Mars", articleProductionOrder1);
this.Verifier.Verify("02_ArticleProductionOrder_Twix", articleProductionOrder2);
var orderStepItem1 = articleProductionOrder1.Data.StepItems.OrderBy(f => f.SortOrder).FirstOrDefault();
var orderStepItem2 = articleProductionOrder2.Data.StepItems.OrderBy(f => f.SortOrder).FirstOrDefault();
orderStepItem1.State = 1;
orderStepItem1.ProducedAmount = orderStepItem1.RequiredAmount;
orderStepItem2.State = 2;
orderStepItem2.ProducedAmount = orderStepItem2.RequiredAmount;
this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().SaveOrUpdateArticleProductionOrderStepItem(orderStepItem1));
this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().SaveOrUpdateArticleProductionOrderStepItem(orderStepItem2));
var orderStepItemResult1 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrderStepItem(orderStepItem1.I3D));
var orderStepItemResult2 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrderStepItem(orderStepItem2.I3D));
this.Verifier.Verify("03_ArticleProductionOrderStepItem_Mars1", orderStepItemResult1);
this.Verifier.Verify("04_ArticleProductionOrderStepItem_Twix1", orderStepItemResult2);
}
}
private void GetArticleProductionOrderStepInfo()
{
var filter1 = new ArticleProductionOrderStepInfoFilter()
{
PlannedStartDate = new DateTime(2023, 05, 15),
State = 0
};
var articleProductionStepDataResult1 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrderStepInfoByFilter(filter1));
this.Verifier.Verify("05_ArticleProductionOrderStepInfo_Filter1", articleProductionStepDataResult1);
var filter2 = new ArticleProductionOrderStepInfoFilter()
{
MachineKindI3D = 3
};
var articleProductionStepDataResult2 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrderStepInfoByFilter(filter2));
this.Verifier.Verify("06_ArticleProductionOrderStepInfo_Filter2", articleProductionStepDataResult2);
}
private void StartArticleProductionOrderStepTime()
{
var user = WithSession(f => f.GetBL<AppUserBL>().GetAppUser(f => f.I3D == 11));
var connection = this.WithSession(f => f.GetBL<CentronConfigurationDbWebServiceBL>().CreateCentronConfigDb(false, Database.Username, Database.Password));
if (connection.OperationSuccessful == false)
throw new Exception(connection.Message);
this.Verifier.Verify("11_CreateCentronConfigDb_Result", connection);
// Use file instead of config DB
this.WithSession(f => f.GetBL<PasswordManagerWebServiceBL>().UpdatePasswordManagerSettings(new LoggedInUser(user), new PasswordManagerSettingsDTO
{
IsPasswordManagerGuidelineManagementActive = false,
SecondsUntilNewAuthentificationPasswordManagerAccess = 0,
MasterPasswordSaveLocation = MasterPasswordSaveLocation.SecureFile,
MasterPasswordSecureFileName = "TestMasterKey.txt"
}));
var masterkey = this.WithSession(f => f.GetBL<CentronConfigurationDbWebServiceBL>().SetHotlineMasterKey(new LoggedInUser(user), "1234ABC567"));
var employeeRfidToken = new EmployeeRfidTokenDTO()
{
EmployeeI3D = user.Employee.I3D,
RfidToken = "12345678"
};
var employeeRfidTokenSaveResult = this.WithSession(f => f.GetBL<EmployeeRfidTokenWebserviceBL>().SaveOrUpdateEmployeeRfidToken(employeeRfidToken, new LoggedInUser(user)));
this.Verifier.Verify("07_SaveRFIDFilter", employeeRfidTokenSaveResult);
var request = new ArticleProductionOrderStepItemTimeRequest()
{
RfidToken = employeeRfidTokenSaveResult.RfidToken,
ArticleProductionOrderStepItemI3Ds = new List<int> { 1, 3 }
};
var startArticleProductionOrderStepTime1 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().SetArticleProductionOrderStepItemTime(request));
var getArticleProductionOrderStepItemTimeDataRecordingByFilter1 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrderStepItemTimeDataRecordingByFilter(new ArticleProductionOrderStepItemTimeDataRecordingFilter()));
this.Verifier.Verify("08_GetArticleProductionOrderStepItemTimeDataRecording_Filter1", getArticleProductionOrderStepItemTimeDataRecordingByFilter1);
var request2 = new ArticleProductionOrderStepItemTimeRequest()
{
RfidToken = employeeRfidTokenSaveResult.RfidToken,
ArticleProductionOrderStepItemI3Ds = new List<int> { 6 }
};
var startArticleProductionOrderStepTime2 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().SetArticleProductionOrderStepItemTime(request2));
var getArticleProductionOrderStepItemTimeDataRecordingByFilter2 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrderStepItemTimeDataRecordingByFilter(new ArticleProductionOrderStepItemTimeDataRecordingFilter()));
this.Verifier.Verify("09_GetArticleProductionOrderStepItemTimeDataRecording_Filter2", getArticleProductionOrderStepItemTimeDataRecordingByFilter2);
var request3 = new ArticleProductionOrderStepItemTimeRequest()
{
RfidToken = employeeRfidTokenSaveResult.RfidToken,
OnlyStop = true,
};
var startArticleProductionOrderStepTime3 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().SetArticleProductionOrderStepItemTime(request3));
var getArticleProductionOrderStepItemTimeDataRecordingByFilter3 = this.WithSession(f => f.GetBL<ArticleProductionWebServiceBL>().GetArticleProductionOrderStepItemTimeDataRecordingByFilter(new ArticleProductionOrderStepItemTimeDataRecordingFilter()));
this.Verifier.Verify("10_GetArticleProductionOrderStepItemTimeDataRecording_Filter3", getArticleProductionOrderStepItemTimeDataRecordingByFilter3);
}
}
}