xu.ding
3 years ago
16 changed files with 1320 additions and 6 deletions
@ -1,10 +1,106 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单创建更新基础Dto
|
|||
/// </summary>
|
|||
public abstract class ASNCreateOrUpdateDTOBase : EntityDto<Guid> |
|||
{ |
|||
/// <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>
|
|||
/// 状态(Status)
|
|||
/// </summary>
|
|||
[Display(Name = "状态(Status)")] |
|||
public int Status { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 联系人(Contact person)
|
|||
/// </summary>
|
|||
[Display(Name = "联系人(ContactName)")] |
|||
public string ContactName { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 联系电话(Contact phone)
|
|||
/// </summary>
|
|||
[Display(Name = "联系电话(ContactPhone)")] |
|||
public string ContactPhone { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 版本(Car Number)
|
|||
/// </summary>
|
|||
[Display(Name = "车牌号(CarNumber)")] |
|||
public string CarNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 仓库(Warehouse code)
|
|||
/// </summary>
|
|||
[Display(Name = "仓库(Warehouse)")] |
|||
public decimal Warehouse { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 收货口(Warehouse Dock)
|
|||
/// </summary>
|
|||
[Display(Name = "收货口(WarehouseDock)")] |
|||
public string WarehouseDock { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 时间窗口开始(Time window Begin)
|
|||
/// </summary>
|
|||
[Display(Name = "时间窗口开始(TimeWindowBegin)")] |
|||
public DateTime TimeWindowBegin { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 时间窗口结束(Time window End)
|
|||
/// </summary>
|
|||
[Display(Name = "时间窗口结束(TimeWIndowEnd)")] |
|||
public DateTime TimeWIndowEnd { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 地点(Site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点(Site)")] |
|||
public string Site { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(IAC company code)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Comapnay)")] |
|||
public string Comapnay { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 备注(Remark)
|
|||
/// </summary>
|
|||
[Display(Name = "备注(Remark)")] |
|||
public string Remark { set; get; } |
|||
|
|||
|
|||
public virtual ICollection<ASNDetailsDTO> ASNDetails { get; set; } |
|||
} |
|||
} |
@ -1,10 +1,106 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单主表DTO
|
|||
/// </summary>
|
|||
public class ASNDTO : AuditedEntityDto<Guid> |
|||
{ |
|||
/// <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>
|
|||
/// 状态(Status)
|
|||
/// </summary>
|
|||
[Display(Name = "状态(Status)")] |
|||
public int Status { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 联系人(Contact person)
|
|||
/// </summary>
|
|||
[Display(Name = "联系人(ContactName)")] |
|||
public string ContactName { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 联系电话(Contact phone)
|
|||
/// </summary>
|
|||
[Display(Name = "联系电话(ContactPhone)")] |
|||
public string ContactPhone { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 版本(Car Number)
|
|||
/// </summary>
|
|||
[Display(Name = "车牌号(CarNumber)")] |
|||
public string CarNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 仓库(Warehouse code)
|
|||
/// </summary>
|
|||
[Display(Name = "仓库(Warehouse)")] |
|||
public decimal Warehouse { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 收货口(Warehouse Dock)
|
|||
/// </summary>
|
|||
[Display(Name = "收货口(WarehouseDock)")] |
|||
public string WarehouseDock { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 时间窗口开始(Time window Begin)
|
|||
/// </summary>
|
|||
[Display(Name = "时间窗口开始(TimeWindowBegin)")] |
|||
public DateTime TimeWindowBegin { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 时间窗口结束(Time window End)
|
|||
/// </summary>
|
|||
[Display(Name = "时间窗口结束(TimeWIndowEnd)")] |
|||
public DateTime TimeWIndowEnd { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 地点(Site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点(Site)")] |
|||
public string Site { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(IAC company code)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Comapnay)")] |
|||
public string Comapnay { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 备注(Remark)
|
|||
/// </summary>
|
|||
[Display(Name = "备注(Remark)")] |
|||
public string Remark { set; get; } |
|||
|
|||
|
|||
public virtual ICollection<ASNDetailsDTO> ASNDetails { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,103 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单明细表DTO
|
|||
/// </summary>
|
|||
public class ASNDetailsDTO : AuditedEntityDto<Guid> |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单号(ASN Number)
|
|||
/// </summary>
|
|||
[Display(Name = "发货单号(AsnNumber)")] |
|||
public string AsnNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 订单号(Purchase order number)
|
|||
/// </summary>
|
|||
[Display(Name = "订单号(PoNumber)")] |
|||
public string PoNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 订单行(Purchase order Line)
|
|||
/// </summary>
|
|||
[Display(Name = "订单行(PoLine)")] |
|||
public string PoLine { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号(PartCode)
|
|||
/// </summary>
|
|||
[Display(Name = "零件号(PartCode)")] |
|||
public string PartCode { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 批次(Lot number)
|
|||
/// </summary>
|
|||
[Display(Name = "批次(Lot)")] |
|||
public string Lot { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商批次(Supplier Lot)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商批次(Supplierlot)")] |
|||
public string Supplierlot { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 生产日期(Produce Date)
|
|||
/// </summary>
|
|||
[Display(Name = "生产日期(ProduceDate)")] |
|||
public DateTime ProduceDate { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 计量单位(Unit of measure)
|
|||
/// </summary>
|
|||
[Display(Name = "计量单位(Uom)")] |
|||
public string Uom { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 发货数量(Delivery quantity)
|
|||
/// </summary>
|
|||
[Display(Name = "发货数量(DeliverQty)")] |
|||
public decimal DeliverQty { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 标包计量单位(standard package um)
|
|||
/// </summary>
|
|||
[Display(Name = "标包计量单位(StdPackUom)")] |
|||
public string StdPackUom { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 标包数量(standard package quantiy)
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量(StdPackQty)")] |
|||
public decimal StdPackQty { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商计量单位(Supplier UM)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商计量单位(SupplierPackUom)")] |
|||
public string SupplierPackUom { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商包装数量(Supplier package UM)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商包装数量(SupplierPackQty)")] |
|||
public decimal SupplierPackQty { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商包装转换率(UM conversion)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商包装转换率(SupplierPackConvertRate)")] |
|||
public decimal SupplierPackConvertRate { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 备注(Remark)
|
|||
/// </summary>
|
|||
[Display(Name = "备注(Remark)")] |
|||
public string Remark { set; get; } |
|||
} |
|||
} |
@ -0,0 +1,7 @@ |
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
public class ASNLabelCreateDTO : ASNLabelCreateOrUpdateDTOBase |
|||
{ |
|||
|
|||
} |
|||
} |
@ -0,0 +1,145 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单标签表创建更新基础Dto
|
|||
/// </summary>
|
|||
public abstract class ASNLabelCreateOrUpdateDTOBase : EntityDto<Guid> |
|||
{ |
|||
/// <summary>
|
|||
/// 标签代码(Label code)
|
|||
/// </summary>
|
|||
[Display(Name = "标签代码(LabelCode)")] |
|||
public string LabelCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 完整条码数据(Barcode barcode)
|
|||
/// </summary>
|
|||
[Display(Name = "完整条码数据(Barcode)")] |
|||
public string Barcode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号(Part code)
|
|||
/// </summary>
|
|||
[Display(Name = "零件号(PartCode)")] |
|||
public string PartCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件名称(Part Name)
|
|||
/// </summary>
|
|||
[Display(Name = "零件名称(PartName)")] |
|||
public string PartName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件描述(Part desc)
|
|||
/// </summary>
|
|||
[Display(Name = "零件描述(PartDesc)")] |
|||
public string PartDesc { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 批次(Lot number)
|
|||
/// </summary>
|
|||
[Display(Name = "批次(Lot)")] |
|||
public bool Lot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 计量单位(UM)
|
|||
/// </summary>
|
|||
[Display(Name = "计量单位(Uom)")] |
|||
public bool Uom { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 数量(Label quantity)
|
|||
/// </summary>
|
|||
[Display(Name = "数量(Qty)")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标包计量单位(Package UM)
|
|||
/// </summary>
|
|||
[Display(Name = "标包计量单位(StdPackUom)")] |
|||
public string StdPackUom { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标包数量(Package quantity)
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量(StdPackQty)")] |
|||
public decimal StdPackQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商代码(Supplier Code)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商代码(SupplierCode)")] |
|||
public string SupplierCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商名称(Supplier Name)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商名称(SupplierName)")] |
|||
public string SupplierName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 订单号(Purchase order number)
|
|||
/// </summary>
|
|||
[Display(Name = "订单号(PoNumber)")] |
|||
public string PoNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 订单行(Purchase order Line)
|
|||
/// </summary>
|
|||
[Display(Name = "订单行(PoLine)")] |
|||
public string PoLine { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 发货单号(ASN Number)
|
|||
/// </summary>
|
|||
[Display(Name = "发货单号(AsnNumber)")] |
|||
public string AsnNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 要货计划单号(Plan number)
|
|||
/// </summary>
|
|||
[Display(Name = "要货计划单号(RpNumber)")] |
|||
public string RpNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商批次(Supplier Lot)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商批次(SupplierLot)")] |
|||
public string SupplierLot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 生产日期(Produce Date)
|
|||
/// </summary>
|
|||
[Display(Name = "生产日期(ProduceDate)")] |
|||
public DateTime ProduceDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 托标签号(Pallet label number)
|
|||
/// </summary>
|
|||
[Display(Name = "托标签号(PalletLabelnumber)")] |
|||
public decimal PalletLabelnumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 地点(site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点(Site)")] |
|||
public string Site { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(IAC company code)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Company)")] |
|||
public decimal Company { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 备注(Remark)
|
|||
/// </summary>
|
|||
[Display(Name = "备注(Remark)")] |
|||
public string Remark { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,145 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单标签表DTO
|
|||
/// </summary>
|
|||
public class ASNLabelDTO : AuditedEntityDto<Guid> |
|||
{ |
|||
/// <summary>
|
|||
/// 标签代码(Label code)
|
|||
/// </summary>
|
|||
[Display(Name = "标签代码(LabelCode)")] |
|||
public string LabelCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 完整条码数据(Barcode barcode)
|
|||
/// </summary>
|
|||
[Display(Name = "完整条码数据(Barcode)")] |
|||
public string Barcode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号(Part code)
|
|||
/// </summary>
|
|||
[Display(Name = "零件号(PartCode)")] |
|||
public string PartCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件名称(Part Name)
|
|||
/// </summary>
|
|||
[Display(Name = "零件名称(PartName)")] |
|||
public string PartName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件描述(Part desc)
|
|||
/// </summary>
|
|||
[Display(Name = "零件描述(PartDesc)")] |
|||
public string PartDesc { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 批次(Lot number)
|
|||
/// </summary>
|
|||
[Display(Name = "批次(Lot)")] |
|||
public bool Lot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 计量单位(UM)
|
|||
/// </summary>
|
|||
[Display(Name = "计量单位(Uom)")] |
|||
public bool Uom { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 数量(Label quantity)
|
|||
/// </summary>
|
|||
[Display(Name = "数量(Qty)")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标包计量单位(Package UM)
|
|||
/// </summary>
|
|||
[Display(Name = "标包计量单位(StdPackUom)")] |
|||
public string StdPackUom { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标包数量(Package quantity)
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量(StdPackQty)")] |
|||
public decimal StdPackQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商代码(Supplier Code)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商代码(SupplierCode)")] |
|||
public string SupplierCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商名称(Supplier Name)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商名称(SupplierName)")] |
|||
public string SupplierName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 订单号(Purchase order number)
|
|||
/// </summary>
|
|||
[Display(Name = "订单号(PoNumber)")] |
|||
public string PoNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 订单行(Purchase order Line)
|
|||
/// </summary>
|
|||
[Display(Name = "订单行(PoLine)")] |
|||
public string PoLine { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 发货单号(ASN Number)
|
|||
/// </summary>
|
|||
[Display(Name = "发货单号(AsnNumber)")] |
|||
public string AsnNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 要货计划单号(Plan number)
|
|||
/// </summary>
|
|||
[Display(Name = "要货计划单号(RpNumber)")] |
|||
public string RpNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商批次(Supplier Lot)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商批次(SupplierLot)")] |
|||
public string SupplierLot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 生产日期(Produce Date)
|
|||
/// </summary>
|
|||
[Display(Name = "生产日期(ProduceDate)")] |
|||
public DateTime ProduceDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 托标签号(Pallet label number)
|
|||
/// </summary>
|
|||
[Display(Name = "托标签号(PalletLabelnumber)")] |
|||
public decimal PalletLabelnumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 地点(site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点(Site)")] |
|||
public string Site { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(IAC company code)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Company)")] |
|||
public decimal Company { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 备注(Remark)
|
|||
/// </summary>
|
|||
[Display(Name = "备注(Remark)")] |
|||
public string Remark { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,7 @@ |
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
public class ASNLabelUpdateDTO : ASNLabelCreateOrUpdateDTOBase |
|||
{ |
|||
|
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
using System; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
public interface IASNLabelAppService:ICrudAppService<ASNLabelDTO,Guid,InputDTO, ASNLabelCreateDTO, ASNLabelUpdateDTO> |
|||
{ |
|||
|
|||
} |
|||
} |
@ -0,0 +1,88 @@ |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.Application.Services; |
|||
using Volo.Abp.Domain.Repositories; |
|||
using Win_in.Sfs.Scp.WebApi.ASNs; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi.ASNs |
|||
{ |
|||
/// <summary>
|
|||
///零件服务
|
|||
/// </summary>
|
|||
[AllowAnonymous] |
|||
[Route("api/SCP/ASNLabel")] |
|||
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)] |
|||
|
|||
public class ASNLabelAppService : CrudAppService<ASNLabel, ASNLabelDTO, Guid,InputDTO, ASNLabelCreateDTO, ASNLabelUpdateDTO>, IASNLabelAppService |
|||
{ |
|||
private readonly IASNLabelRepository _partRepository; |
|||
|
|||
public ASNLabelAppService(IASNLabelRepository repository) : base(repository) |
|||
{ |
|||
_partRepository = repository; |
|||
} |
|||
|
|||
/// <summary>
|
|||
///获取一条数据 (Get a piece of data)
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <returns></returns>
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public override Task<ASNLabelDTO> GetAsync(Guid id) |
|||
{ |
|||
return base.GetAsync(id); |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
///获取数据列表 (Get data list)
|
|||
/// </summary>
|
|||
/// <param name="id"></param>
|
|||
/// <returns></returns>
|
|||
[HttpGet] |
|||
[Route("")] |
|||
public override Task<PagedResultDto<ASNLabelDTO>> GetListAsync(InputDTO input) |
|||
{ |
|||
return base.GetListAsync(input); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 新增实体 (Create New entity)
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
[HttpPost] |
|||
[Route("")] |
|||
public override Task<ASNLabelDTO> CreateAsync(ASNLabelCreateDTO input) |
|||
{ |
|||
return base.CreateAsync(input); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 修改实体 (Modify entity)
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
[HttpPut] |
|||
[Route("{id}")] |
|||
public override Task<ASNLabelDTO> UpdateAsync(Guid id, ASNLabelUpdateDTO input) |
|||
{ |
|||
return base.UpdateAsync(id, input); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 删除实体 (Delete entity)
|
|||
/// </summary>
|
|||
/// <param name="id">ID</param>
|
|||
/// <returns>无</returns>
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
public override Task DeleteAsync(Guid id) |
|||
{ |
|||
return base.DeleteAsync(id); |
|||
} |
|||
} |
|||
} |
@ -1,10 +1,176 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Guids; |
|||
using Win_in.Sfs.Scp.WebApi.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi |
|||
{ |
|||
public class ASN:AuditedAggregateRoot<Guid> |
|||
/// <summary>
|
|||
/// 发货单主表
|
|||
/// </summary>
|
|||
public class ASN: EntityBase<Guid> |
|||
{ |
|||
|
|||
/// <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>
|
|||
/// 状态(Status)
|
|||
/// </summary>
|
|||
[Display(Name = "状态(Status)")] |
|||
public int Status { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 联系人(Contact person)
|
|||
/// </summary>
|
|||
[Display(Name = "联系人(ContactName)")] |
|||
public string ContactName { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 联系电话(Contact phone)
|
|||
/// </summary>
|
|||
[Display(Name = "联系电话(ContactPhone)")] |
|||
public string ContactPhone { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 版本(Car Number)
|
|||
/// </summary>
|
|||
[Display(Name = "车牌号(CarNumber)")] |
|||
public string CarNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 仓库(Warehouse code)
|
|||
/// </summary>
|
|||
[Display(Name = "仓库(Warehouse)")] |
|||
public decimal Warehouse { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 收货口(Warehouse Dock)
|
|||
/// </summary>
|
|||
[Display(Name = "收货口(WarehouseDock)")] |
|||
public string WarehouseDock { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 时间窗口开始(Time window Begin)
|
|||
/// </summary>
|
|||
[Display(Name = "时间窗口开始(TimeWindowBegin)")] |
|||
public DateTime TimeWindowBegin { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 时间窗口结束(Time window End)
|
|||
/// </summary>
|
|||
[Display(Name = "时间窗口结束(TimeWIndowEnd)")] |
|||
public DateTime TimeWIndowEnd { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 地点(Site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点(Site)")] |
|||
public string Site { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 公司(IAC company code)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Comapnay)")] |
|||
public string Comapnay { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 备注(Remark)
|
|||
/// </summary>
|
|||
[Display(Name = "备注(Remark)")] |
|||
public string Remark { set; get; } |
|||
|
|||
|
|||
public virtual List<ASNDetail> ASNDetails { get; set; } |
|||
|
|||
|
|||
|
|||
#region details handler
|
|||
public virtual void AddDetail(IGuidGenerator guidGenerator, ASNDetail detail) |
|||
{ |
|||
Check.NotNull(guidGenerator, nameof(guidGenerator)); |
|||
Check.NotNull(detail, nameof(ASNDetail)); |
|||
if (IsInDetails(detail.PoNumber, detail.PoLine)) |
|||
{ |
|||
throw new Exception(detail.PoNumber + detail.PoLine + "已经在明细中存在!"); |
|||
} |
|||
|
|||
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)); |
|||
|
|||
} |
|||
|
|||
public virtual void AddDetails(IGuidGenerator guidGenerator, IEnumerable<ASNDetail> details) |
|||
{ |
|||
Check.NotNull(guidGenerator, nameof(guidGenerator)); |
|||
foreach (var detail in details) |
|||
{ |
|||
AddDetail(guidGenerator, detail); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
public virtual bool IsInDetails(string ponumber, string poline) |
|||
{ |
|||
return ASNDetails.Any(di => di.PoNumber == ponumber && di.PoLine == poline); |
|||
} |
|||
|
|||
public virtual bool IsInDetails(Guid itemId) |
|||
{ |
|||
return ASNDetails.Any(di => di.Id == itemId); |
|||
} |
|||
|
|||
public virtual bool UpdateDetail(IGuidGenerator guidGenerator, ASNDetail detail) |
|||
{ |
|||
Check.NotNull(detail, nameof(ASNDetail)); |
|||
|
|||
var item = FindDetail(detail.Id); |
|||
|
|||
if (item == null) |
|||
{ |
|||
AddDetail(guidGenerator, detail); |
|||
} |
|||
else |
|||
{ |
|||
Check.NotNull(item, nameof(ASNDetail)); |
|||
|
|||
//item.Set(detail.Remark, detail.Enabled);
|
|||
|
|||
} |
|||
return true; |
|||
} |
|||
|
|||
public virtual ASNDetail FindDetail(Guid itemId) |
|||
{ |
|||
var item = ASNDetails.FirstOrDefault(p => p.Id == itemId); |
|||
return item; |
|||
} |
|||
|
|||
#endregion
|
|||
} |
|||
} |
@ -0,0 +1,127 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Win_in.Sfs.Scp.WebApi.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单明细
|
|||
/// </summary>
|
|||
public class ASNDetail: EntityDetailBase<Guid> |
|||
{ |
|||
/// <summary>
|
|||
/// 发货单号(ASN Number)
|
|||
/// </summary>
|
|||
[Display(Name = "发货单号(AsnNumber)")] |
|||
public string AsnNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 订单号(Purchase order number)
|
|||
/// </summary>
|
|||
[Display(Name = "订单号(PoNumber)")] |
|||
public string PoNumber { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 订单行(Purchase order Line)
|
|||
/// </summary>
|
|||
[Display(Name = "订单行(PoLine)")] |
|||
public string PoLine { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号(PartCode)
|
|||
/// </summary>
|
|||
[Display(Name = "零件号(PartCode)")] |
|||
public string PartCode { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 批次(Lot number)
|
|||
/// </summary>
|
|||
[Display(Name = "批次(Lot)")] |
|||
public string Lot { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商批次(Supplier Lot)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商批次(Supplierlot)")] |
|||
public string Supplierlot { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 生产日期(Produce Date)
|
|||
/// </summary>
|
|||
[Display(Name = "生产日期(ProduceDate)")] |
|||
public DateTime ProduceDate { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 计量单位(Unit of measure)
|
|||
/// </summary>
|
|||
[Display(Name = "计量单位(Uom)")] |
|||
public string Uom { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 发货数量(Delivery quantity)
|
|||
/// </summary>
|
|||
[Display(Name = "发货数量(DeliverQty)")] |
|||
public decimal DeliverQty { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 标包计量单位(standard package um)
|
|||
/// </summary>
|
|||
[Display(Name = "标包计量单位(StdPackUom)")] |
|||
public string StdPackUom { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 标包数量(standard package quantiy)
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量(StdPackQty)")] |
|||
public decimal StdPackQty { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商计量单位(Supplier UM)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商计量单位(SupplierPackUom)")] |
|||
public string SupplierPackUom { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商包装数量(Supplier package UM)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商包装数量(SupplierPackQty)")] |
|||
public decimal SupplierPackQty { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商包装转换率(UM conversion)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商包装转换率(SupplierPackConvertRate)")] |
|||
public decimal SupplierPackConvertRate { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 备注(Remark)
|
|||
/// </summary>
|
|||
[Display(Name = "备注(Remark)")] |
|||
public string Remark { set; get; } |
|||
|
|||
|
|||
public ASNDetail() { } |
|||
|
|||
public ASNDetail( |
|||
Guid id, string asnNumber,string poNumber, string poLine, string partCode, string lot, string supplierlot, DateTime produceDate, string uom, |
|||
decimal deliverQty, string stdPackUom, decimal stdPackQty, string supplierPackUom, decimal supplierPackQty, decimal supplierPackConvertRate, string remark) : base(id) |
|||
{ |
|||
AsnNumber = asnNumber; |
|||
PoNumber = poNumber; |
|||
PoLine = poLine; |
|||
PartCode = partCode; |
|||
Lot = lot; |
|||
Supplierlot = supplierlot; |
|||
ProduceDate = produceDate; |
|||
Uom = uom; |
|||
DeliverQty = deliverQty; |
|||
StdPackUom = stdPackUom; |
|||
StdPackQty = stdPackQty; |
|||
SupplierPackUom = supplierPackUom; |
|||
SupplierPackQty = supplierPackQty; |
|||
SupplierPackConvertRate = supplierPackConvertRate; |
|||
Remark = remark; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,145 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Win_in.Sfs.Scp.WebApi.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi |
|||
{ |
|||
/// <summary>
|
|||
/// 标签表
|
|||
/// </summary>
|
|||
public class ASNLabel:EntityBase<Guid> |
|||
{ |
|||
/// <summary>
|
|||
/// 标签代码(Label code)
|
|||
/// </summary>
|
|||
[Display(Name = "标签代码(LabelCode)")] |
|||
public string LabelCode { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 完整条码数据(Barcode barcode)
|
|||
/// </summary>
|
|||
[Display(Name = "完整条码数据(Barcode)")] |
|||
public string Barcode { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 零件号(Part code)
|
|||
/// </summary>
|
|||
[Display(Name = "零件号(PartCode)")] |
|||
public string PartCode { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 零件名称(Part Name)
|
|||
/// </summary>
|
|||
[Display(Name = "零件名称(PartName)")] |
|||
public string PartName { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 零件描述(Part desc)
|
|||
/// </summary>
|
|||
[Display(Name = "零件描述(PartDesc)")] |
|||
public string PartDesc { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 批次(Lot number)
|
|||
/// </summary>
|
|||
[Display(Name = "批次(Lot)")] |
|||
public bool Lot { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 计量单位(UM)
|
|||
/// </summary>
|
|||
[Display(Name = "计量单位(Uom)")] |
|||
public bool Uom { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 数量(Label quantity)
|
|||
/// </summary>
|
|||
[Display(Name = "数量(Qty)")] |
|||
public decimal Qty { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 标包计量单位(Package UM)
|
|||
/// </summary>
|
|||
[Display(Name = "标包计量单位(StdPackUom)")] |
|||
public string StdPackUom { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 标包数量(Package quantity)
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量(StdPackQty)")] |
|||
public decimal StdPackQty { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 供应商代码(Supplier Code)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商代码(SupplierCode)")] |
|||
public string SupplierCode { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 供应商名称(Supplier Name)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商名称(SupplierName)")] |
|||
public string SupplierName { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 订单号(Purchase order number)
|
|||
/// </summary>
|
|||
[Display(Name = "订单号(PoNumber)")] |
|||
public string PoNumber { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 订单行(Purchase order Line)
|
|||
/// </summary>
|
|||
[Display(Name = "订单行(PoLine)")] |
|||
public string PoLine { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 发货单号(ASN Number)
|
|||
/// </summary>
|
|||
[Display(Name = "发货单号(AsnNumber)")] |
|||
public string AsnNumber { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 要货计划单号(Plan number)
|
|||
/// </summary>
|
|||
[Display(Name = "要货计划单号(RpNumber)")] |
|||
public string RpNumber { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 供应商批次(Supplier Lot)
|
|||
/// </summary>
|
|||
[Display(Name = "供应商批次(SupplierLot)")] |
|||
public string SupplierLot { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 生产日期(Produce Date)
|
|||
/// </summary>
|
|||
[Display(Name = "生产日期(ProduceDate)")] |
|||
public DateTime ProduceDate { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 托标签号(Pallet label number)
|
|||
/// </summary>
|
|||
[Display(Name = "托标签号(PalletLabelnumber)")] |
|||
public decimal PalletLabelnumber { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 地点(site)
|
|||
/// </summary>
|
|||
[Display(Name = "地点(Site)")] |
|||
public string Site { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 公司(IAC company code)
|
|||
/// </summary>
|
|||
[Display(Name = "公司(Company)")] |
|||
public decimal Company { get;set;} |
|||
|
|||
/// <summary>
|
|||
/// 备注(Remark)
|
|||
/// </summary>
|
|||
[Display(Name = "备注(Remark)")] |
|||
public string Remark { get;set;} |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Win_in.Sfs.Scp.WebApi |
|||
{ |
|||
public interface IASNLabelRepository : IRepository<ASNLabel, Guid> |
|||
{ |
|||
|
|||
} |
|||
} |
Loading…
Reference in new issue