diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs
index 1f6f35bbb..8a6db9768 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs
+++ b/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;
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs
index cda6687aa..00539feda 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs
@@ -26,11 +26,11 @@ public class DeliverNoteDetailExchangeDto
///
[Display(Name = "数量")]
public decimal Qty { get; set; }
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -41,4 +41,9 @@ public class DeliverNoteDetailExchangeDto
///
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs
index 3f76b5d9b..37cb3275a 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs
@@ -25,11 +25,11 @@ public class DeliverRequestDetailExchangeDto
///
[Display(Name = "数量")]
public decimal Qty { get; set; }
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -40,4 +40,9 @@ public class DeliverRequestDetailExchangeDto
///
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml
index 84bf66f23..bd66333af 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml
@@ -531,11 +531,6 @@
数量
-
-
- Mes发货单号
-
-
Mes发货计划号
@@ -546,6 +541,11 @@
底盘号
+
+
+ 底盘号
+
+
单据号
@@ -586,11 +586,6 @@
数量
-
-
- Mes发货单号
-
-
Mes发货计划号
@@ -601,6 +596,11 @@
底盘号
+
+
+ 底盘号
+
+
单据号
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
index e3fb58d14..20ca5a718 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
@@ -303,7 +303,7 @@ public class BalanceController : AbpController
}
///
- /// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次
+ /// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次(无箱码)
///
///
///
@@ -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))
{
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs
index 9889b2a87..1e427b46f 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs
+++ b/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
{
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs
index 480978f89..126527d6e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs
@@ -10,11 +10,11 @@ public class DeliverNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToDTOBase
///
[Display(Name = "扩展属性")]
public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -25,4 +25,9 @@ public class DeliverNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToDTOBase
///
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
+ ///
+ /// Mes器具号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs
index e7957adc4..bd537942c 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs
@@ -10,11 +10,11 @@ public class DeliverNoteDetailInput : SfsStoreRecommendFromDetailWithFromToInput
///
[Display(Name = "扩展属性")]
public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -25,4 +25,9 @@ public class DeliverNoteDetailInput : SfsStoreRecommendFromDetailWithFromToInput
///
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
+ ///
+ /// Mes器具号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs
index 48c2eb45f..3cf728105 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs
+++ b/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();
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -33,4 +33,9 @@ public class DeliverRequestDetailDTO : SfsStoreDetailWithQtyDTOBase, IHasExtraPr
///
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
+ ///
+ /// Mes器具号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/IDeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/IDeliverRequestAppService.cs
index e8df97c80..82231c58d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/IDeliverRequestAppService.cs
+++ b/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
{
+ Task> HandleListAsync(List ids, string truckNumber);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs
index c472abe02..45ef731e9 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs
+++ b/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
///
[Display(Name = "扩展属性")]
public ExtraPropertyDictionary ExtraProperties { set; get; }
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -31,4 +31,9 @@ public class DeliverRequestDetailInput : SfsStoreDetailWithQtyInputBase, IHasExt
///
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
+ ///
+ /// Mes器具号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs
index cb66bb549..84afa8dc4 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs
+++ b/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; }
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
[Display(Name = "Mes发货计划号")]
+ [Required]
public string MesDeliveryPlan { get; set; }
+
+ ///
+ /// Mes器具号
+ ///
+ [Display(Name = "Mes器具号")]
+ [Required]
+ public string MesDeliveryContainer { get; set; }
///
/// Mes车牌号
///
@@ -122,17 +130,22 @@ public class DeliverRequestFisImportInput : SfsStoreImportInputBase
[Display(Name = "发货库区")]
[Required]
public string AreaCode { get; set; }
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
[Display(Name = "Mes发货计划号")]
public string MesDeliveryPlan { get; set; }
///
+ /// Mes器具号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
+ ///
/// 底盘号
///
[Display(Name = "底盘号")]
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
index c4d6b30fe..95a7034ba 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
+++ b/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)
/// 处理请求
///
///
+ ///
///
+ ///
[HttpPost("handle-list")]
- public virtual async Task> HandleListAsync(List ids)
+ public virtual async Task> HandleListAsync(List 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>(entitys);
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs
index da3b0fcf0..1fe9e1b56 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs
+++ b/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))
;
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs
index 63d701e4f..30d437190 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs
+++ b/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> HandleListAsync(List ids, string truckNumber)
+ {
+ throw new NotImplementedException();
+ }
+
-
#endregion
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs
index ae672d219..82ef5cf41 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs
+++ b/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
/// 扩展属性
///
public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
- ///
- /// Mes发货单号
- ///
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -20,4 +22,8 @@ public class DeliverNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase
/// 底盘号
///
public string IdentityNo { get; set; }
+ ///
+ /// Mes器具号
+ ///
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs
index 4ef1869ee..0807e21f0 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs
+++ b/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
/// 扩展属性
///
public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
- ///
- /// Mes发货单号
- ///
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -28,4 +30,8 @@ public class DeliverRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasExtraPr
/// 底盘号
///
public string IdentityNo { get; set; }
+ ///
+ /// Mes器具号
+ ///
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs
index cb2807abb..ca8e2d6d5 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs
+++ b/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();
});
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs
index 97fe98634..6828e470e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs
+++ b/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
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs
index 023366466..6996603bf 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs
+++ b/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()
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs
index 416b5fb1d..59b85554d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs
+++ b/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()
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs
index 0d04d1a29..18b167d62 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs
+++ b/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();
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CountJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CountJobEventHandler.cs
index ba21e9490..cec595e7b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CountJobEventHandler.cs
+++ b/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 BuildCountPlanJobUpdateDTO(CountJob entity)
- {
- entity.DepDetails.RemoveAll(r => r.InventoryStage != entity.InventoryStage);
- entity.Details.RemoveAll(r => r.InventoryStage != entity.InventoryStage);
- var countPlanUpdateInput = ObjectMapper.Map(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(entity);
+ //只获取本次盘点的明细更细计划明细
+ List details= entity.Details.Where(r => r.InventoryStage == entity.InventoryStage).ToList();
+ var countPlanUpdateDetailInputs = ObjectMapper.Map, List >(details);
+ countPlanUpdateInput.Details = countPlanUpdateDetailInputs;
return countPlanUpdateInput;
}
- private async Task TrySetDetailPropertiesAsync(CountPlanDetailInput detail)
+ private async Task TrySetDetailPropertiesAsync(CountJobDetail detail)
{
if (string.IsNullOrEmpty(detail.ItemName))
{
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs
index 669794694..158f7431e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs
+++ b/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);
}
}