贾荣国
3 years ago
68 changed files with 820 additions and 697 deletions
@ -1,7 +1,48 @@ |
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单新增DTO(ASN Create DTO)
|
|||
/// </summary>
|
|||
public class ASNCreateDTO : ASNCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单号(ASN Number)
|
|||
/// </summary>
|
|||
[Display(Name = "发货单号(AsnNumber)")] |
|||
public string AsnNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 要货计划单号(Request Plan Number)
|
|||
/// </summary>
|
|||
[Display(Name = "要货计划单号(RpNumber)")] |
|||
public string RpNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 订单号(Purchase order number)
|
|||
/// </summary>
|
|||
[Display(Name = "订单号(PoNumber)")] |
|||
public string PoNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商代码(Supplier code)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商代码(SupplierCode)")] |
|||
public string SupplierCode { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 地点(Site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点(Site)")] |
|||
public string Site { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(IAC company code)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Company)")] |
|||
public string Company { set; get; } |
|||
|
|||
|
|||
} |
|||
} |
@ -1,7 +1,17 @@ |
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单更新DTO(ASN update DTO)
|
|||
/// </summary>
|
|||
public class ASNUpdateDTO : ASNCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 并发时间戳(Concurrency Stamp)
|
|||
/// </summary>
|
|||
[Display(Name = "并发时间戳(Concurrency Stamp)")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
} |
|||
} |
@ -1,9 +0,0 @@ |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi |
|||
{ |
|||
public class InputDTO:EntityDto |
|||
{ |
|||
|
|||
} |
|||
} |
@ -1,10 +1,36 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.POs |
|||
{ |
|||
/// <summary>
|
|||
/// 采购订单创建Dto
|
|||
/// 采购订单新增DTO(Purchase order create DTO)
|
|||
/// </summary>
|
|||
public class POCreateDTO : POCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 订单号(PoNumber)
|
|||
/// </summary>
|
|||
[Display(Name = "订单号(PoNumber)")] |
|||
public string PoNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商代码(SupplierCode)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商代码(SupplierCode)")] |
|||
public string SupplierCode { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 地点(Site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点(Site)")] |
|||
public string Site { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(Company)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Company)")] |
|||
public string Company { set; get; } |
|||
|
|||
|
|||
} |
|||
} |
@ -1,10 +1,17 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.POs |
|||
{ |
|||
/// <summary>
|
|||
/// 采购订单更新Dto
|
|||
/// 采购订单更新DTO(Purchase order update DTO)
|
|||
/// </summary>
|
|||
public class POUpdateDTO : POCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 并发时间戳(Concurrency Stamp)
|
|||
/// </summary>
|
|||
[Display(Name = "并发时间戳(Concurrency Stamp)")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
} |
|||
} |
@ -1,10 +1,17 @@ |
|||
namespace Win_in.Sfs.Scp.WebApi.Parts |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Parts |
|||
{ |
|||
/// <summary>
|
|||
/// 零件更新Dto
|
|||
/// 零件更新DTO(Part update DTO)
|
|||
/// </summary>
|
|||
public class PartUpdateDTO : PartCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 并发时间戳(Concurrency Stamp)
|
|||
/// </summary>
|
|||
[Display(Name = "并发时间戳(Concurrency Stamp)")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
} |
|||
} |
@ -1,7 +1,75 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Receipts |
|||
{ |
|||
/// <summary>
|
|||
/// 澗새데劤藤DTO(Receipt create DTO)
|
|||
/// </summary>
|
|||
public class ReceiptCreateDTO : ReceiptCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 澗새데뵀(RcNumber)
|
|||
/// </summary>
|
|||
[Display(Name = "澗새데뵀(RcNumber)")] |
|||
public string RcNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 랙새데뵀(AsnNumber)
|
|||
/// </summary>
|
|||
[Display(Name = "랙새데뵀(AsnNumber)")] |
|||
public string AsnNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 狼새셕뺍데뵀(RpNumber)
|
|||
/// </summary>
|
|||
[Display(Name = "狼새셕뺍데뵀(RpNumber)")] |
|||
public string RpNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 땐데뵀(PoNumber)
|
|||
/// </summary>
|
|||
[Display(Name = "땐데뵀(PoNumber)")] |
|||
public string PoNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 묩壇�덜쯤(PoNumber)
|
|||
/// </summary>
|
|||
[Display(Name = "묩壇�덜쯤(SupplierCode)")] |
|||
public string SupplierCode { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 澗새데잚謹(RcType)
|
|||
/// "" :澗새데(Receipts)
|
|||
/// "R":藁새데(Return Document)
|
|||
/// </summary>
|
|||
[Display(Name = "澗새데잚謹(RcType)")] |
|||
public string RcType { set; get; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 뒈듐(Site)
|
|||
/// </summary>
|
|||
[Display(Name = "뒈듐(Site)")] |
|||
public string Site { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 무鱇(Company)
|
|||
/// </summary>
|
|||
[Display(Name = "무鱇(Company)")] |
|||
public string Company { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 땐데契(PoLine)
|
|||
/// </summary>
|
|||
[Display(Name = "땐데契(PoLine)")] |
|||
public string PoLine { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 쥐숭뵀(PartCode)
|
|||
/// </summary>
|
|||
[Display(Name = "쥐숭뵀(PartCode)")] |
|||
public string PartCode { set; get; } |
|||
|
|||
|
|||
} |
|||
} |
@ -1,9 +1,18 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Scp.WebApi.Receipts; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Receipts |
|||
{ |
|||
/// <summary>
|
|||
/// 收货单更新DTO(Receipt update DTO)
|
|||
/// </summary>
|
|||
public class ReceiptUpdateDTO : ReceiptCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 并发时间戳(Concurrency Stamp)
|
|||
/// </summary>
|
|||
[Display(Name = "并发时间戳(Concurrency Stamp)")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi |
|||
{ |
|||
/// <summary>
|
|||
/// 请求条件DTO(Request DTO)
|
|||
/// </summary>
|
|||
public class RequestDTO:PagedAndSortedResultRequestDto |
|||
{ |
|||
|
|||
} |
|||
} |
@ -1,12 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Samples |
|||
{ |
|||
public interface ISampleAppService : IApplicationService |
|||
{ |
|||
Task<SampleDto> GetAsync(); |
|||
|
|||
Task<SampleDto> GetAuthorizedAsync(); |
|||
} |
|||
} |
@ -1,7 +0,0 @@ |
|||
namespace Win_in.Sfs.Scp.WebApi.Samples |
|||
{ |
|||
public class SampleDto |
|||
{ |
|||
public int Value { get; set; } |
|||
} |
|||
} |
@ -1,7 +1,35 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.SupplierParts |
|||
{ |
|||
/// <summary>
|
|||
/// 供应商零件新增DTO(Supplier part create DTO)
|
|||
/// </summary>
|
|||
public class SupplierPartCreateDTO : SupplierPartCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 供应商代码(SupplierCode)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商代码(SupplierCode)")] |
|||
public string SupplierCode { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号(PartCode)
|
|||
/// </summary>
|
|||
[Display(Name = "零件号(PartCode)")] |
|||
public string PartCode { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 地点(Site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点")] |
|||
public string Site { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(Company)
|
|||
/// </summary>
|
|||
[Display(Name = "公司")] |
|||
public string Company { get; set; } |
|||
|
|||
} |
|||
} |
@ -1,9 +1,18 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Scp.WebApi.SupplierParts; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.SupplierParts |
|||
{ |
|||
/// <summary>
|
|||
/// 供应商零件更新DTO(Supplier Part Update DTO)
|
|||
/// </summary>
|
|||
public class SupplierPartUpdateDTO : SupplierPartCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 并发时间戳(Concurrency Stamp)
|
|||
/// </summary>
|
|||
[Display(Name = "并发时间戳(Concurrency Stamp)")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
} |
|||
} |
|||
|
@ -1,7 +1,22 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Suppliers |
|||
{ |
|||
/// <summary>
|
|||
/// 供应商新增DTO(Supplier create DTO)
|
|||
/// </summary>
|
|||
public class SupplierCreateDTO : SupplierCreateOrUpdateDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 代码(Code)
|
|||
/// </summary>
|
|||
[Display(Name = "代码(Code)")] |
|||
public string Code { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(Company)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Company)")] |
|||
public string Company { set; get; } |
|||
} |
|||
} |
@ -1,7 +1,18 @@ |
|||
using System.ComponentModel; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Suppliers |
|||
{ |
|||
public class SupplierUpdateDTO : SupplierCreateOrUpdateDTOBase |
|||
/// <summary>
|
|||
/// 供应商更新DTO(Supplier update DTO)
|
|||
/// </summary>
|
|||
public class SupplierUpdateDTO : SupplierCreateOrUpdateDTOBase, IHasConcurrencyStamp |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 并发时间戳(Concurrency Stamp)
|
|||
/// </summary>
|
|||
[Display(Name = "并发时间戳(Concurrency Stamp)")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
} |
|||
} |
|||
|
@ -1,31 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Samples |
|||
{ |
|||
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.Default)] |
|||
public class SampleAppService : WebApiAppService, ISampleAppService |
|||
{ |
|||
public Task<SampleDto> GetAsync() |
|||
{ |
|||
return Task.FromResult( |
|||
new SampleDto |
|||
{ |
|||
Value = 42 |
|||
} |
|||
); |
|||
} |
|||
|
|||
[Authorize] |
|||
public Task<SampleDto> GetAuthorizedAsync() |
|||
{ |
|||
return Task.FromResult( |
|||
new SampleDto |
|||
{ |
|||
Value = 42 |
|||
} |
|||
); |
|||
} |
|||
} |
|||
} |
@ -1,34 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Samples |
|||
{ |
|||
[RemoteService] |
|||
[Route("api/WebApi/sample")] |
|||
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)] |
|||
public class SampleController : WebApiController, ISampleAppService |
|||
{ |
|||
private readonly ISampleAppService _sampleAppService; |
|||
|
|||
public SampleController(ISampleAppService sampleAppService) |
|||
{ |
|||
_sampleAppService = sampleAppService; |
|||
} |
|||
|
|||
[HttpGet] |
|||
public async Task<SampleDto> GetAsync() |
|||
{ |
|||
return await _sampleAppService.GetAsync(); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("authorized")] |
|||
[Authorize] |
|||
public async Task<SampleDto> GetAuthorizedAsync() |
|||
{ |
|||
return await _sampleAppService.GetAsync(); |
|||
} |
|||
} |
|||
} |
@ -1,30 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Shouldly; |
|||
using Xunit; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.Samples |
|||
{ |
|||
public class SampleAppService_Tests : WebApiApplicationTestBase |
|||
{ |
|||
private readonly ISampleAppService _sampleAppService; |
|||
|
|||
public SampleAppService_Tests() |
|||
{ |
|||
_sampleAppService = GetRequiredService<ISampleAppService>(); |
|||
} |
|||
|
|||
[Fact] |
|||
public async Task GetAsync() |
|||
{ |
|||
var result = await _sampleAppService.GetAsync(); |
|||
result.Value.ShouldBe(42); |
|||
} |
|||
|
|||
[Fact] |
|||
public async Task GetAuthorizedAsync() |
|||
{ |
|||
var result = await _sampleAppService.GetAuthorizedAsync(); |
|||
result.Value.ShouldBe(42); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue