| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | |
| | | /// </summary> |
| | | public abstract class WmsContainerCreateOrUpdateDtoBase : ExtensibleEntityDto |
| | | { |
| | | /// <summary> |
| | | /// ç¼å· |
| | | /// </summary> |
| | | public virtual string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | public virtual string Name { get; set; } |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ |
| | | /// </summary> |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ |
| | | /// </summary> |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¿ |
| | | /// </summary> |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宽 |
| | | /// </summary> |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé« |
| | | /// </summary> |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½éä¸é |
| | | /// </summary> |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸æ°é |
| | | /// </summary> |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | ///ç©ææ°é |
| | | /// </summary> |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | |
| | | /// </summary> |
| | | public class WmsContainerDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// ç¼å· |
| | | /// </summary> |
| | | public virtual string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | public virtual string Name { get; set; } |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ |
| | | /// </summary> |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ |
| | | /// </summary> |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¿ |
| | | /// </summary> |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宽 |
| | | /// </summary> |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé« |
| | | /// </summary> |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½éä¸é |
| | | /// </summary> |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸æ°é |
| | | /// </summary> |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | ///ç©ææ°é |
| | | /// </summary> |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using MiniExcelLibs.Attributes; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers |
| | |
| | | /// </summary> |
| | | public class WorkSectionExportModel |
| | | { |
| | | [ExcelColumn(Name = "åç§°", Width = 25)] |
| | | public virtual string Name { get; set; } |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æçç¼å·", Width = 25)] |
| | | public string ContainerNo { get; set; } |
| | | |
| | | [ExcelColumn(Name = "ç¼å·", Width = 25)] |
| | | public virtual string Code { get; set; } |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æçç±»å", Width = 25)] |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æçç¶æ", Width = 25)] |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "é¿åº¦", Width = 25)] |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "宽度", Width = 25)] |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "é«åº¦", Width = 25)] |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¿ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "éé¿", Width = 25)] |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宽 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "é宽", Width = 25)] |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé« |
| | | /// </summary> |
| | | [ExcelColumn(Name = "éé«", Width = 25)] |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½éä¸é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "è½½éä¸é", Width = 25)] |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸æ°é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "å¼å¸¸æ°é", Width = 25)] |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ°é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "ç©ææ°é", Width = 25)] |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "åä½å段1", Width = 25)] |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "åä½å段2", Width = 25)] |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "åä½å段3", Width = 25)] |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "夿³¨", Width = 25)] |
| | | public virtual string Remark { get; set; } |
| | | } |
| | |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var exist = await _wmscontainerRepository.NameExistAsync(input.Name); |
| | | var exist = await _wmscontainerRepository.NameExistAsync(input.ContainerNo); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.Name]); |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.ContainerNo]); |
| | | } |
| | | |
| | | var maxSort = await _wmscontainerRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | var wmscontainer = new WmsContainer(GuidGenerator.Create(), input.Code, input.Name, sort, input.Remark); |
| | | var wmscontainer = new WmsContainer { Id = GuidGenerator.Create(), ContainerNo = input.ContainerNo, Remark = input.Remark }; |
| | | input.MapExtraPropertiesTo(wmscontainer, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await _wmscontainerRepository.InsertAsync(wmscontainer); |
| | |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var wmscontainer = await _wmscontainerRepository.GetAsync(id); |
| | | var exist = await _wmscontainerRepository.NameExistAsync(input.Name, wmscontainer.Id); |
| | | var exist = await _wmscontainerRepository.NameExistAsync(input.ContainerNo, wmscontainer.Id); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.Name]); |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.ContainerNo]); |
| | | } |
| | | |
| | | wmscontainer.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); |
| | | input.MapExtraPropertiesTo(wmscontainer, MappingPropertyDefinitionChecks.None); |
| | | |
| | | wmscontainer.Update(input.Code, input.Name, input.Remark); |
| | | wmscontainer.ContainerStatus = input.ContainerStatus; |
| | | |
| | | await _wmscontainerRepository.UpdateAsync(wmscontainer); |
| | | |
| | |
| | | var wmscontainer = await _wmscontainerRepository.FindAsync(id); |
| | | if (wmscontainer != null) |
| | | { |
| | | var name = wmscontainer.Name + WmsContainerConsts.CloneTag; |
| | | var containerNo = wmscontainer.ContainerNo + WmsContainerConsts.CloneTag; |
| | | var notExist = false; |
| | | while (!notExist) |
| | | { |
| | | var exist = await _wmscontainerRepository.NameExistAsync(name); |
| | | if (exist || wmscontainers.Any(x => x.Name == name)) |
| | | var exist = await _wmscontainerRepository.NameExistAsync(containerNo); |
| | | if (exist || wmscontainers.Any(x => x.ContainerNo == containerNo)) |
| | | { |
| | | name += WmsContainerConsts.CloneTag; |
| | | containerNo += WmsContainerConsts.CloneTag; |
| | | continue; |
| | | } |
| | | |
| | | notExist = true; |
| | | } |
| | | |
| | | wmscontainer = await _wmscontainerRepository.InsertAsync(wmscontainer.Clone(GuidGenerator.Create(), name, sort++)); |
| | | //wmscontainer = await _wmscontainerRepository.InsertAsync(wmscontainer.Clone(GuidGenerator.Create(), containerNo, sort++)); |
| | | wmscontainers.Add(wmscontainer); |
| | | } |
| | | } |
| | |
| | | #region 导å
¥æ ¡éª |
| | | |
| | | // 夿åç§°æ¯å¦éå¤ï¼å¹¶è¾åºç¬¬å è¡éå¤ |
| | | var duplicateWmsContainers = wmscontainers.GroupBy(x => x.Name).Where(x => x.Count() > 1).ToList(); |
| | | var duplicateWmsContainers = wmscontainers.GroupBy(x => x.ContainerNo).Where(x => x.Count() > 1).ToList(); |
| | | if (duplicateWmsContainers?.Any() == true) |
| | | { |
| | | var duplicateWmsContainerMsgs = duplicateWmsContainers.Select(x => $"第 {string.Join(",", x.Select(x => x.RowIndex))} è¡ï¼{x.Key} åç§°éå¤"); |
| | |
| | | |
| | | foreach (var wmscontainer in wmscontainers) |
| | | { |
| | | if (wmscontainer.Code.IsNullOrWhiteSpace() && wmscontainer.Name.IsNullOrWhiteSpace()) |
| | | if (wmscontainer.ContainerNo.IsNullOrWhiteSpace() && wmscontainer.ContainerNo.IsNullOrWhiteSpace()) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (wmscontainer.Name.IsNullOrWhiteSpace()) |
| | | if (wmscontainer.ContainerNo.IsNullOrWhiteSpace()) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmscontainer.RowIndex}è¡ï¼WmsContaineråç§°ä¸è½ä¸ºç©º"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | var oldWmsContainer = await _wmscontainerRepository.FindByNameAsync(wmscontainer.Name); |
| | | var oldWmsContainer = await _wmscontainerRepository.FindByNameAsync(wmscontainer.ContainerNo); |
| | | if (oldWmsContainer != null) |
| | | { |
| | | var wmscontainerUpdateDto = new WmsContainerUpdateDto |
| | | { |
| | | Code = wmscontainer.Code, |
| | | Name = wmscontainer.Name, |
| | | ContainerNo = wmscontainer.ContainerNo, |
| | | ContainerStatus = wmscontainer.ContainerStatus, |
| | | Remark = wmscontainer.Remark, |
| | | }; |
| | | |
| | |
| | | { |
| | | var wmscontainerCreateDto = new WmsContainerCreateDto |
| | | { |
| | | Code = wmscontainer.Code, |
| | | Name = wmscontainer.Name, |
| | | ContainerNo = wmscontainer.ContainerNo, |
| | | ContainerStatus = wmscontainer.ContainerStatus, |
| | | Remark = wmscontainer.Remark, |
| | | }; |
| | | |
| | |
| | | ["é
ç½®"] = result.Select(x => x.GetExportData()).ToList(), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsContainerå表" : result.Count == 1 ? result.First()?.Name : "WmsContainer模ç"; |
| | | var fileName = result.Count > 1 ? "WmsContainerå表" : result.Count == 1 ? result.First()?.ContainerNo : "WmsContainer模ç"; |
| | | return (sheets, fileName); |
| | | } |
| | | |
| | |
| | | protected Task CheckCreateOrUpdateDtoAsync(WmsContainerCreateOrUpdateDtoBase input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | Check.NotNullOrWhiteSpace(input.Code, "ç¼å·", WmsContainerConsts.MaxCodeLength); |
| | | Check.NotNullOrWhiteSpace(input.Name, "åç§°", WmsContainerConsts.MaxNameLength); |
| | | Check.NotNullOrWhiteSpace(input.ContainerNo, "ç¼å·", WmsContainerConsts.MaxCodeLength); |
| | | Check.Length(input.Remark, "夿³¨", WmsContainerConsts.MaxRemarkLength); |
| | | return Task.CompletedTask; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | [Description("æçç¶æ")] |
| | | public enum ContainerStatusEnum |
| | | { |
| | | |
| | | /// <summary> |
| | | /// ç©ºé² |
| | | /// </summary> |
| | | [Description("空é²")] |
| | | KOUXIAN = 1, |
| | | |
| | | /// <summary> |
| | | /// ç»ç |
| | | /// </summary> |
| | | [Description("ç»ç")] |
| | | ZUPANG = 2, |
| | | |
| | | /// <summary> |
| | | /// åºä½ |
| | | /// </summary> |
| | | [Description("åºä½")] |
| | | KUWEI = 3, |
| | | |
| | | /// <summary> |
| | | /// èæåºä½ |
| | | /// </summary> |
| | | [Description("èæåºä½")] |
| | | XUNIKUWEI = 4, |
| | | |
| | | /// <summary> |
| | | /// ç»æ |
| | | /// </summary> |
| | | [Description("ç»æ")] |
| | | ZUTUO = 5, |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸ |
| | | /// </summary> |
| | | [Description("å¼å¸¸")] |
| | | EXCEPTION = 9, |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | [Description("æçç±»å")] |
| | | public enum ContainerTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// èªå¶ä»¶æç |
| | | /// </summary> |
| | | [Description("èªå¶ä»¶æç")] |
| | | ZIZHIJIAN = 1, |
| | | |
| | | /// <summary> |
| | | /// å¤åä»¶æç |
| | | /// </summary> |
| | | [Description("å¤åä»¶æç")] |
| | | WAIXIEJIAN = 2, |
| | | |
| | | /// <summary> |
| | | /// èææç |
| | | /// </summary> |
| | | [Description("èææç")] |
| | | XUNI = 3, |
| | | |
| | | } |
| | | } |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsContainers; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | |
| | | public class WmsContainer : FullAuditedAggregateRoot<Guid> |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainer"/> class. |
| | | /// ID |
| | | /// </summary> |
| | | protected WmsContainer() |
| | | { |
| | | } |
| | | public Guid Id { get; set; } |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainer"/> class. |
| | | /// æçç±»å |
| | | /// </summary> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <param name="code">The code.</param> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="sort">The sort.</param> |
| | | /// <param name="remark">The remark.</param> |
| | | public WmsContainer(Guid id, string code, string name, int sort = 0, string remark = null) : base(id) |
| | | { |
| | | Code = Check.NotNullOrWhiteSpace(code, "ç¼å·", WmsContainerConsts.MaxCodeLength); |
| | | Name = Check.NotNullOrWhiteSpace(name, "åç§°", WmsContainerConsts.MaxNameLength); |
| | | Sort = sort; |
| | | Remark = Check.Length(remark, "夿³¨", WmsContainerConsts.MaxRemarkLength); |
| | | } |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¼å· |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | public virtual string Code { get; protected set; } |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// é¿åº¦ |
| | | /// </summary> |
| | | public virtual string Name { get; protected set; } |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ |
| | | /// </summary> |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¿ |
| | | /// </summary> |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宽 |
| | | /// </summary> |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé« |
| | | /// </summary> |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½éä¸é |
| | | /// </summary> |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸æ°é |
| | | /// </summary> |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | ///ç©ææ°é |
| | | /// </summary> |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; protected set; } |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; protected set; } |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// Updates the specified code. |
| | | /// </summary> |
| | | /// <param name="code">The code.</param> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="remark">The remark.</param> |
| | | public virtual void Update(string code, string name, string remark = null, bool? isDisabled = null) |
| | | { |
| | | Code = Check.NotNullOrWhiteSpace(code, "ç¼å·", WmsContainerConsts.MaxCodeLength); |
| | | Name = Check.NotNullOrWhiteSpace(name, "åç§°", WmsContainerConsts.MaxNameLength); |
| | | Remark = Check.Length(remark, "夿³¨", WmsContainerConsts.MaxRemarkLength); |
| | | IsDisabled = isDisabled ?? IsDisabled; |
| | | } |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | |
| | | Sort = sort; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Clones the specified create. |
| | | /// </summary> |
| | | /// <param name="create">The create.</param> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="i">The i.</param> |
| | | /// <returns></returns> |
| | | public WmsContainer Clone(Guid create, string name, int i) |
| | | { |
| | | return new WmsContainer(create, Code, name, i, Remark); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | private async Task SeedWmsContainerDataAsync() |
| | | { |
| | | using var unitofWork = _unitOfWorkManager.Begin(requiresNew: true); |
| | | if (await _wmscontainerRepository.GetCountAsync() == 0) |
| | | { |
| | | var WmsContainers = new List<WmsContainer>(); |
| | | for (int i = 1; i <= 80; i++) |
| | | { |
| | | var wmscontainer = new WmsContainer(_guidGenerator.Create(), $"WmsContainer_Code{i}", $"WmsContainer_Name{i}", i, $"WmsContainer_Remark{i}"); |
| | | WmsContainers.Add(wmscontainer); |
| | | } |
| | | |
| | | await _wmscontainerRepository.InsertManyAsync(WmsContainers); |
| | | await unitofWork.SaveChangesAsync(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public class WmsContainerSpecification : Volo.Abp.Specifications.Specification<WmsContainer> |
| | | { |
| | | private readonly string _name; |
| | | private readonly string _containerNo; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerSpecification"/> class. |
| | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerSpecification"/> class. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | public WmsContainerSpecification(string name = null) |
| | | /// <param name="containerNo">The name.</param> |
| | | public WmsContainerSpecification(string containerNo = null) |
| | | { |
| | | _name = name; |
| | | _containerNo = containerNo; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | |
| | | { |
| | | Expression<Func<WmsContainer, bool>> expression = c => 1 == 1; |
| | | |
| | | if (_name != null) |
| | | if (_containerNo != null) |
| | | { |
| | | expression = expression.And(c => c.Name == _name); |
| | | expression = expression.And(c => c.ContainerNo == _containerNo); |
| | | } |
| | | |
| | | return expression; |
| | |
| | | |
| | | builder.Entity<WmsContainer>(b => |
| | | { |
| | | //Configure table & schema name |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsContainers").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("WmsContainer"); |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsContainers").ToLower(), CMSPluginDbProperties.DbSchema) |
| | | .HasComment("æçä¿¡æ¯è¡¨"); |
| | | |
| | | b.ConfigureByConvention(); |
| | | |
| | | //Properties |
| | | b.Property(x => x.Code).HasMaxLength(WmsContainerConsts.MaxCodeLength).IsRequired().HasComment("ç¼ç "); |
| | | b.Property(x => x.Name).HasMaxLength(WmsContainerConsts.MaxNameLength).IsRequired().HasComment("åç§°"); |
| | | b.Property(x => x.ContainerNo) |
| | | .HasMaxLength(50) |
| | | .IsRequired() |
| | | .HasComment("æçç¼å·"); |
| | | |
| | | b.Property(x => x.ContainerType) |
| | | .IsRequired() |
| | | .HasComment("æçç±»å"); |
| | | |
| | | b.Property(x => x.ContainerStatus) |
| | | .IsRequired() |
| | | .HasComment("æçç¶æ"); |
| | | |
| | | b.Property(x => x.SpecLength) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("é¿åº¦"); |
| | | |
| | | b.Property(x => x.SpecWidth) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("宽度"); |
| | | |
| | | b.Property(x => x.SpecHeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("é«åº¦"); |
| | | |
| | | b.Property(x => x.LimitLength) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("éé¿"); |
| | | |
| | | b.Property(x => x.LimitWidth) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("é宽"); |
| | | |
| | | b.Property(x => x.LimitHeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("éé«"); |
| | | |
| | | b.Property(x => x.MaxWeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("è½½éä¸é"); |
| | | |
| | | b.Property(x => x.ExceptionNumber) |
| | | .HasComment("å¼å¸¸æ°é"); |
| | | |
| | | b.Property(x => x.MaterialNumber) |
| | | .HasComment("ç©ææ°é"); |
| | | |
| | | b.Property(x => x.RedundantField1) |
| | | .HasMaxLength(200) |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property(x => x.RedundantField2) |
| | | .HasMaxLength(200) |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property(x => x.RedundantField3) |
| | | .HasMaxLength(200) |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property(x => x.Sort).HasComment("æåº"); |
| | | b.Property(x => x.IsDisabled).IsRequired(false).HasComment("æ¯å¦ç¦ç¨"); |
| | | b.Property(x => x.Remark).HasMaxLength(WmsContainerConsts.MaxRemarkLength).IsRequired(false).HasComment("夿³¨"); |
| | | |
| | | b.HasIndex(u => u.Name); |
| | | b.HasIndex(u => u.ContainerNo).IsUnique(); |
| | | b.HasIndex(u => u.ContainerType); |
| | | b.HasIndex(u => u.ContainerStatus); |
| | | |
| | | b.ApplyObjectExtensionMappings(); |
| | | }); |
| | |
| | | |
| | | _logger.LogInformation($"ProcessAsyncï¼Count={count}"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Executes the external API. |
| | | /// </summary> |
| | | private async Task ExecuteExternalApiAsync() |
| | | { |
| | | try |
| | | { |
| | | await _serviceProvider.GetRequiredService<IHIAWmsExternalApi>().CreateAsync(new WmsContainerCreateDto |
| | | { |
| | | Name = "WmsContainer_Name", |
| | | Code = "WmsContainer_Code", |
| | | }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | _logger.LogException(e); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # port 端å£å· |
| | | VITE_PORT = 8001 |
| | | |
| | | VITE_APP_TITLE= CMS |
| | | |
| | | VITE_API_URL = 'http://192.168.5.94:18002' # å¼åç-è²èª |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* eslint-disable */ |
| | | /* prettier-ignore */ |
| | | // @ts-nocheck |
| | | // Generated by unplugin-vue-components |
| | | // Read more: https://github.com/vuejs/core/pull/3399 |
| | | export {} |
| | | |
| | | declare module 'vue' { |
| | | export interface GlobalComponents { |
| | | BaseDialog: typeof import('./src/components/BaseDialog/index.vue')['default'] |
| | | ContextMenu: typeof import('./src/components/vue3-context-menu/ContextMenu.vue')['default'] |
| | | ContextMenuGroup: typeof import('./src/components/vue3-context-menu/ContextMenuGroup.vue')['default'] |
| | | ContextMenuIconCheck: typeof import('./src/components/vue3-context-menu/ContextMenuIconCheck.vue')['default'] |
| | | ContextMenuIconRight: typeof import('./src/components/vue3-context-menu/ContextMenuIconRight.vue')['default'] |
| | | ContextMenuItem: typeof import('./src/components/vue3-context-menu/ContextMenuItem.vue')['default'] |
| | | ContextMenuSeparator: typeof import('./src/components/vue3-context-menu/ContextMenuSeparator.vue')['default'] |
| | | ContextSubMenu: typeof import('./src/components/vue3-context-menu/ContextSubMenu.vue')['default'] |
| | | ContextSubMenuWrapper: typeof import('./src/components/vue3-context-menu/ContextSubMenuWrapper.vue')['default'] |
| | | CustomVxeColumn: typeof import('./src/components/Table/components/custom-vxe-column.vue')['default'] |
| | | DatePicker: typeof import('./src/components/DatePicker/index.vue')['default'] |
| | | Dialog: typeof import('./src/components/Dialog/index.vue')['default'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | | ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] |
| | | ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] |
| | | ElDialog: typeof import('element-plus/es')['ElDialog'] |
| | | ElDivider: typeof import('element-plus/es')['ElDivider'] |
| | | ElDrawer: typeof import('element-plus/es')['ElDrawer'] |
| | | ElDropdown: typeof import('element-plus/es')['ElDropdown'] |
| | | ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] |
| | | ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] |
| | | ElEmpty: typeof import('element-plus/es')['ElEmpty'] |
| | | ElForm: typeof import('element-plus/es')['ElForm'] |
| | | ElFormItem: typeof import('element-plus/es')['ElFormItem'] |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] |
| | | ElMenu: typeof import('element-plus/es')['ElMenu'] |
| | | ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | | ElPagination: typeof import('element-plus/es')['ElPagination'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRadio: typeof import('element-plus/es')['ElRadio'] |
| | | ElSelect: typeof import('element-plus/es')['ElSelect'] |
| | | ElTabPane: typeof import('element-plus/es')['ElTabPane'] |
| | | ElTabs: typeof import('element-plus/es')['ElTabs'] |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElUpload: typeof import('element-plus/es')['ElUpload'] |
| | | Menu: typeof import('./src/components/Menu/index.vue')['default'] |
| | | MenuBar: typeof import('./src/components/vue3-context-menu/MenuBar.vue')['default'] |
| | | MenuBarIconMenu: typeof import('./src/components/vue3-context-menu/MenuBarIconMenu.vue')['default'] |
| | | MyPages: typeof import('./src/components/MyPages/index.vue')['default'] |
| | | Pagination: typeof import('./src/components/Table/components/pagination.vue')['default'] |
| | | Pdf: typeof import('./src/components/Pdf/index.vue')['default'] |
| | | PrefixIcon: typeof import('./src/components/DatePicker/PrefixIcon.vue')['default'] |
| | | PreviewDialog: typeof import('./src/components/PreviewDialog/index.vue')['default'] |
| | | RouterLink: typeof import('vue-router')['RouterLink'] |
| | | RouterView: typeof import('vue-router')['RouterView'] |
| | | SettingItem: typeof import('./src/components/SettingItem/SettingItem.vue')['default'] |
| | | Table: typeof import('./src/components/Table/index.vue')['default'] |
| | | TouchScale: typeof import('./src/components/TouchScale/index.vue')['default'] |
| | | Upload: typeof import('./src/components/Upload/index.vue')['default'] |
| | | } |
| | | } |
| | |
| | | export const menu: Record<string,any>[] = [ |
| | | { |
| | | "name": "æµè¯", |
| | | "path": "/information-base/Ress", |
| | | "patchName": "Ress", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | { |
| | | "name": "HIAWms", |
| | | "path": "/information-base/HIAWms", |
| | | "patchName": "HIAWms", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | { |
| | | "name": "API请æ±", |
| | | "path": "/information-base/Http", |
| | | "patchName": "Http", |
| | | "icon": "p", |
| | | "notPage": false |
| | | } |
| | | ]; |
| | | export const menuMap: Record<string,any> = { |
| | | "Ress": { |
| | | "name": "æµè¯", |
| | | "path": "/information-base/Ress", |
| | | "patchName": "Ress", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | "HIAWms": { |
| | | "name": "HIAWms", |
| | | "path": "/information-base/HIAWms", |
| | | "patchName": "HIAWms", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | "Http": { |
| | | "name": "API请æ±", |
| | | "path": "/information-base/Http", |
| | | "patchName": "Http", |
| | | "icon": "p", |
| | | "notPage": false |
| | | } |