Browse Source

Merge branch 'Agv分支2024-11-19' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into Agv分支2024-11-19

Agv分支2024-11-19
郑勃旭 4 months ago
parent
commit
2f8828b459
  1. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs
  2. 18
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs
  3. 55
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs
  4. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
  5. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs
  6. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs

@ -36,6 +36,11 @@ public class DeliverRequestDTO : SfsStoreRequestDTOBase<DeliverRequestDetailDTO>
/// Mes车牌号
/// </summary>
public string MesTruckNumber { get; set; }
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
/// <summary>
/// 发货类型
/// </summary>

18
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs

@ -9,6 +9,7 @@ using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@ -32,7 +33,7 @@ public class CustomerProductionReturnNoteAppService :
private readonly ICustomerItemAppService _customerItemAppService;
private readonly ICustomerAppService _customerAppService;
private readonly ICustomerItemRepository _customerItemRepository;
private readonly ISalePriceSheetAppService _salePriceSheetAppService;
public CustomerProductionReturnNoteAppService(
@ -40,10 +41,12 @@ public class CustomerProductionReturnNoteAppService :
, ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager
, ICustomerItemAppService customerItemAppService,
ISalePriceSheetAppService salePriceSheetAppService,
ICustomerAppService customerAppService
ICustomerAppService customerAppService,
ICustomerItemRepository customerItemRepository
) : base(repository)
{
_customerItemRepository = customerItemRepository;
_customerItemAppService = customerItemAppService;
@ -89,6 +92,7 @@ public class CustomerProductionReturnNoteAppService :
if (customerlist.Count > 0)
{
entity.CustomerName = customerlist.FirstOrDefault().Name;
}
else
@ -114,6 +118,16 @@ public class CustomerProductionReturnNoteAppService :
#endregion
#region 20241230修改
foreach (var itm in input.Details)
{
var part= custitmDetail.FirstOrDefault(p => p.CustomerCode == entity.CustomerCode && p.ItemCode==itm.ItemCode);
if (part == null)
{
throw new UserFriendlyException($"零件编号{itm.ItemCode}客户编码{entity.CustomerCode}在零件关系表中不存在!");
}
}

55
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs

@ -78,7 +78,8 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
IPostionLocationAppService postionLocationAppService,
IItemBasicAppService itemBasicAppService,
UnitOfWorkManager unitOfWorkManager,
IExpectOutAppService expectOutAppService, IProductionLineAppService productionLineAppService) : base(repository)
IProductionLineAppService _productionLineAppService,
IExpectOutAppService expectOutAppService) : base(repository)
{
_unitOfWorkManager = unitOfWorkManager;
_transferNoteManager = transferNoteManager;
@ -91,7 +92,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
_issueJobAppService = issueJobAppService;
_inventoryLabelAppService = inventoryLabelAppService;
_expectOutAppService = expectOutAppService;
_productionLineAppService = productionLineAppService;
_logger = logger;
_agvOptions = agvOptions;
_postionLocationAppService = postionLocationAppService;
@ -172,7 +172,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
}
/// <summary>
/// 拆箱
/// 拆箱
/// </summary>
/// <param name="transferNoteEditInput"></param>
/// <returns></returns>
@ -187,7 +187,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
}
#region 校验
private void CheckLocation(LocationDTO locationDto, TransferNoteDetail detail)
{
if (locationDto == null)
@ -195,7 +194,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
throw new UserFriendlyException($"库位代码为【{detail.ToLocationCode}】不存在");
}
}
private void CheckFromLocation(LocationDTO locationDto, TransferNoteDetail detail)
{
if (locationDto == null)
@ -203,7 +201,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
throw new UserFriendlyException($"库位代码为【{detail.FromLocationCode}】不存在");
}
}
#endregion
/// <summary>
@ -713,33 +710,39 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
errors.Add($"来源起始点{detail.BeginPosition}库位没查到");
}
var tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false);
LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false);
if (tolocation == null)
{
errors.Add($"结束点{detail.EndPosition}库位没查到");
}
var productionline=await _productionLineAppService.GetByCodeAsync(tolocation.Code).ConfigureAwait(false);
if (productionline == null)
{
errors.Add($"结束点{detail.EndPosition}库位不在生产线中!");
}
//fromlocation.Type == EnumLocationType.WIP;
//tolocation.Type==EnumLocationType.SEMI||EnumLocationType.DimensionalStorehouse
//var productionLineDto=await _productionLineAppService.GetByLocationCodeAsync(tolocation.Code);
//productionLineDto.ProductionLineType==EnumProductionLineType.Assemble
switch (tolocation.WarehouseCode)
{
case "APA-KWZ": // 装配线边库位组
transfer.Type = EnumTransSubType.Transfer_Assemble.ToString();
break;
case "PPA-KWZ": //涂装线边库位组
transfer.Type = EnumTransSubType.Transfer_Coating.ToString();
break;
case "IPA-KWZ": //注塑线边库位组
transfer.Type = EnumTransSubType.Transfer_Injection.ToString();
break;
default:
throw new UserFriendlyException("结束库位、不是喷涂、注塑、涂装等线边类型!");
}
transfer.Type = productionline.ProductionLineType.ToString();
//switch (tolocation.WarehouseCode)
//{
// case "APA-KWZ":// 装配线边库位组
// transfer.Type = EnumTransSubType.Transfer_Assemble.ToString();
// break;
// case "PPA-KWZ"://涂装线边库位组
// transfer.Type = EnumTransSubType.Transfer_Coating.ToString();
// break;
// case "IPA-KWZ"://注塑线边库位组
// transfer.Type = EnumTransSubType.Transfer_Injection.ToString();
// break;
// default:
// throw new UserFriendlyException("结束库位、不是喷涂、注塑、涂装等线边类型!");
//}
var item = await _itemBasicAppService.GetByCodeAsync(detail.MatCode).ConfigureAwait(false);
if (item == null)

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs

@ -135,6 +135,9 @@ public class DeliverRequestAppService :
entitys.ForEach(r => { r.MesTruckNumber = truckNumber; });
Check.NotNull(entitys, typeof(DeliverRequest).Name);
List<string> errors=new List<string>();
foreach (var request in entitys)
{
foreach (var itm in request.Details)

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs

@ -29,6 +29,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap<DeliverRequestImportInput, DeliverRequest>()
// .ForMember(x => x.DeliverRequestType, y => y.MapFrom(t => EnumDeliverRequestType.Normal))
.Ignore(x => x.CustomerAddressCode)
.Ignore(x => x.DeliverPlanNumber)

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs

@ -43,6 +43,12 @@ public class DeliverRequest : SfsStoreRequestAggregateRootBase<DeliverRequestDet
/// </summary>
public string MesTruckNumber { get; set; }
/// <summary>
/// 器具编号
/// </summary>
public string MesDeliveryContainer { get; set; }
/// <summary>
/// 任务明细
/// </summary>

Loading…
Cancel
Save