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. 20
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs
  3. 57
      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车牌号 /// Mes车牌号
/// </summary> /// </summary>
public string MesTruckNumber { get; set; } public string MesTruckNumber { get; set; }
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
/// <summary> /// <summary>
/// 发货类型 /// 发货类型
/// </summary> /// </summary>

20
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 Volo.Abp.Application.Dtos;
using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
@ -32,7 +33,7 @@ public class CustomerProductionReturnNoteAppService :
private readonly ICustomerItemAppService _customerItemAppService; private readonly ICustomerItemAppService _customerItemAppService;
private readonly ICustomerAppService _customerAppService; private readonly ICustomerAppService _customerAppService;
private readonly ICustomerItemRepository _customerItemRepository;
private readonly ISalePriceSheetAppService _salePriceSheetAppService; private readonly ISalePriceSheetAppService _salePriceSheetAppService;
public CustomerProductionReturnNoteAppService( public CustomerProductionReturnNoteAppService(
@ -40,10 +41,12 @@ public class CustomerProductionReturnNoteAppService :
, ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager , ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager
, ICustomerItemAppService customerItemAppService, , ICustomerItemAppService customerItemAppService,
ISalePriceSheetAppService salePriceSheetAppService, ISalePriceSheetAppService salePriceSheetAppService,
ICustomerAppService customerAppService ICustomerAppService customerAppService,
ICustomerItemRepository customerItemRepository
) : base(repository) ) : base(repository)
{ {
_customerItemRepository = customerItemRepository;
_customerItemAppService = customerItemAppService; _customerItemAppService = customerItemAppService;
@ -89,6 +92,7 @@ public class CustomerProductionReturnNoteAppService :
if (customerlist.Count > 0) if (customerlist.Count > 0)
{ {
entity.CustomerName = customerlist.FirstOrDefault().Name; entity.CustomerName = customerlist.FirstOrDefault().Name;
} }
else else
@ -114,7 +118,17 @@ public class CustomerProductionReturnNoteAppService :
#endregion #endregion
#region 20241230修改 #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}在零件关系表中不存在!");
}
}

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

@ -78,7 +78,8 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
IPostionLocationAppService postionLocationAppService, IPostionLocationAppService postionLocationAppService,
IItemBasicAppService itemBasicAppService, IItemBasicAppService itemBasicAppService,
UnitOfWorkManager unitOfWorkManager, UnitOfWorkManager unitOfWorkManager,
IExpectOutAppService expectOutAppService, IProductionLineAppService productionLineAppService) : base(repository) IProductionLineAppService _productionLineAppService,
IExpectOutAppService expectOutAppService) : base(repository)
{ {
_unitOfWorkManager = unitOfWorkManager; _unitOfWorkManager = unitOfWorkManager;
_transferNoteManager = transferNoteManager; _transferNoteManager = transferNoteManager;
@ -91,7 +92,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
_issueJobAppService = issueJobAppService; _issueJobAppService = issueJobAppService;
_inventoryLabelAppService = inventoryLabelAppService; _inventoryLabelAppService = inventoryLabelAppService;
_expectOutAppService = expectOutAppService; _expectOutAppService = expectOutAppService;
_productionLineAppService = productionLineAppService;
_logger = logger; _logger = logger;
_agvOptions = agvOptions; _agvOptions = agvOptions;
_postionLocationAppService = postionLocationAppService; _postionLocationAppService = postionLocationAppService;
@ -172,7 +172,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
} }
/// <summary> /// <summary>
/// 拆箱 /// 拆箱
/// </summary> /// </summary>
/// <param name="transferNoteEditInput"></param> /// <param name="transferNoteEditInput"></param>
/// <returns></returns> /// <returns></returns>
@ -187,7 +187,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
} }
#region 校验 #region 校验
private void CheckLocation(LocationDTO locationDto, TransferNoteDetail detail) private void CheckLocation(LocationDTO locationDto, TransferNoteDetail detail)
{ {
if (locationDto == null) if (locationDto == null)
@ -195,7 +194,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
throw new UserFriendlyException($"库位代码为【{detail.ToLocationCode}】不存在"); throw new UserFriendlyException($"库位代码为【{detail.ToLocationCode}】不存在");
} }
} }
private void CheckFromLocation(LocationDTO locationDto, TransferNoteDetail detail) private void CheckFromLocation(LocationDTO locationDto, TransferNoteDetail detail)
{ {
if (locationDto == null) if (locationDto == null)
@ -203,7 +201,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
throw new UserFriendlyException($"库位代码为【{detail.FromLocationCode}】不存在"); throw new UserFriendlyException($"库位代码为【{detail.FromLocationCode}】不存在");
} }
} }
#endregion #endregion
/// <summary> /// <summary>
@ -713,34 +710,40 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
errors.Add($"来源起始点{detail.BeginPosition}库位没查到"); 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) if (tolocation == null)
{ {
errors.Add($"结束点{detail.EndPosition}库位没查到"); errors.Add($"结束点{detail.EndPosition}库位没查到");
} }
var productionline=await _productionLineAppService.GetByCodeAsync(tolocation.Code).ConfigureAwait(false);
if (productionline == null)
//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": // 装配线边库位组 errors.Add($"结束点{detail.EndPosition}库位不在生产线中!");
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); var item = await _itemBasicAppService.GetByCodeAsync(detail.MatCode).ConfigureAwait(false);
if (item == null) 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; }); entitys.ForEach(r => { r.MesTruckNumber = truckNumber; });
Check.NotNull(entitys, typeof(DeliverRequest).Name); Check.NotNull(entitys, typeof(DeliverRequest).Name);
List<string> errors=new List<string>(); List<string> errors=new List<string>();
foreach (var request in entitys) foreach (var request in entitys)
{ {
foreach (var itm in request.Details) 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>() CreateMap<DeliverRequestImportInput, DeliverRequest>()
// .ForMember(x => x.DeliverRequestType, y => y.MapFrom(t => EnumDeliverRequestType.Normal)) // .ForMember(x => x.DeliverRequestType, y => y.MapFrom(t => EnumDeliverRequestType.Normal))
.Ignore(x => x.CustomerAddressCode) .Ignore(x => x.CustomerAddressCode)
.Ignore(x => x.DeliverPlanNumber) .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> /// </summary>
public string MesTruckNumber { get; set; } public string MesTruckNumber { get; set; }
/// <summary>
/// 器具编号
/// </summary>
public string MesDeliveryContainer { get; set; }
/// <summary> /// <summary>
/// 任务明细 /// 任务明细
/// </summary> /// </summary>

Loading…
Cancel
Save