Browse Source

收容器去掉类型字段

dev_DY_CC
周红军 1 year ago
parent
commit
a09084023b
  1. 19
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
  2. 7
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/DTOs/ItemContainerDTO.cs
  3. 8
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/Inputs/ItemContainerEditInput.cs
  4. 11
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/Inputs/ItemContainerImportInput.cs
  5. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs
  6. 6
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ItemContainers/ItemContainer.cs
  7. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ItemContainers/ItemContainerDbContextModelCreatingExtensions.cs
  8. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs

19
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs

@ -77,19 +77,9 @@ public class ThirdLocationJobController : AbpController
/// <param name="pageIndex"></param> /// <param name="pageIndex"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("list")] [HttpGet("list")]
public virtual async Task<PagedResultDto<ThirdLocationJobDTO>> GetListAsync(int pageSize, int pageIndex, bool isFinished) public virtual async Task<PagedResultDto<ThirdLocationJobDTO>> GetListAsync(int pageSize, int pageIndex)
{ {
var dtos = await _dictApp.GetByCodeAsync("ContainerSpecificationsType").ConfigureAwait(false); var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing };
var status = new List<int>();
if (isFinished == true)
{
status.Add((int)EnumJobStatus.Done);
}
else
{
status.Add((int)EnumJobStatus.Open);
}
var jsonStatus = JsonSerializer.Serialize(status); var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase var request = new SfsJobRequestInputBase
@ -100,10 +90,11 @@ public class ThirdLocationJobController : AbpController
Condition = new Condition Condition = new Condition
{ {
Filters = new List<Filter> Filters = new List<Filter>
{ {
new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In") new(nameof(IssueJobDTO.JobStatus),jsonStatus,"In")
} }
} }
}; };
var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);

7
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/DTOs/ItemContainerDTO.cs

@ -20,12 +20,7 @@ public class ItemContainerDTO : SfsBaseDataDTOBase
[Display(Name = "收容器名称")] [Display(Name = "收容器名称")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ContainerName { get; set; } public string ContainerName { get; set; }
/// <summary>
/// 收容器类型
/// </summary>
[Display(Name = "收容器类型")]
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ContainerType { get; set; }
/// <summary> /// <summary>
/// 物品代码 /// 物品代码
/// </summary> /// </summary>

8
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/Inputs/ItemContainerEditInput.cs

@ -12,13 +12,7 @@ public class ItemContainerEditInput : SfsBaseDataCreateOrUpdateInputBase
[Display(Name = "收容器名称")] [Display(Name = "收容器名称")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ContainerName { get; set; } public string ContainerName { get; set; }
/// <summary>
/// 收容器类型
/// </summary>
[Display(Name = "收容器类型")]
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ContainerType { get; set; }
/// <summary> /// <summary>
/// 收容器计量单位 /// 收容器计量单位

11
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/Inputs/ItemContainerImportInput.cs

@ -22,16 +22,7 @@ public class ItemContainerImportInput : SfsBaseDataImportInputBase
[Display(Name = "收容器名称")] [Display(Name = "收容器名称")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ContainerName { get; set; } public string ContainerName { get; set; }
/// <summary>
/// 收容器类型
/// </summary>
[Display(Name = "收容器类型")]
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
[ValueMapping("EA", "EA")]
[ValueMapping("Box", "Box")]
[ValueMapping("Pallet", "Pallet")]
public string ContainerType { get; set; }
/// <summary> /// <summary>
/// 物品编号 /// 物品编号

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs

@ -49,10 +49,10 @@ public class ItemContainerAppService
[UnitOfWork] [UnitOfWork]
public override async Task<ItemContainerDTO> CreateAsync(ItemContainerEditInput input) public override async Task<ItemContainerDTO> CreateAsync(ItemContainerEditInput input)
{ {
var existEntity = await _repository.FirstOrDefaultAsync(p=>p.ContainerCode==input.ContainerCode).ConfigureAwait(false); var existEntity = await _repository.FirstOrDefaultAsync(p=>p.ItemCode == input.ItemCode).ConfigureAwait(false);
if (existEntity != null) if (existEntity != null)
{ {
throw new UserFriendlyException($"{input.ContainerCode} 已存在"); throw new UserFriendlyException($"物品 {input.ItemCode} 已存在");
} }
var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false);

6
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ItemContainers/ItemContainer.cs

@ -17,11 +17,7 @@ public class ItemContainer : SfsBaseDataAggregateRootBase
/// 收容器名称 /// 收容器名称
/// </summary> /// </summary>
public string ContainerName { get; set; } public string ContainerName { get; set; }
/// <summary>
/// 收容器类型
/// </summary>
public string ContainerType { get; set; }
/// <summary> /// <summary>
/// 物品代码 /// 物品代码

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ItemContainers/ItemContainerDbContextModelCreatingExtensions.cs

@ -24,13 +24,13 @@ public static class ItemContainerDbContextModelCreatingExtensions
b.Property(q => q.ContainerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ContainerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ItemCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ItemCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ContainerName).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.ContainerName).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ContainerType).HasMaxLength(SfsPropertyConst.NameLength);
//Relations //Relations
//None //None
//Indexes //Indexes
b.HasIndex(q => new { q.ItemCode, q.ContainerCode }).IsUnique(); b.HasIndex(q => new { q.ItemCode }).IsUnique();
}); });
} }
} }

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs

@ -75,6 +75,11 @@ public class ThirdLocationJobEventHandler :
detail.ToLocationGroup = location.LocationGroupCode; detail.ToLocationGroup = location.LocationGroupCode;
detail.ToLocationErpCode = location.ErpLocationCode; detail.ToLocationErpCode = location.ErpLocationCode;
detail.ToWarehouseCode = location.WarehouseCode; detail.ToWarehouseCode = location.WarehouseCode;
var locationFrom = await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false);
detail.FromLocationErpCode = locationFrom.ErpLocationCode;
detail.FromWarehouseCode = locationFrom.WarehouseCode;
detail.FromStatus = EnumInventoryStatus.OK;
} }
return thirdLocationNoteCreateInput; return thirdLocationNoteCreateInput;

Loading…
Cancel
Save