aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-12-22 11:27:51 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-12-22 11:27:51 +0200
commit8c3ab6389c3ba0d5bfefc151cd6718016ea9cf44 (patch)
treee280a4df15077f02f9b9efd972a3350929db428a /Software/Visual_Studio/Web/Tango.MachineService/Controllers
parentd0ad477ecc3b4de354aee900e1b5335bc31ab103 (diff)
parentcd670d0404673efd095ae2baec1873b916c49c81 (diff)
downloadTango-8c3ab6389c3ba0d5bfefc151cd6718016ea9cf44.tar.gz
Tango-8c3ab6389c3ba0d5bfefc151cd6718016ea9cf44.zip
MERGE
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
index 10a732221..1bb025217 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
@@ -160,6 +160,8 @@ namespace Tango.MachineService.Controllers
tangoUpdate.UpdateStatus = TangoUpdateStatuses.SetupStarted;
db.TangoUpdates.Add(tangoUpdate);
+ machine.ProductionDate = DateTime.UtcNow;
+
db.SaveChanges();
_pendingUpdates.Add(new PPCPendingUpdate()
@@ -328,6 +330,10 @@ namespace Tango.MachineService.Controllers
var hardwareVersions = db.HardwareVersions.Select(x => new { x.Guid, x.LastUpdated }).ToList();
var catalogs = db.ColorCatalogs.Select(x => new { x.Guid, x.LastUpdated }).ToList();
+ var arr = request.UsedRmlsGuids.ToArray();
+ var existingRml = db.Rmls.Where(x => arr.Contains(x.Guid)).Select(x => x.Guid).Distinct().ToList();
+ response.UsedNotExistingRmlsGuids = arr.Where(x => !existingRml.Exists(y => y == x)).ToList();
+
bool hasDatabaseUpdates = false;
hasDatabaseUpdates = machine.LastUpdated > request.MachineLastUpdated;