27 changed files with 906 additions and 74 deletions
@ -0,0 +1,61 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
using Win_in.Sfs.Shared.Domain.Entities; |
||||
|
using Win_in.Sfs.Shared.Domain.Shared; |
||||
|
using Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
[Display(Name = "盘点任务")] |
||||
|
public class KittingPackagingNoteDTO : SfsJobDTOBase<KittingPackagingNoteDetailDTO> |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生产计划号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点计划号")] |
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string CountPlanNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点阶段
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点阶段")] |
||||
|
public EnumCountStage CountStage { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点方式
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点方式")] |
||||
|
public EnumCountMethod CountMethod { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 类型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点类型")] |
||||
|
public EnumCountType Type { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "描述")] |
||||
|
public string Description { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 物料代码
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "物料代码")] |
||||
|
public string ItemCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库位代码
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库位代码")] |
||||
|
public string LocationCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 任务从表明细(记录每次扫得明细)
|
||||
|
/// </summary>
|
||||
|
public List<KittingPackagingNoteDependentDetailDTO> DepDetails { get; set; } |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
public class KittingPackagingNoteDependentDetailDTO : SfsJobDetailDTOBase, IHasCountResult |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点标签")] |
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string CountLabel { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 计量单位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "计量单位")] |
||||
|
public string Uom { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库存数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库存数量")] |
||||
|
public decimal InventoryQty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库存库位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库存库位")] |
||||
|
public string InventoryLocationCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点数量")] |
||||
|
public decimal CountQty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点时间
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点时间")] |
||||
|
public DateTime? CountTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点操作员
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点操作员")] |
||||
|
public string CountOperator { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点描述")] |
||||
|
public string CountDescription { get; set; } |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
public class KittingPackagingNoteDetailDTO : SfsJobDetailDTOBase, IHasCountResult |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点标签")] |
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string CountLabel { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 计量单位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "计量单位")] |
||||
|
public string Uom { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库存数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库存数量")] |
||||
|
public decimal InventoryQty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库存库位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库存库位")] |
||||
|
public string InventoryLocationCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点数量")] |
||||
|
public decimal CountQty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点时间
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点时间")] |
||||
|
public DateTime? CountTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点操作员
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点操作员")] |
||||
|
public string CountOperator { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点描述")] |
||||
|
public string CountDescription { get; set; } |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
public interface IKittingPackagingNoteAppService : |
||||
|
ISfsStoreMasterReadOnlyAppServiceBase< |
||||
|
KittingPackagingNoteDTO, |
||||
|
SfsStoreRequestInputBase, |
||||
|
KittingPackagingNoteDetailDTO, |
||||
|
SfsStoreRequestInputBase> |
||||
|
{ |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
public class KittingPackagingNoteCheckInput : SfsJobCheckInputBase |
||||
|
{ |
||||
|
|
||||
|
} |
@ -0,0 +1,101 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
using Win_in.Sfs.Shared.Domain.Shared; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查询条件 DTO
|
||||
|
/// </summary>
|
||||
|
public class KittingPackagingNoteCreateRequestInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 盘点方式
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点方式")] |
||||
|
public EnumCountMethod CountMethod { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "描述")] |
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string Description { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点执行形式
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点执行形式")] |
||||
|
public CountPlanRequestType RequestType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 类型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点类型")] |
||||
|
public EnumCountType Type { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 零件条件集合
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "零件条件集合")] |
||||
|
public List<string> PartCondition { get; set; } = new(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库位条件集合
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库位条件集合")] |
||||
|
public List<string> LocCondition { get; set; } = new(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "状态")] |
||||
|
public List<EnumInventoryStatus> StatusList { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 操作员
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "操作员")] |
||||
|
//[Required(ErrorMessage = "{0}是必填项")]
|
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string Worker { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 仓库
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "仓库")] |
||||
|
//[Required(ErrorMessage = "{0}是必填项")]
|
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string WarehouseCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 备注
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "备注")] |
||||
|
public string Remark { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点阶段
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点阶段")] |
||||
|
public EnumCountStage CountStage { get; set; } = EnumCountStage.Circulate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点的零件集合
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点的零件集合")] |
||||
|
public string JsonItemCodes { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点的库位集合
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点的库位集合")] |
||||
|
public string JsonLocationCodes { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点的库存状态集合
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点的库存状态集合")] |
||||
|
public string JsonInventoryStatus { get; set; } |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
public class KittingPackagingNoteDetailInput : SfsJobDetailInputBase, IHasCountResult |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点标签")] |
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string CountLabel { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 计量单位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "计量单位")] |
||||
|
public string Uom { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库存数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库存数量")] |
||||
|
public decimal InventoryQty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库存库位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库存库位")] |
||||
|
public string InventoryLocationCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点数量")] |
||||
|
public decimal CountQty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点时间
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点时间")] |
||||
|
public DateTime? CountTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点操作员
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点操作员")] |
||||
|
public string CountOperator { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点描述")] |
||||
|
public string CountDescription { get; set; } |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
using Win_in.Sfs.Shared.Domain.Shared; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
public class KittingPackagingNoteEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput<KittingPackagingNoteDetailInput> |
||||
|
{ |
||||
|
#region Base
|
||||
|
/// <summary>
|
||||
|
/// 盘点方式
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点方式")] |
||||
|
public EnumCountMethod CountMethod { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 类型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点类型")] |
||||
|
|
||||
|
public EnumCountType Type { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "描述")] |
||||
|
|
||||
|
public string Description { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 物料代码
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "物料代码")] |
||||
|
public string ItemCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库位代码
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "库位代码")] |
||||
|
public string LocationCode { get; set; } |
||||
|
#endregion
|
||||
|
|
||||
|
#region Create
|
||||
|
/// <summary>
|
||||
|
/// 上游任务编号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "上游任务编号")] |
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string UpStreamJobNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点计划号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点计划号")] |
||||
|
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
||||
|
public string CountPlanNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点阶段
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点阶段")] |
||||
|
public EnumCountStage CountStage { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 任务类型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "任务类型")] |
||||
|
public EnumJobType JobType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否自动完成
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "是否自动完成")] |
||||
|
public bool IsAutoComplete { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 任务明细
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "任务明细")] |
||||
|
public List<KittingPackagingNoteDetailInput> Details { get; set; } |
||||
|
#endregion
|
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
public class KittingPackagingNoteImportInput : SfsStoreImportInputBase |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点任务单号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点任务单号")] |
||||
|
public string CountJobNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点计划单号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点计划单号")] |
||||
|
public string CountPlanNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 调整类型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "调整类型")] |
||||
|
public string Type { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否已经调整
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "是否已经调整")] |
||||
|
[Required(ErrorMessage = "{0}是必填项")] |
||||
|
public bool IsAdjusted { get; set; } = false; |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
using Volo.Abp.Authorization.Permissions; |
||||
|
using Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
public static class KittingPackagingNotePermissions |
||||
|
{ |
||||
|
|
||||
|
public const string Default = StorePermissions.GroupName + "." + nameof(KittingPackagingNote); |
||||
|
public const string Create = Default + "." + StorePermissions.CreateStr; |
||||
|
public const string Update = Default + "." + StorePermissions.UpdateStr; |
||||
|
public const string Delete = Default + "." + StorePermissions.DeleteStr; |
||||
|
|
||||
|
public static void AddKittingPackagingNotePermission(this PermissionGroupDefinition permissionGroup) |
||||
|
{ |
||||
|
var countJobPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(KittingPackagingNote))); |
||||
|
countJobPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); |
||||
|
countJobPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); |
||||
|
countJobPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
using Win_in.Sfs.Wms.Store.Domain; |
||||
|
using Win_in.Sfs.Wms.Store.Domain.Shared; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点接口
|
||||
|
/// </summary>
|
||||
|
[Authorize] |
||||
|
[Route($"{StoreConsts.RootPath}KittingPackagingNote")] |
||||
|
public class KittingPackagingNoteAppService |
||||
|
: SfsStoreWithDetailsAppServiceBase< |
||||
|
KittingPackagingNote, |
||||
|
KittingPackagingNoteDTO, |
||||
|
SfsStoreRequestInputBase, |
||||
|
KittingPackagingNoteEditInput, |
||||
|
KittingPackagingNoteDetail, |
||||
|
KittingPackagingNoteDetailDTO, |
||||
|
SfsStoreRequestInputBase, |
||||
|
KittingPackagingNoteImportInput>, IKittingPackagingNoteAppService |
||||
|
{ |
||||
|
private readonly IKittingPackagingNoteManager _kittingPackagingNoteManager; |
||||
|
|
||||
|
public KittingPackagingNoteAppService( |
||||
|
IKittingPackagingNoteRepository repository, |
||||
|
IJisProductReceiptNoteManager KittingPackagingNoteManager, |
||||
|
IKittingPackagingNoteManager kittingPackagingNoteManager) : base(repository) |
||||
|
{ |
||||
|
_kittingPackagingNoteManager = kittingPackagingNoteManager; |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
using AutoMapper; |
||||
|
using Volo.Abp.AutoMapper; |
||||
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
using Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Application; |
||||
|
|
||||
|
public partial class StoreApplicationAutoMapperProfile : Profile |
||||
|
{ |
||||
|
private void KittingPackagingNoteAutoMapperProfile() |
||||
|
{ |
||||
|
CreateMap<KittingPackagingNote, KittingPackagingNoteDTO>() |
||||
|
.ReverseMap(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Threading.Tasks; |
||||
|
using Win_in.Sfs.Shared.Domain.Shared; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
public interface IKittingPackagingNoteManager : ISfsStoreManager<KittingPackagingNote, KittingPackagingNoteDetail> |
||||
|
{ |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
namespace Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
public interface IKittingPackagingNoteRepository : ISfsStoreRepositoryBase<KittingPackagingNote> |
||||
|
{ |
||||
|
|
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain.Entities; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// kitting打包记录
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "kitting打包记录")] |
||||
|
public class KittingPackagingNote : SfsStoreAggregateRootBase<KittingPackagingNoteDetail> |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// kitting代码
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Kitting代码")] |
||||
|
public string KittingCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 任务明细
|
||||
|
/// </summary>
|
||||
|
[IgnoreUpdate] |
||||
|
public override List<KittingPackagingNoteDetail> Details { get; set; } = new(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 任务从表明细(记录每次扫得明细)
|
||||
|
/// </summary>
|
||||
|
[IgnoreUpdate] |
||||
|
public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new(); |
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
public class KittingPackagingNoteChassisDetail : SfsJobDetailEntityBase, IHasCountResult, IHasInventoryQty |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点标签
|
||||
|
/// </summary>
|
||||
|
public string CountLabel { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库存数量
|
||||
|
/// </summary>
|
||||
|
public decimal InventoryQty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 计量单位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "计量单位")] |
||||
|
public string Uom { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 库存库位
|
||||
|
/// </summary>
|
||||
|
public string InventoryLocationCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点数量(每次扫得数量)
|
||||
|
/// </summary>
|
||||
|
public decimal CountQty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点时间
|
||||
|
/// </summary>
|
||||
|
public DateTime? CountTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点操作员
|
||||
|
/// </summary>
|
||||
|
public string CountOperator { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点描述
|
||||
|
/// </summary>
|
||||
|
public string CountDescription { get; set; } |
||||
|
} |
||||
|
|
@ -0,0 +1,40 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
using Win_in.Sfs.Shared.Domain.Entities; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
public class KittingPackagingNoteDetail : SfsStoreDetailEntityBase |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 物品代码
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "物品代码")] |
||||
|
[Required(ErrorMessage = "{0}是必填项")] |
||||
|
[IgnoreUpdate] |
||||
|
public string ItemCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 物品名称
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "物品名称")] |
||||
|
public string ItemName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 物品描述1
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "物品描述1")] |
||||
|
public string ItemDesc1 { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 物品描述2
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "物品描述2")] |
||||
|
public string ItemDesc2 { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "数量")] |
||||
|
public decimal Qty { get; set; } |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Users; |
||||
|
using Volo.Abp.Validation; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
using Win_in.Sfs.Shared.Domain.Shared; |
||||
|
using Win_in.Sfs.Wms.Inventory.Application.Contracts; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
public class KittingPackagingNoteManager : SfsStoreManagerBase<KittingPackagingNote, KittingPackagingNoteDetail>, |
||||
|
IKittingPackagingNoteManager |
||||
|
{ |
||||
|
public KittingPackagingNoteManager( |
||||
|
IKittingPackagingNoteRepository repository |
||||
|
) : base(repository) |
||||
|
|
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,77 @@ |
|||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Volo.Abp.EntityFrameworkCore.Modeling; |
||||
|
using Win_in.Sfs.Shared.Domain.Shared; |
||||
|
using Win_in.Sfs.Shared.EntityFrameworkCore; |
||||
|
using Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; |
||||
|
|
||||
|
public static class KittingPackagingNoteDbContextModelCreatingExtensions |
||||
|
{ |
||||
|
public static void ConfigureKittingPackagingNote(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) |
||||
|
{ |
||||
|
builder.Entity<KittingPackagingNote>(b => |
||||
|
{ |
||||
|
//Configure table & schema name
|
||||
|
b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(KittingPackagingNote), options.Schema); |
||||
|
//Configure ABP properties
|
||||
|
b.ConfigureByConvention(); |
||||
|
//Configure Sfs base properties
|
||||
|
b.ConfigureSfsBase(); |
||||
|
//Properties
|
||||
|
b.Property(q => q.KittingCode).HasMaxLength(SfsPropertyConst.CodeLength); |
||||
|
//Relations
|
||||
|
b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); |
||||
|
b.HasMany(q => q.DepDetails).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); |
||||
|
//Indexes
|
||||
|
b.HasIndex(q => new { q.Number }).IsUnique(); |
||||
|
}); |
||||
|
|
||||
|
builder.Entity<KittingPackagingNoteDetail>(b => |
||||
|
{ |
||||
|
//Configure table & schema name
|
||||
|
b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(KittingPackagingNoteDetail), options.Schema); |
||||
|
//Configure ABP properties
|
||||
|
b.ConfigureByConvention(); |
||||
|
//Configure Sfs base properties
|
||||
|
b.ConfigureSfsBase(); |
||||
|
//Configure Job base properties
|
||||
|
b.ConfigureSfsStoreDetailBase(); |
||||
|
//Properties
|
||||
|
//b.Property(q => q.CountLabel).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
|
||||
|
//b.Property(q => q.InventoryLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
|
||||
|
//b.Property(q => q.CountOperator).HasMaxLength(SfsPropertyConst.CodeLength);
|
||||
|
//b.Property(q => q.CountDescription).HasMaxLength(SfsPropertyConst.CodeLength);
|
||||
|
|
||||
|
//Relations
|
||||
|
//None
|
||||
|
|
||||
|
//Indexes
|
||||
|
//b.HasIndex(q => new { q.PackingCode }).IsUnique();
|
||||
|
}); |
||||
|
|
||||
|
|
||||
|
builder.Entity<KittingPackagingNoteChassisDetail>(b => |
||||
|
{ |
||||
|
//Configure table & schema name
|
||||
|
b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(KittingPackagingNoteChassisDetail), options.Schema); |
||||
|
//Configure ABP properties
|
||||
|
b.ConfigureByConvention(); |
||||
|
//Configure Sfs base properties
|
||||
|
b.ConfigureSfsBase(); |
||||
|
//Configure Job base properties
|
||||
|
b.ConfigureJobDetail(); |
||||
|
//Properties
|
||||
|
b.Property(q => q.CountLabel).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); |
||||
|
b.Property(q => q.InventoryLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); |
||||
|
b.Property(q => q.CountOperator).HasMaxLength(SfsPropertyConst.CodeLength); |
||||
|
b.Property(q => q.CountDescription).HasMaxLength(SfsPropertyConst.CodeLength); |
||||
|
|
||||
|
//Relations
|
||||
|
//None
|
||||
|
|
||||
|
//Indexes
|
||||
|
//b.HasIndex(q => new { q.PackingCode }).IsUnique();
|
||||
|
}); |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
using Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; |
||||
|
|
||||
|
public class KittingPackagingNoteEfCoreRepository : SfsJobEfCoreRepositoryBase<StoreDbContext, KittingPackagingNote>, IKittingPackagingNoteRepository |
||||
|
{ |
||||
|
public KittingPackagingNoteEfCoreRepository(IDbContextProvider<StoreDbContext> dbContextProvider) : base(dbContextProvider) |
||||
|
{ |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue