|
|
@ -61,10 +61,12 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase<Injectio |
|
|
|
_issueJobAppService = issueJobAppService; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 东阳V2
|
|
|
|
|
|
|
|
public override async Task<InjectionRequestDTO> HandleAsync(Guid id) |
|
|
|
{ |
|
|
|
var entity=await _repository.GetAsync(id).ConfigureAwait(false); |
|
|
|
var entity = await _repository.GetAsync(id).ConfigureAwait(false); |
|
|
|
await LocalEventBus.PublishAsync(new SfsHandledEntityEventData<InjectionRequest>(entity), false).ConfigureAwait(false); |
|
|
|
return ObjectMapper.Map<InjectionRequest, InjectionRequestDTO>(entity); |
|
|
|
} |
|
|
@ -72,12 +74,6 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase<Injectio |
|
|
|
[HttpPost("")] |
|
|
|
//[Authorize(InjectionRequestPermissions.Create)]
|
|
|
|
public override async Task<InjectionRequestDTO> CreateAsync(InjectionRequestEditInput input) |
|
|
|
{ |
|
|
|
return await CreateAndHandleAsync(input).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
//[Authorize(InjectionRequestPermissions.Create)]
|
|
|
|
private async Task<InjectionRequestDTO> CreateAndHandleAsync(InjectionRequestEditInput input) |
|
|
|
{ |
|
|
|
foreach (var item in input.Details) |
|
|
|
{ |
|
|
@ -113,6 +109,19 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase<Injectio |
|
|
|
return dto; |
|
|
|
} |
|
|
|
|
|
|
|
//[Authorize(InjectionRequestPermissions.Create)]
|
|
|
|
[HttpPost("create-and-handle")] |
|
|
|
public async Task<InjectionRequestDTO> CreateAndHandleAsync(InjectionRequestEditInput input) |
|
|
|
{ |
|
|
|
var injectionRequestDto = await CreateAsync(input).ConfigureAwait(false); |
|
|
|
|
|
|
|
await HandleAsync(injectionRequestDto.Id).ConfigureAwait(false); |
|
|
|
|
|
|
|
return injectionRequestDto; |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据类型 获取叫料申请
|
|
|
|
/// </summary>
|
|
|
|