Merge remote-tracking branch 'origin/develop' into feature/Remove_autoinc_from_db
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Step.Database.Controllers;
|
||||
using CMS_CORE_Library.Models;
|
||||
using Step.Database.Controllers;
|
||||
using Step.Model.DatabaseModels;
|
||||
using Step.Model.DTOModels.ToolModels;
|
||||
using Step.NC;
|
||||
@@ -7,7 +8,6 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using static CMS_CORE_Library.DataStructures;
|
||||
using static Step.Config.ServerConfig;
|
||||
using static Step.Model.Constants;
|
||||
|
||||
@@ -551,6 +551,8 @@ namespace Step.Controllers.WebApi
|
||||
if (shankId.ShankId == 0)
|
||||
return BadRequest(API_ERROR_KEYS.INCORRECT_PARAMETERS);
|
||||
|
||||
DTONcShankModel dtoShank = new DTONcShankModel();
|
||||
|
||||
// Check data
|
||||
DbNcShankModel shank;
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
@@ -586,6 +588,9 @@ namespace Step.Controllers.WebApi
|
||||
|
||||
if (cmsError.IsError())
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
|
||||
|
||||
dtoShank = toolsManager.GetShank(shank.ShankId);
|
||||
}
|
||||
|
||||
// Update shank data
|
||||
@@ -593,7 +598,10 @@ namespace Step.Controllers.WebApi
|
||||
// Set shankId
|
||||
magazinePos.ShankId = shank.ShankId;
|
||||
|
||||
return Ok(magazinePos);
|
||||
dtoShank.MagazineId = magazineId;
|
||||
dtoShank.PositionId = positionId;
|
||||
|
||||
return Ok(dtoShank);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user