Browse Source

添加 发料记录的 库位赋值

dev_DY_CC
郑勃旭 11 months ago
parent
commit
5b2116c1a2
  1. 3
      InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/CreateUpdateDataExchangeInterfaceConfigDto.cs
  2. 3
      InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/DataExchangeInterfaceConfigDto.cs
  3. 7
      InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application/Z_Business/DataExchangeInterfaceConfigAppService.cs
  4. 13
      InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain.Shared/Enums/EnumStatus.cs
  5. 3
      InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain/Z_Business/DataExchangeInterfaceConfig/DataExchangeInterfaceConfig.cs
  6. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs
  7. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs
  8. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs
  9. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs
  10. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/SparePartIssueNotes/SparePartIssueNoteAppService.cs

3
InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/CreateUpdateDataExchangeInterfaceConfigDto.cs

@ -1,5 +1,6 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using Dy_Exchange.Enums;
using WinIn.FasterZ.Inventory.AppBase.FasterBaseDto; using WinIn.FasterZ.Inventory.AppBase.FasterBaseDto;
namespace Dy_Exchange.Z_Business.Dtos; namespace Dy_Exchange.Z_Business.Dtos;
@ -36,4 +37,6 @@ public class CreateUpdateDataExchangeInterfaceConfigDto: FasterCreateUpdateBaseD
/// </summary> /// </summary>
[DisplayName("DataExchangeInterfaceConfigRemark")] [DisplayName("DataExchangeInterfaceConfigRemark")]
public string? Remark { get; set; } public string? Remark { get; set; }
public EnumStatus Status { get; set; }
} }

3
InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/DataExchangeInterfaceConfigDto.cs

@ -1,4 +1,5 @@
using System; using System;
using Dy_Exchange.Enums;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
namespace Dy_Exchange.Z_Business.Dtos; namespace Dy_Exchange.Z_Business.Dtos;
@ -26,5 +27,5 @@ public class DataExchangeInterfaceConfigDto : AuditedEntityDto<Guid>
public string? Remark { get; set; } public string? Remark { get; set; }
public int? Status { get; set; } public EnumStatus Status { get; set; }
} }

7
InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application/Z_Business/DataExchangeInterfaceConfigAppService.cs

@ -1,4 +1,5 @@
using System; using System;
using System.Threading.Tasks;
using Dy_Exchange.Permissions; using Dy_Exchange.Permissions;
using Dy_Exchange.Z_Business.Dtos; using Dy_Exchange.Z_Business.Dtos;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
@ -27,4 +28,10 @@ public class DataExchangeInterfaceConfigAppService : ZbxBase<DataExchangeInterfa
_repository = repository; _repository = repository;
} }
public override Task<DataExchangeInterfaceConfigDto> UpdateAsync(Guid id, CreateUpdateDataExchangeInterfaceConfigDto input)
{
return base.UpdateAsync(id, input);
}
} }

13
InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain.Shared/Enums/EnumStatus.cs

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Dy_Exchange.Enums
{
public enum EnumStatus
{
[Display(Name = "运行中")] Running = 0,
[Display(Name = "已关闭")] Closed = 1,
}
}

3
InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain/Z_Business/DataExchangeInterfaceConfig/DataExchangeInterfaceConfig.cs

@ -1,4 +1,5 @@
using System; using System;
using Dy_Exchange.Enums;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
namespace Dy_Exchange.Z_Business; namespace Dy_Exchange.Z_Business;
@ -18,5 +19,5 @@ public class DataExchangeInterfaceConfig
public string? Remark { get; set; } public string? Remark { get; set; }
public int? Status { get; set; } public EnumStatus Status { get; set; }
} }

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -25,13 +26,14 @@ public class AssembleIssueNoteAppService :
IAssembleIssueNoteAppService IAssembleIssueNoteAppService
{ {
private readonly IAssembleIssueNoteManager _assembleIssueNoteManager; private readonly IAssembleIssueNoteManager _assembleIssueNoteManager;
private readonly ILocationAppService _locationAppService;
public AssembleIssueNoteAppService( public AssembleIssueNoteAppService(
IAssembleIssueNoteRepository repository, IAssembleIssueNoteRepository repository,
IAssembleIssueNoteManager assembleIssueNoteManager IAssembleIssueNoteManager assembleIssueNoteManager, ILocationAppService locationAppService) : base(repository)
) : base(repository)
{ {
_assembleIssueNoteManager = assembleIssueNoteManager; _assembleIssueNoteManager = assembleIssueNoteManager;
_locationAppService = locationAppService;
} }
[HttpPost("")] [HttpPost("")]
@ -39,6 +41,24 @@ public class AssembleIssueNoteAppService :
public override async Task<AssembleIssueNoteDTO> CreateAsync(AssembleIssueNoteEditInput input) public override async Task<AssembleIssueNoteDTO> CreateAsync(AssembleIssueNoteEditInput input)
{ {
var entity = ObjectMapper.Map<AssembleIssueNoteEditInput, AssembleIssueNote>(input); var entity = ObjectMapper.Map<AssembleIssueNoteEditInput, AssembleIssueNote>(input);
foreach (var detail in entity.Details)
{
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false);
detail.HandledFromLocationArea = fromLocationDto.AreaCode;
detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode;
detail.HandledFromLocationErpCode= fromLocationDto.ErpLocationCode;
detail.HandledFromWarehouseCode= fromLocationDto.WarehouseCode;
detail.HandledToLocationArea = toLocationDto.AreaCode;
detail.HandledToLocationGroup = toLocationDto.LocationGroupCode;
detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode;
detail.HandledToWarehouseCode = toLocationDto.WarehouseCode;
}
await _assembleIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); await _assembleIssueNoteManager.CreateAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<AssembleIssueNote, AssembleIssueNoteDTO>(entity); var dto = ObjectMapper.Map<AssembleIssueNote, AssembleIssueNoteDTO>(entity);
return dto; return dto;

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -25,13 +26,14 @@ public class CoatingIssueNoteAppService :
ICoatingIssueNoteAppService ICoatingIssueNoteAppService
{ {
private readonly ICoatingIssueNoteManager _coatingIssueNoteManager; private readonly ICoatingIssueNoteManager _coatingIssueNoteManager;
private readonly ILocationAppService _locationAppService;
public CoatingIssueNoteAppService( public CoatingIssueNoteAppService(
ICoatingIssueNoteRepository repository, ICoatingIssueNoteRepository repository,
ICoatingIssueNoteManager coatingIssueNoteManager ICoatingIssueNoteManager coatingIssueNoteManager, ILocationAppService locationAppService) : base(repository)
) : base(repository)
{ {
_coatingIssueNoteManager = coatingIssueNoteManager; _coatingIssueNoteManager = coatingIssueNoteManager;
_locationAppService = locationAppService;
} }
[HttpPost("")] [HttpPost("")]
@ -39,6 +41,24 @@ public class CoatingIssueNoteAppService :
public override async Task<CoatingIssueNoteDTO> CreateAsync(CoatingIssueNoteEditInput input) public override async Task<CoatingIssueNoteDTO> CreateAsync(CoatingIssueNoteEditInput input)
{ {
var entity = ObjectMapper.Map<CoatingIssueNoteEditInput, CoatingIssueNote>(input); var entity = ObjectMapper.Map<CoatingIssueNoteEditInput, CoatingIssueNote>(input);
foreach (var detail in entity.Details)
{
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false);
detail.HandledFromLocationArea = fromLocationDto.AreaCode;
detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode;
detail.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode;
detail.HandledFromWarehouseCode = fromLocationDto.WarehouseCode;
detail.HandledToLocationArea = toLocationDto.AreaCode;
detail.HandledToLocationGroup = toLocationDto.LocationGroupCode;
detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode;
detail.HandledToWarehouseCode = toLocationDto.WarehouseCode;
}
await _coatingIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); await _coatingIssueNoteManager.CreateAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<CoatingIssueNote, CoatingIssueNoteDTO>(entity); var dto = ObjectMapper.Map<CoatingIssueNote, CoatingIssueNoteDTO>(entity);
return dto; return dto;

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -25,13 +26,14 @@ public class InjectionIssueNoteAppService :
IInjectionIssueNoteAppService IInjectionIssueNoteAppService
{ {
private readonly IInjectionIssueNoteManager _injectionIssueNoteManager; private readonly IInjectionIssueNoteManager _injectionIssueNoteManager;
private readonly ILocationAppService _locationAppService;
public InjectionIssueNoteAppService( public InjectionIssueNoteAppService(
IInjectionIssueNoteRepository repository, IInjectionIssueNoteRepository repository,
IInjectionIssueNoteManager injectionIssueNoteManager IInjectionIssueNoteManager injectionIssueNoteManager, ILocationAppService locationAppService) : base(repository)
) : base(repository)
{ {
_injectionIssueNoteManager = injectionIssueNoteManager; _injectionIssueNoteManager = injectionIssueNoteManager;
_locationAppService = locationAppService;
} }
[HttpPost("")] [HttpPost("")]
@ -39,6 +41,24 @@ public class InjectionIssueNoteAppService :
public override async Task<InjectionIssueNoteDTO> CreateAsync(InjectionIssueNoteEditInput input) public override async Task<InjectionIssueNoteDTO> CreateAsync(InjectionIssueNoteEditInput input)
{ {
var entity = ObjectMapper.Map<InjectionIssueNoteEditInput, InjectionIssueNote>(input); var entity = ObjectMapper.Map<InjectionIssueNoteEditInput, InjectionIssueNote>(input);
foreach (var detail in entity.Details)
{
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false);
detail.HandledFromLocationArea = fromLocationDto.AreaCode;
detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode;
detail.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode;
detail.HandledFromWarehouseCode = fromLocationDto.WarehouseCode;
detail.HandledToLocationArea = toLocationDto.AreaCode;
detail.HandledToLocationGroup = toLocationDto.LocationGroupCode;
detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode;
detail.HandledToWarehouseCode = toLocationDto.WarehouseCode;
}
await _injectionIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); await _injectionIssueNoteManager.CreateAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<InjectionIssueNote, InjectionIssueNoteDTO>(entity); var dto = ObjectMapper.Map<InjectionIssueNote, InjectionIssueNoteDTO>(entity);
return dto; return dto;

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -25,13 +26,14 @@ public class KittingIssueNoteAppService :
IKittingIssueNoteAppService IKittingIssueNoteAppService
{ {
private readonly IKittingIssueNoteManager _kittingIssueNoteManager; private readonly IKittingIssueNoteManager _kittingIssueNoteManager;
private readonly ILocationAppService _locationAppService;
public KittingIssueNoteAppService( public KittingIssueNoteAppService(
IKittingIssueNoteRepository repository, IKittingIssueNoteRepository repository,
IKittingIssueNoteManager kittingIssueNoteManager IKittingIssueNoteManager kittingIssueNoteManager, ILocationAppService locationAppService) : base(repository)
) : base(repository)
{ {
_kittingIssueNoteManager = kittingIssueNoteManager; _kittingIssueNoteManager = kittingIssueNoteManager;
_locationAppService = locationAppService;
} }
[HttpPost("")] [HttpPost("")]
@ -39,6 +41,24 @@ public class KittingIssueNoteAppService :
public override async Task<KittingIssueNoteDTO> CreateAsync(KittingIssueNoteEditInput input) public override async Task<KittingIssueNoteDTO> CreateAsync(KittingIssueNoteEditInput input)
{ {
var entity = ObjectMapper.Map<KittingIssueNoteEditInput, KittingIssueNote>(input); var entity = ObjectMapper.Map<KittingIssueNoteEditInput, KittingIssueNote>(input);
foreach (var detail in entity.Details)
{
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false);
detail.HandledFromLocationArea = fromLocationDto.AreaCode;
detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode;
detail.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode;
detail.HandledFromWarehouseCode = fromLocationDto.WarehouseCode;
detail.HandledToLocationArea = toLocationDto.AreaCode;
detail.HandledToLocationGroup = toLocationDto.LocationGroupCode;
detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode;
detail.HandledToWarehouseCode = toLocationDto.WarehouseCode;
}
await _kittingIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); await _kittingIssueNoteManager.CreateAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<KittingIssueNote, KittingIssueNoteDTO>(entity); var dto = ObjectMapper.Map<KittingIssueNote, KittingIssueNoteDTO>(entity);
return dto; return dto;

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/SparePartIssueNotes/SparePartIssueNoteAppService.cs

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -25,13 +26,14 @@ public class SparePartIssueNoteAppService :
ISparePartIssueNoteAppService ISparePartIssueNoteAppService
{ {
private readonly ISparePartIssueNoteManager _sparePartIssueNoteManager; private readonly ISparePartIssueNoteManager _sparePartIssueNoteManager;
private readonly ILocationAppService _locationAppService;
public SparePartIssueNoteAppService( public SparePartIssueNoteAppService(
ISparePartIssueNoteRepository repository, ISparePartIssueNoteRepository repository,
ISparePartIssueNoteManager sparePartIssueNoteManager ISparePartIssueNoteManager sparePartIssueNoteManager, ILocationAppService locationAppService) : base(repository)
) : base(repository)
{ {
_sparePartIssueNoteManager = sparePartIssueNoteManager; _sparePartIssueNoteManager = sparePartIssueNoteManager;
_locationAppService = locationAppService;
} }
[HttpPost("")] [HttpPost("")]
@ -39,6 +41,24 @@ public class SparePartIssueNoteAppService :
public override async Task<SparePartIssueNoteDTO> CreateAsync(SparePartIssueNoteEditInput input) public override async Task<SparePartIssueNoteDTO> CreateAsync(SparePartIssueNoteEditInput input)
{ {
var entity = ObjectMapper.Map<SparePartIssueNoteEditInput, SparePartIssueNote>(input); var entity = ObjectMapper.Map<SparePartIssueNoteEditInput, SparePartIssueNote>(input);
foreach (var detail in entity.Details)
{
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false);
detail.HandledFromLocationArea = fromLocationDto.AreaCode;
detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode;
detail.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode;
detail.HandledFromWarehouseCode = fromLocationDto.WarehouseCode;
detail.HandledToLocationArea = toLocationDto.AreaCode;
detail.HandledToLocationGroup = toLocationDto.LocationGroupCode;
detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode;
detail.HandledToWarehouseCode = toLocationDto.WarehouseCode;
}
await _sparePartIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); await _sparePartIssueNoteManager.CreateAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<SparePartIssueNote, SparePartIssueNoteDTO>(entity); var dto = ObjectMapper.Map<SparePartIssueNote, SparePartIssueNoteDTO>(entity);
return dto; return dto;

Loading…
Cancel
Save