diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/DTOs/BomComponentDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/DTOs/BomComponentDTO.cs new file mode 100644 index 000000000..85b037804 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/DTOs/BomComponentDTO.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; + +namespace Win_in.Sfs.Basedata.Boms.DTOs; +public class BomComponentDTO +{ + + + + [Display(Name = "根物料号")] + public string Root { get; set; } + [Display(Name = "物料号")] + public string Component { get; set; } + [Display(Name = "单位")] + public string ComponentUom { get; set; } + [Display(Name = "用量")] + public decimal ComponentQty { get; set; } + + [Display(Name = "父物料号")] + public string ParentComponent { get; set; } + [Display(Name = "合计数量")] + public decimal SumQty { get; set; } + + [Display(Name = "层数")] + public int Level { get; set; } + public List SubComponents { get; set; } + + [Display(Name = "拆解路径")] + public string Path { set; get; } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/IBomAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/IBomAppService.cs index b41d72059..76815f40e 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/IBomAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/IBomAppService.cs @@ -1,7 +1,10 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Win_in.Sfs.Basedata.Boms; +using Win_in.Sfs.Basedata.Boms.DTOs; using Win_in.Sfs.Basedata.Domain; +using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Application.Contracts; namespace Win_in.Sfs.Basedata.Application.Contracts; @@ -42,4 +45,7 @@ public interface IBomAppService /// Task> GetMaterialTotalQtyAsync(string productCode, int productNum); Task> GetBomTreeByCodeAsync(string productCode); + Task> GetSubcomponentsRecursiveList(List p_lst, EnumBomSelectedType p_type); + + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs index bd5c6aa12..b5241d1a0 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs @@ -2,12 +2,15 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; +using DocumentFormat.OpenXml.Spreadsheet; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Volo.Abp.Caching; using Volo.Abp.Domain.Repositories; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Boms; +using Win_in.Sfs.Basedata.Boms.DTOs; using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Basedata.Domain.Shared; @@ -34,6 +37,13 @@ public class BomAppService : base.DeletePolicyName = BomPermissions.Delete; } + + + + + + + #region Get [HttpGet("get-by-productitemcode")] @@ -210,6 +220,24 @@ public class BomAppService : } + [HttpPost("get_bom_sublist")] + + public async Task> GetSubcomponentsRecursiveList(List p_lst, EnumBomSelectedType p_type + ) + { + var entities=ObjectMapper.Map, List>(p_lst); + var list=await _bomManager.GetSubcomponentsRecursiveList(entities, p_type).ConfigureAwait(false); + + var sublist = ObjectMapper.Map, List>(list); + return sublist; + + } + + + + + + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAutoMapperProfile.cs index 285f7627d..bca71ad21 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAutoMapperProfile.cs @@ -1,6 +1,8 @@ using AutoMapper; using Volo.Abp.AutoMapper; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Boms; +using Win_in.Sfs.Basedata.Boms.DTOs; using Win_in.Sfs.Basedata.Domain; namespace Win_in.Sfs.Basedata.Application; @@ -29,5 +31,9 @@ public partial class BasedataApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); + + CreateMap().ReverseMap(); + + } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomComponent.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomComponent.cs index 9a61976a2..396015b18 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomComponent.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomComponent.cs @@ -18,4 +18,7 @@ public class BomComponent public decimal SumQty { get; set; } public int Level { get; set; } public List SubComponents { get; set; } + + + public string Path { set; get; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs index 6493f3e0f..d5087c034 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs @@ -218,13 +218,32 @@ public class BomManager : DomainService, IBomManager return lst; } + + public async Task> GetSubcomponentsRecursiveList(List p_lst, EnumBomSelectedType p_type + ) + { + List list = new List(); + foreach (var item in p_lst) + { + var sublist= await GetSubcomponentsRecursive(item, p_type).ConfigureAwait(false); + list.AddRange(sublist); + } + return list; + + } + + + + + + /// /// Bom操作 /// /// /// /// - private async Task> GetSubcomponentsRecursiveLast(BomComponent p_component, EnumBomSelectedType p_type + public async Task> GetSubcomponentsRecursive(BomComponent p_component, EnumBomSelectedType p_type ) { List lastList = new List(); @@ -236,44 +255,54 @@ public class BomManager : DomainService, IBomManager dimensionList.Add(rs1); }).ConfigureAwait(false); - - - List lastBomList = new List(); - List dimensionBomList = new List(); - List treeBomList = new List(); - foreach (var itm in dimensionList) - { - Bom bom = new Bom(); - bom.InjectFrom(itm); - dimensionBomList.Add(bom); - } - foreach (var itm in lastList) - { - Bom bom = new Bom(); - bom.InjectFrom(itm); - lastBomList.Add(bom); - } - foreach (var itm in treeList) - { - Bom bom = new Bom(); - bom.InjectFrom(itm); - treeBomList.Add(bom); - } - List returnList=new List(); + //List lastBomList = new List(); + //List dimensionBomList = new List(); + //List treeBomList = new List(); + //foreach (var itm in dimensionList) + //{ + // Bom bom = new Bom(); + // bom.InjectFrom(itm); + // dimensionBomList.Add(bom); + //} + //foreach (var itm in lastList) + //{ + // Bom bom = new Bom(); + // bom.InjectFrom(itm); + // lastBomList.Add(bom); + //} + //foreach (var itm in treeList) + //{ + // Bom bom = new Bom(); + // bom.InjectFrom(itm); + // treeBomList.Add(bom); + //} + List returnList=new List(); switch (p_type) { case EnumBomSelectedType.Last: - returnList.AddRange(lastBomList); + returnList = lastList; break; case EnumBomSelectedType.Tree: - returnList.AddRange(treeBomList); + returnList=treeList; break; case EnumBomSelectedType.Dimension: - returnList.AddRange(dimensionBomList); + returnList=dimensionList; break; } return returnList; } + //private static List BomComponents = new List(); + + + //private static List GetBomComponents() + //{ + // if(BomComponents.Any() && ) + + // var lst = await _repository.GetListAsync(p => p.Product == productCode).ConfigureAwait(false); + //} + + + /// /// 层级、拆解、一维结构、树状结构 @@ -285,12 +314,39 @@ public class BomManager : DomainService, IBomManager /// 拆解到最终零件时 /// 树型转成一维表用 /// + + + + + /// + /// 层级、拆解、一维结构、树状结构 + /// + /// 上级组件(初始时为根元素) + /// 层级一般为1 + /// 累计数量 + /// 根 + /// 拆解到最终零件时 + /// 树型转成一维表用 + /// + /// private async Task> GetSubcomponentsRecursive(BomComponent p_component, int level, decimal sumQty, string root, Action p_actionLast, Action p_actionDimension + /* ,List bomList =null*/ ) { List subComponents = new List(); // 假设 GetComponentsByProduct 方法可获取某个物料号下的所有子零件 + + //if (bomList != null && bomList.Count() > 0) + //{ + // = bomList.Where(p => p.Product == p_component.Component) + //} + //else + //{ + // directSubComponents = await GetComponentsByProduct(p_component.Component).ConfigureAwait(false); + //} + + List directSubComponents =await GetComponentsByProduct(p_component.Component).ConfigureAwait(false); if (!directSubComponents.Any() && level != 1)//不是根元素 @@ -303,6 +359,7 @@ public class BomManager : DomainService, IBomManager component.SumQty = sumQty * component.ComponentQty; component.ParentComponent = p_component.Component; component.Level = level; + component.Path = (p_component.Component != root) ? p_component.Path + $"->{component.Component}" : p_component.Component + $"->{component.Component}"; component.SubComponents =await GetSubcomponentsRecursive(component, level + 1, sumQty * component.ComponentQty, component.Root, p_actionLast, p_actionDimension).ConfigureAwait(false); p_actionDimension(component); subComponents.Add(component); @@ -310,6 +367,18 @@ public class BomManager : DomainService, IBomManager return subComponents; } + + + + + + + + + + + + private async Task> GetComponentsByProduct(string product) { diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/IBomManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/IBomManager.cs index 8a801c2bf..2004cf8c2 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/IBomManager.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/IBomManager.cs @@ -2,6 +2,8 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Domain.Services; +using Win_in.Sfs.Basedata.Boms; +using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; namespace Win_in.Sfs.Basedata.Domain; @@ -41,4 +43,6 @@ public interface IBomManager : IDomainService, IBulkImportService /// Task> GetMaterialTotalQtyAsync(string productCode, int productNum); Task> GetAllItemByCode(string productCode); + + Task> GetSubcomponentsRecursiveList(List p_lst, EnumBomSelectedType p_type); } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs index 733651e79..501d57e5c 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs @@ -73,4 +73,9 @@ public enum EnumLocationType /// 在途库 /// [Display(Name = "在途库")] TRANSPORT = 13, + + /// + /// 三方库 + /// + [Display(Name = "三方库")] THIRDPARTY = 14, } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Statuses/EnumMesStatus.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Statuses/EnumMesStatus.cs new file mode 100644 index 000000000..0b4d8c283 --- /dev/null +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Statuses/EnumMesStatus.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Shared.Domain.Shared.Enums.Store.Types; +public enum EnumMesStatus +{ + /// + /// 执行中 + /// + [Display(Name = "执行中")] + Handling = 2, + + /// + /// 已过时 + /// + [Display(Name = "已过时")] + OverTime =3 , + + + /// + /// 有更新 + /// + [Display(Name = "有更新")] + Update = 4, + + /// + /// WEI + /// + [Display(Name = "未开启")] + New =1 , + + +} diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Types/EnumMesType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Types/EnumMesType.cs index da72d0acb..e8a266089 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Types/EnumMesType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Types/EnumMesType.cs @@ -11,3 +11,18 @@ public enum EnumMesType MesUnFreeze=10002, MesUnQualified=10003 } + + + +public enum EnumMesRecordSTATE +{ + MesFreeze = 10001, + MesUnFreeze = 10002, + MesUnQualified = 10003 +} + + + + + + diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/DTOs/MesRecordDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/DTOs/MesRecordDTO.cs new file mode 100644 index 000000000..bd0fcb4d6 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/DTOs/MesRecordDTO.cs @@ -0,0 +1,30 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store.Types; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class MesRecordDTO : SfsStoreDTOBase, IHasNumber +{ + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 类型 + /// + [Display(Name = "类型")] + public string Type { get; set; } + + + public EnumMesStatus State { get; set; } + + /// + /// 请求单号 + /// + [Display(Name = "请求单号")] + public string ScrapRequestNumber { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/DTOs/MesRecordDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/DTOs/MesRecordDetailDTO.cs new file mode 100644 index 000000000..aa3c8bac7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/DTOs/MesRecordDetailDTO.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class MesRecordDetailDTO : SfsStoreDetailWithFromToDTOBase +{ + /// + /// 原因代码 + /// + [Display(Name = "原因代码")] + public string ReasonCode { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/IMesRecordAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/IMesRecordAppService.cs new file mode 100644 index 000000000..fd289e12a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/IMesRecordAppService.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +using System.Threading; + +public interface IMesRecordAppService : ISfsStoreMasterReadOnlyAppServiceBase +{ + Task CreateAsync(MesRecordEditInput input); + + Task> GetListByTypeAsync( + SfsStoreRequestInputBase requestInput, + string type, + bool includeDetails = false, + CancellationToken cancellationToken = default); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordDetailInput.cs new file mode 100644 index 000000000..873f07247 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordDetailInput.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class MesRecordDetailInput : SfsStoreDetailWithFromToInputBase +{ + /// + /// 原因代码 + /// + [Display(Name = "原因代码")] + public string ReasonCode { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordEditInput.cs new file mode 100644 index 000000000..807076fc5 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordEditInput.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store.Types; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class MesRecordEditInput : SfsStoreCreateOrUpdateInputBase +{ + #region Create + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 报废记录号 + /// + [Display(Name = "记录号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Number { get; set; } + + /// + /// 请求单号 + /// + [Display(Name = "请求单号")] + public string MesRequestNumber { get; set; } + + /// + /// 报废类型 + /// + [Display(Name = "类型")] + public string Type { get; set; } + + + public EnumMesStatus State { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordImportInput.cs new file mode 100644 index 000000000..dafe3784f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesRecordImportInput.cs @@ -0,0 +1,20 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class MesRecordImportInput : SfsStoreImportInputBase +{ + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 报废请求单号 + /// + [Display(Name = "请求单号")] + public string MesRequestNumber { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/MesRecordPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/MesRecordPermissions.cs new file mode 100644 index 000000000..22fee4186 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/MesRecordPermissions.cs @@ -0,0 +1,30 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class MesRecordPermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(MesRecord); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //完工收货报废记录 + public const string ProductScrapNote = StorePermissions.GroupName + "." + nameof(ProductScrapNote); + //线边报废记录 + public const string WipScrapNote = StorePermissions.GroupName + "." + nameof(WipScrapNote); + + public static void AddMesRecordPermission(this PermissionGroupDefinition permissionGroup) + { + var scrapNotePermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(MesRecord))); + scrapNotePermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + scrapNotePermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + scrapNotePermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(ProductScrapNote, StorePermissionDefinitionProvider.L(nameof(ProductScrapNote))); + permissionGroup.AddPermission(WipScrapNote, StorePermissionDefinitionProvider.L(nameof(WipScrapNote))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs index f58153b14..a24dee8eb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs @@ -91,6 +91,7 @@ public class StorePermissionDefinitionProvider : PermissionDefinitionProvider storeGroup.AddWipWarehouseAdjustRequestPermission(); storeGroup.AddWipWarehouseAdjustNotePermission(); + storeGroup.AddInjectioModelPlanPermission(); #region Jobs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/DTOs/InjectioModelPlanDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/DTOs/InjectioModelPlanDTO.cs new file mode 100644 index 000000000..a1ef41be7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/DTOs/InjectioModelPlanDTO.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Application.Contracts; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 实体DTO +/// +public class InjectioModelPlanDTO : SfsStoreRequestDTOBase, IHasNumber +{ + /// + /// 车间 + /// + //[Display(Name = "车间")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string Workshop { get; set; } + + ///// + ///// 生产线 + ///// + //[Display(Name = "生产线")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string ProdLine { get; set; } + + ///// + ///// 班次 + ///// + //[Display(Name = "班次")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string Shift { get; set; } + + ///// + ///// 班组 + ///// + //[Display(Name = "班组")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string Team { get; set; } + + /// + /// 计划日期 + /// + [Display(Name = "计划日期")] + [ExporterHeader(DisplayName = "计划日期", Format = "yyyy-MM-dd HH:mm")] + public DateTime PlanDate { get; set; } + + /// + /// 计划时间 + /// + [Display(Name = "计划时间")] + [ExporterHeader(DisplayName = "计划时间", Format = "yyyy-MM-dd HH:mm")] + public DateTime PlanTime { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/DTOs/InjectioModelPlanDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/DTOs/InjectioModelPlanDetailDTO.cs new file mode 100644 index 000000000..4538ee218 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/DTOs/InjectioModelPlanDetailDTO.cs @@ -0,0 +1,37 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectioModelPlanDetailDTO : SfsStoreDetailDTOBase +{ + /// + /// 计划数量 + /// + [Display(Name = "计划数量")] + public decimal PlanQty { get; set; } + + ///// + ///// 合格数量 + ///// + //[Display(Name = "合格数量")] + //public decimal GoodQty { get; set; } + + ///// + ///// 不合格数量 + ///// + //[Display(Name = "不合格数量")] + //public decimal NoGoodQty { get; set; } + + ///// + ///// 订单行状态 0:无效1:有效 + ///// + //[Display(Name = "订单行状态")] + //public int LineStatus { get; set; } + + ///// + ///// Bom版本 + ///// + //[Display(Name = "Bom版本")] + //public string BomVersion { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs new file mode 100644 index 000000000..eb00b7691 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs @@ -0,0 +1,24 @@ +using System; +using System.Threading.Tasks; +using Win_in.Sfs.Shared.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface IInjectioModelPlanAppService + : ISfsStoreRequestMasterAppServiceBase + , ISfsCheckStatusAppService +{ + + /// + /// 开始订单明细 + /// + /// + Task StartDetailAsync(Guid id, Guid detailId); + + /// + /// 停止订单明细 + /// + /// + Task StopDetailAsync(Guid id, Guid detailId); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/InjectioModelPlanPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/InjectioModelPlanPermissions.cs new file mode 100644 index 000000000..dde3b972f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/InjectioModelPlanPermissions.cs @@ -0,0 +1,20 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class InjectioModelPlanPermissions +{ + public const string Default = StorePermissions.GroupName + "." + nameof(InjectioModelPlan); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + public static void AddInjectioModelPlanPermission(this PermissionGroupDefinition permissionGroup) + { + var productionPlanPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(InjectioModelPlan))); + productionPlanPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + productionPlanPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + productionPlanPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanDetailInput.cs new file mode 100644 index 000000000..14a695c3f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanDetailInput.cs @@ -0,0 +1,37 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectioModelPlanDetailInput : SfsStoreDetailDTOBase +{ + /// + /// 计划数量 + /// + [Display(Name = "计划数量")] + public decimal PlanQty { get; set; } + + ///// + ///// 合格数量 + ///// + //[Display(Name = "合格数量")] + //public decimal GoodQty { get; set; } + + ///// + ///// 不合格数量 + ///// + //[Display(Name = "不合格数量")] + //public decimal NoGoodQty { get; set; } + + ///// + ///// 订单行状态 0:无效1:有效 + ///// + //[Display(Name = "订单行状态")] + //public int LineStatus { get; set; } + + ///// + ///// Bom版本 + ///// + //[Display(Name = "Bom版本")] + //public string BomVersion { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanEditInput.cs new file mode 100644 index 000000000..b73556b51 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanEditInput.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 新增和更新基础DTO +/// +public class InjectioModelPlanEditInput : SfsStoreRequestCreateOrUpdateInputBase +{ + #region Base + ///// + ///// 车间 + ///// + //[Display(Name = "车间")] + //[Required(ErrorMessage = "{0}是必填项")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string Workshop { get; set; } + + ///// + ///// 生产线 + ///// + //[Display(Name = "生产线")] + //[Required(ErrorMessage = "{0}是必填项")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string ProdLine { get; set; } + + ///// + ///// 班次 + ///// + //[Display(Name = "班次")] + //[Required(ErrorMessage = "{0}是必填项")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string Shift { get; set; } + + ///// + ///// 班组 + ///// + //[Display(Name = "班组")] + //[Required(ErrorMessage = "{0}是必填项")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string Team { get; set; } + + /// + /// 计划日期 + /// + [Display(Name = "计划日期")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanDate { get; set; } + + /// + /// 计划时间 + /// + [Display(Name = "计划时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanTime { get; set; } + #endregion + + #region Create + /// + /// 生产计划单号 + /// + [Display(Name = "生产计划单号")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Number { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanImportInput.cs new file mode 100644 index 000000000..bfb948499 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanImportInput.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +[Display(Name = "生产计划")] +public class InjectioModelPlanImportInput : SfsStoreImportInputBase +{ + ///// + ///// 生产计划单号 + ///// + //[Display(Name = "生产计划单号")] + //public string Number { get; protected set; } + + ///// + ///// 车间 + ///// + //[Display(Name = "车间")] + //[Required(ErrorMessage = "{0}是必填项")] + + //public string Workshop { get; set; } + + ///// + ///// 生产线 + ///// + //[Display(Name = "生产线")] + //[Required(ErrorMessage = "{0}是必填项")] + + //public string ProdLine { get; set; } + + ///// + ///// 班次 + ///// + //[Display(Name = "班次")] + //[Required(ErrorMessage = "{0}是必填项")] + //public string Shift { get; set; } + + ///// + ///// 班组 + ///// + //[Display(Name = "班组")] + //[Required(ErrorMessage = "{0}是必填项")] + //public string Team { get; set; } + + /// + /// 计划日期 + /// + [Display(Name = "计划日期")] + [ImporterHeader(Name = "计划日期", Format = "yyyy-MM-dd")] + [ExporterHeader(DisplayName = "计划日期", Format = "yyyy-MM-dd")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanDate { get; set; } + + /// + /// 计划时间 + /// + [Display(Name = "计划时间")] + [ImporterHeader(Name = "计划时间", Format = "yyyy-MM-dd HH:mm")] + [ExporterHeader(DisplayName = "计划时间", Format = "yyyy-MM-dd HH:mm")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanTime { get; set; } + + ///// + ///// 仓库代码 + ///// + //[Display(Name = "仓库代码")] + //public string WarehouseCode { get; set; } + + /// + /// 物品代码 + /// + [Display(Name = "明细-物品代码")] + [Required(ErrorMessage = "{0}是必填项")] + public string ItemCode { get; set; } + + /// + /// 数量 + /// + [Display(Name = "明细-计划数量")] + public decimal PlanQty { get; set; } + + ///// + ///// Bom版本 + ///// + //[Display(Name = "明细-Bom版本")] + //public string BomVersion { get; set; } + + ///// + ///// 生产批次 + ///// + //[Display(Name = "明细-生产批次")] + //public string Lot { get; set; } + + /// + /// 备注 + /// + [Display(Name = "备注")] + public string Remark { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Win_in.Sfs.Wms.Store.Application.Contracts.csproj b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Win_in.Sfs.Wms.Store.Application.Contracts.csproj index a14d0abb2..f9406eeb0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Win_in.Sfs.Wms.Store.Application.Contracts.csproj +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Win_in.Sfs.Wms.Store.Application.Contracts.csproj @@ -43,7 +43,6 @@ - diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesRecordAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesRecordAppService.cs new file mode 100644 index 000000000..734211c1d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesRecordAppService.cs @@ -0,0 +1,173 @@ +using System; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using DocumentFormat.OpenXml.Bibliography; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Dtos; +using Volo.Abp.EventBus; +using Win_in.Sfs.Basedata.Application.Contracts; +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; + +using System.Collections.Generic; +using System.Linq; +using IdentityModel; +using Omu.ValueInjecter; +using Volo.Abp; +using Volo.Abp.Domain.Entities; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Basedata.Boms; +using Win_in.Sfs.Basedata.Boms.DTOs; +using Win_in.Sfs.Basedata.Domain; +using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; + +[Authorize] +[Route($"{StoreConsts.RootPath}mes-record")] +public class MesRecordAppService : + SfsStoreWithDetailsAppServiceBase, + IMesRecordAppService +{ + private readonly ILocationAppService _locationAppService; + private readonly IBomAppService _bomAppService; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly IBalanceAppService _balanceAppService; + public MesRecordAppService( + IBomAppService bomAppService, + IMesRecordRepository repository, ILocationAppService locationAppService, IItemBasicAppService itemBasicAppService,IBalanceAppService balanceAppService) : base(repository) + { + _bomAppService = bomAppService; + _locationAppService = locationAppService; + _itemBasicAppService = itemBasicAppService; + _balanceAppService = balanceAppService; + } + + [HttpPost("")] + public override async Task CreateAsync(MesRecordEditInput input) + { + var entity = ObjectMapper.Map(input); + + var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(nameof(MesRecord), entity.ActiveDate).ConfigureAwait(false) : entity.Number; + entity.SetIdAndNumberWithDetails(GuidGenerator, number); + + SfsInventoryRequestInputBase pm = new SfsInventoryRequestInputBase(); + // pm.Condition.Filters.Add(new Filter() { Column="", Action= }); + // _balanceAppService.GetBalancePagedListByFilterAsync(); + foreach (var detail in entity.Details) + { + //var fromLocation=await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false); + //var toLocation =await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); + //var itemBasicDto =await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + //if (fromLocation == null) + //{ + // throw new UserFriendlyException($"库位为空"); + //} + detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); + detail.FromLocationArea = "X"; + detail.FromLocationErpCode = "X"; + detail.FromLocationGroup = "X"; + detail.FromWarehouseCode = "X"; + detail.ToLocationArea = "X"; + detail.ToLocationErpCode = "X"; + detail.ToLocationGroup = "X"; + detail.ToWarehouseCode = "X"; + detail.ToStatus = 0; + detail.Uom = "X"; + detail.StdPackQty = 1; + + #region 添加校验 + + //RecommendBalanceRequestInput rInput = new RecommendBalanceRequestInput(); + //rInput.ItemCode = detail.ItemCode; + //rInput.Locations = new List() { detail.FromLocationCode }; + //rInput.Qty = detail.Qty; + //rInput.Statuses = new List { EnumInventoryStatus.OK }; + //var balanceLst = await _balanceAppService.GetRecommendBalancesByLocationsAsync(rInput).ConfigureAwait(false); + //var first = balanceLst.FirstOrDefault(); + //if (first != null) + //{ + // if (detail.Qty <= first.Qty) + // { + // throw new UserFriendlyException($"库存数量不足"); + // } + //} + //else + //{ + // throw new UserFriendlyException($"库存数量不足"); + //} + + #endregion + } + + entity = await _repository.InsertAsync(entity).ConfigureAwait(false); + // await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData(entity), false).ConfigureAwait(false); + + var dto = ObjectMapper.Map(entity); + return dto; + } + + [HttpPost("get-bom-list")] + + + public virtual async Task> GetBomList(List p_nodes) + { + var list = _repository.WithDetails().Where(p => p_nodes.Contains(p.Number)); + + + List inputs = new List(); + foreach (var itm in list) + { + foreach (var detail in itm.Details) + { + BomComponentDTO dto = new BomComponentDTO(); + dto.SumQty = detail.Qty; + dto.Component = detail.ItemCode; + dto.ComponentUom = detail.Uom; + dto.Root = detail.ItemCode; + dto.Level = 1; + inputs.Add(dto); + } + } + + var bomlist= await _bomAppService.GetSubcomponentsRecursiveList(inputs,EnumBomSelectedType.Last).ConfigureAwait(false); + + return bomlist; + + } + + + + + + + + [HttpPost("by-type/{type}")] + public virtual async Task> GetListByTypeAsync( + SfsStoreRequestInputBase requestInput, + string type, + bool includeDetails = false, + CancellationToken cancellationToken = default) + { + Expression> expression = p => p.Type == type; + if (requestInput.Condition.Filters?.Count > 0) + { + expression = expression.And(requestInput.Condition.Filters.ToLambda()); + } + + return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + } + + + + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesRecordAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesRecordAutoMapperProfile.cs new file mode 100644 index 000000000..9c2a64efd --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesRecordAutoMapperProfile.cs @@ -0,0 +1,38 @@ +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 MesRecordAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs new file mode 100644 index 000000000..60b7e77a5 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs @@ -0,0 +1,276 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; + +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Omu.ValueInjecter; +using Volo.Abp; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Boms.DTOs; +using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared; +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; + +/// +/// 生产计划 +/// +[Authorize] +[Route($"{StoreConsts.RootPath}injection-model-plan")] +public class InjectioModelPlanAppService : + SfsStoreRequestAppServiceBase, + IInjectioModelPlanAppService +{ + private readonly IBomAppService _bomAppService; + private readonly IInjectioModelPlanManager _InjectioModelPlanManager; + //private readonly IWorkShopAppService _workShopApp; +/* private readonly IProductionLineAppService _productionLineApp*/ + //private readonly ITeamAppService _teamApp; + //private readonly IShiftAppService _shiftApp; + + public InjectioModelPlanAppService(IInjectioModelPlanRepository repository, + IInjectioModelPlanManager InjectioModelPlanManager + , IWorkShopAppService workShopApp + , IBomAppService bomAppService + , IProductionLineAppService productionLineApp + //, ITeamAppService teamApp + //, IShiftAppService shiftApp + ) : base(repository, InjectioModelPlanManager) + { + //_workShopApp = workShopApp; + //_productionLineApp = productionLineApp; + //_teamApp = teamApp; + //_shiftApp = shiftApp; + _InjectioModelPlanManager = InjectioModelPlanManager; + _bomAppService=bomAppService; + base.CreatePolicyName = InjectioModelPlanPermissions.Create; + base.UpdatePolicyName = InjectioModelPlanPermissions.Update; + base.DeletePolicyName = InjectioModelPlanPermissions.Delete; + } + + /// + /// 新增实体 + /// + /// + /// + [HttpPost("")] + public override async Task CreateAsync(InjectioModelPlanEditInput input) + { + //物品分组 + //var splits = input.Details.Select(c => c.ItemCode).Distinct(); + //var inputDetails = new List(); + //foreach (var split in splits) + //{ + // //相同物品 数量汇总 + // foreach (var detail in input.Details.Where(c => c.ItemCode == split)) + // { + // var sumQty = input.Details.Where(c => c.ItemCode == split).Sum(s => s.PlanQty); + // detail.PlanQty = sumQty; + // inputDetails.Add(detail); + // break; + // } + //} + //input.Details.Clear(); + //input.Details.AddRange(inputDetails); + + var entity = ObjectMapper.Map(input); + foreach (var itm in input.Details) + { + InjectioModelPlanDetail plan= new InjectioModelPlanDetail(); + plan.InjectFrom(itm); + entity.Details.Add(plan); + } + await _InjectioModelPlanManager.CreateAsync(entity).ConfigureAwait(false); + var dto = ObjectMapper.Map(entity); + return dto; + } + + /// + /// 打开计划明细 + /// + /// + /// + /// + [HttpPost("{id}/detail/start/{detailId}")] + public virtual async Task StartDetailAsync(Guid id, Guid detailId) + { + var entity = await _repository.FindAsync(id).ConfigureAwait(false); + Check.NotNull(entity, EntityClassName); + await entity.StartDetailAsync(detailId).ConfigureAwait(false); + } + + /// + /// 关闭计划明细 + /// + /// + /// + /// + [HttpPost("{id}/detail/stop/{detailId}")] + public virtual async Task StopDetailAsync(Guid id, Guid detailId) + { + var entity = await _repository.FindAsync(id).ConfigureAwait(false); + Check.NotNull(entity, EntityClassName); + await entity.StopDetailAsync(detailId).ConfigureAwait(false); + } + + [HttpPost("check-status")] + public virtual async Task CheckStatusAsync(string number) + { + await Task.CompletedTask.ConfigureAwait(false); + throw new NotImplementedException(); + } + + + [HttpPost("get-sumdetails-byNumbers")] + public virtual async Task> GetBomList(List p_nodes) + { + var list = _repository.WithDetails().Where(p => p_nodes.Contains(p.Number)); + List inputs = new List(); + foreach (var itm in list) + { + foreach (var detail in itm.Details) + { + BomComponentDTO dto = new BomComponentDTO(); + dto.ComponentQty = detail.PlanQty; + dto.Component = detail.ItemCode; + dto.ComponentUom = detail.Uom; + dto.Root = detail.ItemCode; + dto.Level = 1; + inputs.Add(dto); + } + } + + var bomlist = await _bomAppService.GetSubcomponentsRecursiveList(inputs, EnumBomSelectedType.Last).ConfigureAwait(false); + return bomlist; + //if(bomlist.Count==0) + //{ + // throw new Exception("Bom中没有查到零件BOM结构"); + //} + //return ExportImportService.Export(bomlist); + } + + [HttpPost("get-bom-by-detail")] + public virtual async Task> GetBomByPartCode(InjectioModelPlanDetailInput p_input) + { + + if (string.IsNullOrEmpty(p_input.Number)) + { + throw new UserFriendlyException("输入值单号为空!"); + } + if (string.IsNullOrEmpty(p_input.ItemCode)) + { + throw new UserFriendlyException("输入值零件号为空!"); + } + if (p_input.PlanQty>0) + { + throw new UserFriendlyException("计划数量必须大于0!"); + } + + var first = _repository.WithDetails().FirstOrDefault(p =>p.Number==p_input.Number ); + List inputs = new List(); + if (first != null) + { + var part = first.Details.FirstOrDefault(p => p.ItemCode == p_input.ItemCode); + if (part != null) + { + BomComponentDTO dto = new BomComponentDTO(); + dto.ComponentQty = part.PlanQty; + dto.Component = part.ItemCode; + dto.ComponentUom = part.Uom; + dto.Root = part.ItemCode; + dto.Level = 1; + inputs.Add(dto); + } + else + { + throw new UserFriendlyException($"该单号下没有{p_input.ItemCode}零件"); + } + } + else + { + throw new UserFriendlyException("没有查到单号"); + } + + var bomlist = await _bomAppService.GetSubcomponentsRecursiveList(inputs, EnumBomSelectedType.Last).ConfigureAwait(false); + + return bomlist; + + } + + + + + + + #region Import + + protected virtual async Task CheckImportInputBusinessAsync(InjectioModelPlanImportInput importInput, EnumImportMethod importMethod, List validationRresult) + { + await CheckItemBasicAsync(importInput).ConfigureAwait(false); + await CheckProdLineAsync(importInput).ConfigureAwait(false); + await CheckWarehourseAsync(importInput).ConfigureAwait(false); + await CheckWorkShopAsync(importInput).ConfigureAwait(false); + await CheckTeamAsync(importInput).ConfigureAwait(false); + await CheckShiftAsync(importInput).ConfigureAwait(false); + } + + protected async Task CheckItemBasicAsync(InjectioModelPlanImportInput importInput) + { + var item = await ItemBasicAclService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); + + Check.NotNull(item, "物品代码", "物品不存在"); + } + + protected async Task CheckProdLineAsync(InjectioModelPlanImportInput importInput) + { + //var item = await _productionLineApp.GetByCodeAsync(importInput.ProdLine).ConfigureAwait(false); + + //Check.NotNull(item, "生产线", "生产线不存在"); + } + + protected async Task CheckWarehourseAsync(InjectioModelPlanImportInput importInput) + { + //var item = await WarehouseAclService.GetByCodeAsync(importInput.WarehouseCode).ConfigureAwait(false); + + //Check.NotNull(item, "仓库代码", "仓库不存在"); + } + + protected async Task CheckWorkShopAsync(InjectioModelPlanImportInput importInput) + { + //var item = await _workShopApp.GetByCodeAsync(importInput.Workshop).ConfigureAwait(false); + + //Check.NotNull(item, "车间", "车间不存在"); + } + + protected async Task CheckTeamAsync(InjectioModelPlanImportInput importInput) + { + //var item = await _teamApp.GetByCodeAsync(importInput.Team).ConfigureAwait(false); + + //Check.NotNull(item, "班组", "班组不存在"); + } + + protected async Task CheckShiftAsync(InjectioModelPlanImportInput importInput) + { + //var item = await _shiftApp.GetByCodeAsync(importInput.Shift).ConfigureAwait(false); + + //Check.NotNull(item, "班次", "班次不存在"); + } + + protected virtual async Task ImportDataAsync(List entites, List deleteEntities) + { + await _InjectioModelPlanManager.ImportDataAsync(entites, deleteEntities).ConfigureAwait(false); + } + + //protected override Func GetEntityExpression() + //{ + // return p => (p.WarehouseCode, p.Workshop, p.ProdLine, p.Shift, p.Team, p.PlanDate, p.PlanTime); + //} + + #endregion Import +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAutoMapperProfile.cs new file mode 100644 index 000000000..8538985a3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAutoMapperProfile.cs @@ -0,0 +1,93 @@ +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 InjectioModelPlanAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + CreateMap() + .ReverseMap(); + CreateMap() + + .ReverseMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.Uom) + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + // CreateMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.Details) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.RequestStatus) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ActiveDate) + ; + + CreateMap() + .Ignore(x => x.Uom) + .Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2) + .Ignore(x => x.PlanQty) + //.Ignore(x => x.SupplierBatch) + //.Ignore(x => x.ArriveDate) + //.Ignore(x => x.ProduceDate) + //.Ignore(x => x.ExpireDate) + + .Ignore(x => x.TenantId) + .Ignore(x => x.MasterID) + .Ignore(x => x.Number) + .IgnoreAuditedObjectProperties() + .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.Details) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.RequestStatus) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ActiveDate) + ; + + CreateMap() + .Ignore(x => x.Uom) + .Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2) + .Ignore(x => x.PlanQty) + //.Ignore(x => x.SupplierBatch) + //.Ignore(x => x.ArriveDate) + //.Ignore(x => x.ProduceDate) + //.Ignore(x => x.ExpireDate) + + .Ignore(x => x.TenantId) + .Ignore(x => x.MasterID) + .Ignore(x => x.Number) + .IgnoreAuditedObjectProperties() + .Ignore(x => x.Id); + + + + + + + + + + + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/ProductionPlans/ProductionPlanAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/ProductionPlans/ProductionPlanAppService.cs index 2d4e2bb57..0e42a01d5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/ProductionPlans/ProductionPlanAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/ProductionPlans/ProductionPlanAppService.cs @@ -48,6 +48,14 @@ public class ProductionPlanAppService : base.DeletePolicyName = ProductionPlanPermissions.Delete; } + + + + + + + + /// /// 新增实体 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs index 16024ffc9..680938428 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs @@ -102,11 +102,13 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase(input); @@ -139,14 +141,15 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase private async Task SetRequestAutoPropertiesAsync(ThirdLocationRequestEditInput entity) { - var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.PurchaseReturn, EnumTransSubType.None).ConfigureAwait(false); + var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); Check.NotNull(tranType, "事务类型", "事务类型不存在"); - entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; entity.AutoAgree = tranType.AutoAgreeRequest; entity.AutoHandle = tranType.AutoHandleRequest; + entity.AutoCompleteJob = tranType.AutoCompleteJob; entity.DirectCreateNote = tranType.DirectCreateNote; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs index 65ba83c10..73d6ae533 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs @@ -94,6 +94,10 @@ public partial class StoreApplicationAutoMapperProfile : Profile InventoryInitialNoteAutoMapperProfile(); WipWarehouseAdjustNoteMapperProfile(); MesNoteAutoMapperProfile(); + MesRecordAutoMapperProfile(); + InjectioModelPlanAutoMapperProfile(); + + #endregion #region Jobs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Win_in.Sfs.Wms.Store.Application.csproj b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Win_in.Sfs.Wms.Store.Application.csproj index 314d76f6d..4257571ca 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Win_in.Sfs.Wms.Store.Application.csproj +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Win_in.Sfs.Wms.Store.Application.csproj @@ -28,10 +28,6 @@ - - - - all diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/IMesRecordManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/IMesRecordManager.cs new file mode 100644 index 000000000..a1dc42b6f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/IMesRecordManager.cs @@ -0,0 +1,5 @@ +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IMesRecordManager : ISfsStoreManager +{ +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/IMesRecordRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/IMesRecordRepository.cs new file mode 100644 index 000000000..44623eed9 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/IMesRecordRepository.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IMesRecordRepository : ISfsStoreRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecord.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecord.cs new file mode 100644 index 000000000..bea4d1625 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecord.cs @@ -0,0 +1,46 @@ +using System.Collections.Generic; +using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store.Types; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 报废记录 +/// +public class MesRecord : SfsStoreAggregateRootBase, IHasJobNumber +{ + /// + /// 任务ID + /// + [IgnoreUpdate] + public string JobNumber { get; set; } + + /// + ///请求单号 + /// + [IgnoreUpdate] + public string MesRequestNumber { get; set; } + + /// + /// Mes类型 + /// + [IgnoreUpdate] + public string Type { get; set; } + + + + /// + /// Mes类型 + /// + [IgnoreUpdate] + public EnumMesStatus State { get; set; } + + + + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecordDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecordDetail.cs new file mode 100644 index 000000000..486e5dbe0 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecordDetail.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class MesRecordDetail : SfsStoreDetailWithFromToEntityBase +{ + /// + /// 原因代码 + /// + [Display(Name = "原因代码")] + public string ReasonCode { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecordManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecordManager.cs new file mode 100644 index 000000000..f3537fb7e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesRecordManager.cs @@ -0,0 +1,14 @@ +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class MesRecordManager : SfsStoreManagerBase, IMesRecordManager +{ + + public MesRecordManager( + IMesRecordRepository repository + ) : base(repository) + { + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/IInjectioModelPlanManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/IInjectioModelPlanManager.cs new file mode 100644 index 000000000..4ee9565c0 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/IInjectioModelPlanManager.cs @@ -0,0 +1,8 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IInjectioModelPlanManager : ISfsStoreRequestManager, IBulkImportService +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/IInjectioModelPlanRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/IInjectioModelPlanRepository.cs new file mode 100644 index 000000000..080ee7eae --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/IInjectioModelPlanRepository.cs @@ -0,0 +1,7 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IInjectioModelPlanRepository : ISfsStoreRepositoryBase, ISfsBulkRepositoryBase +{ +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlan.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlan.cs new file mode 100644 index 000000000..2cdbb99ae --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlan.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 生产计划 +/// +public class InjectioModelPlan : SfsStoreRequestAggregateRootBase +{ + + ///// + ///// 车间 + ///// + //public string Workshop { get; set; } + + ///// + ///// 生产线 + ///// + //public string ProdLine { get; set; } + + ///// + ///// 班次 + ///// + //public string Shift { get; set; } + + ///// + ///// 班组 + ///// + //public string Team { get; set; } + + /// + /// 计划日期 + /// + public DateTime PlanDate { get; set; } + + /// + /// 计划时间 + /// + public DateTime PlanTime { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + + /// + /// 打开订单明细 + /// + /// + /// + public virtual async Task StartDetailAsync(Guid detailId) + { + await Task.CompletedTask.ConfigureAwait(false); + var detail = GetDetail(detailId); + //detail.LineStatus = 1; + ReplaceDetail(detailId, detail); + } + + /// + /// 关闭订单明细 + /// + /// + /// + public virtual async Task StopDetailAsync(Guid detailId) + { + await Task.CompletedTask.ConfigureAwait(false); + var detail = GetDetail(detailId); + //detail.LineStatus = 0; + ReplaceDetail(detailId, detail); + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlanDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlanDetail.cs new file mode 100644 index 000000000..54840a701 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlanDetail.cs @@ -0,0 +1,43 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 生产计划-明细列表 +/// +public class InjectioModelPlanDetail : SfsStoreDetailEntityBase +{ + + /// + /// 计划数量 + /// + public decimal PlanQty { get; set; } + + ///// + ///// 合格数量 + ///// + //public decimal GoodQty { get; set; } + + ///// + ///// 不合格数量 + ///// + //public decimal NoGoodQty { get; set; } + + ///// + ///// Bom版本 + ///// + //public string BomVersion { get; set; } + + ///// + ///// 订单行状态 0:无效1:有效 + ///// + //public int LineStatus { get; set; } + + /// + /// 计量单位 + /// + [Display(Name = "计量单位")] + [MaxLength(SfsPropertyConst.CodeLength)] + public string Uom { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlanManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlanManager.cs new file mode 100644 index 000000000..cde55d028 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlanManager.cs @@ -0,0 +1,430 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class InjectioModelPlanManager : SfsStoreRequestManagerBase, IInjectioModelPlanManager +{ + private readonly IInjectioModelPlanRepository _repository; + private readonly IPreparationPlanManager _preparationPlanManager; + private readonly IWarehouseAppService _warehouseApp; + private readonly IWorkShopAppService _workShopApp; + private readonly IProductionLineAppService _productionLineApp; + private readonly ITeamAppService _teamApp; + private readonly IShiftAppService _shiftApp; + + public InjectioModelPlanManager( + IInjectioModelPlanRepository repository, + IPreparationPlanManager preparationPlanManager, + IWarehouseAppService warehouseApp, + IWorkShopAppService workShopApp, + IProductionLineAppService productionLineApp, + ITeamAppService teamApp, + IShiftAppService shiftApp + ) : base(repository) + { + _repository = repository; + _preparationPlanManager = preparationPlanManager; + _warehouseApp = warehouseApp; + _workShopApp = workShopApp; + _productionLineApp = productionLineApp; + _teamApp = teamApp; + _shiftApp = shiftApp; + } + + /* + /// + /// 生产计划打开后,根据策略生成完工收货任务 + /// + /// + /// + public virtual async Task HandleAsync(InjectioModelPlan entity) + { + entity.Status = EnumStoreStatus.Handling; + await Repository.UpdateAsync(entity); + + //发布事件 + var eto = ObjectMapper.Map(entity); + await DistributedEventBus.PublishAsync(eto); + } + + /// + /// 生产计划打开后,打开完工收货任务 + /// + /// + /// + public virtual async Task OpenAsync(InjectioModelPlan entity) + { + entity.Status = EnumStoreStatus.New; + await Repository.UpdateAsync(entity); + await _preparationPlanManager.OpenInjectioModelPlanAsync(entity); + + //发布事件 + var eto = ObjectMapper.Map(entity); + await DistributedEventBus.PublishAsync(eto); + } + + /// + /// 生产计划关闭后,关闭完工收货任务 + /// + /// + /// + public virtual async Task CloseAsync(InjectioModelPlan entity) + { + entity.Status = EnumStoreStatus.Closed; + await Repository.UpdateAsync(entity); + await _preparationPlanManager.CloseInjectioModelPlanAsync(entity); + + //发布事件 + var eto = ObjectMapper.Map(entity); + await DistributedEventBus.PublishAsync(eto); + } + */ + + #region Import + + /// + /// 检查导入数据 过滤 数据 + /// + public virtual async Task> BuildAndVerifyImportDataAsync(List entities, List details, EnumImportMethod importMethod = EnumImportMethod.Update) + { + var importData = new SfsImportData(); + + //foreach (var entity in entities) + //{ + // //var exist = await Repository.FindAsync(t => t.Number == entity.Number ); + + // var errs = new List(); + + // await CheckWorkshopAsync(entity, errs).ConfigureAwait(false); + // await CheckProdLineAsync(entity, errs).ConfigureAwait(false); + // await CheckTeamAsync(entity, errs).ConfigureAwait(false); + // await CheckShiftAsync(entity, errs).ConfigureAwait(false); + + // //if (exist != null) + // //{ + // // errs.Add("数据已存在"); + // //} + + // //if (errs.Count > 0) + // //{ + // // importData.ErrorData.Add(entity, errs); + // // continue; + // //} + + // entity.RequestStatus = EnumRequestStatus.New; + + // var details1 = details.FindAll(t => t.MasterID == entity.Id); + + // var isErrDetail = false; + + // foreach (var detail in details1) + // { + // var detialErrs = new List(); + + // if (!string.IsNullOrEmpty(detail.ItemCode)) + // { + // try + // { + // var item = await ItemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + + // if (item != null) + // { + // detail.ItemName = item.Name; + // detail.ItemDesc1 = item.Desc1; + // detail.ItemDesc2 = item.Desc2; + // var validateDays = item.GetValidateDays(); + // detail.ExpireDate = detail.ProduceDate.AddDays(validateDays); + // } + + // if (item == null) + // { + // detialErrs.Add("物品不存在"); + // } + // } + // catch (Exception ex) + // { + // if (ex.Message.Contains("不存在,或该唯一值存在多条记录。")) + // { + // detialErrs.Add("物品不存在"); + // } + // else + // { + // detialErrs.Add(ex.Message); + // } + // } + // } + + // if (detialErrs.Count > 0) + // { + // importData.ErrorData1.Add(detail, detialErrs); + + // isErrDetail = true; + // } + // } + + // if (errs.Count > 0 || isErrDetail) + // { + // importData.ErrorData.Add(entity, errs); + + // foreach (var detail in details1) + // { + // if (!importData.ErrorData1.ContainsKey(detail)) + // { + // importData.ErrorData1.Add(detail, new List()); + // } + + // importData.ErrorData1[detail].AddRange(errs); + // } + // } + // else + // { + // importData.InsertDetails.AddRange(details1); + // entity.Details = details1; + + // entity.SetIdAndNumberWithDetails(GuidGenerator, await GenerateNumberAsync(nameof(InjectioModelPlan), entity.ActiveDate).ConfigureAwait(false)); + + // if (importMethod == EnumImportMethod.Replace) + // { + // //if (exist != null) + // //{ + // // importData.DeleteEntities.Add(exist); + // //} + // //else + // //{ + + // //} + + // importData.MergeEntities.Add(entity); + // } + // else if (importMethod == EnumImportMethod.Update) + // { + // //if (exist != null) + // //{ + // // importData.DeleteEntities.Add(exist); + // //} + // //else + // //{ + // //} + + // importData.MergeEntities.Add(entity); + // } + // } + //} + + return importData; + } + + private async Task CheckShiftAsync(InjectioModelPlan entity, List errs) + { + //if (!string.IsNullOrEmpty(entity.Shift)) + //{ + // try + // { + // var item = await _shiftApp.GetByCodeAsync(entity.Shift).ConfigureAwait(false); + + // if (item == null) + // { + // errs.Add("班次不存在"); + // } + // } + // catch (Exception ex) + // { + // if (ex.Message.Contains("不存在,或该唯一值存在多条记录。")) + // { + // errs.Add("班次不存在"); + // } + // else + // { + // errs.Add(ex.Message); + // } + // } + //} + } + + private async Task CheckTeamAsync(InjectioModelPlan entity, List errs) + { + //if (!string.IsNullOrEmpty(entity.Team)) + //{ + // try + // { + // var item = await _teamApp.GetByCodeAsync(entity.Team).ConfigureAwait(false); + + // if (item == null) + // { + // errs.Add("班组不存在"); + // } + // } + // catch (Exception ex) + // { + // if (ex.Message.Contains("不存在,或该唯一值存在多条记录。")) + // { + // errs.Add("班组不存在"); + // } + // else + // { + // errs.Add(ex.Message); + // } + // } + //} + } + + private async Task CheckProdLineAsync(InjectioModelPlan entity, List errs) + { + //if (!string.IsNullOrEmpty(entity.ProdLine)) + //{ + // try + // { + // var item = await _productionLineApp.GetByCodeAsync(entity.ProdLine).ConfigureAwait(false); + + // if (item == null) + // { + // errs.Add("生产线不存在"); + // } + // } + // catch (Exception ex) + // { + // if (ex.Message.Contains("不存在,或该唯一值存在多条记录。")) + // { + // errs.Add("生产线不存在"); + // } + // else + // { + // errs.Add(ex.Message); + // } + // } + //} + } + + private async Task CheckWorkshopAsync(InjectioModelPlan entity, List errs) + { + //if (!string.IsNullOrEmpty(entity.Workshop)) + //{ + // try + // { + // var item = await _workShopApp.GetByCodeAsync(entity.Workshop).ConfigureAwait(false); + + // if (item == null) + // { + // errs.Add("车间不存在"); + // } + // } + // catch (Exception ex) + // { + // if (ex.Message.Contains("不存在,或该唯一值存在多条记录。")) + // { + // errs.Add("车间不存在"); + // } + // else + // { + // errs.Add(ex.Message); + // } + // } + //} + } + + /// + /// 执行导入 + /// + public virtual async Task ImportDataAsync(List mergeEntities, List deleteEntities = null) + { + if (deleteEntities != null && deleteEntities.Count > 0) + { + await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); + } + + foreach (var entity in mergeEntities) + { + entity.SetIdAndNumberWithDetails(GuidGenerator, await GenerateNumberAsync(nameof(InjectioModelPlan), entity.PlanDate).ConfigureAwait(false)); + } + + await _repository.BulkMergeAsync(mergeEntities).ConfigureAwait(false); + + var insertDetails = new List(); + + foreach (var item in mergeEntities) + { + await SetDetailAsync(item.Details).ConfigureAwait(false); + + insertDetails.AddRange(item.Details); + } + + await _repository.BulkInsertAsync(insertDetails).ConfigureAwait(false); + + } + private async Task SetDetailAsync(List details) + { + foreach (var detail in details) + { + var item = await ItemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + Check.NotNull(item, "物品代码", $"物品 {detail.ItemCode} 不存在"); + + if (item != null) + { + detail.ItemName = item.Name; + detail.ItemDesc1 = item.Desc1; + detail.ItemDesc2 = item.Desc2; + var validateDays = item.GetValidateDays(); + //detail.ExpireDate = detail.ProduceDate.AddDays(validateDays); + } + } + } + + #endregion + + /* + /// + /// 赋值ETO + /// + /// + /// + private InjectioModelPlanStartedETO CreateInjectioModelPlanETO(InjectioModelPlan model) + { + var eto = new InjectioModelPlanStartedETO() + { + Number = model.Number, + Workshop = model.Workshop, + ProdLine = model.ProdLine, + Shift = model.Shift, + Team = model.Team, + PlanDate = model.PlanDate, + PlanTime = model.PlanTime, + Status = model.Status, + Details = CreateDetailETOList(model.Details) + }; + return eto; + } + + /// + /// 赋值子表ETO数据 + /// + /// + /// + private List CreateDetailETOList(List details) + { + var list = new List(); + foreach (var detail in details) + { + var detailETO = new InjectioModelPlanDetailETO() + { + Number =detail.Number, + Item = detail.Item, + ItemCode = detail.ItemCode, + PlanQty = detail.PlanQty, + GoodQty = detail.GoodQty, + NoGoodQty = detail.NoGoodQty, + BomVersion = detail.BomVersion, + LineStatus = detail.LineStatus + }; + list.Add(detailETO); + } + return list; + } + */ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Win_in.Sfs.Wms.Store.Domain.csproj b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Win_in.Sfs.Wms.Store.Domain.csproj index 7503698cd..91fee8b2f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Win_in.Sfs.Wms.Store.Domain.csproj +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Win_in.Sfs.Wms.Store.Domain.csproj @@ -39,7 +39,6 @@ - diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/MesNotes/MesRecordDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/MesNotes/MesRecordDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..3f6ff1a86 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/MesNotes/MesRecordDbContextModelCreatingExtensions.cs @@ -0,0 +1,65 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class MesRecordDbContextModelCreatingExtensions +{ + public static void ConfigureMesRecord(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(MesRecord), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + + //Properties + b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MesRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(MesRecordDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + + //Properties + b.Property(q => q.ReasonCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.FromPackingCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + + //Relations + + //Indexes + b.HasIndex( + q => new + { + q.Number, + q.ItemCode, + q.FromPackingCode, + q.FromLocationCode, + q.ToLocationCode, + q.FromLot, + q.FromStatus + }).IsUnique(); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/MesNotes/MesRecordEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/MesNotes/MesRecordEfCoreRepository.cs new file mode 100644 index 000000000..163ba4dff --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/MesNotes/MesRecordEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class MesRecordEfCoreRepository : SfsStoreEfCoreRepositoryBase, IMesRecordRepository +{ + public MesRecordEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/InjectioModelPlans/InjectioModelPlanDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/InjectioModelPlans/InjectioModelPlanDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..ec79d5edd --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/InjectioModelPlans/InjectioModelPlanDbContextModelCreatingExtensions.cs @@ -0,0 +1,60 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class InjectioModelPlanDbContextModelCreatingExtensions +{ + public static void ConfigureInjectioModelPlan(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(InjectioModelPlan), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + + //Properties + //b.Property(q => q.Workshop).IsRequired().HasMaxLength(SfsPropertyConst.NameLength); + //b.Property(q => q.ProdLine).IsRequired().HasMaxLength(SfsPropertyConst.NameLength); + //b.Property(q => q.Shift).IsRequired().HasMaxLength(SfsPropertyConst.NameLength); + //b.Property(q => q.Team).IsRequired().HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.PlanDate).IsRequired(); + b.Property(q => q.PlanTime).IsRequired(); + + b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(InjectioModelPlanDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + //Properties + + //b.Property(q => q.BomVersion).HasMaxLength(SfsPropertyConst.CodeLength); + //b.Property(q => q.GoodQty).HasDefaultValue(1); + //b.Property(q => q.NoGoodQty).HasDefaultValue(1); + + //Relations + + //Indexes + b.HasIndex(q => new { q.Number, q.ItemCode }).IsUnique(); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/InjectioModelPlans/InjectioModelPlanEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/InjectioModelPlans/InjectioModelPlanEfCoreRepository.cs new file mode 100644 index 000000000..412be9abb --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/InjectioModelPlans/InjectioModelPlanEfCoreRepository.cs @@ -0,0 +1,12 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class InjectioModelPlanEfCoreRepository : SfsStoreEfCoreRepositoryBase, IInjectioModelPlanRepository, ISfsBulkRepositoryBase +{ + public InjectioModelPlanEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs index 8e8b5fad8..5e71acb3c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs @@ -106,6 +106,8 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureInventoryInitialNote(options); builder.ConfigureWipWarehouseAdjustNote(options); builder.ConfigureMesNote(options); + builder.ConfigureMesRecord(options); + builder.ConfigureInjectioModelPlan(options); #endregion #region Jobs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs index 098faee97..0b105decb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs @@ -47,6 +47,8 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); + #endregion @@ -124,7 +126,8 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); - + context.Services.AddTransient(); + #endregion #region Jobs @@ -174,6 +177,9 @@ public class StoreEntityFrameworkCoreModule : AbpModule options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => @@ -320,6 +326,8 @@ public class StoreEntityFrameworkCoreModule : AbpModule orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj index 7f8204f22..7b2f8a553 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj @@ -40,7 +40,6 @@ - diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs index 68ff4ee5c..1e19d26bc 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs @@ -44,7 +44,7 @@ public class ThirdLocationJobEventHandler : #region 私有 /// - /// 创建补料记录实体 + /// 创建记录实体 /// /// ///