Added available_tools
This commit is contained in:
@@ -246,6 +246,15 @@ namespace Step.Database.Controllers
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DTONcToolModel> GetAvailableTools()
|
||||
{
|
||||
List<DTONcToolModel> dtoTools = GetTools()
|
||||
.Where(x => x.ShankId == null || x.ShankId == 0)
|
||||
.ToList();
|
||||
|
||||
return dtoTools;
|
||||
}
|
||||
|
||||
public DbNcToolModel AddTool(DTONewNcToolModel dtoTool)
|
||||
{
|
||||
DbNcToolModel tool = (DbNcToolModel)dtoTool;
|
||||
|
||||
@@ -145,9 +145,7 @@ namespace Step.NC
|
||||
}
|
||||
|
||||
#endregion File manager
|
||||
|
||||
|
||||
|
||||
|
||||
#region Read Data
|
||||
|
||||
public CmsError GetNcGenericData(out DTONcGenericDataModel genericData)
|
||||
|
||||
@@ -96,8 +96,7 @@ namespace Step.Controllers.WebApi
|
||||
|
||||
// Read all contents of multipart message into CustomMultipartFormDataStreamProvider.
|
||||
var result = await Request.Content.ReadAsMultipartAsync(provider);
|
||||
|
||||
Thread.Sleep(5000);
|
||||
|
||||
// Send OK Response along with saved file names to the client.
|
||||
return Ok();
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace Step.Controllers.WebApi
|
||||
// If option is active
|
||||
if (!ToolManagerConfig.FamilyOpt)
|
||||
{
|
||||
// Copy only family
|
||||
// Copy only family
|
||||
DTONewNcFamilyModel newFamily = new DTONewNcFamilyModel();
|
||||
SupportFunctions.CopyProperties(dtoToolWithFamily, newFamily);
|
||||
// Update only family data
|
||||
@@ -469,7 +469,7 @@ namespace Step.Controllers.WebApi
|
||||
}
|
||||
|
||||
[Route("magazine/available_shanks"), HttpGet]
|
||||
public IHttpActionResult GetAvailableTools()
|
||||
public IHttpActionResult GetAvailableShanks()
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
@@ -479,6 +479,17 @@ namespace Step.Controllers.WebApi
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazine/available_tools"), HttpGet]
|
||||
public IHttpActionResult GetAvailableTools()
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
List<DTONcToolModel> tools = toolsManager.GetAvailableTools();
|
||||
|
||||
return Ok(tools);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazine/{magazineId:int}/load/position/{positionId:int}"), HttpPut]
|
||||
public IHttpActionResult LoadToolInToMagazine(byte magazineId, byte positionId, [FromBody][Required] DTONcUpdateMagazineModel shankId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user