wanggang
1 year ago
3 changed files with 87 additions and 59 deletions
@ -0,0 +1,66 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; |
||||
|
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
||||
|
using Win.Sfs.Shared.RepositoryBase; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ; |
||||
|
|
||||
|
public interface IVmiService : IApplicationService, ITransientDependency, IJobService |
||||
|
{ |
||||
|
string Test(); |
||||
|
|
||||
|
void In(VmiCategory category, string erpToLoc, string partCode, string lu, decimal count, object message); |
||||
|
|
||||
|
void Out(VmiCategory category, string erpToLoc, string partCode, string lu, decimal count, object message); |
||||
|
|
||||
|
Task<PagedResultDto<VmiBalance>> Query(RequestDto request); |
||||
|
} |
||||
|
|
||||
|
[AllowAnonymous] |
||||
|
[Route("api/settleaccount/[controller]/[action]")]
|
||||
|
public class VmiAppService : ApplicationService, IVmiService, IJobService, ITransientDependency |
||||
|
{ |
||||
|
private readonly INormalEfCoreRepository<VmiBalance, Guid> _repository; |
||||
|
|
||||
|
public VmiAppService(INormalEfCoreRepository<VmiBalance, Guid> repository) |
||||
|
{ |
||||
|
this._repository = repository; |
||||
|
} |
||||
|
|
||||
|
[HttpPost] |
||||
|
public void Invoke() |
||||
|
{ |
||||
|
Console.WriteLine($"{nameof(VmiAppService)}:{DateTime.Now}"); |
||||
|
} |
||||
|
|
||||
|
[HttpPost] |
||||
|
public void In(VmiCategory category, string erpToLoc, string partCode, string lu, decimal count, object message) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
[HttpPost] |
||||
|
public void Out(VmiCategory category, string erpToLoc, string partCode, string lu, decimal count, object message) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
[HttpPost] |
||||
|
public async Task<PagedResultDto<VmiBalance>> Query(RequestDto input) |
||||
|
{ |
||||
|
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false); |
||||
|
var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); |
||||
|
//var dtos = ObjectMapper.Map<List<CodeSetting>, List<CodeSettingDto>>(entities);
|
||||
|
return new PagedResultDto<VmiBalance>(totalCount, entities); |
||||
|
} |
||||
|
|
||||
|
[HttpGet] |
||||
|
public string Test() |
||||
|
{ |
||||
|
return "Test"; |
||||
|
} |
||||
|
} |
@ -1,56 +0,0 @@ |
|||||
using System; |
|
||||
using System.Linq; |
|
||||
using Microsoft.AspNetCore.Authorization; |
|
||||
using Microsoft.AspNetCore.Mvc; |
|
||||
using Volo.Abp.Application.Services; |
|
||||
using Volo.Abp.DependencyInjection; |
|
||||
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
|
||||
|
|
||||
namespace Win.Sfs.SettleAccount.Entities.BQ; |
|
||||
|
|
||||
public interface IVmiService : IApplicationService, ITransientDependency, IJobService |
|
||||
{ |
|
||||
string Test(); |
|
||||
|
|
||||
void In(); |
|
||||
|
|
||||
void Out(); |
|
||||
|
|
||||
IQueryable<VmiBalance> Query(); |
|
||||
} |
|
||||
|
|
||||
[ApiExplorerSettings(IgnoreApi = true)] |
|
||||
[AllowAnonymous] |
|
||||
[Route("api/settleaccount/[controller]/[action]")]
|
|
||||
public class VmiService : IVmiService |
|
||||
{ |
|
||||
[NonAction] |
|
||||
public void Invoke() |
|
||||
{ |
|
||||
Console.WriteLine($"{nameof(VmiService)}:{DateTime.Now}"); |
|
||||
} |
|
||||
|
|
||||
[NonAction] |
|
||||
public void In() |
|
||||
{ |
|
||||
throw new System.NotImplementedException(); |
|
||||
} |
|
||||
|
|
||||
[NonAction] |
|
||||
public void Out() |
|
||||
{ |
|
||||
throw new System.NotImplementedException(); |
|
||||
} |
|
||||
|
|
||||
[HttpPost] |
|
||||
public IQueryable<VmiBalance> Query() |
|
||||
{ |
|
||||
throw new System.NotImplementedException(); |
|
||||
} |
|
||||
|
|
||||
[HttpGet] |
|
||||
public string Test() |
|
||||
{ |
|
||||
return "Test"; |
|
||||
} |
|
||||
} |
|
Loading…
Reference in new issue