Browse Source

提交

shengtang
gwbvipvip 1 year ago
parent
commit
7ee7d61dfc
5 changed files with 103 additions and 1 deletions
  1. +14
    -0
      backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml
  2. +59
    -0
      backend/BPA.MES.Base.Application/Services/AGVService/Services/AGVThirdPartyService.cs
  3. +12
    -0
      backend/BPA.MES.Base.Application/Services/AGVService/Services/IAGVThirdPartyService.cs
  4. +1
    -0
      backend/BPA.MES.Base.Core/BPA.MES.Base.Core.csproj
  5. +17
    -1
      backend/BPA.MES.Base.Web.Core/Startup.cs

+ 14
- 0
backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml View File

@@ -1662,6 +1662,20 @@
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:BPA.MES.Base.Application.Services.AGVService.Services.AGVThirdPartyService.ExecuteAsync(BPA.AGV.KCExecuteRequest)">
<summary>
下发任务
</summary>
<param name="cExecuteRequest"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.AGVService.Services.AGVThirdPartyService.CancelAsync(BPA.AGV.KCCancelRequest)">
<summary>
取消任务
</summary>
<param name="kCCancelRequest"></param>
<returns></returns>
</member>
<member name="T:BPA.MES.Base.Application.Services.AgvPointService">
<summary>
名 称 :AGV点位管理


+ 59
- 0
backend/BPA.MES.Base.Application/Services/AGVService/Services/AGVThirdPartyService.cs View File

@@ -0,0 +1,59 @@
using BPA.AGV;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.MES.Base.Application.Services.AGVService.Services
{

[ApiDescriptionSettings("AGV管理", Name = "AgvThirdParty", Tag = "AGV第三方api", KeepName = true, SplitCamelCase = true, KeepVerb = true)]
public class AGVThirdPartyService:IAGVThirdPartyService, ITransient, IDynamicApiController
{
private readonly AGVHandler _aGVHandler;
public AGVThirdPartyService(AGVHandler aGVHandler)
{
_aGVHandler = aGVHandler;
}

/// <summary>
/// 下发任务
/// </summary>
/// <param name="cExecuteRequest"></param>
/// <returns></returns>
[HttpPost]
public async Task<KCResponse> ExecuteAsync(KCExecuteRequest cExecuteRequest)
{
if (cExecuteRequest.JobData != null)
cExecuteRequest = new KCExecuteRequest
{
Url = cExecuteRequest.Url,
RobotJobId = Guid.NewGuid().ToString(),
WarehouseId = cExecuteRequest.WarehouseId,
JobPriority = cExecuteRequest.JobPriority,
JobPriorityType = cExecuteRequest.JobPriorityType,
JobData = new KCJobDataRequest
{
StartPoint = cExecuteRequest.JobData.StartPoint,

EndPoint = cExecuteRequest.JobData.EndPoint,
}
};
return await _aGVHandler.ExecuteAsync(cExecuteRequest);
}

/// <summary>
/// 取消任务
/// </summary>
/// <param name="kCCancelRequest"></param>
/// <returns></returns>
[HttpPost]
public async Task<KCResponse> CancelAsync(KCCancelRequest kCCancelRequest)
{
return await _aGVHandler.CancelAsync(kCCancelRequest);
}

}
}

+ 12
- 0
backend/BPA.MES.Base.Application/Services/AGVService/Services/IAGVThirdPartyService.cs View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.MES.Base.Application.Services.AGVService.Services
{
public class IAGVThirdPartyService
{
}
}

+ 1
- 0
backend/BPA.MES.Base.Core/BPA.MES.Base.Core.csproj View File

@@ -13,6 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.AGV" Version="1.0.1" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.8.6.6" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.8.6.6" />
<PackageReference Include="Furion.Pure" Version="4.8.6.6" />


+ 17
- 1
backend/BPA.MES.Base.Web.Core/Startup.cs View File

@@ -1,4 +1,5 @@
using BPA.MES.Base.Application;
using BPA.AGV;
using BPA.MES.Base.Application;
using BPA.MES.Base.Application.Subscriber;
using BPA.MES.Base.Core;
using Furion;
@@ -30,6 +31,21 @@ public class Startup : AppStartup
builder.AddSubscriber(typeof(ToDoEventSubscriber));
});
services.AddRemoteRequest();
services.AddAGV(op =>
{
op = new AGVOptions()
{
Header=new KCOption()
{
AppKey="43",
AppSecret="12",
RequestId= "43",
Timestamp= "2234234324",
Version= "2.9"
}
};
});

services.AddControllers()
.AddInjectWithUnifyResult();
}


Loading…
Cancel
Save