Browse Source

新增两个表功能,大众备件发货和看板发货代码

branch_ccpg_220107
44673626 3 years ago
parent
commit
52a78f2940
  1. 4
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettleAccounts/SettleAccountExportDto.cs
  2. 3
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountExportDto.cs
  3. 96
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/IWMSVWKanBanAppService.cs
  4. 14
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanCreateDto.cs
  5. 84
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDto.cs
  6. 85
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDtoBase.cs
  7. 92
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanExportDto.cs
  8. 93
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanImportDto.cs
  9. 93
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanRequestDto.cs
  10. 100
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanVersionDtoBase.cs
  11. 16
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBantUpdateDto.cs
  12. 91
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/IWMSSparePartAppService.cs
  13. 14
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartCreateDto.cs
  14. 122
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartDto.cs
  15. 124
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartDtoBase.cs
  16. 143
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartExportDto.cs
  17. 129
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartImportDto.cs
  18. 129
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartRequestDto.cs
  19. 100
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartVersionDtoBase.cs
  20. 20
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  21. 64
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  22. 31
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WMSKanBanManager.cs
  23. 163
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WMSKanBanSettle.cs
  24. 47
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WMSKanBanVersion.cs
  25. 215
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-SparePart/WMSSparePart.cs
  26. 47
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-SparePart/WMSSparePartVersion.cs
  27. 136
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  28. BIN
      src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.csprojAssemblyReference.cache
  29. BIN
      src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csprojAssemblyReference.cache
  30. BIN
      src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.csprojAssemblyReference.cache

4
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettleAccounts/SettleAccountExportDto.cs

@ -80,7 +80,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[ExporterHeader(DisplayName = "结算供应商")]
public virtual string SettlementSupplier { get; set; }
[ExporterHeader(DisplayName = "结算状态")]
public virtual int State { get; set; }
//[ExporterHeader(DisplayName = "结算状态")]
//public virtual int State { get; set; }
}
}

3
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountExportDto.cs

@ -80,8 +80,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[ExporterHeader(DisplayName = "结算供应商")]
public virtual string SettlementSupplier { get; set; }
[ExporterHeader(DisplayName = "结算状态")]
public virtual int State { get; set; }
[ExporterHeader(DisplayName = "未结算原因")]
public string UnsettledReason { get; set; }

96
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/IWMSVWKanBanAppService.cs

@ -0,0 +1,96 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public interface IWMSVWKanBanAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> WMSVWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<WMSVWKanBanDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<WMSVWKanBanDto>> GetListAsync(WMSVWKanBanRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<WMSVWKanBanVersionDto>> GetVersionListAsync(WMSVWKanBanVersionRequestDto input);
Task<string> ExportAsync(WMSVWKanBanRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

14
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanCreateDto.cs

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanCreateDto : WMSVWKanBanDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

84
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDto.cs

@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
public virtual string PartType { set; get; }
/// <summary>
/// R3入库时间
/// </summary>
public virtual DateTime SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public virtual DateTime SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
public virtual string State { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
}
}

85
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDtoBase.cs

@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
///看板条码号
/// </summary>
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
public virtual string PartType { set; get; }
/// <summary>
/// R3入库时间
/// </summary>
public virtual DateTime SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public virtual DateTime SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
public virtual int State { get; set; }
public virtual string Version { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
}
}

92
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanExportDto.cs

@ -0,0 +1,92 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanExportDto
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
[ExporterHeader(DisplayName = "看板条码号")]
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
[ExporterHeader(DisplayName = "入库关联号")]
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "零件号")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ExporterHeader(DisplayName = "零件类型")]
public virtual string PartType { set; get; }
/// <summary>
/// R3入库日期
/// </summary>
[ExporterHeader(DisplayName = "R3入库日期")]
public virtual DateTime SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
[ExporterHeader(DisplayName = "供应商")]
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
[ExporterHeader(DisplayName = "批次")]
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
[ExporterHeader(DisplayName = "入库结算标识")]
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
[ExporterHeader(DisplayName = "R3结算时间")]
public virtual DateTime SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
[ExporterHeader(DisplayName = "结算状态")]
public virtual string State { get; set; }
}
}

93
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanImportDto.cs

@ -0,0 +1,93 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanImportDto
{
///// <summary>
///// 期间
///// </summary>
//[ImporterHeader(Name = "期间")]
//public string Period { set; get; }
///// <summary>
///// 版本
///// </summary>
//[ImporterHeader(Name = "版本")]
//public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
[ImporterHeader(Name = "看板条码号", FixAllSpace = true)]
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
[ImporterHeader(Name = "入库关联号")]
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
[ImporterHeader(Name = "工厂")]
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ImporterHeader(Name = "零件号", FixAllSpace = true)]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ImporterHeader(Name = "零件类型")]
public virtual string PartType { set; get; }
/// <summary>
/// R3入库日期
/// </summary>
[ImporterHeader(Name = "R3入库日期")]
public virtual string SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
[ImporterHeader(Name = "供应商")]
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
[ImporterHeader(Name = "批次")]
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
[ImporterHeader(Name = "入库结算标识")]
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
[ImporterHeader(Name = "R3结算时间")]
public virtual string SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
[ImporterHeader(Name = "结算状态")]
public virtual string State { get; set; }
}
}

93
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanRequestDto.cs

@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanRequestDto : RequestDtoBase
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
public virtual string PartType { set; get; }
/// <summary>
/// R3入库时间
/// </summary>
public virtual DateTime SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public virtual DateTime SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
public virtual string State { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

100
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanVersionDtoBase.cs

@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class WMSVWKanBanVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class WMSVWKanBanVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class WMSVWKanBanVersionCreateDto : WMSVWKanBanVersionDtoBase
{ }
public class WMSVWKanBanVersionUpdateDto : WMSVWKanBanVersionDtoBase
{ }
public class WMSVWKanBanVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class WMSVWKanBanVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

16
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBantUpdateDto.cs

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.SettleAccount.Entities.VWKanBan;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBantUpdateDto : VWKanBanDtoBase
{
}
}

91
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/IWMSSparePartAppService.cs

@ -0,0 +1,91 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public interface IWMSSparePartAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> WMSSparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<WMSSparePartDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<WMSSparePartDto>> GetListAsync(WMSSparePartRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<WMSSparePartVersionDto>> GetVersionListAsync(WMSSparePartVersionRequestDto input);
Task<string> ExportAsync(WMSSparePartRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

14
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartCreateDto.cs

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartCreateDto : WMSSparePartDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

122
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartDto.cs

@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

124
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartDtoBase.cs

@ -0,0 +1,124 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

143
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartExportDto.cs

@ -0,0 +1,143 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartExportDto
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public virtual string Version { get; set; }
/// <summary>
/// 行号
/// </summary>
[ExporterHeader(DisplayName = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[ExporterHeader(DisplayName = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[ExporterHeader(DisplayName = "采购订单号")]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[ExporterHeader(DisplayName = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[ExporterHeader(DisplayName = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ExporterHeader(DisplayName = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[ExporterHeader(DisplayName = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[ExporterHeader(DisplayName = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[ExporterHeader(DisplayName = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[ExporterHeader(DisplayName = "科目号")]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ExporterHeader(DisplayName = "物料代码")]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[ExporterHeader(DisplayName = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[ExporterHeader(DisplayName = "交货单号")]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[ExporterHeader(DisplayName = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[ExporterHeader(DisplayName = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[ExporterHeader(DisplayName = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[ExporterHeader(DisplayName = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[ExporterHeader(DisplayName = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[ExporterHeader(DisplayName = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[ExporterHeader(DisplayName = "工厂名称")]
public string FactoryName { get; set; }
}
}

129
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartImportDto.cs

@ -0,0 +1,129 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartImportDto
{
/// <summary>
/// 行号
/// </summary>
[ImporterHeader(Name = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[ImporterHeader(Name = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[ImporterHeader(Name = "采购订单号", FixAllSpace = true)]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[ImporterHeader(Name = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[ImporterHeader(Name = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ImporterHeader(Name = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[ImporterHeader(Name = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[ImporterHeader(Name = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[ImporterHeader(Name = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[ImporterHeader(Name = "科目号", FixAllSpace = true)]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ImporterHeader(Name = "物料代码", FixAllSpace = true)]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ImporterHeader(Name = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[ImporterHeader(Name = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[ImporterHeader(Name = "交货单号", FixAllSpace = true)]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[ImporterHeader(Name = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[ImporterHeader(Name = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[ImporterHeader(Name = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[ImporterHeader(Name = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[ImporterHeader(Name = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[ImporterHeader(Name = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ImporterHeader(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[ImporterHeader(Name = "工厂名称")]
public string FactoryName { get; set; }
}
}

129
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartRequestDto.cs

@ -0,0 +1,129 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartRequestDto : RequestDtoBase
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

100
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartVersionDtoBase.cs

@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class WMSSparePartVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class WMSSparePartVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class WMSSparePartVersionCreateDto : WMSSparePartVersionDtoBase
{ }
public class WMSSparePartVersionUpdateDto : WMSSparePartVersionDtoBase
{ }
public class WMSSparePartVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class WMSSparePartVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

20
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -2308,6 +2308,26 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapWMSSparePart">
<summary>
大众备件发货
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapWMSSparePartVersion">
<summary>
大众备件导入-版本
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapWMSVWKanBan">
<summary>
大众看板发货
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapWMSVWKanBanVersion">
<summary>
大众看板发货-版本
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapVWKanBan">
<summary>
大众看板导入

64
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -79,6 +79,10 @@ using Win.Sfs.SettleAccount.Entities.VWKanBan;
using Win.Sfs.SettleAccount.Entities.VWScrapClaims;
using Win.Sfs.SettleAccount.Entities.VWSparePart;
using Win.Sfs.SettleAccount.Entities.VWKanBanVersion;
using Win.Sfs.SettleAccount.Entities.WMS_KanBan;
using Win.Sfs.SettleAccount.Entities.WMSKanBan;
using Win.Sfs.SettleAccount.Entities.WMS_SparePart;
using Win.Sfs.SettleAccount.Entities.WMSSparePart;
namespace Win.Sfs.SettleAccount
{
@ -208,12 +212,71 @@ namespace Win.Sfs.SettleAccount
CreateMapUnSettleAccount();
CreateMapUnSettleAccountVersion();
//大众看板发货
CreateMapWMSVWKanBan();
CreateMapWMSVWKanBanVersion();
//大众备件发货
CreateMapWMSSparePart();
CreateMapWMSSparePartVersion();
#endregion
}
#region PG-派格映射
/// <summary>
/// 大众备件发货
/// </summary>
private void CreateMapWMSSparePart()
{
CreateMap<WMSSparePart, WMSSparePartDto>().ReverseMap();
CreateMap<WMSSparePart, WMSSparePartRequestDto>().ReverseMap();
CreateMap<WMSSparePart, WMSSparePartImportDto>().ReverseMap();
CreateMap<WMSSparePart, WMSSparePartExportDto>().ReverseMap();
CreateMap<WMSSparePart, WMSSparePartExportDto>().ReverseMap();
}
/// <summary>
/// 大众备件导入-版本
/// </summary>
private void CreateMapWMSSparePartVersion()
{
CreateMap<WMSSparePartVersion, WMSSparePartVersionDto>().ReverseMap();
CreateMap<WMSSparePartVersion, WMSSparePartVersionCreateDto>();
CreateMap<WMSSparePartVersion, WMSSparePartVersionUpdateDto>();
CreateMap<WMSSparePartVersionCreateDto, WMSSparePartVersion>();
CreateMap<WMSSparePartVersionUpdateDto, WMSSparePartVersion>();
}
/// <summary>
/// 大众看板发货
/// </summary>
private void CreateMapWMSVWKanBan()
{
CreateMap<WMSKanBanSettle, WMSVWKanBanDto>().ReverseMap();
CreateMap<WMSKanBanSettle, WMSVWKanBanRequestDto>().ReverseMap();
CreateMap<WMSVWKanBanImportDto, WMSKanBanSettle>()
.ForMember(dest => dest.SettleInputDate,
opt => opt.MapFrom(src => DateTime.ParseExact(src.SettleInputDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture)))
.ForMember(dest => dest.SettleDate,
opt => opt.MapFrom(src => DateTime.ParseExact(src.SettleDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture)));
CreateMap<WMSKanBanSettle, WMSVWKanBanExportDto>().ReverseMap();
}
/// <summary>
/// 大众看板发货-版本
/// </summary>
private void CreateMapWMSVWKanBanVersion()
{
CreateMap<KanBanVersion, VWKanBanVersionDto>().ReverseMap();
CreateMap<KanBanVersion, VWKanBanVersionCreateDto>();
CreateMap<KanBanVersion, VWKanBanVersionUpdateDto>();
CreateMap<VWKanBanVersionCreateDto, KanBanVersion>();
CreateMap<VWKanBanVersionUpdateDto, KanBanVersion>();
}
/// <summary>
/// 大众看板导入
/// </summary>
@ -246,7 +309,6 @@ namespace Win.Sfs.SettleAccount
/// 大众发票导入
/// </summary>
private void CreateMapInvoice()
{
CreateMap<Invoice, InvoiceDto>().ReverseMap();
CreateMap<Invoice, InvoiceRequestDto>().ReverseMap();

31
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WMSKanBanManager.cs

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Services;
namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan
{
public class WMSKanBanManager : DomainService
{
private readonly ISettleAccountBranchEfCoreRepository<WMSKanBanSettle, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<WMSKanBanVersion, Guid> _versionRepository;
public WMSKanBanManager(
ISettleAccountBranchEfCoreRepository<WMSKanBanSettle, Guid> repository,
ISettleAccountBranchEfCoreRepository<WMSKanBanVersion, Guid> versionRepository
)
{
_versionRepository = versionRepository;
_repository = repository;
}
}
}

163
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WMSKanBanSettle.cs

@ -0,0 +1,163 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan
{
public class WMSKanBanSettle : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{
/// <summary>
///年度
/// </summary>
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public string Version { set; get; }
/// <summary>
/// 看板条码号
/// </summary>
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
public string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
public string PartType { set; get; }
/// <summary>
/// 供应商编码
/// </summary>
public string SupplierCode { set; get; }
/// <summary>
/// R3入库时间
/// </summary>
public DateTime SettleInputDate { set; get; }
/// <summary>
/// 批次
/// </summary>
public string Batch { set; get; }
/// <summary>
/// 入库结算标识
/// </summary>
public string Flag { set; get; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// R3结算时间
/// </summary>
public DateTime SettleDate { set; get; }
/// <summary>
/// 结算状态
/// </summary>
public string State { set; get; }
/// <summary>
/// WMS交货单
/// </summary>
public string WMSDeliveryNote { set; get; }
/// <summary>
/// WMS发货状态
/// </summary>
public string WMSDeliverGoodsState { set; get; }
/// <summary>
/// 看板结算状态
/// </summary>
public string WMSKanBanState { set; get; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
public Guid ParentId { get; protected set; }
public void SetValue(Guid guid, Guid branchId, string year, string peroid, string version, Guid parentId)
{
Period = peroid;
Year = year;
Id = guid;
Version = version;
BranchId = branchId;
ParentId = parentId;
}
public WMSKanBanSettle()
{ }
public WMSKanBanSettle(
Guid id,
Guid branchId,
string year,
string version,
string kanban,
string relation,
string factory,
string materialCode,
string partType,
DateTime settleInputDate,
string supplierCode,
decimal qty,
string batch,
string flag,
DateTime settleDate,
string state,
Guid parentId,
//DateTime creationTime,
Guid guid) : base(id)
{
BranchId = branchId;
Year = year;
Version = version;
Kanban = kanban;
Relation = relation;
Factory = factory;
MaterialCode = materialCode;
PartType = partType;
SettleInputDate = settleInputDate;
SupplierCode = supplierCode;
Qty = qty;
Batch = batch;
Flag = flag;
SettleDate = settleDate;
State = state;
ParentId = parentId;
//CreationTime = creationTime;
CreatorId = guid;
}
}
}

47
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WMSKanBanVersion.cs

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan
{
public class WMSKanBanVersion : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{
public WMSKanBanVersion()
{ }
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public WMSKanBanVersion(
Guid id,
Guid branchId,
string year, string period, string version, string customerCode) : base(id)
{
BranchId = branchId;
Year = year;
Period = period;
Version = version;
CustomerCode = customerCode;
}
}
}

215
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-SparePart/WMSSparePart.cs

@ -0,0 +1,215 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart
{
public class WMSSparePart : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{
public WMSSparePart()
{ }
public void SetValue(Guid guid, Guid branchId, string year, string peroid, string version)
{
Period = peroid;
Year = year;
Id = guid;
Version = version;
BranchId = branchId;
}
public WMSSparePart(Guid Id, string year, string period, string version, string lineNumber,
string purchaseType, string purchaseOrderNo, string purchaseOrderNoItem, string purchaseOrderNoText,
decimal receiptQty, decimal invoicedQty, decimal amountNoTax, decimal purchasePriceNoTax,
string accountNum, string materialCode, string materialDesc, DateTime spareDate, string deliveryOrderNo,
string deliveryLineNum, string batchNo, string unit, decimal taxRate, string taxCode, string factory
) : base(Id)
{
Year = year;
Period = period;
Version = version;
LineNumber = lineNumber;
PurchaseType = purchaseType;
PurchaseOrderNo = purchaseOrderNo;
PurchaseOrderNoItem = purchaseOrderNoItem;
PurchaseOrderNoText = purchaseOrderNoText;
ReceiptQty = receiptQty;
InvoicedQty = invoicedQty;
AmountNoTax = amountNoTax;
PurchasePriceNoTax = purchasePriceNoTax;
AccountNum = accountNum;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
SpareDate = spareDate;
DeliveryOrderNo = deliveryOrderNo;
DeliveryLineNum = deliveryLineNum;
BatchNo = batchNo;
Unit = unit;
TaxRate = taxRate;
TaxCode = taxCode;
Factory = factory;
}
//行号 采购类型 采购订单号 采购订单行项目 采购订单文本 收货数量 开票数量 不含税金额 采购价格不含税
//科目号 物料代码 物料描述 日期 交货单号 交货行号 批次号 单位 税率 税码
//德国发票号 AP_REQUISITION_MIMRS.GERMANY_INVOCE_AMOUNT 借贷 PO币种 工厂 工厂名称 BM 单号
/// <summary>
///年
/// </summary>
[Display(Name = "年")]
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
[Display(Name = "版本号")]
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
[Display(Name = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[Display(Name = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[Display(Name = "采购订单号")]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[Display(Name = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[Display(Name = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[Display(Name = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[Display(Name = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[Display(Name = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[Display(Name = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[Display(Name = "科目号")]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[Display(Name = "物料代码")]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[Display(Name = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[Display(Name = "交货单号")]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[Display(Name = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[Display(Name = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[Display(Name = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[Display(Name = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[Display(Name = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[Display(Name = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[Display(Name = "工厂名称")]
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
public string Extend { set; get; }
/// <summary>
/// WMS交货单
/// </summary>
public string WMSDeliveryNote { set; get; }
/// <summary>
/// WMS发货状态
/// </summary>
public string WMSDeliverGoodsState { set; get; }
/// <summary>
/// 看板结算状态
/// </summary>
public string WMSKanBanState { set; get; }
}
}

47
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-SparePart/WMSSparePartVersion.cs

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart
{
public class WMSSparePartVersion : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{
public WMSSparePartVersion()
{ }
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public WMSSparePartVersion(
Guid id,
Guid branchId,
string year, string period, string version, string customerCode) : base(id)
{
BranchId = branchId;
Year = year;
Period = period;
Version = version;
CustomerCode = customerCode;
}
}
}

136
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -65,6 +65,7 @@ using Win.Sfs.SettleAccount.Entities.SecMatch;
using Win.Sfs.SettleAccount.Entities.VWKanBan;
using Win.Sfs.SettleAccount.Entities.VWScrapClaims;
using Win.Sfs.SettleAccount.Entities.VWSparePart;
using Win.Sfs.SettleAccount.Entities.WMS_KanBan;
namespace Win.Sfs.SettleAccount
{
@ -266,26 +267,38 @@ namespace Win.Sfs.SettleAccount
#region 派格结算
//大众看板明细导入
builder.ConfigureKanBan(options);
builder.ConfigureKanBanVersion(options);
//大众发票导入
builder.ConfigureInvoice(options);
builder.ConfigureInvoiceVersion(options);
//CP7报废和索赔
builder.ConfigureScrapClaims(options);
builder.ConfigureScrapClaimsVersion(options);
//大众备件
builder.ConfigureSparePart(options);
builder.ConfigureSparePartVersion(options);
//大众FIS未结明细
builder.ConfigureUnSettleAccount(options);
builder.ConfigureUnSettleAccountVersion(options);
//大众准时化结算明细导入-已结
builder.ConfigureSettleAccount(options);
builder.ConfigureSettleAccountVersion(options);
//大众看板发货
builder.ConfigureWMSKanBan(options);
builder.ConfigureWMSKanBanVersion(options);
//大众备件发货
builder.ConfigureWMSSparePart(options);
builder.ConfigureWMSSparePartVersion(options);
#endregion
@ -293,6 +306,123 @@ namespace Win.Sfs.SettleAccount
#region PG-派格
/// <summary>
/// 大众备件发货
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureWMSSparePart(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<SparePart>(b =>
{
b.ToTable($"{options.TablePrefix}_WMSSparePart", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.LineNumber).HasMaxLength(50);
b.Property(x => x.PurchaseType).HasMaxLength(50);
b.Property(x => x.PurchaseOrderNo).IsRequired().HasMaxLength(50);
b.Property(x => x.PurchaseOrderNoItem).HasMaxLength(50);
b.Property(x => x.PurchaseOrderNoText).HasMaxLength(50);
b.Property(x => x.ReceiptQty).IsRequired();
b.Property(x => x.InvoicedQty).IsRequired();
b.Property(x => x.AmountNoTax).IsRequired();
b.Property(x => x.PurchasePriceNoTax).IsRequired();
b.Property(x => x.AccountNum).HasMaxLength(50);
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150);
b.Property(x => x.MaterialDesc).HasMaxLength(50);
b.Property(x => x.SpareDate);
b.Property(x => x.DeliveryOrderNo).IsRequired().HasMaxLength(50);
b.Property(x => x.DeliveryLineNum).HasMaxLength(50);
b.Property(x => x.BatchNo).HasMaxLength(50);
b.Property(x => x.Unit).HasMaxLength(50);
b.Property(x => x.TaxRate);
b.Property(x => x.TaxCode);
b.Property(x => x.GermanInvoiceNo).HasMaxLength(100);
b.Property(x => x.Factory).HasMaxLength(50);
b.Property(x => x.FactoryName).HasMaxLength(50);
b.Property(x => x.Extend).HasMaxLength(250);
//创建索引(没有版本一说)
b.HasIndex(x => new { x.PurchaseOrderNo, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
});
}
/// <summary>
/// 大众备件发货-版本
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureWMSSparePartVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<SparePartVersion>(b =>
{
b.ToTable($"{options.TablePrefix}_WMSSparePart_Version", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter);
});
}
/// <summary>
/// 大众看板发货
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureWMSKanBan(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WMSKanBanSettle>(b =>
{
b.ToTable($"{options.TablePrefix}_WMSKanBanSettle", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Kanban).IsRequired().HasMaxLength(150);//必填项
b.Property(x => x.Relation).HasMaxLength(100);
b.Property(x => x.Factory).HasMaxLength(50);
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150);
b.Property(x => x.PartType).HasMaxLength(50);
b.Property(x => x.SupplierCode).HasMaxLength(50);
b.Property(x => x.Batch).HasMaxLength(50);
b.Property(x => x.Flag).HasMaxLength(50);
//创建组合索引
b.HasIndex(x => new { x.Kanban, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
});
}
/// <summary>
/// 大众看板发货-版本
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureWMSKanBanVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WMSKanBanVersion>(b =>
{
b.ToTable($"{options.TablePrefix}_WMSKanBanSettle_Version", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter);
});
}
/// <summary>
/// 大众看板结算明细导入表结构
/// </summary>
@ -315,8 +445,8 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.SupplierCode).HasMaxLength(50);
b.Property(x => x.Batch).HasMaxLength(50);
b.Property(x => x.Flag).HasMaxLength(50);
//创建索引
b.HasIndex(x => new { x.Kanban, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
//创建组合索引
b.HasIndex(x => new {x.Version, x.Kanban, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
});
}
@ -473,6 +603,8 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.Factory).HasMaxLength(50);
b.Property(x => x.FactoryName).HasMaxLength(50);
b.Property(x => x.Extend).HasMaxLength(250);
//创建索引
b.HasIndex(x => new { x.Version, x.PurchaseOrderNo, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
});
}

BIN
src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.csprojAssemblyReference.cache

Binary file not shown.

BIN
src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csprojAssemblyReference.cache

Binary file not shown.

BIN
src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.csprojAssemblyReference.cache

Binary file not shown.
Loading…
Cancel
Save