Browse Source

asn接口调整

master
yu.wu 3 years ago
parent
commit
03717f0042
  1. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNCreateOrUpdateDTOBase.cs
  2. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNDTO.cs
  3. 18
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNDetailsDTO.cs
  4. 5
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/IASNAppService.cs
  5. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/POCreateOrUpdateDTOBase.cs
  6. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/PODTO.cs
  7. 24
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ASNs/ASNAppService.cs
  8. 4
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ASNs/ASNLabelAppService.cs
  9. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/POs/POAppService.cs
  10. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs
  11. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs
  12. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Samples/SampleAppService.cs
  13. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/SupplierParts/SupplierPartAppService.cs
  14. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs
  15. 8
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASN.cs
  16. 26
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASNDetail.cs
  17. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/POs/PO.cs
  18. 5
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContextModelCreatingExtensions.cs

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNCreateOrUpdateDTOBase.cs

@ -100,6 +100,12 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
[Display(Name = "备注(Remark)")] [Display(Name = "备注(Remark)")]
public string Remark { set; get; } public string Remark { set; get; }
/// <summary>
/// 是否已读(IsrRead)
/// </summary>
[Display(Name = "是否已读(IsrRead)")]
public bool IsrRead { set; get; }
public virtual ICollection<ASNDetailsDTO> ASNDetails { get; set; } public virtual ICollection<ASNDetailsDTO> ASNDetails { get; set; }
} }

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNDTO.cs

@ -100,6 +100,12 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
[Display(Name = "备注(Remark)")] [Display(Name = "备注(Remark)")]
public string Remark { set; get; } public string Remark { set; get; }
/// <summary>
/// 是否已读(IsrRead)
/// </summary>
[Display(Name = "是否已读(IsrRead)")]
public bool IsrRead { set; get; }
public virtual ICollection<ASNDetailsDTO> ASNDetails { get; set; } public virtual ICollection<ASNDetailsDTO> ASNDetails { get; set; }
} }

18
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNDetailsDTO.cs

@ -95,9 +95,21 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
public decimal SupplierPackConvertRate { set; get; } public decimal SupplierPackConvertRate { set; get; }
/// <summary> /// <summary>
/// 备注(Remark) /// 标签代码(LabelCode)
/// </summary> /// </summary>
[Display(Name = "备注(Remark)")] [Display(Name = "标签代码(LabelCode)")]
public string Remark { set; get; } public string LabelCode { set; get; }
/// <summary>
/// 完整条码数据(BarCode)
/// </summary>
[Display(Name = "完整条码数据(BarCode)")]
public string BarCode { set; get; }
/// <summary>
/// 托标签号(PalletLabelnumber)
/// </summary>
[Display(Name = "托标签号(PalletLabelnumber)")]
public string PalletLabelnumber { set; get; }
} }
} }

5
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/IASNAppService.cs

@ -1,10 +1,13 @@
using System; using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
namespace Win_in.Sfs.Scp.WebApi.ASNs namespace Win_in.Sfs.Scp.WebApi.ASNs
{ {
public interface IASNAppService:ICrudAppService<ASNDTO,Guid,InputDTO,ASNCreateDTO, ASNUpdateDTO> public interface IASNAppService:ICrudAppService<ASNDTO,Guid,InputDTO,ASNCreateDTO, ASNUpdateDTO>
{ {
Task<PagedResultDto<ASNDTO>> GetDataAsync(bool isRead);
Task<ASNDTO> UpdateISReadAsync(Guid id,bool isRead);
} }
} }

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/POCreateOrUpdateDTOBase.cs

@ -53,12 +53,6 @@ namespace Win_in.Sfs.Scp.WebApi.POs
[Display(Name = "截止日期(DueDate)")] [Display(Name = "截止日期(DueDate)")]
public DateTime DueDate { set; get; } public DateTime DueDate { set; get; }
/// <summary>
/// 版本(Version)
/// </summary>
[Display(Name = "版本(Version)")]
public string Version { set; get; }
/// <summary> /// <summary>
/// 税率(TaxRate) /// 税率(TaxRate)
/// </summary> /// </summary>

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/PODTO.cs

@ -54,12 +54,6 @@ namespace Win_in.Sfs.Scp.WebApi.POs
[Display(Name = "截止日期(DueDate)")] [Display(Name = "截止日期(DueDate)")]
public DateTime DueDate { set; get; } public DateTime DueDate { set; get; }
/// <summary>
/// 版本(Version)
/// </summary>
[Display(Name = "版本(Version)")]
public string Version { set; get; }
/// <summary> /// <summary>
/// 税率(TaxRate) /// 税率(TaxRate)
/// </summary> /// </summary>

24
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ASNs/ASNAppService.cs

@ -39,7 +39,7 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
/// <summary> /// <summary>
///获取数据列表 (Get data list) ///获取数据列表 (Get data list)
/// </summary> /// </summary>
/// <param name="id"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]
@ -48,6 +48,17 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
return base.GetListAsync(input); return base.GetListAsync(input);
} }
/// <summary>
///获取数据列表 (Get data list)
/// </summary>
/// <param name="isRead"></param>
/// <returns></returns>
[HttpGet]
[Route("GetISReadListAsync")]
public Task<PagedResultDto<ASNDTO>> GetDataAsync(bool isRead)
{
return GetDataAsync(isRead);
}
/// <summary> /// <summary>
/// 新增实体 (Create New entity) /// 新增实体 (Create New entity)
@ -71,6 +82,17 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
return base.UpdateAsync(id, input); return base.UpdateAsync(id, input);
} }
/// <summary>
/// 修改实体已读状态 (Modify entity read status)
/// </summary>
/// <returns></returns>
[HttpPut]
[Route("UpdateISReadAsync")]
public Task<ASNDTO> UpdateISReadAsync(Guid id, bool isRead)
{
return UpdateISReadAsync(id, isRead);
}
/// <summary> /// <summary>
/// 删除实体 (Delete entity) /// 删除实体 (Delete entity)
/// </summary> /// </summary>

4
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ASNs/ASNLabelAppService.cs

@ -15,7 +15,7 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
/// </summary> /// </summary>
[AllowAnonymous] [AllowAnonymous]
[Route("api/SCP/ASNLabel")] [Route("api/SCP/ASNLabel")]
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)] [ApiExplorerSettings(GroupName = SwaggerGroupConsts.Default)]
public class ASNLabelAppService : CrudAppService<ASNLabel, ASNLabelDTO, Guid,InputDTO, ASNLabelCreateDTO, ASNLabelUpdateDTO>, IASNLabelAppService public class ASNLabelAppService : CrudAppService<ASNLabel, ASNLabelDTO, Guid,InputDTO, ASNLabelCreateDTO, ASNLabelUpdateDTO>, IASNLabelAppService
{ {
@ -42,7 +42,7 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
/// <summary> /// <summary>
///获取数据列表 (Get data list) ///获取数据列表 (Get data list)
/// </summary> /// </summary>
/// <param name="id"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/POs/POAppService.cs

@ -40,7 +40,7 @@ namespace Win_in.Sfs.Scp.WebApi.POs
/// <summary> /// <summary>
///获取数据列表 (Get data list) ///获取数据列表 (Get data list)
/// </summary> /// </summary>
/// <param name="id"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs

@ -42,7 +42,7 @@ namespace Win_in.Sfs.Scp.WebApi.Parts
/// <summary> /// <summary>
///获取数据列表 (Get data list) ///获取数据列表 (Get data list)
/// </summary> /// </summary>
/// <param name="id"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs

@ -40,7 +40,7 @@ namespace Win_in.Sfs.Scp.WebApi.Receipts
/// <summary> /// <summary>
///获取数据列表 (Get data list) ///获取数据列表 (Get data list)
/// </summary> /// </summary>
/// <param name="id"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Samples/SampleAppService.cs

@ -1,8 +1,10 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Win_in.Sfs.Scp.WebApi.Samples namespace Win_in.Sfs.Scp.WebApi.Samples
{ {
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.Default)]
public class SampleAppService : WebApiAppService, ISampleAppService public class SampleAppService : WebApiAppService, ISampleAppService
{ {
public Task<SampleDto> GetAsync() public Task<SampleDto> GetAsync()

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/SupplierParts/SupplierPartAppService.cs

@ -40,7 +40,7 @@ namespace Win_in.Sfs.Scp.WebApi.SupplierParts
/// <summary> /// <summary>
///获取数据列表 (Get data list) ///获取数据列表 (Get data list)
/// </summary> /// </summary>
/// <param name="id"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs

@ -41,7 +41,7 @@ namespace Win_in.Sfs.Scp.WebApi.Supplierss
/// <summary> /// <summary>
///获取数据列表 (Get data list) ///获取数据列表 (Get data list)
/// </summary> /// </summary>
/// <param name="id"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]

8
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASN.cs

@ -104,6 +104,12 @@ namespace Win_in.Sfs.Scp.WebApi
[Display(Name = "备注(Remark)")] [Display(Name = "备注(Remark)")]
public string Remark { set; get; } public string Remark { set; get; }
/// <summary>
/// 是否已读(IsrRead)
/// </summary>
[Display(Name = "是否已读(IsrRead)")]
public bool IsrRead { set; get; }
public virtual List<ASNDetail> ASNDetails { get; set; } public virtual List<ASNDetail> ASNDetails { get; set; }
@ -120,7 +126,7 @@ namespace Win_in.Sfs.Scp.WebApi
} }
ASNDetails.Add(new ASNDetail(guidGenerator.Create(), detail.AsnNumber, detail.PoNumber, detail.PoLine, detail.PartCode, detail.Lot, detail.Supplierlot, detail.ProduceDate, ASNDetails.Add(new ASNDetail(guidGenerator.Create(), detail.AsnNumber, detail.PoNumber, detail.PoLine, detail.PartCode, detail.Lot, detail.Supplierlot, detail.ProduceDate,
detail.Uom, detail.DeliverQty, detail.StdPackUom, detail.StdPackQty, detail.SupplierPackUom,detail.SupplierPackQty,detail.SupplierPackConvertRate, detail.Remark)); detail.Uom, detail.DeliverQty, detail.StdPackUom, detail.StdPackQty, detail.SupplierPackUom,detail.SupplierPackQty,detail.SupplierPackConvertRate, detail.LabelCode,detail.BarCode,detail.PalletLabelnumber));
} }

26
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASNDetail.cs

@ -95,17 +95,29 @@ namespace Win_in.Sfs.Scp.WebApi
public decimal SupplierPackConvertRate { set; get; } public decimal SupplierPackConvertRate { set; get; }
/// <summary> /// <summary>
/// 备注(Remark) /// 标签代码(LabelCode)
/// </summary> /// </summary>
[Display(Name = "备注(Remark)")] [Display(Name = "标签代码(LabelCode)")]
public string Remark { set; get; } public string LabelCode { set; get; }
/// <summary>
/// 完整条码数据(BarCode)
/// </summary>
[Display(Name = "完整条码数据(BarCode)")]
public string BarCode { set; get; }
/// <summary>
/// 托标签号(PalletLabelnumber)
/// </summary>
[Display(Name = "托标签号(PalletLabelnumber)")]
public string PalletLabelnumber { set; get; }
public ASNDetail() { } public ASNDetail() { }
public ASNDetail( public ASNDetail(
Guid id, string asnNumber,string poNumber, string poLine, string partCode, string lot, string supplierlot, DateTime produceDate, string uom, Guid id, string asnNumber,string poNumber, string poLine, string partCode, string lot, string supplierlot, DateTime produceDate, string uom,decimal deliverQty,
decimal deliverQty, string stdPackUom, decimal stdPackQty, string supplierPackUom, decimal supplierPackQty, decimal supplierPackConvertRate, string remark) : base(id) string stdPackUom, decimal stdPackQty, string supplierPackUom, decimal supplierPackQty, decimal supplierPackConvertRate,string labelCode,string barCode,string palletLabelnumber) : base(id)
{ {
AsnNumber = asnNumber; AsnNumber = asnNumber;
PoNumber = poNumber; PoNumber = poNumber;
@ -121,7 +133,9 @@ namespace Win_in.Sfs.Scp.WebApi
SupplierPackUom = supplierPackUom; SupplierPackUom = supplierPackUom;
SupplierPackQty = supplierPackQty; SupplierPackQty = supplierPackQty;
SupplierPackConvertRate = supplierPackConvertRate; SupplierPackConvertRate = supplierPackConvertRate;
Remark = remark; LabelCode = labelCode;
BarCode = barCode;
PalletLabelnumber = palletLabelnumber;
} }
} }
} }

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/POs/PO.cs

@ -56,12 +56,6 @@ namespace Win_in.Sfs.Scp.WebApi
[Display(Name = "截止日期(DueDate)")] [Display(Name = "截止日期(DueDate)")]
public DateTime DueDate { set; get; } public DateTime DueDate { set; get; }
/// <summary>
/// 版本(Version)
/// </summary>
[Display(Name = "版本(Version)")]
public string Version { set; get; }
/// <summary> /// <summary>
/// 税率(TaxRate) /// 税率(TaxRate)
/// </summary> /// </summary>

5
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContextModelCreatingExtensions.cs

@ -299,6 +299,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
b.Property(q => q.Remark).HasMaxLength(4096); b.Property(q => q.Remark).HasMaxLength(4096);
b.Property(x => x.Version).HasMaxLength(64); b.Property(x => x.Version).HasMaxLength(64);
b.Property(x => x.SequenceNumber).HasMaxLength(64); b.Property(x => x.SequenceNumber).HasMaxLength(64);
b.Property(x => x.IsrRead).IsRequired(); ;
b.HasMany(u => u.ASNDetails).WithOne().HasForeignKey(rd => rd.Id).OnDelete(DeleteBehavior.NoAction).IsRequired(); b.HasMany(u => u.ASNDetails).WithOne().HasForeignKey(rd => rd.Id).OnDelete(DeleteBehavior.NoAction).IsRequired();
@ -333,7 +334,9 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
b.Property(q => q.SupplierPackUom).IsRequired().HasMaxLength(64); b.Property(q => q.SupplierPackUom).IsRequired().HasMaxLength(64);
b.Property(q => q.SupplierPackQty).IsRequired(); b.Property(q => q.SupplierPackQty).IsRequired();
b.Property(q => q.SupplierPackConvertRate).IsRequired(); b.Property(q => q.SupplierPackConvertRate).IsRequired();
b.Property(q => q.Remark).HasMaxLength(4096); b.Property(q => q.LabelCode).HasMaxLength(64);
b.Property(q => q.BarCode).HasMaxLength(4096);
b.Property(q => q.PalletLabelnumber).HasMaxLength(64);
b.Property(x => x.Version).HasMaxLength(64); b.Property(x => x.Version).HasMaxLength(64);
b.HasIndex(x => new { x.AsnNumber, x.PartCode }).IsUnique(); b.HasIndex(x => new { x.AsnNumber, x.PartCode }).IsUnique();

Loading…
Cancel
Save