aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-12-22 12:34:49 +0200
committerAvi Levkovich <avi@twine-s.com>2019-12-22 12:34:49 +0200
commit4f1b171aae508c983b1dffe8d21e40ba3b69c906 (patch)
treefae19719cb31ef70bfcf2d1fd4405ee35dd54a9b /Software/Visual_Studio/Web/Tango.MachineService/Controllers
parent82f97b7000677ead42a6d075793c146fd7c8cf1d (diff)
parent1ee3c5e5cdacd6797fbcb87a7784b40fe5d6be7f (diff)
downloadTango-4f1b171aae508c983b1dffe8d21e40ba3b69c906.tar.gz
Tango-4f1b171aae508c983b1dffe8d21e40ba3b69c906.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
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;