diff options
| author | Avi Levkovich <avi@twine-s.com> | 2019-12-22 12:34:49 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2019-12-22 12:34:49 +0200 |
| commit | 4f1b171aae508c983b1dffe8d21e40ba3b69c906 (patch) | |
| tree | fae19719cb31ef70bfcf2d1fd4405ee35dd54a9b /Software/Visual_Studio/Web/Tango.MachineService/Controllers | |
| parent | 82f97b7000677ead42a6d075793c146fd7c8cf1d (diff) | |
| parent | 1ee3c5e5cdacd6797fbcb87a7784b40fe5d6be7f (diff) | |
| download | Tango-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.cs | 6 |
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; |
