From 55aa5390c5d9f67c3b0a506e2ce9b4466be7db4f Mon Sep 17 00:00:00 2001
From: zs <zhousong@weben-smart.com>
Date: 周二, 29 4月 2025 10:58:49 +0800
Subject: [PATCH] 删除原来的默认表
---
HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.cs | 333 ++++++++++
HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/CMSPluginDbContextModelSnapshot.cs | 673 +++++++++++++++++++++
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsStore.cs | 2
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsContainerRepository.cs | 12
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsMaterial.cs | 2
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/appsettings.json | 2
/dev/null | 187 -----
HIAWms/server/src/CMS.Plugin.HIAWms.SqlServer/CMSPluginDbContext.cs | 2
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs | 2
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsPlace.cs | 2
HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/CMSPluginDbContext.cs | 2
HIAWms/server/src/CMS.Plugin.HIAWms.PostgreSql/CMSPluginDbContext.cs | 2
HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.Designer.cs | 675 +++++++++++++++++++++
13 files changed, 1,695 insertions(+), 201 deletions(-)
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/GetSamplesInput.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/GetSamplesInput.cs
deleted file mode 100644
index 06799ed..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/GetSamplesInput.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-
-/// <summary>
-/// Sample鏌ヨ鍙傛暟瀵硅薄
-/// </summary>
-public class GetSamplesInput : ExtensiblePagedAndSortedResultRequestDto
-{
- /// <summary>
- /// Gets or sets the filter.
- /// </summary>
- public string Filter { get; set; }
-
- /// <summary>
- /// Gets or sets the name.
- /// </summary>
- public string Name { get; set; }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleCreateDto.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleCreateDto.cs
deleted file mode 100644
index 7aeb3d6..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleCreateDto.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-
-/// <summary>
-/// Sample鍒涘缓鍙傛暟瀵硅薄
-/// </summary>
-public class SampleCreateDto : SampleCreateOrUpdateDtoBase
-{
- /// <summary>
- /// 鎺掑簭
- /// </summary>
- public virtual int? Sort { get; set; }
-
- /// <summary>
- /// 鏄惁绂佺敤
- /// </summary>
- public bool? IsDisabled { get; set; } = false;
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleCreateOrUpdateDtoBase.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleCreateOrUpdateDtoBase.cs
deleted file mode 100644
index f13a90b..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleCreateOrUpdateDtoBase.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-
-/// <summary>
-/// Sample鍒涘缓鎴栨洿鏂板熀绫�
-/// </summary>
-public abstract class SampleCreateOrUpdateDtoBase : ExtensibleEntityDto
-{
- /// <summary>
- /// 缂栧彿
- /// </summary>
- public virtual string Code { get; set; }
-
- /// <summary>
- /// 鍚嶇О
- /// </summary>
- public virtual string Name { get; set; }
-
- /// <summary>
- /// 澶囨敞
- /// </summary>
- public virtual string Remark { get; set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="SampleCreateOrUpdateDtoBase"/> class.
- /// </summary>
- public SampleCreateOrUpdateDtoBase() : base(false)
- {
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleDto.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleDto.cs
deleted file mode 100644
index 25ced34..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleDto.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Domain.Entities;
-
-namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-
-/// <summary>
-/// Sample鏁版嵁鍙傛暟瀵硅薄
-/// </summary>
-public class SampleDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp
-{
- /// <summary>
- /// 缂栧彿
- /// </summary>
- public virtual string Code { get; set; }
-
- /// <summary>
- /// 鍚嶇О
- /// </summary>
- public virtual string Name { get; set; }
-
- /// <summary>
- /// 鎺掑簭
- /// </summary>
- public virtual int Sort { get; set; }
-
- /// <summary>
- /// 澶囨敞
- /// </summary>
- public virtual string Remark { get; set; }
-
- /// <summary>
- /// 鏄惁绂佺敤
- /// </summary>
- public virtual bool? IsDisabled { get; set; }
-
- /// <summary>
- /// 骞跺彂鎴�
- /// </summary>
- public string ConcurrencyStamp { get; set; }
-
- /// <summary>
- /// Gets the export data.
- /// </summary>
- /// <returns></returns>
- public Dictionary<string, object> GetExportData()
- {
- var exportData = new Dictionary<string, object>();
- foreach (var property in this.GetType().GetProperties())
- {
- exportData.Add(property.Name, property.GetValue(this));
- }
-
- return exportData;
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleUpdateDto.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleUpdateDto.cs
deleted file mode 100644
index d6fa064..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SampleUpdateDto.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Volo.Abp.Domain.Entities;
-
-namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-
-/// <summary>
-/// Sample鏇存柊鍙傛暟瀵硅薄
-/// </summary>
-public class SampleUpdateDto : SampleCreateOrUpdateDtoBase, IHasConcurrencyStamp
-{
- /// <summary>
- /// 骞跺彂鎴�
- /// </summary>
- public string ConcurrencyStamp { get; set; }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SamplesExportModel.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SamplesExportModel.cs
deleted file mode 100644
index 84a75b0..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SamplesExportModel.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using MiniExcelLibs.Attributes;
-
-namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples
-{
- /// <summary>
- /// Samples瀵煎嚭妯″瀷
- /// </summary>
- public class SamplesExportModel
- {
- /// <summary>
- /// Sample瀵煎嚭妯″瀷
- /// </summary>
- public class WorkSectionExportModel
- {
- [ExcelColumn(Name = "鍚嶇О", Width = 25)]
- public virtual string Name { get; set; }
-
- [ExcelColumn(Name = "缂栧彿", Width = 25)]
- public virtual string Code { get; set; }
-
- [ExcelColumn(Name = "澶囨敞", Width = 25)]
- public virtual string Remark { get; set; }
- }
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SamplesImportModel.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SamplesImportModel.cs
deleted file mode 100644
index 4073c61..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/Samples/SamplesImportModel.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using static CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples.SamplesExportModel;
-
-namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples
-{
- /// <summary>
- /// Samples瀵煎叆妯″瀷
- /// </summary>
- public class SamplesImportModel
- {
- private List<SampleImportModel> _samples = new();
-
- public List<SampleImportModel> Samples
- {
- get => _samples;
- set
- {
- _samples = value;
- var rowIndex = 2;
- _samples?.ForEach(x => x.RowIndex = rowIndex++);
- }
- }
-
- /// <summary>
- /// Sample瀵煎叆妯″瀷
- /// </summary>
- public class SampleImportModel : WorkSectionExportModel
- {
- /// <summary>
- /// 琛屽彿
- /// </summary>
- public int RowIndex { get; set; }
- }
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Services/ISampleAppService.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Services/ISampleAppService.cs
deleted file mode 100644
index 24c1e36..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Services/ISampleAppService.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-using Volo.Abp.Application.Services;
-
-namespace CMS.Plugin.HIAWms.Application.Contracts.Services;
-
-/// <summary>
-/// Sample搴旂敤鏈嶅姟
-/// </summary>
-public interface ISampleAppService : ICrudAppService<SampleDto, Guid, GetSamplesInput, SampleCreateDto, SampleUpdateDto>
-{
- /// <summary>
- /// Clones the asynchronous.
- /// </summary>
- /// <param name="ids">The ids.</param>
- /// <returns></returns>
- Task<List<SampleDto>> CloneAsync(IEnumerable<Guid> ids);
-
- /// <summary>
- /// Deletes the many asynchronous.
- /// </summary>
- /// <param name="ids">The ids.</param>
- /// <returns></returns>
- Task DeleteManyAsync(IEnumerable<Guid> ids);
-
- /// <summary>
- /// Adjusts the sort asynchronous.
- /// </summary>
- /// <param name="id">The identifier.</param>
- /// <param name="sort">The sort.</param>
- /// <returns></returns>
- Task AdjustSortAsync(Guid id, int sort);
-
- /// <summary>
- /// Imports the asynchronous.
- /// </summary>
- /// <param name="input">The input.</param>
- /// <returns></returns>
- Task ImportAsync(SamplesImportModel input);
-
- /// <summary>
- /// Exports the asynchronous.
- /// </summary>
- /// <param name="input">The input.</param>
- /// <returns></returns>
- Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetSamplesInput input);
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/SampleAppService.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/SampleAppService.cs
deleted file mode 100644
index 0ecd8d8..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/SampleAppService.cs
+++ /dev/null
@@ -1,308 +0,0 @@
-using CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-using CMS.Plugin.HIAWms.Application.Contracts.Services;
-using CMS.Plugin.HIAWms.Domain.Samples;
-using CMS.Plugin.HIAWms.Domain.Shared;
-using CMS.Plugin.HIAWms.Domain.Shared.Samples;
-using Volo.Abp;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Data;
-using Volo.Abp.ObjectExtending;
-
-namespace CMS.Plugin.HIAWms.Application.Implements;
-
-/// <inheritdoc />
-public class SampleAppService : CMSPluginAppService, ISampleAppService
-{
- private readonly ISampleRepository _sampleRepository;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="SampleAppService"/> class.
- /// </summary>
- /// <param name="sampleRepository">The task job repository.</param>
- public SampleAppService(ISampleRepository sampleRepository)
- {
- _sampleRepository = sampleRepository;
- }
-
- /// <inheritdoc />
- public virtual async Task<SampleDto> GetAsync(Guid id)
- {
- return ObjectMapper.Map<Sample, SampleDto>(await _sampleRepository.GetAsync(id));
- }
-
- /// <inheritdoc />
- public virtual async Task<PagedResultDto<SampleDto>> GetListAsync(GetSamplesInput input)
- {
- Check.NotNull(input, nameof(input));
-
- if (input.Sorting.IsNullOrWhiteSpace())
- {
- input.Sorting = nameof(Sample.Sort);
- }
-
- var specification = new SampleSpecification(input.Name);
- var count = await _sampleRepository.GetCountAsync(input.Filter, specification);
- var list = await _sampleRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification);
-
- return new PagedResultDto<SampleDto>(count, ObjectMapper.Map<List<Sample>, List<SampleDto>>(list));
- }
-
- /// <inheritdoc />
- public virtual async Task<SampleDto> CreateAsync(SampleCreateDto input)
- {
- await CheckCreateOrUpdateDtoAsync(input);
-
- var exist = await _sampleRepository.NameExistAsync(input.Name);
- if (exist)
- {
- throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.Name]);
- }
-
- var maxSort = await _sampleRepository.GetMaxSortAsync();
- var sort = input.Sort ?? maxSort;
- var sample = new Sample(GuidGenerator.Create(), input.Code, input.Name, sort, input.Remark);
- input.MapExtraPropertiesTo(sample, MappingPropertyDefinitionChecks.None);
-
- await _sampleRepository.InsertAsync(sample);
-
- if (input.Sort.HasValue && sample.Sort != maxSort)
- {
- await AdjustSortAsync(sample.Id, sample.Sort);
- }
-
- return ObjectMapper.Map<Sample, SampleDto>(sample);
- }
-
- /// <inheritdoc />
- public virtual async Task<SampleDto> UpdateAsync(Guid id, SampleUpdateDto input)
- {
- await CheckCreateOrUpdateDtoAsync(input);
-
- var sample = await _sampleRepository.GetAsync(id);
- var exist = await _sampleRepository.NameExistAsync(input.Name, sample.Id);
- if (exist)
- {
- throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.Name]);
- }
-
- sample.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);
- input.MapExtraPropertiesTo(sample, MappingPropertyDefinitionChecks.None);
-
- sample.Update(input.Code, input.Name, input.Remark);
-
- await _sampleRepository.UpdateAsync(sample);
-
- return ObjectMapper.Map<Sample, SampleDto>(sample);
- }
-
- /// <inheritdoc />
- public async Task<List<SampleDto>> CloneAsync(IEnumerable<Guid> ids)
- {
- var samples = new List<Sample>();
- if (ids != null)
- {
- var sort = await _sampleRepository.GetMaxSortAsync();
- foreach (var id in ids)
- {
- var sample = await _sampleRepository.FindAsync(id);
- if (sample != null)
- {
- var name = sample.Name + SampleConsts.CloneTag;
- var notExist = false;
- while (!notExist)
- {
- var exist = await _sampleRepository.NameExistAsync(name);
- if (exist || samples.Any(x => x.Name == name))
- {
- name += SampleConsts.CloneTag;
- continue;
- }
-
- notExist = true;
- }
-
- sample = await _sampleRepository.InsertAsync(sample.Clone(GuidGenerator.Create(), name, sort++));
- samples.Add(sample);
- }
- }
- }
-
- return ObjectMapper.Map<List<Sample>, List<SampleDto>>(samples);
- }
-
- /// <inheritdoc />
- public virtual Task DeleteAsync(Guid id)
- {
- return _sampleRepository.DeleteAsync(id);
- }
-
- /// <inheritdoc />
- public async Task DeleteManyAsync(IEnumerable<Guid> ids)
- {
- foreach (var id in ids)
- {
- await DeleteAsync(id);
- }
- }
-
- /// <inheritdoc />
- public virtual async Task AdjustSortAsync(Guid id, int sort)
- {
- var list = await _sampleRepository.GetListAsync(nameof(Sample.Sort));
- if (list != null && list.Any())
- {
- var initSort = 1;
- list.ForEach(x => x.AdjustSort(initSort++));
- var entity = list.FirstOrDefault(x => x.Id == id);
- if (entity != null)
- {
- if (sort == 1)
- {
- list.Where(x => x.Id != id).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1));
- }
- else if (entity.Sort > sort)
- {
- list.Where(x => x.Id != id && x.Sort >= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1));
- list.Where(x => x.Id != id && x.Sort < sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1));
- }
- else if (entity.Sort < sort)
- {
- list.Where(x => x.Id != id && x.Sort > sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1));
- list.Where(x => x.Id != id && x.Sort <= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1));
- }
-
- entity.AdjustSort(sort);
- }
- }
-
- await _sampleRepository.UpdateManyAsync(list);
- }
-
- /// <inheritdoc />
- public async Task ImportAsync(SamplesImportModel input)
- {
- Check.NotNull(input, nameof(input));
-
- var sampleCreateDtos = new List<(int RowIndex, SampleCreateDto Item)>();
- var sampleUpdateDtos = new List<(int RowIndex, Guid Id, SampleUpdateDto Item)>();
- var samples = input.Samples;
-
- if (samples != null && samples.Any())
- {
- #region 瀵煎叆鏍¢獙
-
- // 鍒ゆ柇鍚嶇О鏄惁閲嶅锛屽苟杈撳嚭绗嚑琛岄噸澶�
- var duplicateSamples = samples.GroupBy(x => x.Name).Where(x => x.Count() > 1).ToList();
- if (duplicateSamples?.Any() == true)
- {
- var duplicateSampleMsgs = duplicateSamples.Select(x => $"绗� {string.Join(",", x.Select(x => x.RowIndex))} 琛岋細{x.Key} 鍚嶇О閲嶅");
- var errorMsg = $"瀵煎叆澶辫触锛侀厤缃紝 {string.Join(",", duplicateSampleMsgs)}锛岀粓姝㈠鍏�";
- throw new UserFriendlyException(errorMsg);
- }
-
- #endregion
-
- foreach (var sample in samples)
- {
- if (sample.Code.IsNullOrWhiteSpace() && sample.Name.IsNullOrWhiteSpace())
- {
- continue;
- }
-
- if (sample.Name.IsNullOrWhiteSpace())
- {
- var errorMsg = $"瀵煎叆澶辫触锛侀厤缃紝绗瑊sample.RowIndex}琛岋細Sample鍚嶇О涓嶈兘涓虹┖";
- throw new UserFriendlyException(errorMsg);
- }
-
- var oldSample = await _sampleRepository.FindByNameAsync(sample.Name);
- if (oldSample != null)
- {
- var sampleUpdateDto = new SampleUpdateDto
- {
- Code = sample.Code,
- Name = sample.Name,
- Remark = sample.Remark,
- };
-
- sampleUpdateDtos.Add((sample.RowIndex, oldSample.Id, sampleUpdateDto));
- }
- else
- {
- var sampleCreateDto = new SampleCreateDto
- {
- Code = sample.Code,
- Name = sample.Name,
- Remark = sample.Remark,
- };
-
- sampleCreateDtos.Add((sample.RowIndex, sampleCreateDto));
- }
- }
- }
-
- // 鏂板
- foreach (var sampleDto in sampleCreateDtos)
- {
- try
- {
- await CreateAsync(sampleDto.Item);
- }
- catch (Exception e)
- {
- var errorMsg = $"瀵煎叆澶辫触锛侀厤缃紝绗瑊sampleDto.RowIndex}琛岋細{e.Message}锛岀粓姝㈠鍏�";
- throw new UserFriendlyException(errorMsg);
- }
- }
-
- // 鏇存柊
- foreach (var sampleDto in sampleUpdateDtos)
- {
- try
- {
- await UpdateAsync(sampleDto.Id, sampleDto.Item);
- }
- catch (Exception e)
- {
- var errorMsg = $"瀵煎叆澶辫触锛侀厤缃紝绗瑊sampleDto.RowIndex}琛岋細{e.Message}锛岀粓姝㈠鍏�";
- throw new UserFriendlyException(errorMsg);
- }
- }
- }
-
- /// <inheritdoc />
- public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetSamplesInput input)
- {
- Check.NotNull(input, nameof(input));
-
- if (input.Sorting.IsNullOrWhiteSpace())
- {
- input.Sorting = nameof(Sample.Sort);
- }
-
- var specification = new SampleSpecification(input.Name);
- var list = await _sampleRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true);
- var result = ObjectMapper.Map<List<Sample>, List<SampleDto>>(list);
-
- var sheets = new Dictionary<string, object>
- {
- ["閰嶇疆"] = result.Select(x => x.GetExportData()).ToList(),
- };
-
- var fileName = result.Count > 1 ? "Sample鍒楄〃" : result.Count == 1 ? result.First()?.Name : "Sample妯$増";
- return (sheets, fileName);
- }
-
- /// <summary>
- /// Checks the create or update dto asynchronous.
- /// </summary>
- /// <param name="input">The input.</param>
- protected Task CheckCreateOrUpdateDtoAsync(SampleCreateOrUpdateDtoBase input)
- {
- Check.NotNull(input, nameof(input));
- Check.NotNullOrWhiteSpace(input.Code, "缂栧彿", SampleConsts.MaxCodeLength);
- Check.NotNullOrWhiteSpace(input.Name, "鍚嶇О", SampleConsts.MaxNameLength);
- Check.Length(input.Remark, "澶囨敞", SampleConsts.MaxRemarkLength);
- return Task.CompletedTask;
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application/MapperProfiles/SampleAutoMapperProfile.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application/MapperProfiles/SampleAutoMapperProfile.cs
deleted file mode 100644
index 5e447c6..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application/MapperProfiles/SampleAutoMapperProfile.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using AutoMapper;
-using CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-using CMS.Plugin.HIAWms.Domain.Samples;
-using Volo.Abp.ObjectExtending;
-
-namespace CMS.Plugin.HIAWms.Application.MapperProfiles;
-
-/// <summary>
-/// AutoMapper閰嶇疆
-/// </summary>
-/// <seealso cref="AutoMapper.Profile" />
-public class SampleAutoMapperProfile : Profile
-{
- /// <summary>
- /// Initializes a new instance of the <see cref="SampleAutoMapperProfile"/> class.
- /// </summary>
- public SampleAutoMapperProfile()
- {
- /* You can configure your AutoMapper mapping configuration here.
- * Alternatively, you can split your mapping configurations
- * into multiple profile classes for a better organization. */
- CreateMap<Sample, SampleDto>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None);
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain.Shared/Samples/SampleConsts.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Domain.Shared/Samples/SampleConsts.cs
deleted file mode 100644
index b3e789b..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain.Shared/Samples/SampleConsts.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace CMS.Plugin.HIAWms.Domain.Shared.Samples;
-
-/// <summary>
-/// Sample甯搁噺瀹氫箟
-/// </summary>
-public static class SampleConsts
-{
- public const string CloneTag = "_鍓湰";
- public static int MaxCodeLength { get; set; } = 64;
- public static int MaxNameLength { get; set; } = 64;
- public static int MaxRemarkLength { get; set; } = 256;
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain.Shared/Samples/SampleEto.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Domain.Shared/Samples/SampleEto.cs
deleted file mode 100644
index a541bca..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain.Shared/Samples/SampleEto.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-namespace CMS.Plugin.HIAWms.Domain.Shared.Samples;
-
-/// <summary>
-/// Sample浜嬩欢鍙傛暟瀵硅薄
-/// </summary>
-[Serializable]
-public class SampleEto
-{
- /// <summary>
- /// Initializes a new instance of the <see cref="SampleEto"/> class.
- /// </summary>
- /// <param name="name">The name.</param>
- public SampleEto(string name)
- {
- Name = name;
- }
-
- /// <summary>
- /// 鍚嶇О
- /// </summary>
- public string Name { get; }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/EventHandlers/SampleEventHandler.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/EventHandlers/SampleEventHandler.cs
deleted file mode 100644
index 5c11e33..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/EventHandlers/SampleEventHandler.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using CMS.Plugin.HIAWms.Domain.Shared.Samples;
-using Volo.Abp.DependencyInjection;
-using Volo.Abp.EventBus.Distributed;
-
-namespace CMS.Plugin.HIAWms.Domain.EventHandlers;
-
-/// <summary>
-/// Sample浜嬩欢澶勭悊绋嬪簭
-/// </summary>
-public class SampleEventHandler : IDistributedEventHandler<SampleEto>, ITransientDependency
-{
- /// <inheritdoc />
- public Task HandleEventAsync(SampleEto eventData)
- {
- return Task.CompletedTask;
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/ISampleRepository.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/ISampleRepository.cs
deleted file mode 100644
index 8aeff5a..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/ISampleRepository.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using Volo.Abp.Domain.Repositories;
-using Volo.Abp.Specifications;
-
-namespace CMS.Plugin.HIAWms.Domain.Samples;
-
-/// <summary>
-/// Sample浠撳偍
-/// </summary>
-public interface ISampleRepository : IBasicRepository<Sample, Guid>
-{
- /// <summary>
- /// Finds the by name asynchronous.
- /// </summary>
- /// <param name="name">The name.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns></returns>
- Task<Sample> FindByNameAsync(string name, CancellationToken cancellationToken = default);
-
- /// <summary>
- /// Names the exist asynchronous.
- /// </summary>
- /// <param name="name">The name.</param>
- /// <param name="id">The identifier.</param>
- /// <returns></returns>
- Task<bool> NameExistAsync(string name, Guid? id = null);
-
- /// <summary>
- /// Gets the maximum sort asynchronous.
- /// </summary>
- /// <returns></returns>
- Task<int> GetMaxSortAsync();
-
- /// <summary>
- /// Gets the list asynchronous.
- /// </summary>
- /// <param name="sorting">The sorting.</param>
- /// <param name="maxResultCount">The maximum result count.</param>
- /// <param name="skipCount">The skip count.</param>
- /// <param name="filter">The filter.</param>
- /// <param name="specification">The specification.</param>
- /// <param name="includeDetails">if set to <c>true</c> [include details].</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns></returns>
- Task<List<Sample>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<Sample> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default);
-
- /// <summary>
- /// Gets the count asynchronous.
- /// </summary>
- /// <param name="filter">The filter.</param>
- /// <param name="specification">The specification.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns></returns>
- Task<long> GetCountAsync(string filter = null, Specification<Sample> specification = null, CancellationToken cancellationToken = default);
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/Sample.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/Sample.cs
deleted file mode 100644
index 25da3ba..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/Sample.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-using CMS.Plugin.HIAWms.Domain.Shared.Samples;
-using Volo.Abp;
-using Volo.Abp.Domain.Entities.Auditing;
-
-namespace CMS.Plugin.HIAWms.Domain.Samples
-{
- /// <summary>
- /// Sample
- /// </summary>
- public class Sample : FullAuditedAggregateRoot<Guid>
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="Sample"/> class.
- /// </summary>
- protected Sample()
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Sample"/> 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 Sample(Guid id, string code, string name, int sort = 0, string remark = null) : base(id)
- {
- Code = Check.NotNullOrWhiteSpace(code, "缂栧彿", SampleConsts.MaxCodeLength);
- Name = Check.NotNullOrWhiteSpace(name, "鍚嶇О", SampleConsts.MaxNameLength);
- Sort = sort;
- Remark = Check.Length(remark, "澶囨敞", SampleConsts.MaxRemarkLength);
- }
-
- /// <summary>
- /// 缂栧彿
- /// </summary>
- public virtual string Code { get; protected set; }
-
- /// <summary>
- /// 鍚嶇О
- /// </summary>
- public virtual string Name { get; protected set; }
-
- /// <summary>
- /// 鎺掑簭
- /// </summary>
- public virtual int Sort { get; protected set; }
-
- /// <summary>
- /// 澶囨敞
- /// </summary>
- public virtual string Remark { get; protected 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, "缂栧彿", SampleConsts.MaxCodeLength);
- Name = Check.NotNullOrWhiteSpace(name, "鍚嶇О", SampleConsts.MaxNameLength);
- Remark = Check.Length(remark, "澶囨敞", SampleConsts.MaxRemarkLength);
- IsDisabled = isDisabled ?? IsDisabled;
- }
-
- /// <summary>
- /// Adjusts the sort.
- /// </summary>
- /// <param name="sort">The sort.</param>
- public void AdjustSort(int 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 Sample Clone(Guid create, string name, int i)
- {
- return new Sample(create, Code, name, i, Remark);
- }
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/SampleDataSeedContributor.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/SampleDataSeedContributor.cs
deleted file mode 100644
index c484dc1..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/SampleDataSeedContributor.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using Volo.Abp.Data;
-using Volo.Abp.DependencyInjection;
-using Volo.Abp.Guids;
-using Volo.Abp.Uow;
-
-namespace CMS.Plugin.HIAWms.Domain.Samples
-{
- /// <summary>
- /// Sample绉嶅瓙鏁版嵁鎻愪緵绋嬪簭
- /// </summary>
- public class SampleDataSeedContributor : IDataSeedContributor, ITransientDependency
- {
- private readonly IUnitOfWorkManager _unitOfWorkManager;
- private readonly ISampleRepository _sampleRepository;
- private readonly IGuidGenerator _guidGenerator;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="SampleDataSeedContributor"/> class.
- /// </summary>
- /// <param name="unitOfWorkManager">The unit of work manager.</param>
- /// <param name="guidGenerator">The unique identifier generator.</param>
- /// <param name="sampleRepository">The work section repository.</param>
- public SampleDataSeedContributor(IUnitOfWorkManager unitOfWorkManager, IGuidGenerator guidGenerator, ISampleRepository sampleRepository)
- {
- _unitOfWorkManager = unitOfWorkManager;
- _sampleRepository = sampleRepository;
- _guidGenerator = guidGenerator;
- }
-
- /// <inheritdoc />
- public async Task SeedAsync(DataSeedContext context)
- {
- if (context.Properties.ContainsKey(CMSPluginDbProperties.ConnectionStringName) && context.Properties[CMSPluginDbProperties.ConnectionStringName]?.ToString() == CMSPluginDbProperties.ConnectionStringName)
- {
- try
- {
- //using var unitofWork = _unitOfWorkManager.Begin(requiresNew: true);
- //await unitofWork.SaveChangesAsync();
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
-
- if (context.Properties.ContainsKey("SeedTestData") && context.Properties["SeedTestData"]?.ToString() == "SeedTestData")
- {
- try
- {
- await SeedSampleDataAsync();
- }
- catch (Exception e)
- {
- Console.WriteLine(e.Message);
- }
- }
- }
-
- /// <summary>
- /// Seeds the work section data asynchronous.
- /// </summary>
- private async Task SeedSampleDataAsync()
- {
- using var unitofWork = _unitOfWorkManager.Begin(requiresNew: true);
- if (await _sampleRepository.GetCountAsync() == 0)
- {
- var Samples = new List<Sample>();
- for (int i = 1; i <= 80; i++)
- {
- var sample = new Sample(_guidGenerator.Create(), $"Sample_Code{i}", $"Sample_Name{i}", i, $"Sample_Remark{i}");
- Samples.Add(sample);
- }
-
- await _sampleRepository.InsertManyAsync(Samples);
- await unitofWork.SaveChangesAsync();
- }
- }
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/SampleSpecification.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/SampleSpecification.cs
deleted file mode 100644
index d7f2178..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.Domain/Samples/SampleSpecification.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System.Linq.Expressions;
-
-namespace CMS.Plugin.HIAWms.Domain.Samples
-{
- /// <summary>
- /// Sample瑙勭害
- /// </summary>
- public class SampleSpecification : Volo.Abp.Specifications.Specification<Sample>
- {
- private readonly string _name;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="SampleSpecification"/> class.
- /// </summary>
- public SampleSpecification()
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="SampleSpecification"/> class.
- /// </summary>
- /// <param name="name">The name.</param>
- public SampleSpecification(string name = null)
- {
- _name = name;
- }
-
- /// <inheritdoc />
- public override Expression<Func<Sample, bool>> ToExpression()
- {
- Expression<Func<Sample, bool>> expression = c => 1 == 1;
-
- if (_name != null)
- {
- expression = expression.And(c => c.Name == _name);
- }
-
- return expression;
- }
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.Sample.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.Sample.cs
deleted file mode 100644
index bcff9c9..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.Sample.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using CMS.Plugin.HIAWms.Domain;
-using CMS.Plugin.HIAWms.Domain.Samples;
-using CMS.Plugin.HIAWms.Domain.Shared.Samples;
-using Microsoft.EntityFrameworkCore;
-using Volo.Abp;
-using Volo.Abp.EntityFrameworkCore.Modeling;
-
-namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions;
-
-/// <summary>
-/// EfCore鎵╁睍
-/// </summary>
-public static partial class CMSPluginEfCoreExtensions
-{
- /// <summary>
- /// Includes the details.
- /// </summary>
- /// <param name="queryable">The queryable.</param>
- /// <param name="include">if set to <c>true</c> [include].</param>
- /// <returns></returns>
- public static IQueryable<Sample> IncludeDetails(this IQueryable<Sample> queryable, bool include = true)
- {
- if (!include)
- {
- return queryable;
- }
-
- return queryable;
- }
-
- /// <summary>
- /// Configures the sample.
- /// </summary>
- /// <param name="builder">The builder.</param>
- public static void ConfigureSample(this ModelBuilder builder)
- {
- Check.NotNull(builder, nameof(builder));
-
- builder.Entity<Sample>(b =>
- {
- //Configure table & schema name
- b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_Samples").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("Sample");
-
- b.ConfigureByConvention();
-
- //Properties
- b.Property(x => x.Code).HasMaxLength(SampleConsts.MaxCodeLength).IsRequired().HasComment("缂栫爜");
- b.Property(x => x.Name).HasMaxLength(SampleConsts.MaxNameLength).IsRequired().HasComment("鍚嶇О");
- b.Property(x => x.Sort).HasComment("鎺掑簭");
- b.Property(x => x.IsDisabled).IsRequired(false).HasComment("鏄惁绂佺敤");
- b.Property(x => x.Remark).HasMaxLength(SampleConsts.MaxRemarkLength).IsRequired(false).HasComment("澶囨敞");
-
- b.HasIndex(u => u.Name);
-
- b.ApplyObjectExtensionMappings();
- });
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs
index fe7155e..c335bd9 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs
@@ -39,7 +39,7 @@
builder.Entity<WmsArea>(b =>
{
// Configure table & schema name
- b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsAreas").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("Wms_Area");
+ b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsAreas").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("搴撳尯琛�");
b.ConfigureByConvention();
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsMaterial.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsMaterial.cs
index 95afa67..7cf375e 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsMaterial.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsMaterial.cs
@@ -39,7 +39,7 @@
builder.Entity<WmsMaterial>(b =>
{
// 閰嶇疆琛ㄥ悕鍜屾敞閲�
- b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_Wms_Materials").ToLower(),
+ b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsMaterials").ToLower(),
CMSPluginDbProperties.DbSchema)
.HasComment("鐗╂枡鍩虹淇℃伅琛�");
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsPlace.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsPlace.cs
index 9b4566d..b557a95 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsPlace.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsPlace.cs
@@ -39,7 +39,7 @@
builder.Entity<WmsPlace>(b =>
{
// Configure table & schema name
- b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsPlaces").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("Wms_Place");
+ b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsPlaces").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("搴撲綅琛�");
b.ConfigureByConvention();
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsStore.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsStore.cs
index d4512d3..59ed277 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsStore.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsStore.cs
@@ -39,7 +39,7 @@
builder.Entity<WmsStore>(b =>
{
// Configure table & schema name
- b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsStores").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("Wms_Store");
+ b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsStores").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("浠撳簱淇℃伅琛�");
b.ConfigureByConvention();
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreSampleRepository.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreSampleRepository.cs
deleted file mode 100644
index 980cb59..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreSampleRepository.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System.Linq.Dynamic.Core;
-using CMS.Plugin.HIAWms.Domain.Samples;
-using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions;
-using Microsoft.EntityFrameworkCore;
-using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
-using Volo.Abp.EntityFrameworkCore;
-using Volo.Abp.Specifications;
-
-namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Repositories;
-
-/// <inheritdoc />
-public class EfCoreSampleRepository : EfCoreRepository<ICMSPluginDbContext, Sample, Guid>, ISampleRepository
-{
- /// <summary>
- /// Initializes a new instance of the <see cref="EfCoreSampleRepository"/> class.
- /// </summary>
- /// <param name="dbContextProvider">The database context provider.</param>
- public EfCoreSampleRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider)
- : base(dbContextProvider)
- {
- }
-
- /// <inheritdoc />
- public virtual async Task<Sample> FindByNameAsync(string name, CancellationToken cancellationToken = default)
- {
- return await (await GetDbSetAsync())
- .IncludeDetails()
- .OrderBy(t => t.Sort)
- .FirstOrDefaultAsync(t => t.Name == name, GetCancellationToken(cancellationToken));
- }
-
- /// <inheritdoc />
- public async Task<bool> NameExistAsync(string name, Guid? id = null)
- {
- return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).AnyAsync(x => x.Name == name);
- }
-
- /// <inheritdoc />
- public async Task<int> GetMaxSortAsync()
- {
- var hasAny = await (await GetQueryableAsync()).AnyAsync();
- if (!hasAny)
- {
- return 1;
- }
-
- var sort = await (await GetQueryableAsync()).MaxAsync(x => x.Sort);
- return sort + 1;
- }
-
- /// <inheritdoc />
- public async Task<List<Sample>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<Sample> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default)
- {
- specification ??= new SampleSpecification();
- return await (await GetDbSetAsync())
- .IncludeDetails(includeDetails)
- .Where(specification.ToExpression())
- .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.Name.Contains(filter))
- .OrderBy(sorting.IsNullOrEmpty() ? nameof(Sample.Sort) : sorting)
- .PageBy(skipCount, maxResultCount)
- .ToListAsync(GetCancellationToken(cancellationToken));
- }
-
- /// <inheritdoc />
- public async Task<long> GetCountAsync(string filter = null, Specification<Sample> specification = null, CancellationToken cancellationToken = default)
- {
- specification ??= new SampleSpecification();
- return await (await GetQueryableAsync())
- .Where(specification.ToExpression())
- .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.Name.Contains(filter))
- .CountAsync(cancellationToken: GetCancellationToken(cancellationToken));
- }
-
- /// <inheritdoc />
- public override async Task<IQueryable<Sample>> WithDetailsAsync()
- {
- return (await GetQueryableAsync()).IncludeDetails();
- }
-}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsContainerRepository.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsContainerRepository.cs
index 4e14eae..06c876d 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsContainerRepository.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsContainerRepository.cs
@@ -21,18 +21,18 @@
}
/// <inheritdoc />
- public virtual async Task<WmsContainer> FindByNameAsync(string name, CancellationToken cancellationToken = default)
+ public virtual async Task<WmsContainer> FindByNameAsync(string containerNo, CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.IncludeDetails()
.OrderBy(t => t.Sort)
- .FirstOrDefaultAsync(t => t.Name == name, GetCancellationToken(cancellationToken));
+ .FirstOrDefaultAsync(t => t.ContainerNo == containerNo, GetCancellationToken(cancellationToken));
}
/// <inheritdoc />
- public async Task<bool> NameExistAsync(string name, Guid? id = null)
+ public async Task<bool> NameExistAsync(string containerNo, Guid? id = null)
{
- return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).AnyAsync(x => x.Name == name);
+ return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).AnyAsync(x => x.ContainerNo == containerNo);
}
/// <inheritdoc />
@@ -55,7 +55,7 @@
return await (await GetDbSetAsync())
.IncludeDetails(includeDetails)
.Where(specification.ToExpression())
- .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.Name.Contains(filter))
+ .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.ContainerNo.Contains(filter))
.OrderBy(sorting.IsNullOrEmpty() ? nameof(WmsContainer.Sort) : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
@@ -67,7 +67,7 @@
specification ??= new WmsContainerSpecification();
return await (await GetQueryableAsync())
.Where(specification.ToExpression())
- .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.Name.Contains(filter))
+ .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.ContainerNo.Contains(filter))
.CountAsync(cancellationToken: GetCancellationToken(cancellationToken));
}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/appsettings.json b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/appsettings.json
index 58af186..ebe0b8c 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/appsettings.json
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/appsettings.json
@@ -1,5 +1,5 @@
{
"ConnectionStrings": {
- "Default": "Server=127.0.0.1;Database=CMS.Plugin.HIAWms;User ID=root;Password=123abc.com"
+ "Default": "Server=localhost;Database=CMS.Plugin.HIAWms;User ID=root;Password=123abc.com"
}
}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/CMSPluginDbContext.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/CMSPluginDbContext.cs
index 6157a9d..bd06548 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/CMSPluginDbContext.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/CMSPluginDbContext.cs
@@ -36,7 +36,7 @@
builder.ConfigureWmsStore();
builder.ConfigureWmsArea();
builder.ConfigureWmsPlace();
- builder.ConfigureWmsContainer();
+ builder.ConfigureWmsMaterial();
/* Configure your own tables/entities inside here */
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.Designer.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.Designer.cs
new file mode 100644
index 0000000..67fed0b
--- /dev/null
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.Designer.cs
@@ -0,0 +1,675 @@
+锘�// <auto-generated />
+using System;
+using CMS.Plugin.HIAWms.MySQL;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace CMS.Plugin.HIAWms.MySQL.Migrations
+{
+ [DbContext(typeof(CMSPluginDbContext))]
+ [Migration("20250429025531_InitialCreate")]
+ partial class InitialCreate
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
+ .HasAnnotation("ProductVersion", "6.0.16")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsAreas.WmsArea", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<string>("AreaDesc")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("鎻忚堪");
+
+ b.Property<string>("AreaName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("搴撳尯鍚嶇О");
+
+ b.Property<string>("AreaNo")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("搴撳尯缂栧彿");
+
+ b.Property<int>("AreaStatus")
+ .HasColumnType("int")
+ .HasComment("搴撳尯鐘舵��");
+
+ b.Property<int>("AreaType")
+ .HasColumnType("int")
+ .HasComment("搴撳尯绫诲瀷");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .HasColumnType("tinyint(1)")
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("Sort")
+ .HasColumnType("int")
+ .HasComment("鎺掑簭");
+
+ b.Property<string>("StoreCode")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("浠撳簱浠g爜");
+
+ b.Property<string>("StoreName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("浠撳簱鍚嶇О");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AreaName");
+
+ b.ToTable("scms_wmsareas", (string)null);
+
+ b.HasComment("搴撳尯琛�");
+ });
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsContainers.WmsContainer", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<string>("ContainerNo")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("鎵樼洏缂栧彿");
+
+ b.Property<int>("ContainerStatus")
+ .HasColumnType("int")
+ .HasComment("鎵樼洏鐘舵��");
+
+ b.Property<int>("ContainerType")
+ .HasColumnType("int")
+ .HasComment("鎵樼洏绫诲瀷");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<int?>("ExceptionNumber")
+ .HasColumnType("int")
+ .HasComment("寮傚父鏁伴噺");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .HasColumnType("tinyint(1)")
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<decimal?>("LimitHeight")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闄愰珮");
+
+ b.Property<decimal?>("LimitLength")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闄愰暱");
+
+ b.Property<decimal?>("LimitWidth")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闄愬");
+
+ b.Property<int?>("MaterialNumber")
+ .HasColumnType("int")
+ .HasComment("鐗╂枡鏁伴噺");
+
+ b.Property<decimal?>("MaxWeight")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("杞介噸涓婇檺");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("Sort")
+ .HasColumnType("int")
+ .HasComment("鎺掑簭");
+
+ b.Property<decimal?>("SpecHeight")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("楂樺害");
+
+ b.Property<decimal?>("SpecLength")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闀垮害");
+
+ b.Property<decimal?>("SpecWidth")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("瀹藉害");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContainerNo")
+ .IsUnique();
+
+ b.HasIndex("ContainerStatus");
+
+ b.HasIndex("ContainerType");
+
+ b.ToTable("scms_wmscontainers", (string)null);
+
+ b.HasComment("鎵樼洏淇℃伅琛�");
+ });
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsMaterials.WmsMaterial", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<string>("Certification")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("璇佷功缂栧彿");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<string>("Factory")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("鐢熶骇宸ュ巶");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<bool>("IsMainBranch")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasComment("鏄惁涓轰富鏀");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<decimal>("Length")
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闀垮害锛堝崟浣嶏細m锛�");
+
+ b.Property<string>("MaterialCode")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("鐗╂枡缂栫爜锛堝敮涓�鏍囪瘑锛�");
+
+ b.Property<string>("MaterialName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("鐗╂枡鍚嶇О");
+
+ b.Property<string>("MaterialQuality")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("鏉愯川锛堝锛�304涓嶉攬閽級");
+
+ b.Property<int>("MaterialType")
+ .HasColumnType("int")
+ .HasComment("鐗╂枡绫诲瀷锛堟灇涓惧�硷級");
+
+ b.Property<decimal>("OuterDiameter")
+ .HasColumnType("decimal(18,2)")
+ .HasComment("澶栧緞锛堝崟浣嶏細mm锛�");
+
+ b.Property<string>("PrimaryUnit")
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("涓诲崟浣嶏紙濡傦細kg銆乵銆佷釜锛�");
+
+ b.Property<int>("PurchaseType")
+ .HasColumnType("int")
+ .HasComment("閲囪喘绫诲瀷锛堟灇涓惧�硷級");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(500)
+ .HasColumnType("varchar(500)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("Sort")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0)
+ .HasComment("鎺掑簭");
+
+ b.Property<string>("Standard")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("瑙勬牸/鏍囧噯锛堝锛欸B/T 8163-2018锛�");
+
+ b.Property<decimal>("WallThickness")
+ .HasColumnType("decimal(18,2)")
+ .HasComment("澹佸帤锛堝崟浣嶏細mm锛�");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MaterialCode")
+ .IsUnique();
+
+ b.HasIndex("MaterialName");
+
+ b.HasIndex("MaterialType");
+
+ b.HasIndex("PurchaseType");
+
+ b.ToTable("scms_wmsmaterials", (string)null);
+
+ b.HasComment("鐗╂枡鍩虹淇℃伅琛�");
+ });
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsPlaces.WmsPlace", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<int>("Aisle")
+ .HasColumnType("int")
+ .HasComment("宸烽亾");
+
+ b.Property<string>("AreaCode")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("鎵�鍦ㄥ簱鍖�");
+
+ b.Property<int>("ColumnNo")
+ .HasColumnType("int")
+ .HasComment("鍒�");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<int>("EmptyContainer")
+ .HasColumnType("int")
+ .HasComment("鏄惁绌烘墭");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .HasColumnType("tinyint(1)")
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<int>("Islock")
+ .HasColumnType("int")
+ .HasComment("鏄惁閿佸畾");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<int>("LayerNo")
+ .HasColumnType("int")
+ .HasComment("灞�");
+
+ b.Property<string>("PlaceNo")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("缂栧彿");
+
+ b.Property<int>("PlaceStatus")
+ .HasColumnType("int")
+ .HasComment("璐т綅鐘舵��");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("RowNo")
+ .HasColumnType("int")
+ .HasComment("鎺�");
+
+ b.Property<int>("Sort")
+ .HasColumnType("int")
+ .HasComment("鎺掑簭");
+
+ b.Property<int>("StorageTypeNo")
+ .HasColumnType("int")
+ .HasComment("璐т綅绫诲瀷");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AreaCode");
+
+ b.HasIndex("PlaceNo")
+ .IsUnique();
+
+ b.HasIndex("PlaceStatus");
+
+ b.HasIndex("StorageTypeNo");
+
+ b.ToTable("scms_wmsplaces", (string)null);
+
+ b.HasComment("搴撲綅琛�");
+ });
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsStores.WmsStore", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .HasColumnType("tinyint(1)")
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("Sort")
+ .HasColumnType("int")
+ .HasComment("鎺掑簭");
+
+ b.Property<string>("StoreCode")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("浠撳簱浠g爜");
+
+ b.Property<string>("StoreName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("浠撳簱鍚嶇О");
+
+ b.HasKey("Id");
+
+ b.HasIndex("StoreName");
+
+ b.ToTable("scms_wmsstores", (string)null);
+
+ b.HasComment("浠撳簱淇℃伅琛�");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.cs
new file mode 100644
index 0000000..60b9400
--- /dev/null
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.cs
@@ -0,0 +1,333 @@
+锘縰sing System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CMS.Plugin.HIAWms.MySQL.Migrations
+{
+ public partial class InitialCreate : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterDatabase()
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "scms_wmsareas",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ AreaNo = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "搴撳尯缂栧彿")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ AreaName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "搴撳尯鍚嶇О")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ AreaDesc = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "鎻忚堪")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ AreaStatus = table.Column<int>(type: "int", nullable: false, comment: "搴撳尯鐘舵��"),
+ AreaType = table.Column<int>(type: "int", nullable: false, comment: "搴撳尯绫诲瀷"),
+ RedundantField1 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField2 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField3 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ StoreCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "浠撳簱浠g爜")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ StoreName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "浠撳簱鍚嶇О")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+ Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "澶囨敞")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "鏄惁绂佺敤"),
+ ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
+ CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
+ LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
+ DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_scms_wmsareas", x => x.Id);
+ },
+ comment: "搴撳尯琛�")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "scms_wmscontainers",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ ContainerNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "鎵樼洏缂栧彿")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ ContainerType = table.Column<int>(type: "int", nullable: false, comment: "鎵樼洏绫诲瀷"),
+ ContainerStatus = table.Column<int>(type: "int", nullable: false, comment: "鎵樼洏鐘舵��"),
+ SpecLength = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "闀垮害"),
+ SpecWidth = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "瀹藉害"),
+ SpecHeight = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "楂樺害"),
+ LimitLength = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "闄愰暱"),
+ LimitWidth = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "闄愬"),
+ LimitHeight = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "闄愰珮"),
+ MaxWeight = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "杞介噸涓婇檺"),
+ ExceptionNumber = table.Column<int>(type: "int", nullable: true, comment: "寮傚父鏁伴噺"),
+ MaterialNumber = table.Column<int>(type: "int", nullable: true, comment: "鐗╂枡鏁伴噺"),
+ RedundantField1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField2 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField3 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+ Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "澶囨敞")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "鏄惁绂佺敤"),
+ ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
+ CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
+ LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
+ DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_scms_wmscontainers", x => x.Id);
+ },
+ comment: "鎵樼洏淇℃伅琛�")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "scms_wmsmaterials",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ MaterialCode = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "鐗╂枡缂栫爜锛堝敮涓�鏍囪瘑锛�")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ MaterialName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false, comment: "鐗╂枡鍚嶇О")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ PurchaseType = table.Column<int>(type: "int", nullable: false, comment: "閲囪喘绫诲瀷锛堟灇涓惧�硷級"),
+ MaterialType = table.Column<int>(type: "int", nullable: false, comment: "鐗╂枡绫诲瀷锛堟灇涓惧�硷級"),
+ PrimaryUnit = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "涓诲崟浣嶏紙濡傦細kg銆乵銆佷釜锛�")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Standard = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true, comment: "瑙勬牸/鏍囧噯锛堝锛欸B/T 8163-2018锛�")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ OuterDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "澶栧緞锛堝崟浣嶏細mm锛�"),
+ WallThickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "澹佸帤锛堝崟浣嶏細mm锛�"),
+ MaterialQuality = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "鏉愯川锛堝锛�304涓嶉攬閽級")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "闀垮害锛堝崟浣嶏細m锛�"),
+ IsMainBranch = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "鏄惁涓轰富鏀"),
+ Factory = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "鐢熶骇宸ュ巶")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Certification = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true, comment: "璇佷功缂栧彿")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "鎺掑簭"),
+ Remark = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "澶囨敞")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "鏄惁绂佺敤"),
+ ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
+ CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
+ LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
+ DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_scms_wmsmaterials", x => x.Id);
+ },
+ comment: "鐗╂枡鍩虹淇℃伅琛�")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "scms_wmsplaces",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ PlaceNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "缂栧彿")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ StorageTypeNo = table.Column<int>(type: "int", nullable: false, comment: "璐т綅绫诲瀷"),
+ PlaceStatus = table.Column<int>(type: "int", nullable: false, comment: "璐т綅鐘舵��"),
+ AreaCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "鎵�鍦ㄥ簱鍖�")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Aisle = table.Column<int>(type: "int", nullable: false, comment: "宸烽亾"),
+ RowNo = table.Column<int>(type: "int", nullable: false, comment: "鎺�"),
+ ColumnNo = table.Column<int>(type: "int", nullable: false, comment: "鍒�"),
+ LayerNo = table.Column<int>(type: "int", nullable: false, comment: "灞�"),
+ Islock = table.Column<int>(type: "int", nullable: false, comment: "鏄惁閿佸畾"),
+ EmptyContainer = table.Column<int>(type: "int", nullable: false, comment: "鏄惁绌烘墭"),
+ RedundantField1 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField2 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField3 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+ Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "澶囨敞")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "鏄惁绂佺敤"),
+ ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
+ CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
+ LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
+ DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_scms_wmsplaces", x => x.Id);
+ },
+ comment: "搴撲綅琛�")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "scms_wmsstores",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ StoreCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "浠撳簱浠g爜")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ StoreName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "浠撳簱鍚嶇О")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField1 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField2 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ RedundantField3 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "澶囨敞")
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+ IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "鏄惁绂佺敤"),
+ ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
+ CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
+ LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
+ DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
+ DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_scms_wmsstores", x => x.Id);
+ },
+ comment: "浠撳簱淇℃伅琛�")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsareas_AreaName",
+ table: "scms_wmsareas",
+ column: "AreaName");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmscontainers_ContainerNo",
+ table: "scms_wmscontainers",
+ column: "ContainerNo",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmscontainers_ContainerStatus",
+ table: "scms_wmscontainers",
+ column: "ContainerStatus");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmscontainers_ContainerType",
+ table: "scms_wmscontainers",
+ column: "ContainerType");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsmaterials_MaterialCode",
+ table: "scms_wmsmaterials",
+ column: "MaterialCode",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsmaterials_MaterialName",
+ table: "scms_wmsmaterials",
+ column: "MaterialName");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsmaterials_MaterialType",
+ table: "scms_wmsmaterials",
+ column: "MaterialType");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsmaterials_PurchaseType",
+ table: "scms_wmsmaterials",
+ column: "PurchaseType");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsplaces_AreaCode",
+ table: "scms_wmsplaces",
+ column: "AreaCode");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsplaces_PlaceNo",
+ table: "scms_wmsplaces",
+ column: "PlaceNo",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsplaces_PlaceStatus",
+ table: "scms_wmsplaces",
+ column: "PlaceStatus");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsplaces_StorageTypeNo",
+ table: "scms_wmsplaces",
+ column: "StorageTypeNo");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_scms_wmsstores_StoreName",
+ table: "scms_wmsstores",
+ column: "StoreName");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "scms_wmsareas");
+
+ migrationBuilder.DropTable(
+ name: "scms_wmscontainers");
+
+ migrationBuilder.DropTable(
+ name: "scms_wmsmaterials");
+
+ migrationBuilder.DropTable(
+ name: "scms_wmsplaces");
+
+ migrationBuilder.DropTable(
+ name: "scms_wmsstores");
+ }
+ }
+}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/CMSPluginDbContextModelSnapshot.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/CMSPluginDbContextModelSnapshot.cs
new file mode 100644
index 0000000..a11c8d5
--- /dev/null
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/CMSPluginDbContextModelSnapshot.cs
@@ -0,0 +1,673 @@
+锘�// <auto-generated />
+using System;
+using CMS.Plugin.HIAWms.MySQL;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace CMS.Plugin.HIAWms.MySQL.Migrations
+{
+ [DbContext(typeof(CMSPluginDbContext))]
+ partial class CMSPluginDbContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
+ .HasAnnotation("ProductVersion", "6.0.16")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsAreas.WmsArea", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<string>("AreaDesc")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("鎻忚堪");
+
+ b.Property<string>("AreaName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("搴撳尯鍚嶇О");
+
+ b.Property<string>("AreaNo")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("搴撳尯缂栧彿");
+
+ b.Property<int>("AreaStatus")
+ .HasColumnType("int")
+ .HasComment("搴撳尯鐘舵��");
+
+ b.Property<int>("AreaType")
+ .HasColumnType("int")
+ .HasComment("搴撳尯绫诲瀷");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .HasColumnType("tinyint(1)")
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("Sort")
+ .HasColumnType("int")
+ .HasComment("鎺掑簭");
+
+ b.Property<string>("StoreCode")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("浠撳簱浠g爜");
+
+ b.Property<string>("StoreName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("浠撳簱鍚嶇О");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AreaName");
+
+ b.ToTable("scms_wmsareas", (string)null);
+
+ b.HasComment("搴撳尯琛�");
+ });
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsContainers.WmsContainer", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<string>("ContainerNo")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("鎵樼洏缂栧彿");
+
+ b.Property<int>("ContainerStatus")
+ .HasColumnType("int")
+ .HasComment("鎵樼洏鐘舵��");
+
+ b.Property<int>("ContainerType")
+ .HasColumnType("int")
+ .HasComment("鎵樼洏绫诲瀷");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<int?>("ExceptionNumber")
+ .HasColumnType("int")
+ .HasComment("寮傚父鏁伴噺");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .HasColumnType("tinyint(1)")
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<decimal?>("LimitHeight")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闄愰珮");
+
+ b.Property<decimal?>("LimitLength")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闄愰暱");
+
+ b.Property<decimal?>("LimitWidth")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闄愬");
+
+ b.Property<int?>("MaterialNumber")
+ .HasColumnType("int")
+ .HasComment("鐗╂枡鏁伴噺");
+
+ b.Property<decimal?>("MaxWeight")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("杞介噸涓婇檺");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("Sort")
+ .HasColumnType("int")
+ .HasComment("鎺掑簭");
+
+ b.Property<decimal?>("SpecHeight")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("楂樺害");
+
+ b.Property<decimal?>("SpecLength")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闀垮害");
+
+ b.Property<decimal?>("SpecWidth")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)")
+ .HasComment("瀹藉害");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContainerNo")
+ .IsUnique();
+
+ b.HasIndex("ContainerStatus");
+
+ b.HasIndex("ContainerType");
+
+ b.ToTable("scms_wmscontainers", (string)null);
+
+ b.HasComment("鎵樼洏淇℃伅琛�");
+ });
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsMaterials.WmsMaterial", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<string>("Certification")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("璇佷功缂栧彿");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<string>("Factory")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("鐢熶骇宸ュ巶");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<bool>("IsMainBranch")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasComment("鏄惁涓轰富鏀");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<decimal>("Length")
+ .HasColumnType("decimal(18,2)")
+ .HasComment("闀垮害锛堝崟浣嶏細m锛�");
+
+ b.Property<string>("MaterialCode")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("鐗╂枡缂栫爜锛堝敮涓�鏍囪瘑锛�");
+
+ b.Property<string>("MaterialName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("鐗╂枡鍚嶇О");
+
+ b.Property<string>("MaterialQuality")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("鏉愯川锛堝锛�304涓嶉攬閽級");
+
+ b.Property<int>("MaterialType")
+ .HasColumnType("int")
+ .HasComment("鐗╂枡绫诲瀷锛堟灇涓惧�硷級");
+
+ b.Property<decimal>("OuterDiameter")
+ .HasColumnType("decimal(18,2)")
+ .HasComment("澶栧緞锛堝崟浣嶏細mm锛�");
+
+ b.Property<string>("PrimaryUnit")
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("涓诲崟浣嶏紙濡傦細kg銆乵銆佷釜锛�");
+
+ b.Property<int>("PurchaseType")
+ .HasColumnType("int")
+ .HasComment("閲囪喘绫诲瀷锛堟灇涓惧�硷級");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(500)
+ .HasColumnType("varchar(500)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("Sort")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0)
+ .HasComment("鎺掑簭");
+
+ b.Property<string>("Standard")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("瑙勬牸/鏍囧噯锛堝锛欸B/T 8163-2018锛�");
+
+ b.Property<decimal>("WallThickness")
+ .HasColumnType("decimal(18,2)")
+ .HasComment("澹佸帤锛堝崟浣嶏細mm锛�");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MaterialCode")
+ .IsUnique();
+
+ b.HasIndex("MaterialName");
+
+ b.HasIndex("MaterialType");
+
+ b.HasIndex("PurchaseType");
+
+ b.ToTable("scms_wmsmaterials", (string)null);
+
+ b.HasComment("鐗╂枡鍩虹淇℃伅琛�");
+ });
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsPlaces.WmsPlace", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<int>("Aisle")
+ .HasColumnType("int")
+ .HasComment("宸烽亾");
+
+ b.Property<string>("AreaCode")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("鎵�鍦ㄥ簱鍖�");
+
+ b.Property<int>("ColumnNo")
+ .HasColumnType("int")
+ .HasComment("鍒�");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<int>("EmptyContainer")
+ .HasColumnType("int")
+ .HasComment("鏄惁绌烘墭");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .HasColumnType("tinyint(1)")
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<int>("Islock")
+ .HasColumnType("int")
+ .HasComment("鏄惁閿佸畾");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<int>("LayerNo")
+ .HasColumnType("int")
+ .HasComment("灞�");
+
+ b.Property<string>("PlaceNo")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("缂栧彿");
+
+ b.Property<int>("PlaceStatus")
+ .HasColumnType("int")
+ .HasComment("璐т綅鐘舵��");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("RowNo")
+ .HasColumnType("int")
+ .HasComment("鎺�");
+
+ b.Property<int>("Sort")
+ .HasColumnType("int")
+ .HasComment("鎺掑簭");
+
+ b.Property<int>("StorageTypeNo")
+ .HasColumnType("int")
+ .HasComment("璐т綅绫诲瀷");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AreaCode");
+
+ b.HasIndex("PlaceNo")
+ .IsUnique();
+
+ b.HasIndex("PlaceStatus");
+
+ b.HasIndex("StorageTypeNo");
+
+ b.ToTable("scms_wmsplaces", (string)null);
+
+ b.HasComment("搴撲綅琛�");
+ });
+
+ modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsStores.WmsStore", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property<DateTime>("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property<Guid?>("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property<Guid?>("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property<DateTime?>("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property<string>("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property<bool>("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property<bool?>("IsDisabled")
+ .HasColumnType("tinyint(1)")
+ .HasComment("鏄惁绂佺敤");
+
+ b.Property<DateTime?>("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property<Guid?>("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property<string>("RedundantField1")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField2")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("RedundantField3")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+
+ b.Property<string>("Remark")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("澶囨敞");
+
+ b.Property<int>("Sort")
+ .HasColumnType("int")
+ .HasComment("鎺掑簭");
+
+ b.Property<string>("StoreCode")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("浠撳簱浠g爜");
+
+ b.Property<string>("StoreName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("浠撳簱鍚嶇О");
+
+ b.HasKey("Id");
+
+ b.HasIndex("StoreName");
+
+ b.ToTable("scms_wmsstores", (string)null);
+
+ b.HasComment("浠撳簱淇℃伅琛�");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.PostgreSql/CMSPluginDbContext.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.PostgreSql/CMSPluginDbContext.cs
index 96f3122..5ba375d 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.PostgreSql/CMSPluginDbContext.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.PostgreSql/CMSPluginDbContext.cs
@@ -36,7 +36,7 @@
builder.ConfigureWmsStore();
builder.ConfigureWmsArea();
builder.ConfigureWmsPlace();
- builder.ConfigureWmsContainer();
+ builder.ConfigureWmsMaterial();
/* Configure your own tables/entities inside here */
//builder.Entity<YourEntity>(b =>
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.SqlServer/CMSPluginDbContext.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.SqlServer/CMSPluginDbContext.cs
index 4a1c315..5c9a9e7 100644
--- a/HIAWms/server/src/CMS.Plugin.HIAWms.SqlServer/CMSPluginDbContext.cs
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.SqlServer/CMSPluginDbContext.cs
@@ -36,7 +36,7 @@
builder.ConfigureWmsStore();
builder.ConfigureWmsArea();
builder.ConfigureWmsPlace();
- builder.ConfigureWmsContainer();
+ builder.ConfigureWmsMaterial();
/* Configure your own tables/entities inside here */
diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms/Controller/SampleController.cs b/HIAWms/server/src/CMS.Plugin.HIAWms/Controller/SampleController.cs
deleted file mode 100644
index c442f6b..0000000
--- a/HIAWms/server/src/CMS.Plugin.HIAWms/Controller/SampleController.cs
+++ /dev/null
@@ -1,187 +0,0 @@
-using Ao.Lang;
-using CMS.Extensions.Abp.AspNetCore.Mvc.Filters;
-using CMS.Plugin.HIAWms.Application.Contracts.Dtos.Samples;
-using CMS.Plugin.HIAWms.Application.Contracts.Services;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using MiniExcelLibs;
-using System.Reflection;
-using Volo.Abp;
-using Volo.Abp.Application.Dtos;
-
-namespace CMS.Plugin.HIAWms.Controller
-{
- /// <summary>
- /// Sample鏈嶅姟
- /// </summary>
- [ApiController]
- [TypeFilter(typeof(CMSLanguageFilter))]
- [TypeFilter(typeof(CMSUowActionFilter))]
- [TypeFilter(typeof(CMSAuditActionFilter))]
- [TypeFilter(typeof(CMSExceptionFilter))]
- [Route("api/v{version:apiVersion}/HIAWms/[controller]")]
- public class SampleController : ControllerBase
- {
- private readonly ISampleAppService _sampleAppService;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="SampleController"/> class.
- /// </summary>
- /// <param name="sampleAppService">The sample application service.</param>
- public SampleController(ISampleAppService sampleAppService)
- {
- _sampleAppService = sampleAppService;
- }
-
- /// <summary>
- /// 鑾峰彇sample.
- /// </summary>
- /// <param name="id">鏍囪瘑绗�.</param>
- /// <returns></returns>
- [HttpGet]
- [Route("{id}")]
- public virtual Task<SampleDto> GetAsync(Guid id)
- {
- return _sampleAppService.GetAsync(id);
- }
-
- /// <summary>
- /// 鑾峰彇sample鐨勫垪琛�.
- /// </summary>
- /// <param name="input">杈撳叆.</param>
- /// <returns></returns>
- [HttpGet]
- public virtual Task<PagedResultDto<SampleDto>> GetListAsync([FromQuery] GetSamplesInput input)
- {
- return _sampleAppService.GetListAsync(input);
- }
-
- /// <summary>
- /// 鍒涘缓sample.
- /// </summary>
- /// <param name="input">杈撳叆.</param>
- /// <returns></returns>
- //[Authorize]
- [HttpPost]
- public virtual Task<SampleDto> CreateAsync(SampleCreateDto input)
- {
- return _sampleAppService.CreateAsync(input);
- }
-
- /// <summary>
- /// 鏇存柊sample.
- /// </summary>
- /// <param name="id">鏍囪瘑绗�.</param>
- /// <param name="input">杈撳叆.</param>
- /// <returns></returns>
- //[Authorize]
- [HttpPut]
- [Route("{id}")]
- public virtual Task<SampleDto> UpdateAsync(Guid id, SampleUpdateDto input)
- {
- return _sampleAppService.UpdateAsync(id, input);
- }
-
- /// <summary>
- /// 鍏嬮殕Sample.
- /// </summary>
- /// <param name="ids">Id闆嗗悎.</param>
- /// <returns></returns>
- //[Authorize]
- [HttpPost]
- [Route("Clone")]
- public virtual Task<List<SampleDto>> CloneAsync([FromBody] IEnumerable<Guid> ids)
- {
- return _sampleAppService.CloneAsync(ids);
- }
-
- /// <summary>
- /// 鍒犻櫎sample.
- /// </summary>
- /// <param name="id">鏍囪瘑绗�.</param>
- /// <returns></returns>
- //[Authorize]
- [HttpDelete]
- [Route("{id}")]
- public virtual Task DeleteAsync(Guid id)
- {
- return _sampleAppService.DeleteAsync(id);
- }
-
- /// <summary>
- /// 鎵归噺鍒犻櫎sample.
- /// </summary>
- /// <param name="ids">The ids.</param>
- /// <returns></returns>
- //[Authorize]
- [HttpDelete]
- public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids)
- {
- return _sampleAppService.DeleteManyAsync(ids);
- }
-
- /// <summary>
- /// 璋冩暣鎺掑簭.
- /// </summary>
- /// <param name="id">鏍囪瘑绗�.</param>
- /// <returns></returns>
- [HttpPut]
- [Route("{id}/AdjustSort/{sort}")]
- public virtual Task AdjustSortAsync(Guid id, int sort)
- {
- return _sampleAppService.AdjustSortAsync(id, sort);
- }
-
- /// <summary>
- /// 瀵煎叆sample.
- /// </summary>
- /// <returns></returns>
- [Authorize]
- [HttpPost]
- [Route("Import")]
- public virtual async Task<IActionResult> ImportAsync(IFormFile file)
- {
- using var stream = new MemoryStream();
- await file.CopyToAsync(stream);
- stream.Seek(0L, SeekOrigin.Begin);
-
- var sheetNames = stream.GetSheetNames();
- var sampleRows = sheetNames.Contains("閰嶇疆") ? MiniExcel.Query<SamplesImportModel.SampleImportModel>(stream, sheetName: "閰嶇疆").ToList() : new();
-
- if (!sampleRows.Any())
- {
- throw new UserFriendlyException("璇锋鏌ュ鍏ョ殑琛ㄦ牸");
- }
-
- await _sampleAppService.ImportAsync(new SamplesImportModel
- {
- Samples = sampleRows,
- });
-
- return Ok();
- }
-
- /// <summary>
- /// 瀵煎嚭sample.
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- [Route("Export")]
- public virtual async Task<IActionResult> ExportAsync([FromQuery] GetSamplesInput input)
- {
- input.MaxResultCount = int.MaxValue;
- var exportData = await _sampleAppService.ExportAsync(input);
- var templatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Resources/Templates/Sample瀵煎嚭妯℃澘.xlsx");
- if (!System.IO.File.Exists(templatePath))
- {
- templatePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty, $"Resources/Templates/Sample瀵煎嚭妯℃澘.xlsx");
- }
-
- var memoryStream = new MemoryStream();
- await memoryStream.SaveAsByTemplateAsync(templatePath, exportData.Sheets);
- memoryStream.Seek(0L, SeekOrigin.Begin);
- return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = $"{exportData.FileName}_{DateTime.Now:yyyyMMddhhmmss}.xlsx" };
- }
- }
-}
--
Gitblit v1.9.3