Browse Source

成品发运修改

dev_DY_CC
lvzb 10 months ago
parent
commit
0a6e5ccf1a
  1. 13
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs
  2. 15
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs
  3. 15
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs
  4. 20
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml
  5. 8
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
  6. 2
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs
  7. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs
  8. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs
  9. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs
  10. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/IDeliverRequestAppService.cs
  11. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs
  12. 33
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs
  13. 42
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
  14. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs
  15. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs
  16. 14
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs
  17. 14
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs
  18. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs
  19. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs
  20. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs
  21. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs
  22. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs
  23. 19
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CountJobEventHandler.cs
  24. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs

13
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs

@ -82,7 +82,8 @@ public class DeliveryReader : IReader
DataAction = EnumExchangeDataAction.Add,
SourceSystem = EnumSystemType.MES.ToString(),
SourceDataId = Delivery.mesout_delivery_id.ToString(),
SourceDataGroupCode =Delivery.mesout_delivery_type=="0"? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan,
// SourceDataGroupCode =Delivery.mesout_delivery_type=="0"? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan,
SourceDataGroupCode = Delivery.mesout_delivery_plan,
SourceDataDetailCode = Delivery.mesout_delivery_customer,
SourceDataContent = JsonSerializer.Serialize(Delivery),
WriteTime = DateTime.Now,
@ -98,22 +99,24 @@ public class DeliveryReader : IReader
var mesRequest = new DeliverRequestExchangeDto()
{
DeliverRequestType = Delivery.mesout_delivery_type == "0" ? EnumDeliverRequestType.FIS : EnumDeliverRequestType.Normal,
DeliverPlanNumber= Delivery.mesout_delivery_type == "0" ? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan,
//DeliverPlanNumber= Delivery.mesout_delivery_type == "0" ? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan,
DeliverPlanNumber =Delivery.mesout_delivery_plan,
CustomerCode = Delivery.mesout_delivery_customer,
Number = Delivery.mesout_delivery_no,
Worker = "MESFY",
ActiveDate = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime) ? dateTime : DateTime.Now,
DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now,
MesTruckNumber=Delivery.mesout_delivery_carno,
MesTruckNumber="",
};
var mesRequestDetail = new DeliverRequestDetailExchangeDto()
{
ItemCode = Delivery.mesout_delivery_part,
Qty = Delivery.mesout_delivery_num,
AreaCode = Delivery.mesout_delivery_loc,
MesDeliveryNo=Delivery.mesout_delivery_no,
//MesDeliveryNo=Delivery.mesout_delivery_no,
MesDeliveryPlan = Delivery.mesout_delivery_plan,
IdentityNo =Delivery.mesout_delivery_identity_no
IdentityNo =Delivery.mesout_delivery_identity_no,
MesDeliveryContainer= Delivery.mesout_delivery_container
};
mesRequest.Detail = mesRequestDetail;
return mesRequest;

15
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs

@ -26,11 +26,11 @@ public class DeliverNoteDetailExchangeDto
/// </summary>
[Display(Name = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// Mes发货单号
/// </summary>
[Display(Name = "Mes发货单号")]
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//[Display(Name = "Mes发货单号")]
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
@ -41,4 +41,9 @@ public class DeliverNoteDetailExchangeDto
/// </summary>
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
/// <summary>
/// 底盘号
/// </summary>
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
}

15
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs

@ -25,11 +25,11 @@ public class DeliverRequestDetailExchangeDto
/// </summary>
[Display(Name = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// Mes发货单号
/// </summary>
[Display(Name = "Mes发货单号")]
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//[Display(Name = "Mes发货单号")]
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
@ -40,4 +40,9 @@ public class DeliverRequestDetailExchangeDto
/// </summary>
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
/// <summary>
/// 底盘号
/// </summary>
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
}

20
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml

@ -531,11 +531,6 @@
数量
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverNote.DeliverNoteDetailExchangeDto.MesDeliveryNo">
<summary>
Mes发货单号
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverNote.DeliverNoteDetailExchangeDto.MesDeliveryPlan">
<summary>
Mes发货计划号
@ -546,6 +541,11 @@
底盘号
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverNote.DeliverNoteDetailExchangeDto.MesDeliveryContainer">
<summary>
底盘号
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverNote.DeliverNoteExchangeDto.Number">
<summary>
单据号
@ -586,11 +586,6 @@
数量
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest.DeliverRequestDetailExchangeDto.MesDeliveryNo">
<summary>
Mes发货单号
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest.DeliverRequestDetailExchangeDto.MesDeliveryPlan">
<summary>
Mes发货计划号
@ -601,6 +596,11 @@
底盘号
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest.DeliverRequestDetailExchangeDto.MesDeliveryContainer">
<summary>
底盘号
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest.DeliverRequestExchangeDto.Number">
<summary>
单据号

8
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs

@ -303,7 +303,7 @@ public class BalanceController : AbpController
}
/// <summary>
/// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次
/// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次(无箱码)
/// </summary>
/// <param name="listInput"></param>
/// <returns></returns>
@ -333,10 +333,10 @@ public class BalanceController : AbpController
input.Condition.Filters.Add(new Filter("Lot", listInput.lot));
}
if (!string.IsNullOrWhiteSpace(listInput.packingCode))
{
//if (!string.IsNullOrWhiteSpace(listInput.packingCode))
//{
input.Condition.Filters.Add(new Filter("PackingCode", listInput.packingCode));
}
//}
if (!string.IsNullOrWhiteSpace(listInput.containerCode))
{

2
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs

@ -133,7 +133,7 @@ public class JobController : AbpController
}
}
}).ConfigureAwait(false);
list.Add(new JobCountDto { JobType = EnumJobType.CountJob_ByPackingCode, Count = countJobs_ByErpItemCode });
list.Add(new JobCountDto { JobType = EnumJobType.CountJob_ByErpItemCode, Count = countJobs_ByErpItemCode });
//成品发运
var deliverJobs = await _deliverJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase
{

15
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs

@ -10,11 +10,11 @@ public class DeliverNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToDTOBase
/// </summary>
[Display(Name = "扩展属性")]
public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
/// <summary>
/// Mes发货单号
/// </summary>
[Display(Name = "Mes发货单号")]
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//[Display(Name = "Mes发货单号")]
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
@ -25,4 +25,9 @@ public class DeliverNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToDTOBase
/// </summary>
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
/// <summary>
/// Mes器具号
/// </summary>
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
}

15
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs

@ -10,11 +10,11 @@ public class DeliverNoteDetailInput : SfsStoreRecommendFromDetailWithFromToInput
/// </summary>
[Display(Name = "扩展属性")]
public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
/// <summary>
/// Mes发货单号
/// </summary>
[Display(Name = "Mes发货单号")]
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//[Display(Name = "Mes发货单号")]
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
@ -25,4 +25,9 @@ public class DeliverNoteDetailInput : SfsStoreRecommendFromDetailWithFromToInput
/// </summary>
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
/// <summary>
/// Mes器具号
/// </summary>
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
}

15
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs

@ -18,11 +18,11 @@ public class DeliverRequestDetailDTO : SfsStoreDetailWithQtyDTOBase, IHasExtraPr
public ExtraPropertyDictionary ExtraProperties { set; get; } = new ExtraPropertyDictionary();
/// <summary>
/// Mes发货单号
/// </summary>
[Display(Name = "Mes发货单号")]
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//[Display(Name = "Mes发货单号")]
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
@ -33,4 +33,9 @@ public class DeliverRequestDetailDTO : SfsStoreDetailWithQtyDTOBase, IHasExtraPr
/// </summary>
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
/// <summary>
/// Mes器具号
/// </summary>
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
}

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

@ -1,3 +1,5 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -8,4 +10,5 @@ public interface IDeliverRequestAppService
<DeliverRequestDTO, SfsStoreRequestInputBase, DeliverRequestEditInput, DeliverRequestDetailDTO, SfsStoreRequestInputBase>
{
Task<List<DeliverRequestDTO>> HandleListAsync(List<Guid> ids, string truckNumber);
}

15
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs

@ -16,11 +16,11 @@ public class DeliverRequestDetailInput : SfsStoreDetailWithQtyInputBase, IHasExt
/// </summary>
[Display(Name = "扩展属性")]
public ExtraPropertyDictionary ExtraProperties { set; get; }
/// <summary>
/// Mes发货单号
/// </summary>
[Display(Name = "Mes发货单号")]
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//[Display(Name = "Mes发货单号")]
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
@ -31,4 +31,9 @@ public class DeliverRequestDetailInput : SfsStoreDetailWithQtyInputBase, IHasExt
/// </summary>
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
/// <summary>
/// Mes器具号
/// </summary>
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
}

33
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs

@ -58,16 +58,24 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase
[Required]
public string AreaCode { get; set; }
/// <summary>
/// Mes发货单号
/// </summary>
[Display(Name = "Mes发货单号")]
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//[Display(Name = "Mes发货单号")]
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
[Display(Name = "Mes发货计划号")]
[Required]
public string MesDeliveryPlan { get; set; }
/// <summary>
/// Mes器具号
/// </summary>
[Display(Name = "Mes器具号")]
[Required]
public string MesDeliveryContainer { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
@ -122,17 +130,22 @@ public class DeliverRequestFisImportInput : SfsStoreImportInputBase
[Display(Name = "发货库区")]
[Required]
public string AreaCode { get; set; }
/// <summary>
/// Mes发货单号
/// </summary>
[Display(Name = "Mes发货单号")]
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//[Display(Name = "Mes发货单号")]
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
[Display(Name = "Mes发货计划号")]
public string MesDeliveryPlan { get; set; }
/// <summary>
/// Mes器具号
/// </summary>
[Display(Name = "Mes器具号")]
public string MesDeliveryContainer { get; set; }
/// <summary>
/// 底盘号
/// </summary>
[Display(Name = "底盘号")]

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

@ -63,20 +63,16 @@ IItemBasicAppService itemBasicAppService)
request.Remark = "成品发运手动导入";
request.ActiveDate = DateTime.Now;
await SetRequestAutoPropertiesAsync(request).ConfigureAwait(false);
var detailGroupCount= request.Details.GroupBy(r => new { r.AreaCode, r.MesDeliveryNo, r.MesDeliveryPlan }).Count();
var detailGroupCount= request.Details.GroupBy(r => new { r.AreaCode,r.MesDeliveryPlan }).Count();
if (detailGroupCount != 1)
{
throw new UserFriendlyException($"同一发货类型、发货时间、客户的发货区域、Mes发货单号、Mes发货计划号必须相同!");
throw new UserFriendlyException($"同一发货类型、发货时间、客户的发货区域、Mes发货计划号必须相同!");
}
if (request.Details.Count != request.Details.Select(r => r.ItemCode).Distinct().Count())
{
throw new UserFriendlyException($"同一发货类型、发货时间、客户的存在相同零件号!");
}
if(request.DeliverRequestType== EnumDeliverRequestType.FIS)
{
request.DeliverPlanNumber = request.Details.First().MesDeliveryNo;
}
else if (request.DeliverRequestType == EnumDeliverRequestType.Normal)
if(request.DeliverRequestType== EnumDeliverRequestType.FIS|| request.DeliverRequestType == EnumDeliverRequestType.Normal)
{
request.DeliverPlanNumber = request.Details.First().MesDeliveryPlan;
}
@ -126,13 +122,13 @@ IItemBasicAppService itemBasicAppService)
{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写底盘号", new string[] { "底盘号" }));
}
if (string.IsNullOrEmpty(model.MesDeliveryNo))
if (string.IsNullOrEmpty(model.MesDeliveryContainer))
{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写MES发货单号", new string[] { "MES发货单号" }));
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写Mes器具号", new string[] { "Mes器具号" }));
}
if (!string.IsNullOrEmpty(model.MesDeliveryPlan))
if (string.IsNullOrEmpty(model.MesDeliveryPlan))
{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货MES发货计划单号应该为空", new string[] { "MES发货计划单号" }));
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" }));
}
}
if (model.DeliverRequestType == EnumDeliverRequestType.Normal )
@ -141,9 +137,9 @@ IItemBasicAppService itemBasicAppService)
{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" }));
}
if(!string.IsNullOrEmpty(model.IdentityNo)|| !string.IsNullOrEmpty(model.MesDeliveryNo))
if(!string.IsNullOrEmpty(model.IdentityNo))
{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货底盘号和MES发货单号应该为空", new string[] { "底盘号" , "MES发货单号" }));
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货底盘号应该为空", new string[] { "底盘号"}));
}
}
var area = await _areaApp.GetByCodeAsync(model.AreaCode).ConfigureAwait(false);
@ -165,16 +161,26 @@ IItemBasicAppService itemBasicAppService)
/// 处理请求
/// </summary>
/// <param name="ids"></param>
/// <param name="truckNumber"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
[HttpPost("handle-list")]
public virtual async Task<List<DeliverRequestDTO>> HandleListAsync(List<Guid> ids)
public virtual async Task<List<DeliverRequestDTO>> HandleListAsync(List<Guid> ids,string truckNumber)
{
if (string.IsNullOrEmpty(truckNumber))
{
throw new UserFriendlyException($"车牌号不能为空");
}
var entitys = await _repository.GetListAsync(r=> ids.Contains(r.Id),true).ConfigureAwait(false);
//if (entitys.Select(r => r.CustomerCode).Distinct().Count()>1)
//{
// throw new UserFriendlyException($"所选申请涉及多个客户不能创建为一个发货单,请重新选择!");
//}
if (entitys.Select(r => r.CustomerCode).Distinct().Count() > 1)
{
throw new UserFriendlyException($"所选申请涉及多个客户不能创建为一个发货单,请重新选择!");
}
//一车发运车牌号相同
entitys.ForEach(r => { r.MesTruckNumber = truckNumber; });
Check.NotNull(entitys, typeof(DeliverRequest).Name);
var result = await _deliverRequestManager.HandleListAsync(entitys).ConfigureAwait(false);
var dtos = ObjectMapper.Map<List<DeliverRequest>, List<DeliverRequestDTO>>(entitys);

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

@ -94,9 +94,10 @@ public partial class StoreApplicationAutoMapperProfile : Profile
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.Remark)
.Ignore(x => x.IdentityNo)
.Ignore(x => x.MesDeliveryNo)
// .Ignore(x => x.MesDeliveryNo)
.Ignore(x => x.MesDeliveryPlan)
// .AfterMap((x, y) => y.SetProperty(nameof(x.FromVinCode), x.FromVinCode))
.Ignore(x => x.MesDeliveryContainer)
// .AfterMap((x, y) => y.SetProperty(nameof(x.FromVinCode), x.FromVinCode))
//.AfterMap((x, y) => y.SetProperty(nameof(x.ToVinCode), x.ToVinCode))
;
}

9
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs

@ -176,8 +176,6 @@ public class DeliverRequestFisAppService :
bool includeDetails = false,
CancellationToken cancellationToken = default)
{
sfsRequestInput.Condition.Filters.Add(
new Filter(nameof(DeliverRequest.DeliverRequestType), "Normal"));
sfsRequestInput.Condition.Filters.Add(
new Filter(nameof(DeliverRequest.RequestStatus), "Reviewing"));
return base.GetPagedListByFilterAsync(sfsRequestInput, includeDetails, cancellationToken);
@ -407,8 +405,13 @@ public class DeliverRequestFisAppService :
await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false);
}
[HttpPost("handle-list")]
public Task<List<DeliverRequestDTO>> HandleListAsync(List<Guid> ids, string truckNumber)
{
throw new NotImplementedException();
}
#endregion
}

14
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs

@ -1,3 +1,5 @@
using DocumentFormat.OpenXml.Wordprocessing;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Data;
namespace Win_in.Sfs.Wms.Store.Domain;
@ -8,10 +10,10 @@ public class DeliverNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase
/// 扩展属性
/// </summary>
public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
/// <summary>
/// Mes发货单号
/// </summary>
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
@ -20,4 +22,8 @@ public class DeliverNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase
/// 底盘号
/// </summary>
public string IdentityNo { get; set; }
/// <summary>
/// Mes器具号
/// </summary>
public string MesDeliveryContainer { get; set; }
}

14
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs

@ -1,3 +1,5 @@
using DocumentFormat.OpenXml.Wordprocessing;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Data;
namespace Win_in.Sfs.Wms.Store.Domain;
@ -16,10 +18,10 @@ public class DeliverRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasExtraPr
/// 扩展属性
/// </summary>
public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
/// <summary>
/// Mes发货单号
/// </summary>
public string MesDeliveryNo { get; set; }
///// <summary>
///// Mes发货单号
///// </summary>
//public string MesDeliveryNo { get; set; }
/// <summary>
/// Mes发货计划号
/// </summary>
@ -28,4 +30,8 @@ public class DeliverRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasExtraPr
/// 底盘号
/// </summary>
public string IdentityNo { get; set; }
/// <summary>
/// Mes器具号
/// </summary>
public string MesDeliveryContainer { get; set; }
}

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs

@ -52,7 +52,8 @@ public static class DeliverNoteDbContextModelCreatingExtensions
b.Property(q => q.ToLot).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.IdentityNo).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.MesDeliveryPlan).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.MesDeliveryNo).HasMaxLength(SfsPropertyConst.CodeLength);
//b.Property(q => q.MesDeliveryNo).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.MesDeliveryContainer).HasMaxLength(SfsPropertyConst.CodeLength);
//Indexes
b.HasIndex(q => new { q.Number, q.ItemCode, q.FromPackingCode, q.FromLot, q.FromLocationCode, q.ToLocationCode }).IsUnique();
});

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs

@ -44,7 +44,8 @@ public static class DeliverRequestDbContextModelCreatingExtensions
b.ConfigureSfsStoreDetailBase();
b.Property(q => q.IdentityNo).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.MesDeliveryPlan).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.MesDeliveryNo).HasMaxLength(SfsPropertyConst.CodeLength);
// b.Property(q => q.MesDeliveryNo).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.MesDeliveryContainer).HasMaxLength(SfsPropertyConst.CodeLength);
//Properties
//Relations

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs

@ -53,6 +53,7 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.JsonItemCodes)
.Ignore(x => x.JsonLocationCodes)
.Ignore(x => x.JsonInventoryStatus)
.Ignore(x=>x.Details)
;
CreateMap<CountJobDetail, CountPlanDetailInput>()

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs

@ -46,9 +46,10 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.MesDeliveryNo)
// .Ignore(x => x.MesDeliveryNo)
.Ignore(x => x.IdentityNo)
.Ignore(x => x.MesDeliveryPlan)
.Ignore(x=>x.MesDeliveryContainer)
;
CreateMap<DeliverJobDetail, ExpectOutEditInput>()

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs

@ -97,8 +97,9 @@ public partial class StoreEventAutoMapperProfile : Profile
.ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status))
.ForMember(x => x.ToWarehouseCode, y => y.MapFrom(d => d.WarehouseCode))
.Ignore(t => t.StdPackQty)
.Ignore(t => t.MesDeliveryNo)
// .Ignore(t => t.MesDeliveryNo)
.Ignore(t => t.MesDeliveryPlan)
.Ignore(t=>t.MesDeliveryContainer)
.Ignore(t => t.IdentityNo)
.Ignore(x => x.ExtraProperties)
.IgnoreIHasRecommendAndHandledFrom();

19
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CountJobEventHandler.cs

@ -3,6 +3,7 @@ using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.EventBus;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Event;
@ -39,6 +40,7 @@ public class CountJobEventHandler :
}
else
{
var countPlanUpdateInput = await BuildCountPlanJobUpdateDTO(entity).ConfigureAwait(false);
await _countPlanAppService.UpdateByJobAsync(countPlanUpdateInput).ConfigureAwait(false);
}
@ -57,12 +59,8 @@ public class CountJobEventHandler :
}
}
private async Task<CountPlanEditInput> BuildCountPlanJobUpdateDTO(CountJob entity)
{
entity.DepDetails.RemoveAll(r => r.InventoryStage != entity.InventoryStage);
entity.Details.RemoveAll(r => r.InventoryStage != entity.InventoryStage);
var countPlanUpdateInput = ObjectMapper.Map<CountJob, CountPlanEditInput>(entity);
foreach (var detail in countPlanUpdateInput.Details)
{
foreach (var detail in entity.Details)
{
//if (detail.FinalCountQty != 0)
//{
@ -70,11 +68,16 @@ public class CountJobEventHandler :
//}
await TrySetDetailPropertiesAsync(detail).ConfigureAwait(false);
}
var countPlanUpdateInput = ObjectMapper.Map<CountJob, CountPlanEditInput>(entity);
//只获取本次盘点的明细更细计划明细
List<CountJobDetail> details= entity.Details.Where(r => r.InventoryStage == entity.InventoryStage).ToList();
var countPlanUpdateDetailInputs = ObjectMapper.Map<List<CountJobDetail>, List<CountPlanDetailInput> >(details);
countPlanUpdateInput.Details = countPlanUpdateDetailInputs;
return countPlanUpdateInput;
}
private async Task TrySetDetailPropertiesAsync(CountPlanDetailInput detail)
private async Task TrySetDetailPropertiesAsync(CountJobDetail detail)
{
if (string.IsNullOrEmpty(detail.ItemName))
{

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs

@ -198,9 +198,10 @@ public class DeliverRequestEventHandler
}
inputDetail.ExtraProperties = detail.ExtraProperties;
inputDetail.MesDeliveryNo = detail.MesDeliveryNo;
//inputDetail.MesDeliveryNo = detail.MesDeliveryNo;
inputDetail.IdentityNo = detail.IdentityNo;
inputDetail.MesDeliveryPlan = detail.MesDeliveryPlan;
inputDetail.MesDeliveryContainer = detail.MesDeliveryContainer;
createInput.Details.Add(inputDetail);
}
}
@ -287,9 +288,10 @@ public class DeliverRequestEventHandler
}
inputDetail.ExtraProperties = detail.ExtraProperties;
inputDetail.MesDeliveryNo = detail.MesDeliveryNo;
// inputDetail.MesDeliveryNo = detail.MesDeliveryNo;
inputDetail.IdentityNo = detail.IdentityNo;
inputDetail.MesDeliveryPlan = detail.MesDeliveryPlan;
inputDetail.MesDeliveryContainer = detail.MesDeliveryContainer;
createInput.Details.Add(inputDetail);
}
}

Loading…
Cancel
Save