diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtl.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtl.cs
new file mode 100644
index 000000000..7b9b122ee
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtl.cs
@@ -0,0 +1,39 @@
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Domain.Entities;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+public class CallMtl : Entity
+{
+ ///
+ /// 序号
+ ///
+ [Key]
+ public string mesout_callmtl_id { get; set; }
+ ///
+ /// 物料
+ ///
+ public string mesout_callmtl_erpno { get; set; }
+ ///
+ /// 库位
+ ///
+ public string mesout_callmtl_loc { get; set; }
+ ///
+ /// 数量
+ ///
+ public decimal mesout_callmtl_num { get; set; }
+ ///
+ /// 时间
+ ///
+ public string mesout_callmtl_wt { get; set; }
+
+ ///
+ /// 是否读取(0,1)
+ ///
+ public long Yl1 { get; set; }
+
+ public override object[] GetKeys()
+ {
+ return new object[] { mesout_callmtl_id };
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtlManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtlManager.cs
new file mode 100644
index 000000000..d48c9e68e
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtlManager.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Services;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+public class CallMtlManager : DomainService, ICallMtlManager
+{
+ private readonly ICallMtlRepository _repository;
+
+ public CallMtlManager(ICallMtlRepository repository)
+ {
+ _repository = repository;
+ }
+ public virtual async Task> GetToBeProcessedListAsync()
+ {
+ var plans = await _repository.GetListAsync(p => p.Yl1 == 0).ConfigureAwait(false);
+ return plans;
+ }
+ public virtual async Task UpdateProcesseErrordListAsync(List entities)
+ {
+ var ids = entities.Select(p => p.mesout_callmtl_id);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_callmtl_id)).ConfigureAwait(false);
+ plans.ForEach(p =>
+ {
+ p.Yl1 = 2;
+ // p.WmsDate = Clock.Now;
+ });
+ await _repository.UpdateManyAsync(plans).ConfigureAwait(false);
+ }
+ public virtual async Task UpdateProcessedListAsync(List entities)
+ {
+ var ids = entities.Select(p => p.mesout_callmtl_id);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_callmtl_id)).ConfigureAwait(false);
+ plans.ForEach(p =>
+ {
+ p.Yl1 = 1;
+
+ // p.WmsDate = Clock.Now;
+ });
+ await _repository.UpdateManyAsync(plans).ConfigureAwait(false);
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlManager.cs
new file mode 100644
index 000000000..7a8ffab76
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlManager.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+public interface ICallMtlManager
+{
+ Task> GetToBeProcessedListAsync();
+ Task UpdateProcessedListAsync(List entities);
+ Task UpdateProcesseErrordListAsync(List entities);
+}
\ No newline at end of file
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlRepository.cs
new file mode 100644
index 000000000..7ea7c5a79
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlRepository.cs
@@ -0,0 +1,7 @@
+using Volo.Abp.Domain.Repositories;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+public interface ICallMtlRepository : IRepository
+{
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/Delivery.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/Delivery.cs
new file mode 100644
index 000000000..85f87fca3
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/Delivery.cs
@@ -0,0 +1,66 @@
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Domain.Entities;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+public class Delivery : Entity
+{
+ ///
+ /// 序号
+ ///
+ [Key]
+ public string mesout_delivery_id { get; set; }
+ ///
+ /// 类型
+ ///
+ public string mesout_delivery_type { get; set; }
+ ///
+ /// 物料
+ ///
+ public string mesout_delivery_part { get; set; }
+ ///
+ /// 底盘号
+ ///
+ public string mesout_delivery_identity_no { get; set; }
+ ///
+ /// 发红储位
+ ///
+ public string mesout_delivery_loc { get; set; }
+ ///
+ /// 数量
+ ///
+ public decimal mesout_delivery_num { get; set; }
+ ///
+ /// 客户代码
+ ///
+ public string mesout_delivery_customer { get; set; }
+
+ ///
+ /// 车牌号
+ ///
+ public string mesout_delivery_carno { get; set; }
+ ///
+ /// 写入时间
+ ///
+ public string mesout_delivery_wt { get; set; }
+ ///
+ /// 发货单号
+ ///
+ public string mesout_delivery_no { get; set; }
+ ///
+ /// 器具号
+ ///
+ public string mesout_delivery_container { get; set; }
+ ///
+ /// 发货计划号
+ ///
+ public string mesout_delivery_plan { get; set; }
+ ///
+ /// 是否读取(0,1)
+ ///
+ public long Yl1 { get; set; }
+
+ public override object[] GetKeys()
+ {
+ return new object[] { mesout_delivery_id };
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/DeliveryManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/DeliveryManager.cs
new file mode 100644
index 000000000..c5788df2c
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/DeliveryManager.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Services;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+public class DeliveryManager : DomainService, IDeliveryManager
+{
+ private readonly IDeliveryRepository _repository;
+
+ public DeliveryManager(IDeliveryRepository repository)
+ {
+ _repository = repository;
+ }
+ public virtual async Task> GetToBeProcessedListAsync()
+ {
+ var plans = await _repository.GetListAsync(p => p.Yl1 == 0).ConfigureAwait(false);
+ return plans;
+
+ }
+ public virtual async Task UpdateProcesseErrordListAsync(List entities)
+ {
+ var ids = entities.Select(p => p.mesout_delivery_id);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_delivery_id)).ConfigureAwait(false);
+ plans.ForEach(p =>
+ {
+ p.Yl1 = 2;
+ // p.WmsDate = Clock.Now;
+ });
+ await _repository.UpdateManyAsync(plans).ConfigureAwait(false);
+ }
+ public virtual async Task UpdateProcessedListAsync(List entities)
+ {
+ var ids = entities.Select(p => p.mesout_delivery_id);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_delivery_id)).ConfigureAwait(false);
+ plans.ForEach(p =>
+ {
+ p.Yl1 = 1;
+
+ // p.WmsDate = Clock.Now;
+ });
+ await _repository.UpdateManyAsync(plans).ConfigureAwait(false);
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryManager.cs
new file mode 100644
index 000000000..222614bc1
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryManager.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+public interface IDeliveryManager
+{
+ Task> GetToBeProcessedListAsync();
+ Task UpdateProcessedListAsync(List entities);
+ Task UpdateProcesseErrordListAsync(List entities);
+}
\ No newline at end of file
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryRepository.cs
new file mode 100644
index 000000000..77310f439
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryRepository.cs
@@ -0,0 +1,8 @@
+using Volo.Abp.Domain.Repositories;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+
+public interface IDeliveryRepository : IRepository
+{
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/Frozen.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/Frozen.cs
new file mode 100644
index 000000000..9ae130400
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/Frozen.cs
@@ -0,0 +1,49 @@
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Domain.Entities;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
+public class Frozen : Entity
+{
+ ///
+ /// 序号
+ ///
+ [Key]
+ public string mesout_frozen_id { get; set; }
+ ///
+ /// 类型
+ ///
+ public string mesout_frozen_type { get; set; }
+ ///
+ /// 物料
+ ///
+ public string mesout_frozen_part { get; set; }
+ ///
+ /// 日期
+ ///
+ public string mesout_frozen_date { get; set; }
+ ///
+ /// 来源库位
+ ///
+ public string mesout_frozen_loc { get; set; }
+ ///
+ /// 冻结原因
+ ///
+ public string mesout_frozen_reason { get; set; }
+ ///
+ /// 数量
+ ///
+ public decimal mesout_frozen_num { get; set; }
+ ///
+ /// 冻结用户
+ ///
+ public string mesout_frozen_user { get; set; }
+ ///
+ /// 是否读取(0,1)
+ ///
+ public long Yl1 { get; set; }
+
+ public override object[] GetKeys()
+ {
+ return new object[] { mesout_frozen_id };
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/FrozenManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/FrozenManager.cs
new file mode 100644
index 000000000..e0f15b29c
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/FrozenManager.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Services;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
+public class FrozenManager : DomainService, IFrozenManager
+{
+ private readonly IFrozenRepository _repository;
+
+ public FrozenManager(IFrozenRepository repository)
+ {
+ _repository = repository;
+ }
+ public virtual async Task> GetToBeProcessedListAsync()
+ {
+ var plans = await _repository.GetListAsync(p => p.Yl1 == 0).ConfigureAwait(false);
+ return plans;
+
+ }
+ public virtual async Task UpdateProcesseErrordListAsync(List entities)
+ {
+ var ids = entities.Select(p => p.mesout_frozen_id);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_frozen_id)).ConfigureAwait(false);
+ plans.ForEach(p =>
+ {
+ p.Yl1 = 2;
+ // p.WmsDate = Clock.Now;
+ });
+ await _repository.UpdateManyAsync(plans).ConfigureAwait(false);
+ }
+ public virtual async Task UpdateProcessedListAsync(List entities)
+ {
+ var ids = entities.Select(p => p.mesout_frozen_id);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_frozen_id)).ConfigureAwait(false);
+ plans.ForEach(p =>
+ {
+ p.Yl1 = 1;
+
+ // p.WmsDate = Clock.Now;
+ });
+ await _repository.UpdateManyAsync(plans).ConfigureAwait(false);
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenManager.cs
new file mode 100644
index 000000000..ce90eb038
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenManager.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
+public interface IFrozenManager
+{
+ Task> GetToBeProcessedListAsync();
+ Task UpdateProcessedListAsync(List entities);
+ Task UpdateProcesseErrordListAsync(List entities);
+}
\ No newline at end of file
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenRepository.cs
new file mode 100644
index 000000000..0cde2a7a6
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenRepository.cs
@@ -0,0 +1,7 @@
+using Volo.Abp.Domain.Repositories;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
+public interface IFrozenRepository : IRepository
+{
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/MesOut/MesOut.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/MesOut/MesOut.cs
index 34a5aee52..de58a3987 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/MesOut/MesOut.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/MesOut/MesOut.cs
@@ -11,6 +11,10 @@ public class MesOut : Entity
[Key]
public string Mesout_ref_nbr { get; set; }
///
+ /// 条码号(20240430添加)
+ ///
+ public string Mesout_barcode { get; set; }
+ ///
/// 调出储位
///
public string Mesout_id { get; set; }
@@ -19,6 +23,10 @@ public class MesOut : Entity
///
public string Mesout_part { get; set; }
///
+ /// 质量补标识(20240430添加)
+ ///
+ public string Mesout_quality { get; set; }
+ ///
/// 日期
///
public string Mesout_date { get; set; }
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeManager.cs
new file mode 100644
index 000000000..474e56296
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeManager.cs
@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Services;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
+public interface IQtyrfeManager : IDomainService
+{
+ Task> GetToBeProcessedListAsync();
+ Task UpdateProcessedListAsync(List entities);
+ Task UpdateProcesseErrordListAsync(List entities);
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeRepository.cs
new file mode 100644
index 000000000..8535022a2
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeRepository.cs
@@ -0,0 +1,7 @@
+using Volo.Abp.Domain.Repositories;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
+public interface IQtyrfeRepository : IRepository
+{
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs
new file mode 100644
index 000000000..b2110b82f
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs
@@ -0,0 +1,50 @@
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Domain.Entities;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
+public class Qtyrfe : Entity
+{
+ ///
+ /// 序号
+ ///
+ [Key]
+ public string mesout_qtyrfe_id { get; set; }
+ ///
+ /// 物料
+ ///
+ public string mesout_qtyrfe_part { get; set; }
+ ///
+ /// 调出储位
+ ///
+ public string mesout_qtyrfe_loc_from { get; set; }
+ ///
+ /// 调入储位
+ ///
+ public string mesout_qtyrfe_loc_to { get; set; }
+ ///
+ /// 数量
+ ///
+ public decimal mesout_qtyrfe_num { get; set; }
+ ///
+ /// 调拨用户
+ ///
+ public string mesout_qtyrfe_user { get; set; }
+ ///
+ /// 写入时间
+ ///
+ public string mesout_qtyrfe_wt { get; set; }
+ ///
+ /// 类型(1为质量补)
+ ///
+ public string mesout_qtyrfe_type { get; set; }
+
+ public override object[] GetKeys()
+ {
+ return new object[] { mesout_qtyrfe_id };
+ }
+
+ ///
+ /// 是否读取(0,1)
+ ///
+ public long Yl1 { get; set; }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs
new file mode 100644
index 000000000..9b1147dcb
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Services;
+
+namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
+public class QtyrfeManager : DomainService, IQtyrfeManager
+{
+ private readonly IQtyrfeRepository _repository;
+
+ public QtyrfeManager(IQtyrfeRepository repository)
+ {
+ _repository = repository;
+ }
+ public virtual async Task> GetToBeProcessedListAsync()
+ {
+ var plans = await _repository.GetListAsync(p => p.Yl1 == 0).ConfigureAwait(false);
+ return plans;
+
+ }
+ public virtual async Task UpdateProcesseErrordListAsync(List entities)
+ {
+ var ids = entities.Select(p => p.mesout_qtyrfe_id);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_qtyrfe_id)).ConfigureAwait(false);
+ plans.ForEach(p =>
+ {
+ p.Yl1 = 2;
+ // p.WmsDate = Clock.Now;
+ });
+ await _repository.UpdateManyAsync(plans).ConfigureAwait(false);
+ }
+ public virtual async Task UpdateProcessedListAsync(List entities)
+ {
+ var ids = entities.Select(p => p.mesout_qtyrfe_id);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_qtyrfe_id)).ConfigureAwait(false);
+ plans.ForEach(p =>
+ {
+ p.Yl1 = 1;
+
+ // p.WmsDate = Clock.Now;
+ });
+ await _repository.UpdateManyAsync(plans).ConfigureAwait(false);
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlDbContextModelCreatingExtensions.cs
new file mode 100644
index 000000000..9a28e7a47
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlDbContextModelCreatingExtensions.cs
@@ -0,0 +1,27 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.Modeling;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+
+namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
+public static class CallMtlDbContextModelCreatingExtensions
+{
+ public static void ConfigureCallMtl(this ModelBuilder builder, MesModelBuilderConfigurationOptions options)
+ {
+ builder.Entity(b =>
+ {
+ //Configure table & schema Name
+ b.ToTable(options.TablePrefix + "mesout_callmtl", options.Schema);
+ //Configure ABP properties
+ b.ConfigureByConvention();
+
+ //Properties
+ b.Property(q => q.mesout_callmtl_id).HasMaxLength(20);
+ b.Property(q => q.mesout_callmtl_erpno).HasMaxLength(20);
+ b.Property(q => q.mesout_callmtl_loc).HasMaxLength(10);
+ b.Property(q => q.mesout_callmtl_num).HasPrecision(10, 2);
+ b.Property(q => q.mesout_callmtl_wt).HasMaxLength(20);
+ b.Property(q => q.Yl1);
+ });
+
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlEfCoreRepository.cs
new file mode 100644
index 000000000..945973e60
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlEfCoreRepository.cs
@@ -0,0 +1,12 @@
+using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+
+namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
+public class CallMtlEfCoreRepository : EfCoreRepository, ICallMtlRepository
+{
+ public CallMtlEfCoreRepository(IDbContextProvider dbContextProvider)
+ : base(dbContextProvider)
+ {
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeDbContextModelCreatingExtensions.cs
index 3d5d56d79..85ed867b5 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeDbContextModelCreatingExtensions.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeDbContextModelCreatingExtensions.cs
@@ -27,5 +27,9 @@ public static class DataExchangeDbContextModelCreatingExtensions
builder.ConfigureScrap(options);
builder.ConfigurePck(options);
builder.ConfigureBackflu(options);
+ builder.ConfigureQtyrfe(options);
+ builder.ConfigureFrozen(options);
+ builder.ConfigureDelivery(options);
+ builder.ConfigureCallMtl(options);
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeEntityFrameworkCoreFawtygModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeEntityFrameworkCoreFawtygModule.cs
index ea5d271be..192205bbc 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeEntityFrameworkCoreFawtygModule.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeEntityFrameworkCoreFawtygModule.cs
@@ -3,9 +3,13 @@ using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Modularity;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.MesOut;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.PullTask;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
@@ -32,5 +36,9 @@ public class DataExchangeEntityFrameworkCoreFawtygModule : AbpModule
context.Services.AddTransient();
context.Services.AddTransient();
context.Services.AddTransient();
+ context.Services.AddTransient();
+ context.Services.AddTransient();
+ context.Services.AddTransient();
+ context.Services.AddTransient();
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryDbContextModelCreatingExtensions.cs
new file mode 100644
index 000000000..4ae9db369
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryDbContextModelCreatingExtensions.cs
@@ -0,0 +1,35 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.Modeling;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+
+namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
+
+public static class DeliveryDbContextModelCreatingExtensions
+{
+ public static void ConfigureDelivery(this ModelBuilder builder, MesModelBuilderConfigurationOptions options)
+ {
+ builder.Entity(b =>
+ {
+ //Configure table & schema Name
+ b.ToTable(options.TablePrefix + "mesout_delivery", options.Schema);
+ //Configure ABP properties
+ b.ConfigureByConvention();
+
+ //Properties
+ b.Property(q => q.mesout_delivery_id).HasMaxLength(20);
+ b.Property(q => q.mesout_delivery_type).HasMaxLength(1);
+ b.Property(q => q.mesout_delivery_part).HasMaxLength(20);
+ b.Property(q => q.mesout_delivery_identity_no).HasMaxLength(20);
+ b.Property(q => q.mesout_delivery_loc).HasMaxLength(10);
+ b.Property(q => q.mesout_delivery_num).HasPrecision(10, 2);
+ b.Property(q => q.mesout_delivery_customer).HasMaxLength(10);
+ b.Property(q => q.mesout_delivery_carno).HasMaxLength(10);
+ b.Property(q => q.mesout_delivery_wt).HasMaxLength(20);
+ b.Property(q => q.mesout_delivery_no).HasMaxLength(20);
+ b.Property(q => q.mesout_delivery_container).HasMaxLength(20);
+ b.Property(q => q.mesout_delivery_plan).HasMaxLength(20);
+ b.Property(q => q.Yl1);
+ });
+
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryEfCoreRepository.cs
new file mode 100644
index 000000000..ef2c6e155
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryEfCoreRepository.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+
+namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
+
+public class DeliveryEfCoreRepository : EfCoreRepository,IDeliveryRepository
+{
+ public DeliveryEfCoreRepository(IDbContextProvider dbContextProvider)
+ : base(dbContextProvider)
+ {
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenDbContextModelCreatingExtensions.cs
new file mode 100644
index 000000000..35103288d
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenDbContextModelCreatingExtensions.cs
@@ -0,0 +1,30 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.Modeling;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
+
+namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
+public static class FrozenDbContextModelCreatingExtensions
+{
+ public static void ConfigureFrozen(this ModelBuilder builder, MesModelBuilderConfigurationOptions options)
+ {
+ builder.Entity(b =>
+ {
+ //Configure table & schema Name
+ b.ToTable(options.TablePrefix + "mesout_frozen", options.Schema);
+ //Configure ABP properties
+ b.ConfigureByConvention();
+
+ //Properties
+ b.Property(q => q.mesout_frozen_id).HasMaxLength(20);
+ b.Property(q => q.mesout_frozen_type).HasMaxLength(1);
+ b.Property(q => q.mesout_frozen_part).HasMaxLength(20);
+ b.Property(q => q.mesout_frozen_date).HasMaxLength(20);
+ b.Property(q => q.mesout_frozen_loc).HasMaxLength(10);
+ b.Property(q => q.mesout_frozen_reason).HasMaxLength(500);
+ b.Property(q => q.mesout_frozen_num).HasPrecision(10, 2);
+ b.Property(q => q.mesout_frozen_user).HasMaxLength(20);
+ b.Property(q => q.Yl1);
+ });
+
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenEfCoreRepository.cs
new file mode 100644
index 000000000..e9dc87935
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenEfCoreRepository.cs
@@ -0,0 +1,12 @@
+using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
+
+namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
+public class FrozenEfCoreRepository : EfCoreRepository, IFrozenRepository
+{
+ public FrozenEfCoreRepository(IDbContextProvider dbContextProvider)
+ : base(dbContextProvider)
+ {
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/IMesDbContext.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/IMesDbContext.cs
index 60810373f..a93053241 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/IMesDbContext.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/IMesDbContext.cs
@@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.MesOut;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.PullTask;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
@@ -20,4 +24,11 @@ public interface IMesDbContext : IEfCoreDbContext
DbSet MesOuts { get; }
DbSet PullTasks { get; }
DbSet Backflu { get; }
+
+ DbSet Qtyrfe { get; }
+
+ DbSet Frozen { get; }
+
+ DbSet Delivery { get; }
+ DbSet CallMtl { get; }
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesDbContext.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesDbContext.cs
index 775047674..c4efc833b 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesDbContext.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesDbContext.cs
@@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.MesOut;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.PullTask;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
@@ -22,6 +26,13 @@ public class MesDbContext :
public virtual DbSet Issue { get; }
public virtual DbSet Backflu { get; }
+ public virtual DbSet Qtyrfe { get; }
+
+ public virtual DbSet Frozen { get; }
+
+ public virtual DbSet Delivery { get; }
+
+ public virtual DbSet CallMtl { get; }
public MesDbContext(DbContextOptions options)
: base(options)
{
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesOut/MesOutDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesOut/MesOutDbContextModelCreatingExtensions.cs
index 61d77b269..0b8bdd2ff 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesOut/MesOutDbContextModelCreatingExtensions.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesOut/MesOutDbContextModelCreatingExtensions.cs
@@ -17,8 +17,10 @@ public static class MesOutDbContextModelCreatingExtensions
//Properties
b.Property(q => q.Mesout_ref_nbr).HasMaxLength(36);
+ b.Property(q => q.Mesout_barcode).HasMaxLength(20);
b.Property(q => q.Mesout_id).HasMaxLength(1);
b.Property(q => q.Mesout_part).HasMaxLength(20);
+ b.Property(q => q.Mesout_quality).HasMaxLength(20);
b.Property(q => q.Mesout_date).HasMaxLength(8);
b.Property(q => q.Mesout_move).HasPrecision(18, 2);
b.Property(q => q.Mesout_unable).HasPrecision(18, 2);
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs
new file mode 100644
index 000000000..1950bfa30
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs
@@ -0,0 +1,30 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.Modeling;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
+
+namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
+public static class QtyrfeDbContextModelCreatingExtensions
+{
+ public static void ConfigureQtyrfe(this ModelBuilder builder, MesModelBuilderConfigurationOptions options)
+ {
+ builder.Entity(b =>
+ {
+ //Configure table & schema Name
+ b.ToTable(options.TablePrefix + "mesout_qtyrfe", options.Schema);
+ //Configure ABP properties
+ b.ConfigureByConvention();
+
+ //Properties
+ b.Property(q => q.mesout_qtyrfe_id).HasMaxLength(20);
+ b.Property(q => q.mesout_qtyrfe_part).HasMaxLength(20);
+ b.Property(q => q.mesout_qtyrfe_loc_from).HasMaxLength(10);
+ b.Property(q => q.mesout_qtyrfe_loc_to).HasMaxLength(10);
+ b.Property(q => q.mesout_qtyrfe_num).HasPrecision(10, 2);
+ b.Property(q => q.mesout_qtyrfe_user).HasMaxLength(20);
+ b.Property(q => q.mesout_qtyrfe_wt).HasMaxLength(20);
+ b.Property(q => q.mesout_qtyrfe_type).HasMaxLength(2);
+ b.Property(q => q.Yl1);
+ });
+
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeEfCoreRepository.cs
new file mode 100644
index 000000000..81886dcaa
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeEfCoreRepository.cs
@@ -0,0 +1,13 @@
+using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
+
+namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes;
+
+public class QtyrfeEfCoreRepository : EfCoreRepository, IQtyrfeRepository
+{
+ public QtyrfeEfCoreRepository(IDbContextProvider dbContextProvider)
+ : base(dbContextProvider)
+ {
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes.csproj b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes.csproj
index 89ae346ea..4f26ffa5b 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes.csproj
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes.csproj
@@ -1,4 +1,4 @@
-
+
net6.0
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
index a29d697f6..efbb754bb 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
@@ -20,6 +20,8 @@ using System.Text.Json.Serialization;
using System.IdentityModel.Tokens.Jwt;
using Volo.Abp;
using System.Net.NetworkInformation;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
+
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming;
public class InjectionMoldingRequestReader : IReader
{
@@ -121,7 +123,7 @@ public class InjectionMoldingRequestReader : IReader
InjectionIssueRequestEditInput input = new InjectionIssueRequestEditInput();
input.Worker = "Vision";
- input.Type = "Vision";
+ input.IssueRequestType = EnumIssueRequestType.Vision;
input.AutoSubmit = true;
input.ActiveDate = DateTime.Now;
input.UseOnTheWayLocation = false;
@@ -135,7 +137,7 @@ public class InjectionMoldingRequestReader : IReader
ToLocationCode = inject.AreaID.ToString(),
PositionCode=inject.CargoID,
Qty = 1,
- RecommendType = EnumRecommendType.W,
+ RecommendType = EnumRecommendType.RAW,
IssuedQty = 0,
ReceivedQty = 0,
Status = EnumStatus.Open,
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs
index 0f32b55f7..7f5cc4065 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs
@@ -3,10 +3,15 @@ using Volo.Abp.AutoMapper;
using Win_in.Sfs.Shared.Application;
using Win_in.Sfs.Wms.DataExchange.Domain;
using Win_in.Sfs.Wms.DataExchange.WMS.BackFlushNote;
+using Win_in.Sfs.Wms.DataExchange.WMS.DeliverNote;
+using Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest;
+using Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest;
using Win_in.Sfs.Wms.DataExchange.WMS.MaterialRequest;
+using Win_in.Sfs.Wms.DataExchange.WMS.MesNote;
using Win_in.Sfs.Wms.DataExchange.WMS.PCK;
using Win_in.Sfs.Wms.DataExchange.WMS.ProductReceiptNote;
using Win_in.Sfs.Wms.DataExchange.WMS.ScrapNote;
+using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
@@ -148,16 +153,14 @@ public class FawtygAutoMapperProfile : Profile
.IgnoreIHasRecommendAndHandledFrom();
CreateMap()
- .Ignore(x => x.Detail)
- ;
+ .Ignore(x => x.Detail);
CreateMap();
CreateMap()
.Ignore(x => x.Details)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.Number)
- .Ignore(x => x.JobNumber)
- ;
+ .Ignore(x => x.JobNumber);
CreateMap()
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
@@ -174,8 +177,122 @@ public class FawtygAutoMapperProfile : Profile
.Ignore(x => x.ExpireDate)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.ToWarehouseCode)
+ .Ignore(x => x.Uom)
+ .Ignore(x => x.StdPackQty);
+
+ CreateMap()
+ .Ignore(x => x.Details)
+ .Ignore(x => x.ExtraProperties)
+ .Ignore(x => x.RequestNumber)
+ .Ignore(x => x.JobNumber)
+ .Ignore(x => x.CallRequestNumber)
+ .Ignore(x => x.CallJobNumber)
+ .Ignore(x => x.CallBusinessType)
+ .Ignore(x => x.CallServerName)
+ .Ignore(x => x.UseOnTheWayLocation)
+ .Ignore(x => x.Confirmed)
+ .Ignore(x => x.ConfirmTime)
+ .Ignore(x => x.Details)
+ .Ignore(x => x.ExtraProperties);
+ CreateMap()
+ .Ignore(x => x.ItemName)
+ .Ignore(x => x.ItemDesc1)
+ .Ignore(x => x.ItemDesc2)
+ .Ignore(x => x.FromLocationCode)
+ .Ignore(x => x.FromLocationArea)
+ .Ignore(x => x.FromLocationGroup)
+ .Ignore(x => x.FromContainerCode)
+ .Ignore(x => x.FromWarehouseCode)
+ .Ignore(x => x.FromLot)
+ .Ignore(x => x.FromPackingCode)
+ .Ignore(x => x.ToPackingCode)
+ .Ignore(x => x.ToContainerCode)
+ .Ignore(x => x.ToLocationCode)
+ .Ignore(x => x.ToLocationArea)
+ .Ignore(x => x.ToLocationGroup)
+ .Ignore(x => x.ToWarehouseCode)
+ .Ignore(x => x.ToLot)
+ .Ignore(x => x.SupplierBatch)
+ .Ignore(x => x.ArriveDate)
+ .Ignore(x => x.ProduceDate)
+ .Ignore(x => x.ExpireDate)
+ .Ignore(x => x.Uom)
+ .Ignore(x => x.StdPackQty);
+
+ CreateMap()
+ .Ignore(x => x.ExtraProperties)
+ .Ignore(x => x.JobNumber)
+ .Ignore(x => x.Details)
+ .Ignore(x => x.ExtraProperties);
+ CreateMap()
+ .ForMember(x => x.FromLocationCode, y => y.MapFrom(t => t.FromLocationErpCode))
+ .ForMember(x => x.ToLocationCode, y => y.MapFrom(t => t.ToLocationErpCode))
+ .Ignore(x => x.ItemName)
+ .Ignore(x => x.ItemDesc1)
+ .Ignore(x => x.ItemDesc2)
+ .Ignore(x => x.FromLocationArea)
+ .Ignore(x => x.FromLocationGroup)
+ .Ignore(x => x.FromContainerCode)
+ .Ignore(x => x.FromWarehouseCode)
+ .Ignore(x => x.FromLot)
+ .Ignore(x => x.FromPackingCode)
+ .Ignore(x => x.ToPackingCode)
+ .Ignore(x => x.ToContainerCode)
+ .Ignore(x => x.ToLocationArea)
+ .Ignore(x => x.ToLocationGroup)
+ .Ignore(x => x.ToWarehouseCode)
+ .Ignore(x => x.ToLot)
+ .Ignore(x => x.SupplierBatch)
+ .Ignore(x => x.ArriveDate)
+ .Ignore(x => x.ProduceDate)
+ .Ignore(x => x.ExpireDate)
+ .Ignore(x => x.Uom)
+ .Ignore(x => x.StdPackQty);
+
+ CreateMap()
+ .Ignore(x => x.DeliverPlanNumber)
+ .Ignore(x => x.ExtraProperties)
+ .Ignore(x => x.Details)
+ .Ignore(x => x.CustomerAddressCode)
+ .Ignore(x => x.ExtraProperties)
+ .Ignore(x => x.AutoSubmit)
+ .Ignore(x => x.AutoAgree)
+ .Ignore(x => x.AutoHandle)
+ .Ignore(x => x.AutoCompleteJob)
+ .Ignore(x => x.DirectCreateNote);
+ CreateMap()
.Ignore(x => x.Uom)
.Ignore(x => x.StdPackQty)
- ;
+ .Ignore(x => x.Remark)
+ .Ignore(x => x.ItemName)
+ .Ignore(x => x.ItemDesc1)
+ .Ignore(x => x.ItemDesc2);
+
+ CreateMap()
+ .Ignore(x => x.ExtraProperties)
+ .Ignore(x => x.Details)
+ .Ignore(x => x.AutoSubmit)
+ .Ignore(x => x.AutoAgree)
+ .Ignore(x => x.AutoHandle)
+ .Ignore(x => x.AutoCompleteJob)
+ .Ignore(x => x.DirectCreateNote)
+ .Ignore(x => x.UseOnTheWayLocation);
+ CreateMap()
+ .Ignore(x => x.Uom)
+ .Ignore(x => x.StdPackQty)
+ .Ignore(x => x.Remark)
+ .Ignore(x => x.ItemName)
+ .Ignore(x => x.ItemDesc1)
+ .Ignore(x => x.ItemDesc2)
+ .Ignore(x => x.ProdLine)
+ .Ignore(x => x.ToLocationErpCode)
+ .Ignore(x => x.ToLocationArea)
+ .Ignore(x => x.ToLocationGroup)
+ .Ignore(x => x.ToWarehouseCode)
+ .Ignore(x => x.RequestStatus)
+ .Ignore(x => x.IssuedQty)
+ .Ignore(x => x.ReceivedQty)
+ .Ignore(x => x.Status)
+ .Ignore(x => x.PositionCode);
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlConverter.cs
new file mode 100644
index 000000000..a3b56ccb0
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlConverter.cs
@@ -0,0 +1,101 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Volo.Abp.ObjectMapping;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+public class CallMtlConverter : IIncomingConverter
+{
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly IIncomingToWmsManager _incomingToWmsManager;
+ private readonly IObjectMapper _objectMapper;
+ private readonly IItemBasicAppService _itemBasicAppService;
+ private readonly ILocationAppService _locationAppService;
+ private readonly ILogger _logger;
+
+ public CallMtlConverter(
+ IIncomingToWmsManager incomingToWmsManager
+ , IObjectMapper objectMapper
+ , IItemBasicAppService itemBasicAppService
+ , ILogger logger,
+ ILocationAppService locationAppService,
+ IIncomingFromExternalManager incomingFromExternalManager)
+ {
+ _incomingToWmsManager = incomingToWmsManager;
+ _objectMapper = objectMapper;
+ _itemBasicAppService = itemBasicAppService;
+ _logger = logger;
+ _locationAppService = locationAppService;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ }
+
+ public virtual async Task ConvertAsync(List incomingFromExternalList)
+ {
+ if (!incomingFromExternalList.Any())
+ {
+ _logger.LogInformation("no CallMtls");
+ return;
+ }
+
+ //按Number合并InjectionIssue单据
+ var transferNoteList = await BuildIncomingToWmsOfInjectionIssueAsync(incomingFromExternalList).ConfigureAwait(false);
+ await _incomingToWmsManager.CreateManyAsync(transferNoteList).ConfigureAwait(false);
+ //归档
+ await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false);
+ }
+
+ private async Task> BuildIncomingToWmsOfInjectionIssueAsync(List incomingDataList)
+ {
+ var incomingToWmsList = new List();
+ foreach (var incomingData in incomingDataList)
+ {
+ var incomingToWms = new IncomingToWms()
+ {
+ DataType = incomingData.DataType,
+ DataAction = incomingData.DataAction,
+ SourceSystem = incomingData.SourceSystem,
+ DataIdentityCode = incomingData.SourceDataGroupCode,
+ };
+ incomingToWms.SetEffectiveDate(incomingData.EffectiveDate);
+ var exchangeInjectionIssue = JsonSerializer.Deserialize(incomingData.DestinationDataContent);
+ var wmsInjectionIssueDetail = _objectMapper.Map(exchangeInjectionIssue.Detail);
+ var wmsInjectionIssue = _objectMapper.Map(exchangeInjectionIssue);
+ wmsInjectionIssue.Details = new List();
+ var item = await _itemBasicAppService.GetByCodeAsync(wmsInjectionIssueDetail.ItemCode).ConfigureAwait(false);
+ try
+ {
+
+ if (item != null)
+ {
+ wmsInjectionIssueDetail.ItemName = item.Name;
+ wmsInjectionIssueDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : "";
+ wmsInjectionIssueDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : "";
+ wmsInjectionIssueDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : "";
+ wmsInjectionIssueDetail.StdPackQty = item.StdPackQty;
+ }
+ }
+ catch (Exception)
+ {
+ wmsInjectionIssueDetail.ItemName = "";
+ wmsInjectionIssueDetail.ItemDesc1 = "";
+ wmsInjectionIssueDetail.ItemDesc2 = "";
+ wmsInjectionIssueDetail.Uom = "";
+ }
+
+ wmsInjectionIssue.Details.Add(wmsInjectionIssueDetail);
+
+ incomingToWms.DataContent = JsonSerializer.Serialize(wmsInjectionIssue);
+ incomingToWmsList.Add(incomingToWms);
+ }
+ return incomingToWmsList;
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlReader.cs
new file mode 100644
index 000000000..7bc6dd95a
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlReader.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using System.Text.Json;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl;
+using Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+public class CallMtlReader : IReader
+{
+ private readonly ICallMtlManager _CallMtlManager;
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly ILogger _logger;
+ private readonly ILocationAppService _locationAppService;
+
+ public CallMtlReader(
+ ICallMtlManager pillTaskManager
+ , IIncomingFromExternalManager incomingFromExternalManager
+ , ILogger logger
+ , ILocationAppService locationAppService
+ )
+ {
+ _CallMtlManager = pillTaskManager;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ _logger = logger;
+ _locationAppService = locationAppService;
+ }
+
+ public virtual async Task> ReadAsync()
+
+ {
+ //从MES读取待处理CallMtl
+ var toBeProcessedPillTasks = await _CallMtlManager.GetToBeProcessedListAsync().ConfigureAwait(false);
+ if (!toBeProcessedPillTasks.Any())
+ {
+ _logger.LogInformation("no CallMtls");
+ return new List();
+ }
+ //CallMtl逐一转换为MaterialRequest
+ var holdLocation = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.HOLD).ConfigureAwait(false);
+ var incomingDataList = BuildIncomingFromExternalFromPillTaskAsync(toBeProcessedPillTasks, holdLocation == null ? "" : holdLocation.Code);
+ await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false);
+ //更新MES数据状态
+ await _CallMtlManager.UpdateProcessedListAsync(toBeProcessedPillTasks).ConfigureAwait(false);
+
+ return incomingDataList;
+ }
+
+ private static List BuildIncomingFromExternalFromPillTaskAsync(List toBeProcessedCallMtls, string holdLocationCode)
+ {
+ var incomingDataList = new List();
+ foreach (var CallMtl in toBeProcessedCallMtls)
+ {
+ var incomingData = BuildIncomingFromExternal(CallMtl);
+
+ incomingData.SetEffectiveDate(DateTime.Now);
+ incomingData.SetSuccess();
+ try
+ {
+ var MaterialRequest = BuildMesNoteCreateInput(CallMtl, holdLocationCode);
+ incomingData.DestinationDataContent = JsonSerializer.Serialize(MaterialRequest);
+ }
+ catch (Exception ex)
+ {
+ incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString());
+ }
+
+ incomingDataList.Add(incomingData);
+
+ }
+
+ return incomingDataList;
+ }
+
+ private static IncomingFromExternal BuildIncomingFromExternal(CallMtl CallMtl)
+ {
+ var incomingData = new IncomingFromExternal()
+ {
+ DataType = EnumIncomingDataType.CallMtl.ToString(),
+ DataAction = EnumExchangeDataAction.Add,
+ SourceSystem = EnumSystemType.MES.ToString(),
+ SourceDataId = CallMtl.mesout_callmtl_id.ToString(),
+ SourceDataGroupCode = CallMtl.mesout_callmtl_id,
+ SourceDataDetailCode = CallMtl.mesout_callmtl_erpno,
+ SourceDataContent = JsonSerializer.Serialize(CallMtl),
+ WriteTime = DateTime.Now,
+ Writer = nameof(MesIncomingBackgroundWorker),
+
+ DestinationSystem = EnumSystemType.WMS.ToString(),
+ };
+ return incomingData;
+ }
+
+ private static InjectionIssueRequestExchangeDto BuildMesNoteCreateInput(CallMtl CallMtl, string holdLocationCode)
+ {
+ var request = new InjectionIssueRequestExchangeDto()
+ {
+ IssueRequestType = EnumIssueRequestType.Mes,
+ Worker = "MesZDJL",
+ ActiveDate = DateTime.TryParse(CallMtl.mesout_callmtl_wt, out DateTime dateTime) ? dateTime : DateTime.Now
+ };
+ var detail = new InjectionIssueRequestDetailExchangeDto()
+ {
+ ItemCode = CallMtl.mesout_callmtl_erpno,
+ Qty = CallMtl.mesout_callmtl_num,
+ BoxQty = CallMtl.mesout_callmtl_num,
+ ToLocationCode = CallMtl.mesout_callmtl_loc,
+ RecommendType = EnumRecommendType.RAW,
+ };
+ request.Detail = detail;
+ return request;
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryConverter.cs
new file mode 100644
index 000000000..2f321ce47
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryConverter.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Volo.Abp.ObjectMapping;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+public class DeliveryConverter : IIncomingConverter
+{
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly IIncomingToWmsManager _incomingToWmsManager;
+ private readonly IObjectMapper _objectMapper;
+ private readonly IItemBasicAppService _itemBasicAppService;
+ private readonly ICustomerAppService _customerAppService;
+ private readonly ILogger _logger;
+
+ public DeliveryConverter(
+ IIncomingToWmsManager incomingToWmsManager
+ , IObjectMapper objectMapper
+ , IItemBasicAppService itemBasicAppService
+ , ILogger logger,
+ ICustomerAppService customerAppService,
+ IIncomingFromExternalManager incomingFromExternalManager)
+ {
+ _incomingToWmsManager = incomingToWmsManager;
+ _objectMapper = objectMapper;
+ _itemBasicAppService = itemBasicAppService;
+ _logger = logger;
+ _customerAppService = customerAppService;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ }
+
+ public virtual async Task ConvertAsync(List incomingFromExternalList)
+ {
+ if (!incomingFromExternalList.Any())
+ {
+ _logger.LogInformation("no Deliverys");
+ return;
+ }
+
+ //按Number合并DeliveryRequest单据
+ var transferRequestList = await BuildIncomingToWmsOfDeliveryRequestAsync(incomingFromExternalList).ConfigureAwait(false);
+ await _incomingToWmsManager.CreateManyAsync(transferRequestList).ConfigureAwait(false);
+ //归档
+ await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false);
+ }
+
+ private async Task> BuildIncomingToWmsOfDeliveryRequestAsync(List incomingDataList)
+ {
+ var incomingToWmsList = new List();
+ var groups = incomingDataList.GroupBy(p => new { p.SourceDataGroupCode ,p.SourceDataDetailCode});
+ foreach (var group in groups)
+ {
+ var first = group.First();
+ var incomingToWms = new IncomingToWms()
+ {
+ DataType = first.DataType,
+ DataAction = first.DataAction,
+ SourceSystem = first.SourceSystem,
+ DataIdentityCode = first.SourceDataGroupCode,
+ };
+ incomingToWms.SetEffectiveDate(first.EffectiveDate);
+ var exchangeDeliveryRequest = JsonSerializer.Deserialize(first.DestinationDataContent);
+ var wmsDeliveryRequest = _objectMapper.Map(exchangeDeliveryRequest);
+ wmsDeliveryRequest.Details = new List();
+ var cust= await _customerAppService.GetByCodeAsync(wmsDeliveryRequest.CustomerCode).ConfigureAwait(false);
+ wmsDeliveryRequest.CustomerAddressCode = String.IsNullOrEmpty( cust?.Address)?"无": cust.Address;
+ foreach (var incomingFromExternal in group.ToList())
+ {
+ var transferRequest = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent);
+ var wmsDeliveryRequestDetail = _objectMapper.Map(transferRequest.Detail);
+ var item = await _itemBasicAppService.GetByCodeAsync(wmsDeliveryRequestDetail.ItemCode).ConfigureAwait(false);
+ try
+ {
+ if (item != null)
+ {
+ wmsDeliveryRequestDetail.ItemName = item.Name;
+ wmsDeliveryRequestDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : "";
+ wmsDeliveryRequestDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : "";
+ wmsDeliveryRequestDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : "";
+ wmsDeliveryRequestDetail.StdPackQty = item.StdPackQty;
+ }
+ }
+ catch (Exception)
+ {
+ wmsDeliveryRequestDetail.ItemName = "";
+ wmsDeliveryRequestDetail.ItemDesc1 = "";
+ wmsDeliveryRequestDetail.ItemDesc2 = "";
+ wmsDeliveryRequestDetail.Uom = "";
+ }
+
+ wmsDeliveryRequest.Details.Add(wmsDeliveryRequestDetail);
+ }
+ incomingToWms.DataContent = JsonSerializer.Serialize(wmsDeliveryRequest);
+ incomingToWmsList.Add(incomingToWms);
+ }
+ return incomingToWmsList;
+ }
+
+}
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
new file mode 100644
index 000000000..6a5238413
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs
@@ -0,0 +1,120 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery;
+using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using System.Text.Json;
+using Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest;
+using Win_in.Sfs.Shared.Domain.Shared;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+
+public class DeliveryReader : IReader
+{
+ private readonly IDeliveryManager _DeliveryManager;
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly ILogger _logger;
+
+ public DeliveryReader(
+ IDeliveryManager pillTaskManager
+ , IIncomingFromExternalManager incomingFromExternalManager
+ , ILogger logger
+ )
+ {
+ _DeliveryManager = pillTaskManager;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ _logger = logger;
+ }
+
+ public virtual async Task> ReadAsync()
+
+ {
+ //从MES读取待处理Delivery
+ var toBeProcessedPillTasks = await _DeliveryManager.GetToBeProcessedListAsync().ConfigureAwait(false);
+ if (!toBeProcessedPillTasks.Any())
+ {
+ _logger.LogInformation("no Deliverys");
+ return new List();
+ }
+ //Delivery逐一转换为MaterialRequest
+ var incomingDataList = BuildIncomingFromExternalFromPillTaskAsync(toBeProcessedPillTasks);
+ await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false);
+ //更新MES数据状态
+ await _DeliveryManager.UpdateProcessedListAsync(toBeProcessedPillTasks).ConfigureAwait(false);
+
+ return incomingDataList;
+ }
+
+ private static List BuildIncomingFromExternalFromPillTaskAsync(List toBeProcessedDeliverys)
+ {
+ var incomingDataList = new List();
+ foreach (var Delivery in toBeProcessedDeliverys)
+ {
+ var incomingData = BuildIncomingFromExternal(Delivery);
+
+ incomingData.SetEffectiveDate(DateTime.Now);
+ incomingData.SetSuccess();
+ try
+ {
+ var DetilveryRequest = BuildDeliverRequestCreateInput(Delivery);
+ incomingData.DestinationDataContent = JsonSerializer.Serialize(DetilveryRequest);
+ }
+ catch (Exception ex)
+ {
+ incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString());
+ }
+
+ incomingDataList.Add(incomingData);
+
+ }
+
+ return incomingDataList;
+ }
+
+ private static IncomingFromExternal BuildIncomingFromExternal(Delivery Delivery)
+ {
+ var incomingData = new IncomingFromExternal()
+ {
+ DataType = EnumIncomingDataType.Delivery.ToString(),
+ 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,
+ SourceDataDetailCode = Delivery.mesout_delivery_customer,
+ SourceDataContent = JsonSerializer.Serialize(Delivery),
+ WriteTime = DateTime.Now,
+ Writer = nameof(MesIncomingBackgroundWorker),
+
+ DestinationSystem = EnumSystemType.WMS.ToString(),
+ };
+ return incomingData;
+ }
+
+ private static DeliverRequestExchangeDto BuildDeliverRequestCreateInput(Delivery Delivery)
+ {
+ var mesRequest = new DeliverRequestExchangeDto()
+ {
+ DeliverRequestType = Delivery.mesout_delivery_type == "0" ? EnumDeliverRequestType.FIS : EnumDeliverRequestType.Normal,
+ 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
+ };
+ var mesRequestDetail = new DeliverRequestDetailExchangeDto()
+ {
+ ItemCode = Delivery.mesout_delivery_part,
+ Qty = Delivery.mesout_delivery_num,
+ AreaCode = Delivery.mesout_delivery_loc,
+ MesDeliveryNo=Delivery.mesout_delivery_no,
+ MesDeliveryPlan = Delivery.mesout_delivery_plan,
+ IdentityNo =Delivery.mesout_delivery_identity_no
+ };
+ mesRequest.Detail = mesRequestDetail;
+ return mesRequest;
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenConverter.cs
new file mode 100644
index 000000000..378067647
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenConverter.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.WMS.MesNote;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+using Volo.Abp.ObjectMapping;
+using Win_in.Sfs.Wms.DataExchange.WMS.MesNote;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+
+public class FrozenConverter : IIncomingConverter
+{
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly IIncomingToWmsManager _incomingToWmsManager;
+ private readonly IObjectMapper _objectMapper;
+ private readonly IItemBasicAppService _itemBasicAppService;
+ private readonly ILocationAppService _locationAppService;
+ private readonly ILogger _logger;
+
+ public FrozenConverter(
+ IIncomingToWmsManager incomingToWmsManager
+ , IObjectMapper objectMapper
+ , IItemBasicAppService itemBasicAppService
+ , ILogger logger,
+ ILocationAppService locationAppService,
+ IIncomingFromExternalManager incomingFromExternalManager)
+ {
+ _incomingToWmsManager = incomingToWmsManager;
+ _objectMapper = objectMapper;
+ _itemBasicAppService = itemBasicAppService;
+ _logger = logger;
+ _locationAppService = locationAppService;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ }
+
+ public virtual async Task ConvertAsync(List incomingFromExternalList)
+ {
+ if (!incomingFromExternalList.Any())
+ {
+ _logger.LogInformation("no Frozens");
+ return;
+ }
+
+ //按Number合并MesNote单据
+ var transferNoteList = await BuildIncomingToWmsOfMesNoteAsync(incomingFromExternalList).ConfigureAwait(false);
+ await _incomingToWmsManager.CreateManyAsync(transferNoteList).ConfigureAwait(false);
+ //归档
+ await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false);
+ }
+
+ private async Task> BuildIncomingToWmsOfMesNoteAsync(List incomingDataList)
+ {
+ var incomingToWmsList = new List();
+ foreach (var incomingData in incomingDataList)
+ {
+ var incomingToWms = new IncomingToWms()
+ {
+ DataType = incomingData.DataType,
+ DataAction = incomingData.DataAction,
+ SourceSystem = incomingData.SourceSystem,
+ DataIdentityCode = incomingData.SourceDataGroupCode,
+ };
+ incomingToWms.SetEffectiveDate(incomingData.EffectiveDate);
+ var exchangeMesNote = JsonSerializer.Deserialize(incomingData.DestinationDataContent);
+ var wmsMesNoteDetail = _objectMapper.Map(exchangeMesNote.Detail);
+ var wmsMesNote = _objectMapper.Map(exchangeMesNote);
+ wmsMesNote.Details = new List();
+ var item = await _itemBasicAppService.GetByCodeAsync(wmsMesNoteDetail.ItemCode).ConfigureAwait(false);
+ try
+ {
+ wmsMesNoteDetail.FromPackingCode = "";
+ wmsMesNoteDetail.ToPackingCode = "";
+ wmsMesNoteDetail.FromLot = "";
+ wmsMesNoteDetail.ToLot = "";
+ wmsMesNoteDetail.FromWarehouseCode = "";
+ wmsMesNoteDetail.ToWarehouseCode = "";
+ //if (transferNote.Remark.Contains("质量补移库"))//质量补
+ //{
+ // wmsMesNoteDetail.FromPackingCode = "RFE"; //质量补排序批次
+ // wmsMesNoteDetail.FromLot = "RFE";//质量补箱标签
+ // wmsMesNoteDetail.ToPackingCode = "RFE"; //质量补排序批次
+ // wmsMesNoteDetail.ToLot = "RFE";//质量补箱标签
+ //}
+ if (item != null)
+ {
+ wmsMesNoteDetail.ItemName = item.Name;
+ wmsMesNoteDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : "";
+ wmsMesNoteDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : "";
+ wmsMesNoteDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : "";
+ wmsMesNoteDetail.StdPackQty = item.StdPackQty;
+ }
+ //if (tolocation != null)
+ //{
+ // wmsMesNoteDetail.ToLocationCode = tolocation.Code;
+ // wmsMesNoteDetail.ToLocationArea = tolocation.AreaCode;
+ // wmsMesNoteDetail.ToLocationGroup = tolocation.LocationGroupCode;
+ // wmsMesNoteDetail.ToWarehouseCode = tolocation.WarehouseCode;
+ // if (tolocation.Type == EnumLocationType.CUST)
+ // {
+ // wmsMesNote.Type = EnumTransSubType.Mes_Customer.ToString();//客户储位调拨
+ // }
+ //}
+ //if (fromlocation != null)
+ //{
+ // wmsMesNoteDetail.FromLocationCode = fromlocation.Code;
+ // wmsMesNoteDetail.FromLocationArea = fromlocation.AreaCode;
+ // wmsMesNoteDetail.FromLocationGroup = fromlocation.LocationGroupCode;
+ // wmsMesNoteDetail.FromWarehouseCode = fromlocation.WarehouseCode;
+ //}
+ }
+ catch (Exception)
+ {
+ wmsMesNoteDetail.ItemName = "";
+ wmsMesNoteDetail.ItemDesc1 = "";
+ wmsMesNoteDetail.ItemDesc2 = "";
+ wmsMesNoteDetail.Uom = "";
+ }
+
+ wmsMesNote.Details.Add(wmsMesNoteDetail);
+
+ incomingToWms.DataContent = JsonSerializer.Serialize(wmsMesNote);
+ incomingToWmsList.Add(incomingToWms);
+ }
+ return incomingToWmsList;
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenReader.cs
new file mode 100644
index 000000000..75b4f9ba5
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenReader.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen;
+using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using System.Text.Json;
+using Win_in.Sfs.Wms.DataExchange.WMS.MesNote;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Shared.Domain.Shared;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+public class FrozenReader : IReader
+{
+ private readonly IFrozenManager _FrozenManager;
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly ILogger _logger;
+ private readonly ILocationAppService _locationAppService;
+
+ public FrozenReader(
+ IFrozenManager pillTaskManager
+ , IIncomingFromExternalManager incomingFromExternalManager
+ , ILogger logger
+ , ILocationAppService locationAppService
+ )
+ {
+ _FrozenManager = pillTaskManager;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ _logger = logger;
+ _locationAppService = locationAppService;
+ }
+
+ public virtual async Task> ReadAsync()
+
+ {
+ //从MES读取待处理Frozen
+ var toBeProcessedPillTasks = await _FrozenManager.GetToBeProcessedListAsync().ConfigureAwait(false);
+ if (!toBeProcessedPillTasks.Any())
+ {
+ _logger.LogInformation("no Frozens");
+ return new List();
+ }
+ //Frozen逐一转换为MaterialRequest
+ var holdLocation = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.HOLD).ConfigureAwait(false);
+ var incomingDataList = BuildIncomingFromExternalFromPillTaskAsync(toBeProcessedPillTasks, holdLocation==null?"": holdLocation.Code);
+ await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false);
+ //更新MES数据状态
+ await _FrozenManager.UpdateProcessedListAsync(toBeProcessedPillTasks).ConfigureAwait(false);
+
+ return incomingDataList;
+ }
+
+ private static List BuildIncomingFromExternalFromPillTaskAsync(List toBeProcessedFrozens,string holdLocationCode)
+ {
+ var incomingDataList = new List();
+ foreach (var Frozen in toBeProcessedFrozens)
+ {
+ var incomingData = BuildIncomingFromExternal(Frozen);
+
+ incomingData.SetEffectiveDate(DateTime.Now);
+ incomingData.SetSuccess();
+ try
+ {
+ var MaterialRequest = BuildMesNoteCreateInput(Frozen, holdLocationCode);
+ incomingData.DestinationDataContent = JsonSerializer.Serialize(MaterialRequest);
+ }
+ catch (Exception ex)
+ {
+ incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString());
+ }
+
+ incomingDataList.Add(incomingData);
+
+ }
+
+ return incomingDataList;
+ }
+
+ private static IncomingFromExternal BuildIncomingFromExternal(Frozen Frozen)
+ {
+ var incomingData = new IncomingFromExternal()
+ {
+ DataType = EnumIncomingDataType.MesNote.ToString(),
+ DataAction = EnumExchangeDataAction.Add,
+ SourceSystem = EnumSystemType.MES.ToString(),
+ SourceDataId = Frozen.mesout_frozen_id.ToString(),
+ SourceDataGroupCode = Frozen.mesout_frozen_id,
+ SourceDataDetailCode = Frozen.mesout_frozen_part,
+ SourceDataContent = JsonSerializer.Serialize(Frozen),
+ WriteTime = DateTime.Now,
+ Writer = nameof(MesIncomingBackgroundWorker),
+
+ DestinationSystem = EnumSystemType.WMS.ToString(),
+ };
+ return incomingData;
+ }
+
+ private static MesNoteExchangeDto BuildMesNoteCreateInput(Frozen Frozen, string holdLocationCode)
+ {
+ var mesNote = new MesNoteExchangeDto()
+ {
+ MesRequestNumber=Frozen.mesout_frozen_id,
+ Worker = Frozen.mesout_frozen_user,
+ Remark = Frozen.mesout_frozen_reason,
+ Type = Frozen.mesout_frozen_type == "0" ? EnumTransType.MesFreezed.ToString() : EnumTransType.MesUnFreezed.ToString(),
+ ActiveDate = DateTime.TryParse(Frozen.mesout_frozen_date, out DateTime dateTime) ? dateTime : DateTime.Now
+ };
+ var mesNoteDetail = new MesNoteDetailExchangeDto()
+ {
+ ItemCode = Frozen.mesout_frozen_part,
+ Qty = Frozen.mesout_frozen_num,
+ ToLocationErpCode = Frozen.mesout_frozen_type == "0"? holdLocationCode : Frozen.mesout_frozen_loc,
+ FromLocationErpCode = Frozen.mesout_frozen_type != "0"? holdLocationCode:Frozen.mesout_frozen_loc,
+ ToStatus= Frozen.mesout_frozen_type == "0"? EnumInventoryStatus.HOLD: EnumInventoryStatus.OK,
+ FromStatus = Frozen.mesout_frozen_type != "0" ? EnumInventoryStatus.HOLD : EnumInventoryStatus.OK,
+ };
+ mesNote.Detail = mesNoteDetail;
+ return mesNote;
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs
index 87b487f78..950c015b9 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@@ -6,6 +7,7 @@ using Microsoft.Extensions.Options;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.Threading;
using Volo.Abp.Uow;
+using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
using Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
@@ -46,10 +48,18 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
Logger.LogInformation($"Read MesOut");//缴库
var mesOutReader = workerContext.ServiceProvider.GetRequiredService();
var mesOutConverter = workerContext.ServiceProvider.GetRequiredService();
- //读取并保存MesOut
+ var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService();
+ //读取mes缴库
var mesOutsFromExternalList = await mesOutReader.ReadAsync().ConfigureAwait(false);
- //转换MesOut
- await mesOutConverter.ConvertAsync(mesOutsFromExternalList).ConfigureAwait(false);
+ var mesOutsFromExternalList_ProductReceipt = mesOutsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.ProductReceipt.ToString()).ToList();
+ var mesOutsFromExternalList_TransferNote = mesOutsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.TransferNote.ToString()).ToList();
+ //转换缴库数据(如果有质量补得数据直接生产移库数据移到客户库位)
+ await mesOutConverter.ConvertAsync(mesOutsFromExternalList_ProductReceipt).ConfigureAwait(false);
+ if (mesOutsFromExternalList_TransferNote.Count > 0)//如果有质量补则生产储位调拨任务
+ {
+ await TransferNoteConverter.ConvertAsync(mesOutsFromExternalList_TransferNote).ConfigureAwait(false);
+ }
+
//上海和安徽无此接口
//Logger.LogInformation($"Read PullTask");//拉动任务
@@ -59,7 +69,7 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
//var pullTaskFromExternalList = await pullTaskReader.ReadAsync().ConfigureAwait(false);
////转换PullTask
//await pullTaskConverter.ConvertAsync(pullTaskFromExternalList).ConfigureAwait(false);
- Logger.LogInformation($"Read Scrap");
+ Logger.LogInformation($"Read Scrap");//报废
var scrapReader = workerContext.ServiceProvider.GetRequiredService();
var scrapConverter = workerContext.ServiceProvider.GetRequiredService();
@@ -84,6 +94,42 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false);
//转换BackFlush
await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false);
+
+
+ Logger.LogInformation($"Read TransferNote");//储位调拨
+ var TransferNoteReader = workerContext.ServiceProvider.GetRequiredService();
+ // var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService();
+ //读取并保存TransferNote
+ var transferNoteFromExternalList = await TransferNoteReader.ReadAsync().ConfigureAwait(false);
+ //转换TransferNote
+ await TransferNoteConverter.ConvertAsync(transferNoteFromExternalList).ConfigureAwait(false);
+
+ Logger.LogInformation($"Read Frozen");//冻结解冻
+ var FrozenReader = workerContext.ServiceProvider.GetRequiredService();
+ var FrozenConverter = workerContext.ServiceProvider.GetRequiredService();
+ //读取并保存Frozen
+ var mesNoteFromExternalList = await FrozenReader.ReadAsync().ConfigureAwait(false);
+ //转换Frozen
+ await FrozenConverter.ConvertAsync(mesNoteFromExternalList).ConfigureAwait(false);
+
+
+ Logger.LogInformation($"Read Delivery");//成品发运
+ var DeliveryReader = workerContext.ServiceProvider.GetRequiredService();
+ var DeliveryConverter = workerContext.ServiceProvider.GetRequiredService();
+ //读取并保存Delivery
+ var deliveryNoteFromExternalList = await DeliveryReader.ReadAsync().ConfigureAwait(false);
+ //转换Delivery
+ await DeliveryConverter.ConvertAsync(deliveryNoteFromExternalList).ConfigureAwait(false);
+
+
+
+ Logger.LogInformation($"Read CallMtl");//自动叫料
+ var CallMtlReader = workerContext.ServiceProvider.GetRequiredService();
+ var CallMtlConverter = workerContext.ServiceProvider.GetRequiredService();
+ //读取并保存Delivery
+ var callMtlFromExternalList = await CallMtlReader.ReadAsync().ConfigureAwait(false);
+ //转换Delivery
+ await CallMtlConverter.ConvertAsync(callMtlFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Completed: Handling {Incoming}");
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs
index 941cc6cb4..5ede235e6 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs
@@ -89,7 +89,7 @@ public class MesOutConverter : IIncomingConverter
var productReceiptNote = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent);
var wmsProductReceiptNoteDetail = _objectMapper.Map(productReceiptNote.Detail);
- var oldNoteDetail = wmsProductReceiptNote.Details.FirstOrDefault(r => r.ItemCode == wmsProductReceiptNoteDetail.ItemCode && r.LocationErpCode == wmsProductReceiptNoteDetail.LocationErpCode && (first.TableType != EnumExchangeTableType.MainTable ? true : r.ReturnQty != 0));
+ var oldNoteDetail = wmsProductReceiptNote.Details.FirstOrDefault(r =>r.MesQuality== wmsProductReceiptNoteDetail.MesQuality&& r.ItemCode == wmsProductReceiptNoteDetail.ItemCode && r.LocationErpCode == wmsProductReceiptNoteDetail.LocationErpCode && (first.TableType != EnumExchangeTableType.MainTable ? true : r.ReturnQty != 0));
sumdetail.itemCode = wmsProductReceiptNoteDetail.ItemCode;
sumdetail.locationCode = wmsProductReceiptNoteDetail.LocationErpCode;
@@ -111,6 +111,11 @@ public class MesOutConverter : IIncomingConverter
wmsProductReceiptNoteDetail.WarehouseCode = "T8";
wmsProductReceiptNoteDetail.LocationArea = "";
wmsProductReceiptNoteDetail.LocationGroup = "";
+ if (wmsProductReceiptNoteDetail.MesQuality=="1")//质量补
+ {
+ wmsProductReceiptNoteDetail.Lot = "RFE"; //质量补排序批次
+ wmsProductReceiptNoteDetail.PackingCode = "RFE";//质量补箱标签
+ }
var loc = await _locationAppService.GetListByTypesAndErpCodeAsync(types, wmsProductReceiptNoteDetail.LocationErpCode, wmsProductReceiptNoteDetail.LocationErpCode).ConfigureAwait(false);
if (loc != null)
{
@@ -123,13 +128,16 @@ public class MesOutConverter : IIncomingConverter
wmsProductReceiptNoteDetail.HandledToLocationArea = loc[0].AreaCode;
wmsProductReceiptNoteDetail.HandledToLocationGroup = loc[0].LocationGroupCode;
wmsProductReceiptNoteDetail.HandledToLocationErpCode = loc[0].ErpLocationCode;
+ wmsProductReceiptNoteDetail.HandledPackingCode = wmsProductReceiptNoteDetail.PackingCode;
+ wmsProductReceiptNoteDetail.HandledLot = wmsProductReceiptNoteDetail.Lot;
wmsProductReceiptNoteDetail.RecommendToLocationCode = loc[0].Code;
wmsProductReceiptNoteDetail.RecommendToLocationArea = loc[0].AreaCode;
wmsProductReceiptNoteDetail.RecommendToLocationGroup = loc[0].LocationGroupCode;
wmsProductReceiptNoteDetail.RecommendToLocationErpCode = loc[0].ErpLocationCode;
+ wmsProductReceiptNoteDetail.RecommendPackingCode = wmsProductReceiptNoteDetail.PackingCode;
+ wmsProductReceiptNoteDetail.RecommendLot = wmsProductReceiptNoteDetail.Lot;
}
-
var item = await _itemBasicAppService.GetByCodeAsync(wmsProductReceiptNoteDetail.ItemCode).ConfigureAwait(false);
if (item != null)
{
@@ -137,7 +145,7 @@ public class MesOutConverter : IIncomingConverter
wmsProductReceiptNoteDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : "";
wmsProductReceiptNoteDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : "";
wmsProductReceiptNoteDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : "";
-
+ wmsProductReceiptNoteDetail.StdPackQty = item.StdPackQty;
wmsProductReceiptNoteDetail.ProduceDate = incomingFromExternal.EffectiveDate;
wmsProductReceiptNoteDetail.ArriveDate = incomingFromExternal.EffectiveDate;
wmsProductReceiptNoteDetail.ExpireDate = wmsProductReceiptNoteDetail.ProduceDate.AddDays(item.GetValidateDays());
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutReader.cs
index f0171be9c..958d8eeba 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutReader.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutReader.cs
@@ -8,8 +8,10 @@ using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.DataExchange.Domain;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.MesOut;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
using Win_in.Sfs.Wms.DataExchange.WMS.ProductReceiptNote;
+using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote;
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
@@ -19,17 +21,20 @@ public class MesOutReader : IReader
private readonly IIncomingFromExternalManager _incomingFromExternalManager;
private readonly ILogger _logger;
private readonly ILocationAppService _locationAppService;
+ private readonly ICustomerItemAppService _customerItemAppService;
public MesOutReader(
IMesOutManager mesOutManager
, IIncomingFromExternalManager incomingFromExternalManager
, ILogger logger
, ILocationAppService locationAppService
+ , ICustomerItemAppService customerItemAppService
)
{
_mesOutManager = mesOutManager;
_incomingFromExternalManager = incomingFromExternalManager;
_logger = logger;
_locationAppService = locationAppService;
+ _customerItemAppService = customerItemAppService;
}
public virtual async Task> ReadAsync()
@@ -51,7 +56,7 @@ public class MesOutReader : IReader
await _mesOutManager.UpdateProcesseErrordListAsync(toBeProcessedEroMwsOuts).ConfigureAwait(false);
}
//MesOut逐一转换为ProductReceiptNote
- var incomingDataList = BuildIncomingFromExternalFromShipAsync(toBeProcessedMwsOuts);
+ var incomingDataList =await BuildIncomingFromExternalFromShipAsync(toBeProcessedMwsOuts).ConfigureAwait(false);
await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false);
//更新MES数据状态
await _mesOutManager.UpdateProcessedListAsync(toBeProcessedMwsOuts).ConfigureAwait(false);
@@ -59,13 +64,12 @@ public class MesOutReader : IReader
return incomingDataList;
}
- private static List BuildIncomingFromExternalFromShipAsync(List toBeProcessedMesOuts)
+ private async Task> BuildIncomingFromExternalFromShipAsync(List toBeProcessedMesOuts)
{
var incomingDataList = new List();
foreach (var mesOut in toBeProcessedMesOuts)
{
var incomingData = BuildIncomingFromExternal(mesOut);
-
incomingData.SetEffectiveDate(DateTime.ParseExact(mesOut.Mesout_date, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture));
incomingData.SetSuccess();
try
@@ -79,7 +83,29 @@ public class MesOutReader : IReader
}
incomingDataList.Add(incomingData);
+ if (mesOut.Mesout_quality == "1")
+ {
+ //查询零件对应的客户库位
+ string locationCode = await _customerItemAppService.GetFirstLocationCodeByItemCode(mesOut.Mesout_part).ConfigureAwait(false);
+ if (!string.IsNullOrEmpty(locationCode))
+ {
+ var incomingData_TransferNote = BuildIncomingFromExternal_TransferNote(mesOut);
+ incomingData_TransferNote.SetEffectiveDate(DateTime.ParseExact(mesOut.Mesout_date, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture));
+ incomingData_TransferNote.SetSuccess();
+ try
+ {
+
+ var transferNote = BuildTransferNoteCreateInput(mesOut, locationCode);
+ incomingData_TransferNote.DestinationDataContent = JsonSerializer.Serialize(transferNote);
+ }
+ catch (Exception ex)
+ {
+ incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString());
+ }
+ incomingDataList.Add(incomingData_TransferNote);
+ }
+ }
}
return incomingDataList;
@@ -126,7 +152,6 @@ public class MesOutReader : IReader
}
return incomingData;
}
-
private static ProductReceiptNoteExchangeDto BuildProductReceiptNoteCreateInput(MesOut mesOut)
{
var productReceiptNote = new ProductReceiptNoteExchangeDto()
@@ -141,10 +166,53 @@ public class MesOutReader : IReader
Qty = mesOut.Mesout_move,
LocationErpCode = mesOut.Mesout_loc,
Remark = mesOut.memo,
- ReturnQty = mesOut.Mesout_bad
+ ReturnQty = mesOut.Mesout_bad,
+ MesBarCode = mesOut.Mesout_barcode,
+ MesQuality = mesOut.Mesout_quality
+
};
productReceiptNote.Detail = productReceiptNoteDetail;
return productReceiptNote;
}
+ private static IncomingFromExternal BuildIncomingFromExternal_TransferNote(MesOut mesOut)
+ {
+ var incomingData = new IncomingFromExternal()
+ {
+ DataType = EnumIncomingDataType.TransferNote.ToString(),
+ DataAction = EnumExchangeDataAction.Add,
+ SourceSystem = EnumSystemType.MES.ToString(),
+ SourceDataId = mesOut.Mesout_ref_nbr.ToString(),
+ SourceDataGroupCode = mesOut.Mesout_ref_nbr,
+ SourceDataDetailCode = mesOut.Mesout_part,
+ SourceDataContent = JsonSerializer.Serialize(mesOut),
+ WriteTime = DateTime.Now,
+ Writer = nameof(MesIncomingBackgroundWorker),
+
+ DestinationSystem = EnumSystemType.WMS.ToString(),
+ };
+ return incomingData;
+ }
+
+ private static TransferNoteExchangeDto BuildTransferNoteCreateInput(MesOut mesOut,string toLocationCode)
+ {
+ var transferNote = new TransferNoteExchangeDto()
+ {
+ Worker = "MesJK",
+ Remark="质量补移库"
+ };
+ var transferNoteDetail = new TransferNoteDetailExchangeDto()
+ {
+ ItemCode = mesOut.Mesout_part,
+ Qty = mesOut.Mesout_move,
+ ToLocationErpCode = toLocationCode,
+ FromLocationErpCode = mesOut.Mesout_loc,
+ PackingCode="RFE",
+ Lot = "RFE",
+ };
+ transferNote.Detail = transferNoteDetail;
+ return transferNote;
+ }
+
+
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeConverter.cs
new file mode 100644
index 000000000..91f9e3f6c
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeConverter.cs
@@ -0,0 +1,140 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+using Volo.Abp.ObjectMapping;
+using Win_in.Sfs.Wms.Store.Domain;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+public class QtyrfeConverter : IIncomingConverter
+{
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly IIncomingToWmsManager _incomingToWmsManager;
+ private readonly IObjectMapper _objectMapper;
+ private readonly IItemBasicAppService _itemBasicAppService;
+ private readonly ILocationAppService _locationAppService;
+ private readonly ILogger _logger;
+
+ public QtyrfeConverter(
+ IIncomingToWmsManager incomingToWmsManager
+ , IObjectMapper objectMapper
+ , IItemBasicAppService itemBasicAppService
+ , ILogger logger,
+ ILocationAppService locationAppService,
+ IIncomingFromExternalManager incomingFromExternalManager)
+ {
+ _incomingToWmsManager = incomingToWmsManager;
+ _objectMapper = objectMapper;
+ _itemBasicAppService = itemBasicAppService;
+ _logger = logger;
+ _locationAppService = locationAppService;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ }
+
+ public virtual async Task ConvertAsync(List incomingFromExternalList)
+ {
+ if (!incomingFromExternalList.Any())
+ {
+ _logger.LogInformation("no Qtyrfes");
+ return;
+ }
+
+ //按Number合并TransferNote单据
+ var transferNoteList = await BuildIncomingToWmsOfTransferNoteAsync(incomingFromExternalList).ConfigureAwait(false);
+ await _incomingToWmsManager.CreateManyAsync(transferNoteList).ConfigureAwait(false);
+ //归档
+ await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false);
+ }
+
+ private async Task> BuildIncomingToWmsOfTransferNoteAsync(List incomingDataList)
+ {
+ var incomingToWmsList = new List();
+ var groups = incomingDataList.GroupBy(p => p.SourceDataGroupCode);
+ foreach (var group in groups)
+ {
+ var first = group.First();
+ var incomingToWms = new IncomingToWms()
+ {
+ DataType = first.DataType,
+ DataAction = first.DataAction,
+ SourceSystem = first.SourceSystem,
+ DataIdentityCode = first.SourceDataGroupCode,
+ };
+ incomingToWms.SetEffectiveDate(first.EffectiveDate);
+ var exchangeTransferNote = JsonSerializer.Deserialize(first.DestinationDataContent);
+ var wmsTransferNote = _objectMapper.Map(exchangeTransferNote);
+ wmsTransferNote.Type = EnumTransSubType.Transfer_Area.ToString();//客户储位调拨
+ wmsTransferNote.Details = new List();
+ foreach (var incomingFromExternal in group.ToList())
+ {
+ var transferNote = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent);
+ var wmsTransferNoteDetail = _objectMapper.Map(transferNote.Detail);
+ var item = await _itemBasicAppService.GetByCodeAsync(wmsTransferNoteDetail.ItemCode).ConfigureAwait(false);
+ var tolocation=await _locationAppService.GetByCodeAsync(wmsTransferNoteDetail.ToLocationErpCode).ConfigureAwait(false);
+ var fromlocation = await _locationAppService.GetByCodeAsync(wmsTransferNoteDetail.FromLocationErpCode).ConfigureAwait(false);
+ try
+ {
+ wmsTransferNoteDetail.FromPackingCode = "";
+ wmsTransferNoteDetail.ToPackingCode = "";
+ wmsTransferNoteDetail.FromLot = "";
+ wmsTransferNoteDetail.ToLot = "";
+ wmsTransferNoteDetail.FromStatus = EnumInventoryStatus.OK;
+ wmsTransferNoteDetail.ToStatus = EnumInventoryStatus.OK;
+ if (transferNote.Remark.Contains("质量补移库"))//质量补
+ {
+ wmsTransferNoteDetail.FromPackingCode = "RFE"; //质量补排序批次
+ wmsTransferNoteDetail.FromLot = "RFE";//质量补箱标签
+ wmsTransferNoteDetail.ToPackingCode = "RFE"; //质量补排序批次
+ wmsTransferNoteDetail.ToLot = "RFE";//质量补箱标签
+ }
+ if (item != null)
+ {
+ wmsTransferNoteDetail.ItemName = item.Name;
+ wmsTransferNoteDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : "";
+ wmsTransferNoteDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : "";
+ wmsTransferNoteDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : "";
+ wmsTransferNoteDetail.StdPackQty = item.StdPackQty;
+ }
+ if (tolocation != null)
+ {
+ wmsTransferNoteDetail.ToLocationCode = tolocation.Code;
+ wmsTransferNoteDetail.ToLocationArea = tolocation.AreaCode;
+ wmsTransferNoteDetail.ToLocationGroup = tolocation.LocationGroupCode;
+ wmsTransferNoteDetail.ToWarehouseCode = tolocation.WarehouseCode;
+ if (tolocation.Type== EnumLocationType.CUST)
+ {
+ wmsTransferNote.Type = EnumTransSubType.Transfer_Customer.ToString();//客户储位调拨
+ }
+ }
+ if (fromlocation!=null)
+ {
+ wmsTransferNoteDetail.FromLocationCode = fromlocation.Code;
+ wmsTransferNoteDetail.FromLocationArea = fromlocation.AreaCode;
+ wmsTransferNoteDetail.FromLocationGroup = fromlocation.LocationGroupCode;
+ wmsTransferNoteDetail.FromWarehouseCode = fromlocation.WarehouseCode;
+ }
+ }
+ catch (Exception)
+ {
+ wmsTransferNoteDetail.ItemName = "";
+ wmsTransferNoteDetail.ItemDesc1 = "";
+ wmsTransferNoteDetail.ItemDesc2 = "";
+ wmsTransferNoteDetail.Uom = "";
+ }
+
+ wmsTransferNote.Details.Add(wmsTransferNoteDetail);
+ }
+ incomingToWms.DataContent = JsonSerializer.Serialize(wmsTransferNote);
+ incomingToWmsList.Add(incomingToWms);
+ }
+ return incomingToWmsList;
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs
new file mode 100644
index 000000000..a2e2e22d9
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs
@@ -0,0 +1,117 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe;
+using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.WMS.MaterialRequest;
+using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+public class QtyrfeReader : IReader
+{
+ private readonly IQtyrfeManager _QtyrfeManager;
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly ILogger _logger;
+
+ public QtyrfeReader(
+ IQtyrfeManager pillTaskManager
+ , IIncomingFromExternalManager incomingFromExternalManager
+ , ILogger logger
+ )
+ {
+ _QtyrfeManager = pillTaskManager;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ _logger = logger;
+ }
+
+ public virtual async Task> ReadAsync()
+
+ {
+ //从MES读取待处理Qtyrfe
+ var toBeProcessedPillTasks = await _QtyrfeManager.GetToBeProcessedListAsync().ConfigureAwait(false);
+ if (!toBeProcessedPillTasks.Any())
+ {
+ _logger.LogInformation("no Qtyrfes");
+ return new List();
+ }
+ //Qtyrfe逐一转换为MaterialRequest
+ var incomingDataList = BuildIncomingFromExternalFromPillTaskAsync(toBeProcessedPillTasks);
+ await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false);
+ //更新MES数据状态
+ await _QtyrfeManager.UpdateProcessedListAsync(toBeProcessedPillTasks).ConfigureAwait(false);
+
+ return incomingDataList;
+ }
+
+ private static List BuildIncomingFromExternalFromPillTaskAsync(List toBeProcessedQtyrfes)
+ {
+ var incomingDataList = new List();
+ foreach (var Qtyrfe in toBeProcessedQtyrfes)
+ {
+ var incomingData = BuildIncomingFromExternal(Qtyrfe);
+
+ incomingData.SetEffectiveDate(DateTime.Now);
+ incomingData.SetSuccess();
+ try
+ {
+ var MaterialRequest = BuildTransferNoteCreateInput(Qtyrfe);
+ incomingData.DestinationDataContent = JsonSerializer.Serialize(MaterialRequest);
+ }
+ catch (Exception ex)
+ {
+ incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString());
+ }
+
+ incomingDataList.Add(incomingData);
+
+ }
+
+ return incomingDataList;
+ }
+
+ private static IncomingFromExternal BuildIncomingFromExternal(Qtyrfe Qtyrfe)
+ {
+ var incomingData = new IncomingFromExternal()
+ {
+ DataType = EnumIncomingDataType.TransferNote.ToString(),
+ DataAction = EnumExchangeDataAction.Add,
+ SourceSystem = EnumSystemType.MES.ToString(),
+ SourceDataId = Qtyrfe.mesout_qtyrfe_id.ToString(),
+ SourceDataGroupCode = Qtyrfe.mesout_qtyrfe_id,
+ SourceDataDetailCode = Qtyrfe.mesout_qtyrfe_part,
+ SourceDataContent = JsonSerializer.Serialize(Qtyrfe),
+ WriteTime = DateTime.Now,
+ Writer = nameof(MesIncomingBackgroundWorker),
+
+ DestinationSystem = EnumSystemType.WMS.ToString(),
+ };
+ return incomingData;
+ }
+
+ private static TransferNoteExchangeDto BuildTransferNoteCreateInput(Qtyrfe Qtyrfe)
+ {
+ var transferNote = new TransferNoteExchangeDto()
+ {
+ Worker = Qtyrfe.mesout_qtyrfe_user,
+ Remark = ""
+ };
+ if (Qtyrfe.mesout_qtyrfe_type == "1")
+ {
+ transferNote.Remark = "质量补移库";
+ }
+ var transferNoteDetail = new TransferNoteDetailExchangeDto()
+ {
+ ItemCode = Qtyrfe.mesout_qtyrfe_part,
+ Qty =Qtyrfe.mesout_qtyrfe_num,
+ ToLocationErpCode = Qtyrfe.mesout_qtyrfe_loc_to,
+ FromLocationErpCode = Qtyrfe.mesout_qtyrfe_loc_from,
+ };
+ transferNote.Detail = transferNoteDetail;
+ return transferNote;
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json
index a5a6cb1d9..b3b640492 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json
@@ -1,12 +1,12 @@
{
"ConnectionStrings": {
- "Default": "Server=10.164.113.32,1818\\SHDB;Database=Wms_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false",
- "DataExchange": "Server=10.164.113.32,1818\\SHDB;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false",
- "MES": "Server=10.164.113.32,1818\\SHDB;Database=MES_SH;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false"
+ "Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false",
+ "DataExchange": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false",
+ "MES": "Server=dev.ccwin-in.com,13319;Database=MES_SH;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false"
},
"AuthServer": {
- "Authority": "http://10.164.113.31:60083/",
+ "Authority": "http://dev.ccwin-in.com:60083/",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "admin",
"SwaggerClientSecret": "1q2w3E*",
@@ -24,13 +24,13 @@
"RemoteServices": {
"BaseData": {
- "BaseUrl": "http://10.164.113.31:60084/"
+ "BaseUrl": "http://dev.ccwin-in.com:60084/"
},
"Store": {
- "BaseUrl": "http://10.164.113.31:60085/"
+ "BaseUrl": "http://dev.ccwin-in.com:60085/"
},
"Label": {
- "BaseUrl": "http://10.164.113.31:60082/"
+ "BaseUrl": "http://dev.ccwin-in.com:60082/"
}
},
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/AssembleIssueNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/AssembleIssueNoteConverter.cs
new file mode 100644
index 000000000..375faace0
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/AssembleIssueNoteConverter.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Volo.Abp.ObjectMapping;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp;
+using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.WMS.PCK;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Outgoing;
+
+public class AssembleIssueNoteConverter : IOutgoingConverter
+{
+ private readonly string billtype = "4026";
+ private readonly IOutgoingFromWmsManager _outgoingFromWmsManager;
+ private readonly IOutgoingToExternalManager _outgoingToExternalManager;
+ private readonly IObjectMapper _objectMapper;
+
+ public AssembleIssueNoteConverter(
+ IOutgoingFromWmsManager outgoingFromWmsManager
+ , IOutgoingToExternalManager outgoingToExternalManager
+ , IObjectMapper objectMapper
+ )
+ {
+ _outgoingFromWmsManager = outgoingFromWmsManager;
+ _outgoingToExternalManager = outgoingToExternalManager;
+ _objectMapper = objectMapper;
+ }
+
+ public virtual async Task> ConvertAsync()
+ {
+ var outgoingToExternalList = new List();
+ //获取要同步得数据
+ var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.AssembleIssue, EnumSystemType.ERP).ConfigureAwait(false);
+ foreach (var outgoingFromWms in outgoingFromWmsList)
+ {
+ string tyrpNumber = outgoingFromWms.TyrpNumber;
+ #region 主表
+ var wmsReceipt = JsonSerializer.Deserialize(outgoingFromWms.DataContent);
+ var exchangeReceipt = _objectMapper.Map(wmsReceipt);
+ var putawayNote = BuildDataInterface(exchangeReceipt);
+ var outgoingToExternal = new OutgoingToExternal()
+ {
+ DataType = EnumOutgoingDataType.Issue.ToString(),
+ TableType = EnumExchangeTableType.MainTable,
+ DataAction = outgoingFromWms.DataAction,
+ SerialNumber = tyrpNumber,
+ SourceSystem = EnumSystemType.WMS.ToString(),
+ SourceDataId = wmsReceipt.Id.ToString(),
+ SourceDataGroupCode = wmsReceipt.Number,
+ SourceDataDetailCode = wmsReceipt.Number,
+ Writer = nameof(TyrpOutgoingBackgroundWorker),
+ DestinationSystem = EnumSystemType.ERP.ToString(),
+ DestinationDataId = "",
+ };
+ outgoingToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate);
+ outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceipt);
+ outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNote);
+ outgoingToExternalList.Add(outgoingToExternal);
+ #endregion
+ var sumDetails = wmsReceipt.Details.GroupBy(r => new { r.ItemCode, r.HandledFromLocationErpCode, r.HandledToLocationErpCode }).Select(p => new AssembleIssueNoteDetailDTO { ItemCode = p.Key.ItemCode, HandledFromLocationErpCode = p.Key.HandledFromLocationErpCode, HandledToLocationErpCode = p.Key.HandledToLocationErpCode, HandledToQty = p.Sum(x => x.HandledToQty) }).ToList();
+ #region 明细
+ foreach (var detail in sumDetails)
+ {
+ var outgoingDetailToExternal = new OutgoingToExternal()
+ {
+ DataType = EnumOutgoingDataType.Issue.ToString(),
+ TableType = EnumExchangeTableType.DetailTable,
+ DataAction = outgoingFromWms.DataAction,
+ SerialNumber = tyrpNumber,
+ SourceSystem = EnumSystemType.WMS.ToString(),
+ SourceDataId = detail.Id.ToString(),
+ SourceDataGroupCode = wmsReceipt.Number,
+ SourceDataDetailCode = detail.ItemCode,
+ Writer = nameof(TyrpOutgoingBackgroundWorker),
+ DestinationSystem = EnumSystemType.ERP.ToString(),
+ DestinationDataId = "",
+ };
+ outgoingDetailToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate);
+ var exchangeReceiptDetail = _objectMapper.Map(detail);
+ outgoingDetailToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceiptDetail);
+ var putawayNoteDetail = BuildDataInterfaceDetail(exchangeReceipt, exchangeReceiptDetail, putawayNote.scontrol_dt_w);
+ outgoingDetailToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNoteDetail);
+ outgoingToExternalList.Add(outgoingDetailToExternal);
+ }
+ #endregion
+ }
+ //插入到中间表OutgoingToExternal
+ await _outgoingToExternalManager.CreateManyAsync(outgoingToExternalList).ConfigureAwait(false);
+ //将outgoingFromWms数据归档
+ await _outgoingFromWmsManager.ArchiveManyAsync(outgoingFromWmsList).ConfigureAwait(false);
+
+ return outgoingToExternalList;
+ }
+ ///
+ /// 构建主表
+ ///
+ ///
+ ///
+ private Scontrol BuildDataInterface(AssembleIssueNoteExchangeDto exchangeOrder)
+ {
+ var ret = new Scontrol()
+ {
+ scontrol_nbr = exchangeOrder.Number,
+ scontrol_dt_w = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"),
+ scontrol_stat = "Y",
+ scontrol_dt_k = "",
+ scontrol_type = billtype,
+ scontrol_id = 0,//明细中最大scmsend_id
+ };
+ return ret;
+ }
+ ///
+ /// 构建明细
+ ///
+ ///
+ ///
+ ///
+ private Scmsend BuildDataInterfaceDetail(AssembleIssueNoteExchangeDto exchangeOrder, AssembleIssueNoteDetailExchangeDto exchangeDetailOrder, string dt_w)
+ {
+ var ret = new Scmsend()
+ {
+ scmsend_type = billtype,
+ scmsend_dt_w = dt_w,
+ scmsend_nbr = exchangeOrder.Number,
+ scmsend_stat1 = "1",
+ scmsend_part = exchangeDetailOrder.ItemCode,
+ scmsend_delv_date = "",
+ scmsend_orderno = "",
+ scmsend_loc = exchangeDetailOrder.FromLocationErpCode,
+ //scmsend_date = exchangeOrder.ActiveDate.ToString("yyyyMMdd"),
+ scmsend_date = DateTime.Now.ToString("yyyyMMdd"),
+ scmsend_qty = exchangeDetailOrder.Qty,
+ scmsend_wipd_loc = exchangeDetailOrder.ToLocationErpCode,
+ scmsend_userid = "WMS"
+ };
+ return ret;
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CountAdjustNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CountAdjustNoteConverter.cs
index a5990abd1..0463e5d8a 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CountAdjustNoteConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CountAdjustNoteConverter.cs
@@ -75,7 +75,7 @@ public class CountAdjustNoteConverter : IOutgoingConverter
DestinationDataId = "",
};
outgoingToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate);
- var exchangeIssue = await BuildPurchaseReceiptExchangeDtoAsync(wmsCountAdjust, detail).ConfigureAwait(false);
+ var exchangeIssue = BuildPurchaseReceiptExchangeDtoAsync(wmsCountAdjust, detail);
outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeIssue);
var arrive = BuildWip(exchangeIssue, departmentCode);
outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive);
@@ -103,7 +103,7 @@ public class CountAdjustNoteConverter : IOutgoingConverter
DestinationDataId = "",
};
outgoingToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate);
- var exchangeIssue = await BuildPurchaseReceiptExchangeDtoAsync(wmsCountAdjust, detail).ConfigureAwait(false);
+ var exchangeIssue = BuildPurchaseReceiptExchangeDtoAsync(wmsCountAdjust, detail);
outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeIssue);
var arrive = BuildIssue(exchangeIssue, departmentCode);
outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive);
@@ -159,7 +159,7 @@ public class CountAdjustNoteConverter : IOutgoingConverter
};
return counta;
}
- private async Task BuildPurchaseReceiptExchangeDtoAsync(
+ private CountAdjustNoteExchangeDto BuildPurchaseReceiptExchangeDtoAsync(
CountAdjustNoteDTO wmsCountAdjust, CountAdjustNoteDetailExchangeDto wmsCountAdjustDetail)
{
var exchangeCountAdjust = _objectMapper.Map(wmsCountAdjust);
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedIssueNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedIssueNoteConverter.cs
index 05a75e3d7..05b6beeee 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedIssueNoteConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedIssueNoteConverter.cs
@@ -22,19 +22,22 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter
private readonly IDepartmentAppService _departmentAppService;
private readonly IObjectMapper _objectMapper;
private readonly ISfsUserAppService _sfsUserAppService;
+ private readonly IUnplannedIssueRequestAppService _unplannedIssueRequestAppService;
public UnplannedIssueNoteConverter(
IOutgoingFromWmsManager outgoingFromWmsManager
, IOutgoingToExternalManager outgoingToExternalManager
, IDepartmentAppService departmentAppService
, IObjectMapper objectMapper
- , ISfsUserAppService sfsUserAppService)
+ , ISfsUserAppService sfsUserAppService,
+IUnplannedIssueRequestAppService unplannedIssueRequestAppService)
{
_outgoingFromWmsManager = outgoingFromWmsManager;
_outgoingToExternalManager = outgoingToExternalManager;
_departmentAppService = departmentAppService;
_objectMapper = objectMapper;
_sfsUserAppService = sfsUserAppService;
+ _unplannedIssueRequestAppService = unplannedIssueRequestAppService;
}
///
@@ -54,6 +57,12 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter
var exchangeReceipt = _objectMapper.Map(wmsReceipt);
var department = await _departmentAppService.GetByUsernameAsync(exchangeReceipt.Worker).ConfigureAwait(false);
var departmentCode = department == null ? "" : department.Code;
+ var requset = await _unplannedIssueRequestAppService.GetByNumberAsync(exchangeReceipt.UnplannedIssueRequestNumber).ConfigureAwait(false);
+ string worker = requset?.Worker;
+ if (!string.IsNullOrEmpty(worker))
+ {
+ worker = await _sfsUserAppService.GetUserNameByUserAsync(requset.Worker).ConfigureAwait(false);
+ }
//if (Guid.TryParse(exchangeReceipt.CreatorId.ToString(), out Guid guid))
//{
// var username = await _sfsUserAppService.GetUserNameById(guid).ConfigureAwait(false);
@@ -63,7 +72,7 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter
// }
//}
- var purchaseOrder = BuildDataInterface(exchangeReceipt, tyrpNumber, departmentCode);
+ var purchaseOrder = BuildDataInterface(exchangeReceipt, tyrpNumber, departmentCode, worker);
var outgoingToExternal = new OutgoingToExternal()
{
DataType = EnumOutgoingDataType.UnplannedIssue.ToString(),
@@ -123,7 +132,7 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter
///
///
///
- private Wmsoutm BuildDataInterface(UnplannedIssueNoteExchangeDto exchangeOrder,string tyrpNumber,string departmentCode)
+ private Wmsoutm BuildDataInterface(UnplannedIssueNoteExchangeDto exchangeOrder,string tyrpNumber,string departmentCode,string worker)
{
string billtype = "4013";
if (exchangeOrder.UnplannedIssueType== EnumUnplannedIssueType.Wip)
@@ -137,7 +146,7 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter
wmsoutm_dt_w = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"),
wmsoutm_stat = "Y",
wmsoutm_tyrp_dt = "",
- wmsoutm_user = exchangeOrder.Worker.Length >= 6 ? exchangeOrder.Worker.Substring(exchangeOrder.Worker.Length- 6) : exchangeOrder.Worker,
+ wmsoutm_user = worker.Length >= 6 ? worker.Substring(worker.Length- 6) : worker,
wmsoutm_dept = departmentCode,//根据Worker从UserDepartment中获取
// wmsoutm_date = exchangeOrder.ActiveDate.ToString("yyyyMMdd"),
wmsoutm_date = DateTime.Now.ToString("yyyyMMdd"),
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedReceiptNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedReceiptNoteConverter.cs
index 1a5cb0d4d..e6cf534ed 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedReceiptNoteConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedReceiptNoteConverter.cs
@@ -23,6 +23,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter
private readonly IDepartmentAppService _departmentAppService;
private readonly IObjectMapper _objectMapper;
private readonly ISfsUserAppService _sfsUserAppService;
+ private readonly IUnplannedReceiptRequestAppService _unplannedReceiptRequestAppService;
public UnplannedReceiptNoteConverter(
IOutgoingFromWmsManager outgoingFromWmsManager
@@ -30,6 +31,9 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter
, IDepartmentAppService departmentAppService
, IObjectMapper objectMapper
, ISfsUserAppService sfsUserAppService
+,
+IUnplannedReceiptRequestAppService unplannedReceiptRequestAppService
+
)
{
_outgoingFromWmsManager = outgoingFromWmsManager;
@@ -37,6 +41,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter
_departmentAppService = departmentAppService;
_objectMapper = objectMapper;
_sfsUserAppService = sfsUserAppService;
+ _unplannedReceiptRequestAppService = unplannedReceiptRequestAppService;
}
///
@@ -56,6 +61,12 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter
var exchangeReceipt = _objectMapper.Map(wmsReceipt);
var department = await _departmentAppService.GetByUsernameAsync(exchangeReceipt.Worker).ConfigureAwait(false);
var departmentCode = department == null ? "" : department.Code;
+ var requset = await _unplannedReceiptRequestAppService.GetByNumberAsync(exchangeReceipt.UnplannedReceiptRequestNumber).ConfigureAwait(false);
+ string worker = requset?.Worker;
+ if (!string.IsNullOrEmpty(worker))
+ {
+ worker = await _sfsUserAppService.GetUserNameByUserAsync(requset.Worker).ConfigureAwait(false);
+ }
//if (Guid.TryParse(exchangeReceipt.CreatorId.ToString(), out Guid guid))
//{
// var username = await _sfsUserAppService.GetUserNameById(guid).ConfigureAwait(false);
@@ -64,7 +75,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter
// exchangeReceipt.Worker = username;
// }
//}
- var purchaseOrder = BuildDataInterface(exchangeReceipt, tyrpNumber, departmentCode);
+ var purchaseOrder = BuildDataInterface(exchangeReceipt, tyrpNumber, departmentCode, worker);
var outgoingToExternal = new OutgoingToExternal()
{
DataType = EnumOutgoingDataType.UnplannedReceipt.ToString(),
@@ -124,7 +135,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter
///
///
///
- private Wmsoutm BuildDataInterface(UnplannedReceiptNoteExchangeDto exchangeOrder, string tyrpNumber,string departmentCode)
+ private Wmsoutm BuildDataInterface(UnplannedReceiptNoteExchangeDto exchangeOrder, string tyrpNumber,string departmentCode,string worker)
{
string billtype = "4014";
if (exchangeOrder.UnplannedReceiptType == EnumUnplannedReceiptType.Wip)
@@ -138,7 +149,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter
wmsoutm_dt_w = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"),
wmsoutm_stat = "Y",
wmsoutm_tyrp_dt = "",
- wmsoutm_user = exchangeOrder.Worker.Length>=6? exchangeOrder.Worker.Substring(exchangeOrder.Worker.Length-6) : exchangeOrder.Worker,
+ wmsoutm_user = worker.Length>=6? worker.Substring(worker.Length-6) : worker,
wmsoutm_dept = departmentCode,//根据Worker从UserDepartment中获取
//wmsoutm_date = exchangeOrder.ActiveDate.ToString("yyyyMMdd"),
wmsoutm_date = DateTime.Now.ToString("yyyyMMdd"),
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs
index 3b181f817..6c7ca0d7a 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs
@@ -171,10 +171,15 @@ public static class IncomingToWmsExtensions
public static async Task HandleProductReceiptsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
{
- var productReceipt = JsonSerializer.Deserialize(incomingConverted.DataContent);
- var productReceiptAppService = workerContext.ServiceProvider.GetRequiredService();
-
- await productReceiptAppService.CreateAsync(productReceipt).ConfigureAwait(false);
+ //var productReceipt = JsonSerializer.Deserialize(incomingConverted.DataContent);
+ //var productReceiptAppService = workerContext.ServiceProvider.GetRequiredService();
+
+ //await productReceiptAppService.CreateAsync(productReceipt).ConfigureAwait(false);
+ var productReceipt = JsonSerializer.Deserialize(incomingConverted.DataContent);
+ var productReceiptAppService = workerContext.ServiceProvider.GetRequiredService();
+ List list = new List();
+ list.Add(productReceipt);
+ await productReceiptAppService.CreateManyAsync(list).ConfigureAwait(false);
}
public static async Task HandleMaterialRequestsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
@@ -183,7 +188,30 @@ public static class IncomingToWmsExtensions
var materialRequestAppService = workerContext.ServiceProvider.GetRequiredService();
await materialRequestAppService.CreateAndHandleByAPIAsync(materialRequest).ConfigureAwait(false);
}
-
+ public static async Task HandleTransferNoteAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
+ {
+ var transferNote = JsonSerializer.Deserialize(incomingConverted.DataContent);
+ var transferNoteAppService = workerContext.ServiceProvider.GetRequiredService();
+ await transferNoteAppService.CreateAsync(transferNote).ConfigureAwait(false);
+ }
+ public static async Task HandleMesNoteAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
+ {
+ var mesNote = JsonSerializer.Deserialize(incomingConverted.DataContent);
+ var mesNoteAppService = workerContext.ServiceProvider.GetRequiredService();
+ await mesNoteAppService.CreateAsync(mesNote).ConfigureAwait(false);
+ }
+ public static async Task HandleDeliveryRequestAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
+ {
+ var deliverRequest = JsonSerializer.Deserialize(incomingConverted.DataContent);
+ var deliverRequestAppService = workerContext.ServiceProvider.GetRequiredService();
+ await deliverRequestAppService.CreateAsync(deliverRequest).ConfigureAwait(false);
+ }
+ public static async Task HandleInjectionIssueRequestAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
+ {
+ var injectionIssueRequest = JsonSerializer.Deserialize(incomingConverted.DataContent);
+ var injectionIssueRequestAppService = workerContext.ServiceProvider.GetRequiredService();
+ await injectionIssueRequestAppService.CreateAsync(injectionIssueRequest).ConfigureAwait(false);
+ }
public static async Task HandleScrapsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
{
var scrap = JsonSerializer.Deserialize(incomingConverted.DataContent);
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs
index 4120b94f6..8d93ccf90 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs
@@ -68,7 +68,7 @@ public class IncomingToWmsWorker : AsyncPeriodicBackgroundWorkerBase
//Do the work
var incomingToWmsList = await incomingToWmsManager.GetToBeProcessedListAsync().ConfigureAwait(false);
- foreach (var incomingToWms in incomingToWmsList)
+ foreach (var incomingToWms in incomingToWmsList.OrderBy(r=>r.CreationTime))
{
try
{
@@ -169,7 +169,7 @@ public class IncomingToWmsWorker : AsyncPeriodicBackgroundWorkerBase
await incomingToWms.HandleAsnsAsync(workerContext).ConfigureAwait(false);
break;
case EnumIncomingDataType.ProductReceipt:
- await SendProductReceipt(workerContext, incomingToWms).ConfigureAwait(false);
+ await incomingToWms.HandleProductReceiptsAsync(workerContext).ConfigureAwait(false);
break;
case EnumIncomingDataType.MaterialRequest:
await incomingToWms.HandleMaterialRequestsAsync(workerContext).ConfigureAwait(false);
@@ -184,8 +184,20 @@ public class IncomingToWmsWorker : AsyncPeriodicBackgroundWorkerBase
await incomingToWms.HandleInventoryLabelsAsync(workerContext).ConfigureAwait(false);
break;
case EnumIncomingDataType.BackFlush:
- // await incomingToWms.HandleBackFlushsAsync(workerContext).ConfigureAwait(false);
- await SendBackFlush(workerContext, incomingToWms).ConfigureAwait(false);
+ await incomingToWms.HandleBackFlushsAsync(workerContext).ConfigureAwait(false);
+ // await SendBackFlush(workerContext, incomingToWms).ConfigureAwait(false);
+ break;
+ case EnumIncomingDataType.TransferNote:
+ await incomingToWms.HandleTransferNoteAsync(workerContext).ConfigureAwait(false);
+ break;
+ case EnumIncomingDataType.MesNote:
+ await incomingToWms.HandleMesNoteAsync(workerContext).ConfigureAwait(false);
+ break;
+ case EnumIncomingDataType.Delivery:
+ await incomingToWms.HandleDeliveryRequestAsync(workerContext).ConfigureAwait(false);
+ break;
+ case EnumIncomingDataType.CallMtl:
+ await incomingToWms.HandleInjectionIssueRequestAsync(workerContext).ConfigureAwait(false);
break;
case EnumIncomingDataType.None:
default:
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json
index 156e965e2..7b848b1b8 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json
@@ -1,13 +1,13 @@
{
"ConnectionStrings": {
- "Default": "Server=10.164.113.32,1818\\SHDB;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True",
- "DataExchange": "Server=10.164.113.32,1818\\SHDB;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True"
+ "Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True",
+ "DataExchange": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True"
},
"AuthServer": {
- "Authority": "http://10.164.113.31:60083/",
+ "Authority": "http://dev.ccwin-in.com:60083/",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "admin",
"SwaggerClientSecret": "1q2w3E*",
@@ -26,16 +26,16 @@
"RemoteServices": {
"BaseData": {
- "BaseUrl": "http://10.164.113.31:60084/"
+ "BaseUrl": "http://dev.ccwin-in.com:60084/"
},
"Store": {
- "BaseUrl": "http://10.164.113.31:60085/"
+ "BaseUrl": "http://localhost:59095/"
},
"Label": {
- "BaseUrl": "http://10.164.113.31:60082/"
+ "BaseUrl": "http://dev.ccwin-in.com:60082/"
},
"Auth": {
- "BaseUrl": "http://10.164.113.31:60083/"
+ "BaseUrl": "http://dev.ccwin-in.com:60083/"
}
},
"DataExchangeOptions": {
@@ -44,7 +44,7 @@
"PeriodSeconds": 10,
"RetryTimes": 1,
"BatchSize": 100,
- "apiUrl": "http://10.164.113.31:60085/"
+ "apiUrl": "http://dev.ccwin-in.com:60085/"
},
"OutgoingOptions": {
"Active": false,
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 306172f7e..e0b3bb7d6 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,4 +26,19 @@ 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 MesDeliveryPlan { get; set; }
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "底盘号")]
+ public string IdentityNo { 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
new file mode 100644
index 000000000..f46e0d787
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs
@@ -0,0 +1,43 @@
+using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain;
+
+namespace Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest;
+public class DeliverRequestDetailExchangeDto
+{
+ ///
+ /// 单据号
+ ///
+ [Display(Name = "单据号")]
+ [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
+ public string Number { get; set; }
+ ///
+ /// 物品代码
+ ///
+ [Display(Name = "物品代码")]
+ public string ItemCode { get; set; }
+ ///
+ /// 来源库区
+ ///
+ [Display(Name = "来源库区")]
+ public string AreaCode { get; set; }
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
+ ///
+ /// Mes发货单号
+ ///
+ [Display(Name = "Mes发货单号")]
+ public string MesDeliveryNo { get; set; }
+ ///
+ /// Mes发货计划号
+ ///
+ [Display(Name = "Mes发货计划号")]
+ public string MesDeliveryPlan { get; set; }
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "底盘号")]
+ public string IdentityNo { get; set; }
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs
new file mode 100644
index 000000000..7273c7ce0
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs
@@ -0,0 +1,43 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared;
+
+namespace Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest;
+public class DeliverRequestExchangeDto
+{
+ ///
+ /// 单据号
+ ///
+ public string Number { get; set; }
+ ///
+ /// 操作员
+ ///
+ public string Worker { get; set; }
+
+ ///
+ /// 生效日期
+ ///
+ public DateTime ActiveDate { get; set; } = DateTime.Now.Date;
+ ///
+ /// 发货时间
+ ///
+ public DateTime DeliverTime { get; set; } = DateTime.Now.Date;
+ ///
+ /// 发货类型
+ ///
+ public EnumDeliverRequestType DeliverRequestType { get; set; }
+
+ ///
+ /// 客户
+ ///
+ [Display(Name = "客户")]
+ [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
+ public string CustomerCode { get; set; }
+
+ ///
+ /// 明细列表
+ ///
+ [Display(Name = "明细列表")]
+ public DeliverRequestDetailExchangeDto Detail { get; set; } = new();
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestDetailExchangeDto.cs
new file mode 100644
index 000000000..273fcf2f5
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestDetailExchangeDto.cs
@@ -0,0 +1,34 @@
+using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain.Shared;
+
+namespace Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest;
+public class InjectionIssueRequestDetailExchangeDto
+{
+ ///
+ /// 目标ERP储位
+ ///
+ [Display(Name = "目标储位")]
+ public string ToLocationCode { get; set; }
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
+
+ ///
+ /// 需求箱数量
+ ///
+ [Display(Name = "需求箱数量")]
+ public decimal BoxQty { get; set; }
+
+ ///
+ /// 物品代码
+ ///
+ [Display(Name = "物品代码")]
+ public string ItemCode { get; set; }
+
+ ///
+ /// 推荐类型
+ ///
+ public EnumRecommendType RecommendType { get; set; }
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestExchangeDto.cs
new file mode 100644
index 000000000..123972c0e
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestExchangeDto.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
+using Win_in.Sfs.Wms.DataExchange.WMS.MesNote;
+using Win_in.Sfs.Wms.DataExchange.WMS.PurchaseOrder;
+
+namespace Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest;
+public class InjectionIssueRequestExchangeDto
+{
+ ///
+ /// 叫料类型
+ ///
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
+ ///
+ /// 操作员
+ ///
+ [Display(Name = "操作员")]
+ [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
+ public string Worker { get; set; }
+
+ ///
+ /// 生效日期
+ ///
+ [Display(Name = "生效日期")]
+ public DateTime ActiveDate { get; set; } = DateTime.Now.Date;
+
+ ///
+ /// 明细
+ ///
+ [Display(Name = "明细")]
+ public InjectionIssueRequestDetailExchangeDto Detail { get; set; } = new();
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteDetailExchangeDto.cs
new file mode 100644
index 000000000..c58436b83
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteDetailExchangeDto.cs
@@ -0,0 +1,36 @@
+using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain;
+
+namespace Win_in.Sfs.Wms.DataExchange.WMS.PCK;
+
+public class AssembleIssueNoteDetailExchangeDto
+
+{
+
+ ///
+ /// 目标ERP库位
+ ///
+ [Display(Name = "目标ERP库位")]
+ public string ToLocationErpCode { get; set; }
+
+ public string FromPackingCode { get; set; }
+ ///
+ /// 来源ERP库位
+ ///
+ public string FromLocationErpCode { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
+
+ ///
+ /// 物品代码
+ ///
+ [Display(Name = "物品代码")]
+ [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
+ [Required(ErrorMessage = "{0}是必填项")]
+ public string ItemCode { get; set; }
+
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteExchangeDto.cs
new file mode 100644
index 000000000..22ff4899e
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteExchangeDto.cs
@@ -0,0 +1,29 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace Win_in.Sfs.Wms.DataExchange.WMS.PCK;
+
+public class AssembleIssueNoteExchangeDto
+{
+ ///
+ /// 发料记录号
+ ///
+ [Display(Name = "发料记录号")]
+ public string Number { get; set; }
+ ///
+ /// 生效日期
+ ///
+ [Display(Name = "生效日期")]
+ public DateTime ActiveDate { get; set; } = DateTime.Now.Date;
+
+ ///
+ /// 操作员
+ ///
+ [Display(Name = "操作员")]
+ public string Worker { get; set; }
+ ///
+ /// 明细
+ ///
+ [Display(Name = "明细")]
+ public AssembleIssueNoteDetailExchangeDto Detail { get; set; } = new();
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteDetailExchangeDto.cs
new file mode 100644
index 000000000..4283d490f
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteDetailExchangeDto.cs
@@ -0,0 +1,48 @@
+using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain.Shared;
+
+namespace Win_in.Sfs.Wms.DataExchange.WMS.MesNote;
+
+public class MesNoteDetailExchangeDto
+{
+ ///
+ /// 上架单号
+ ///
+ [Display(Name = "移库单号")]
+ public string Number { get; set; }
+ ///
+ /// 物品代码
+ ///
+ [Display(Name = "物品代码")]
+ public string ItemCode { get; set; }
+
+ ///
+ /// 目标ERP库位
+ ///
+ [Display(Name = "目标ERP库位")]
+ public string ToLocationErpCode { get; set; }
+
+ ///
+ /// 来源ERP库位
+ ///
+ [Display(Name = "来源ERP库位")]
+ public string FromLocationErpCode { get; set; }
+
+ ///
+ /// 目标ERP库位
+ ///
+ [Display(Name = "来源库位状态")]
+ public EnumInventoryStatus FromStatus { get; set; }
+
+ ///
+ /// 来源ERP库位
+ ///
+ [Display(Name = "目标库位状态")]
+ public EnumInventoryStatus ToStatus { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteExchangeDto.cs
new file mode 100644
index 000000000..3aa64c617
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteExchangeDto.cs
@@ -0,0 +1,47 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace Win_in.Sfs.Wms.DataExchange.WMS.MesNote;
+public class MesNoteExchangeDto
+{
+ ///
+ /// 上架单号
+ ///
+ [Display(Name = "移库单号")]
+ public string Number { get; set; }
+ ///
+ /// MES请求单号
+ ///
+ [Display(Name = "MES请求单号")]
+ public string MesRequestNumber { get; set; }
+
+
+ ///
+ /// 生效日期
+ ///
+ [Display(Name = "生效日期")]
+ public DateTime ActiveDate { get; set; } = DateTime.Now.Date;
+
+ ///
+ /// 操作员
+ ///
+ [Display(Name = "操作员")]
+ public string Worker { get; set; }
+
+ ///
+ /// 调拨类型
+ ///
+ [Display(Name = "调拨类型")]
+ public string Type { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [Display(Name = "备注")]
+ public string Remark { get; set; }
+ ///
+ /// 明细列表
+ ///
+ [Display(Name = "明细列表")]
+ public MesNoteDetailExchangeDto Detail { get; set; } = new();
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ProductReceiptNote/ProductReceiptNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ProductReceiptNote/ProductReceiptNoteDetailExchangeDto.cs
index 1ee7279d5..fe2722182 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ProductReceiptNote/ProductReceiptNoteDetailExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ProductReceiptNote/ProductReceiptNoteDetailExchangeDto.cs
@@ -61,4 +61,15 @@ public class ProductReceiptNoteDetailExchangeDto
/// 仓库
///
public string WarehouseCode { get; set; }
+
+ ///
+ /// Mes条码号
+ ///
+ [Display(Name = "Mes条码号")]
+ public string MesBarCode { get; set; }
+ ///
+ /// Mes质量补标识
+ ///
+ [Display(Name = "Mes质量补标识")]
+ public string MesQuality { get; set; }
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteDetailExchangeDto.cs
index 1ea1ca327..b50be31b2 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteDetailExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteDetailExchangeDto.cs
@@ -32,4 +32,17 @@ public class TransferNoteDetailExchangeDto
///
[Display(Name = "数量")]
public decimal Qty { get; set; }
+
+
+ ///
+ /// 批次
+ ///
+ [Display(Name = "批次")]
+ public string Lot { get; set; } = "";
+
+ ///
+ /// 箱码
+ ///
+ [Display(Name = "箱码")]
+ public string PackingCode { get; set; } = "";
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteExchangeDto.cs
index 2b84dcc42..65c93c570 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteExchangeDto.cs
@@ -29,4 +29,14 @@ public class TransferNoteExchangeDto
[Display(Name = "调拨类型")]
public string Type { get; set; }
+ ///
+ /// 备注
+ ///
+ [Display(Name = "备注")]
+ public string Remark { get; set; }
+ ///
+ /// 明细列表
+ ///
+ [Display(Name = "明细列表")]
+ public TransferNoteDetailExchangeDto Detail { get; set; } = new();
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedIssueNote/UnplannedIssueNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedIssueNote/UnplannedIssueNoteExchangeDto.cs
index b27945058..8ce513ce2 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedIssueNote/UnplannedIssueNoteExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedIssueNote/UnplannedIssueNoteExchangeDto.cs
@@ -1,4 +1,8 @@
using System;
+using IdentityServer4.Models;
+using System.ComponentModel.DataAnnotations;
+using System.Xml.Linq;
+using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.DataExchange.WMS.UnplannedIssueNote;
@@ -27,4 +31,9 @@ public class UnplannedIssueNoteExchangeDto
/// 领料类别
///
public EnumUnplannedIssueType UnplannedIssueType { get; set; }
+
+ ///
+ /// 计划外出库请求单号
+ ///
+ public string UnplannedIssueRequestNumber { get; set; }
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedReceiptNote/UnplannedReceiptNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedReceiptNote/UnplannedReceiptNoteExchangeDto.cs
index abae086af..e21240614 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedReceiptNote/UnplannedReceiptNoteExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedReceiptNote/UnplannedReceiptNoteExchangeDto.cs
@@ -1,4 +1,8 @@
using System;
+using IdentityServer4.Models;
+using System.ComponentModel.DataAnnotations;
+using System.Xml.Linq;
+using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.DataExchange.WMS.UnplannedReceiptNote;
@@ -28,5 +32,9 @@ public class UnplannedReceiptNoteExchangeDto
/// 退料类别
///
public EnumUnplannedReceiptType UnplannedReceiptType { get; set; }
+ ///
+ /// 计划外入库请求单号
+ ///
+ public string UnplannedReceiptRequestNumber { 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 c979bbb94..c1943c344 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,6 +531,21 @@
数量
+
+
+ Mes发货单号
+
+
+
+
+ Mes发货计划号
+
+
+
+
+ 底盘号
+
+
单据号
@@ -551,6 +566,76 @@
客户
+
+
+ 单据号
+
+
+
+
+ 物品代码
+
+
+
+
+ 来源库区
+
+
+
+
+ 数量
+
+
+
+
+ Mes发货单号
+
+
+
+
+ Mes发货计划号
+
+
+
+
+ 底盘号
+
+
+
+
+ 单据号
+
+
+
+
+ 操作员
+
+
+
+
+ 生效日期
+
+
+
+
+ 发货时间
+
+
+
+
+ 发货类型
+
+
+
+
+ 客户
+
+
+
+
+ 明细列表
+
+
代码
@@ -631,6 +716,51 @@
仓库代码
+
+
+ 目标ERP储位
+
+
+
+
+ 数量
+
+
+
+
+ 需求箱数量
+
+
+
+
+ 物品代码
+
+
+
+
+ 推荐类型
+
+
+
+
+ 叫料类型
+
+
+
+
+ 操作员
+
+
+
+
+ 生效日期
+
+
+
+
+ 明细
+
+
是否可用
@@ -771,6 +901,76 @@
明细列表
+
+
+ 上架单号
+
+
+
+
+ 物品代码
+
+
+
+
+ 目标ERP库位
+
+
+
+
+ 来源ERP库位
+
+
+
+
+ 目标ERP库位
+
+
+
+
+ 来源ERP库位
+
+
+
+
+ 数量
+
+
+
+
+ 上架单号
+
+
+
+
+ MES请求单号
+
+
+
+
+ 生效日期
+
+
+
+
+ 操作员
+
+
+
+
+ 调拨类型
+
+
+
+
+ 备注
+
+
+
+
+ 明细列表
+
+
上架单号
@@ -861,6 +1061,16 @@
仓库
+
+
+ Mes条码号
+
+
+
+
+ Mes质量补标识
+
+
完工时间
@@ -1721,6 +1931,16 @@
数量
+
+
+ 批次
+
+
+
+
+ 箱码
+
+
上架单号
@@ -1741,6 +1961,16 @@
调拨类型
+
+
+ 备注
+
+
+
+
+ 明细列表
+
+
单据号
@@ -1801,6 +2031,11 @@
领料类别
+
+
+ 计划外出库请求单号
+
+
单据号
@@ -1861,6 +2096,11 @@
退料类别
+
+
+ 计划外入库请求单号
+
+
用户号码
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumIncomingDataType.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumIncomingDataType.cs
index 4042cb1de..824808a90 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumIncomingDataType.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumIncomingDataType.cs
@@ -114,4 +114,20 @@ public enum EnumIncomingDataType
/// Erp库位零件(开账)
///
ErpLocationItem = 27,
+ ///
+ /// 储位调拨
+ ///
+ TransferNote=28,
+ ///
+ /// 储位调拨
+ ///
+ MesNote = 29,
+ ///
+ /// 发货单
+ ///
+ Delivery=30,
+ ///
+ /// 自动叫料
+ ///
+ CallMtl=31,
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumOutgoingDataType.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumOutgoingDataType.cs
index 985dfb465..a2fdb0412 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumOutgoingDataType.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumOutgoingDataType.cs
@@ -32,7 +32,20 @@ public enum EnumOutgoingDataType
ProductRecycle = 24,
Item_Transform = 25,//线边仓调整单
WIPAdjust = 26,//回收料调整单
- SemiPutaway=27//半成品上架
+ SemiPutaway=27,//半成品上架
+ ///
+ /// 注塑发料
+ ///
+ InjectionIssue = 30,
+ ///
+ /// 涂装发料
+ ///
+ CoatingIssue = 31,
+ ///
+ /// 装配发料
+ ///
+ AssembleIssue = 32,
+
}
public enum EnumExchangeTableType
{
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemContainerController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemContainerController.cs
new file mode 100644
index 000000000..ac9c15b66
--- /dev/null
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemContainerController.cs
@@ -0,0 +1,33 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.Mvc;
+using Win_in.Sfs.Basedata.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas;
+
+///
+///
+[ApiController]
+[Route($"{PdaHostConst.ROOT_ROUTE}item-container")]
+public class ItemContainerController : AbpController
+{
+ private readonly IItemContainerAppService _itemContainerAppService;
+
+ public ItemContainerController(IItemContainerAppService itemContainerAppService)
+ {
+ _itemContainerAppService = itemContainerAppService;
+ }
+
+ ///
+ /// 根据名称获取物品
+ ///
+ ///
+ ///
+ [HttpGet("by-item")]
+ public virtual async Task GetListByItemNameAsync(string itemCode)
+ {
+ var dto = await _itemContainerAppService.GetByItemCodeAsync(itemCode).ConfigureAwait(false);
+
+ return dto;
+ }
+}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs
new file mode 100644
index 000000000..85558bfe0
--- /dev/null
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs
@@ -0,0 +1,176 @@
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.AspNetCore.Mvc;
+using Win_in.Sfs.Auth.Application.Contracts;
+using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs.IssueJobs;
+
+///
+///
+[ApiController]
+[Route($"{PdaHostConst.ROOT_ROUTE}job/kitting-issue")]
+public class KittingIssueJobsController : AbpController
+{
+ private readonly IKittingIssueJobAppService _kittingIssueJobAppService;
+
+ private readonly IUserWorkGroupAppService _userWorkGroupAppService;
+
+ public KittingIssueJobsController(IKittingIssueJobAppService kittingIssueJobAppService, IUserWorkGroupAppService userWorkGroupAppService)
+ {
+ _kittingIssueJobAppService = kittingIssueJobAppService;
+ _userWorkGroupAppService = userWorkGroupAppService;
+ }
+
+ ///
+ /// 获取列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("list")]
+ public virtual async Task> GetListAsync(int pageSize, int pageIndex,
+ bool isFinished)
+ {
+ var status = new List();
+ if (isFinished)
+ {
+ status.Add((int)EnumJobStatus.Done);
+ }
+ else
+ {
+ status.Add((int)EnumJobStatus.Open);
+ status.Add((int)EnumJobStatus.Wait);
+ status.Add((int)EnumJobStatus.Doing);
+ status.Add((int)EnumJobStatus.Partial);
+ }
+
+ var jsonStatus = JsonSerializer.Serialize(status);
+
+ var request = new SfsJobRequestInputBase
+ {
+ MaxResultCount = pageSize,
+ SkipCount = (pageIndex - 1) * pageSize,
+ Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
+ Condition = new Condition
+ {
+ Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
+ }
+ };
+
+ var list = await _kittingIssueJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);
+
+ return list;
+ }
+
+ ///
+ /// 承接任务
+ ///
+ ///
+ ///
+ [HttpPost("take/{id}")]
+ public virtual async Task TakeAsync(Guid id)
+ {
+ await _kittingIssueJobAppService.AcceptAsync(id).ConfigureAwait(false);
+ }
+
+ ///
+ /// 取消承接任务
+ ///
+ ///
+ ///
+ [HttpPost("cancel-take/{id}")]
+ public virtual async Task CancelTakeAsync(Guid id)
+ {
+ await _kittingIssueJobAppService.CancelAcceptAsync(id).ConfigureAwait(false);
+ }
+
+ ///
+ /// 执行任务明细
+ ///
+ ///
+ [HttpPost("ExecuteDetail/{masterId}")]
+ public async Task ExecuteDetailAsync(Guid masterId, Guid detailId, KittingIssueJobDetailDTO issueJobDetailDto)
+ {
+ await _kittingIssueJobAppService.ExecuteDetailAsync(masterId,detailId,issueJobDetailDto).ConfigureAwait(false);
+ }
+
+ ///
+ /// 获取任务数量
+ ///
+ ///
+ [HttpGet("count")]
+ public virtual async Task> CountAsync()
+ {
+ var status = new List
+ {
+ (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial, (int)EnumJobStatus.Wait
+ };
+ var jsonStatus = JsonSerializer.Serialize(status);
+
+ var request = new SfsJobRequestInputBase
+ {
+ Sorting = $"{nameof(InspectJobDTO.Priority)} ASC",
+ Condition = new Condition
+ {
+ Filters = new List
+ {
+ //new(nameof(InspectJobDTO.WorkGroupCode),jsonCodes,"In"),
+ new(nameof(InspectJobDTO.JobStatus), jsonStatus, "In")
+ }
+ }
+ };
+
+ var count = await _kittingIssueJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false);
+
+ return Ok(count);
+ }
+
+ ///
+ /// 获取任务详情
+ ///
+ ///
+ ///
+ [HttpGet("{id}")]
+ public virtual async Task> GetAsync(Guid id)
+ {
+ var result = await _kittingIssueJobAppService.GetAsync(id).ConfigureAwait(false);
+ return Ok(result);
+ }
+
+ ///
+ /// 根据Job Number 获取盘点任务列表
+ ///
+ ///
+ ///
+ [HttpGet("by-number/{jobNumber}")]
+ public virtual async Task> GetByNumberAsync(string jobNumber)
+ {
+ var jobDto = await _kittingIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false);
+ if (jobDto == null)
+ {
+ throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务");
+ }
+
+ var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
+ if (!wlgCodes.Contains(jobDto.WorkGroupCode))
+ {
+ return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}");
+ }
+
+ if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id)
+ {
+ return new NotFoundObjectResult($"任务正在被 {jobDto.AcceptUserName} 处理");
+ }
+
+ return jobDto;
+ }
+}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs
similarity index 99%
rename from be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibJobController.cs
rename to be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs
index c8084e7d7..5caf96652 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibJobController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs
@@ -31,7 +31,7 @@ public class TransferLibJobController : AbpController
}
///
- /// 获取盘点任务详情
+ ///
///
///
///
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/KittingRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/KittingRequestController.cs
new file mode 100644
index 000000000..c24e85e69
--- /dev/null
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/KittingRequestController.cs
@@ -0,0 +1,125 @@
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.AspNetCore.Mvc;
+using Win_in.Sfs.Auth.Application.Contracts;
+using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
+
+///
+/// Kitting叫料请求
+///
+[ApiController]
+[Route($"{PdaHostConst.ROOT_ROUTE}store/kitting-request")]
+public class KittingRequestController : AbpController
+{
+ private readonly IKittingIssueRequestAppService _kittingIssueRequestAppService;
+
+ private readonly IUserWorkGroupAppService _userWorkGroupAppService;
+
+ ///
+ ///
+ ///
+ public KittingRequestController(IKittingIssueRequestAppService kittingIssueRequestAppService,
+ IUserWorkGroupAppService userWorkGroupAppService)
+ {
+ _kittingIssueRequestAppService = kittingIssueRequestAppService;
+ _userWorkGroupAppService = userWorkGroupAppService;
+ }
+
+ ///
+ /// Kitting叫料申请
+ ///
+ ///
+ ///
+ [HttpPost("")]
+ public virtual async Task CreateAsync(KittingIssueRequestEditInput input)
+ {
+ await _kittingIssueRequestAppService.CreateAndHandleAsync(input).ConfigureAwait(false);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("list")]
+ public virtual async Task> GetListAsync(int pageSize, int pageIndex,
+ bool isFinished)
+ {
+ var status = new List();
+ if (isFinished)
+ {
+ status.Add((int)EnumRequestStatus.Completed);
+ }
+ else
+ {
+ status.Add((int)EnumRequestStatus.Partial);
+ status.Add((int)EnumRequestStatus.Handling);
+ status.Add((int)EnumRequestStatus.New);
+ }
+
+ var jsonStatus = JsonSerializer.Serialize(status);
+
+ var request = new SfsStoreRequestInputBase
+ {
+ MaxResultCount = pageSize,
+ SkipCount = (pageIndex - 1) * pageSize,
+ Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
+ Condition = new Condition
+ {
+ Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
+ }
+ };
+
+ var list = await _kittingIssueRequestAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);
+
+ return list;
+ }
+
+ ///
+ ///
+ ///
+ [HttpPost("handle/{id}")]
+ public virtual async Task HandleAsync(Guid id)
+ {
+ await _kittingIssueRequestAppService.HandleAsync(id).ConfigureAwait(false);
+ }
+
+ ///
+ /// 根据Job Number 获取盘点任务列表
+ ///
+ ///
+ ///
+ [HttpGet("by-number/{requestNumber}")]
+ public virtual async Task> GetByNumberAsync(string requestNumber)
+ {
+ var jobDto = await _kittingIssueRequestAppService.GetByNumberAsync(requestNumber).ConfigureAwait(false);
+ if (jobDto == null)
+ {
+ throw new UserFriendlyException($"未找到编号为 {requestNumber} 的请求");
+ }
+
+ return jobDto;
+ }
+
+ ///
+ /// 获取任务详情
+ ///
+ ///
+ ///
+ [HttpGet("{id}")]
+ public virtual async Task> GetAsync(Guid id)
+ {
+ var result = await _kittingIssueRequestAppService.GetAsync(id).ConfigureAwait(false);
+ return Ok(result);
+ }
+}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/DTOs/CustomerItemDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/DTOs/CustomerItemDTO.cs
index 946e15d81..a9b783f32 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/DTOs/CustomerItemDTO.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/DTOs/CustomerItemDTO.cs
@@ -61,4 +61,11 @@ public class CustomerItemDTO : SfsBaseDataDTOBase
[Display(Name = "结束时间")]
public DateTime? EndTime { get; set; }
+ ///
+ /// 客户零件库位
+ ///
+ [Display(Name = "客户零件库位")]
+ public string LocationCode { get; set; }
+
+
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs
index ef35579a0..8e721681c 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs
@@ -10,5 +10,6 @@ public interface ICustomerItemAppService
, ISfsUpsertAppService
{
+ Task GetFirstLocationCodeByItemCode(string itemCode);
Task> GetListByPartsAsync(List inputs);
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemEditInput.cs
index 8ed4c0988..f6719dd70 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemEditInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemEditInput.cs
@@ -45,6 +45,13 @@ public class CustomerItemEditInput : SfsBaseDataCreateOrUpdateInputBase
///
[Display(Name = "结束时间")]
public DateTime? EndTime { get; set; }
+
+ ///
+ /// 客户零件库位
+ ///
+ [Display(Name = "客户零件库位")]
+ public string LocationCode { get; set; }
+
#endregion
#region Create
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs
index 4b0880904..bb1f2b228 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs
@@ -56,6 +56,14 @@ public class CustomerItemImportInput : SfsBaseDataImportInputBase
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Version { get; set; }
+ ///
+ /// 客户零件库位
+ ///
+ [Display(Name = "客户零件库位")]
+ [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
+ public string LocationCode { get; set; }
+
+
///
/// 开始时间
///
@@ -80,4 +88,6 @@ public class CustomerItemImportInput : SfsBaseDataImportInputBase
[Display(Name = "备注")]
[StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Remark { get; set; }
+
+
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/IItemBasicAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/IItemBasicAppService.cs
index da616e239..59739fcba 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/IItemBasicAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/IItemBasicAppService.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
+using Win_in.Sfs.Basedata.tests;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
@@ -26,4 +27,5 @@ public interface IItemBasicAppService
Task UpsertAsyncByInterface(ItemBasicEditInput input);
Task UpsertStdPackQtyAsync(string itemCode, decimal stdpackqty);
+ Task GetErpCodeByMesBarCode(string BarCode);
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/IItemContainerAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/IItemContainerAppService.cs
index 783e1ab02..4acdf4457 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/IItemContainerAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/IItemContainerAppService.cs
@@ -8,4 +8,5 @@ public interface IItemContainerAppService : ISfsBaseDataAppServiceBase> GetListByItemCodeAsync(string itemCode);
Task UpsertAndItemBasicUomAsync(string itemCode,decimal stdPackQty);
+ Task GetByItemCodeAsync(string itemCode);
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/IItemStoreRelationAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/IItemStoreRelationAppService.cs
index 7d4113c45..34bbb5c8c 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/IItemStoreRelationAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/IItemStoreRelationAppService.cs
@@ -21,4 +21,5 @@ public interface IItemStoreRelationAppService : ISfsBaseDataAppServiceBase GetFirstAsync(ItemAndLocationRequestInput itemAndLocations);
Task GetFirstAsync(string itemCode, string locationCode);
+ Task GetByItemAndLocationAsync(string itemCode, string value, EnumStoreRelationType storeRelationType);
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/ErpCodeRequest.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/ErpCodeRequest.cs
new file mode 100644
index 000000000..ebd3c4da9
--- /dev/null
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/ErpCodeRequest.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
+
+namespace Win_in.Sfs.Basedata.tests;
+[Serializable]
+public class ErpCodeRequest
+{
+ public string ErpCode { set; get; }
+ public string ProductType { set; get; }
+
+
+ public string ProductColor { set; get; }
+
+ public string ProductState { set; get; }
+
+ public string ProductProperty { set; get; }
+
+ public string From { set; get; }
+}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Bases/SfsBaseDataAppServiceBase.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Bases/SfsBaseDataAppServiceBase.cs
index e7183a1a2..89812ac99 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Bases/SfsBaseDataAppServiceBase.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Bases/SfsBaseDataAppServiceBase.cs
@@ -178,7 +178,14 @@ public abstract class SfsBaseDataAppServiceBase validationRresult)
+ {
+ var item = await LocationAppService.GetByCodeAsync(defaultLocationCode).ConfigureAwait(false);
+ if (item == null&& item.Type != type)
+ {
+ validationRresult.Add(new ValidationResult($"库位代码{defaultLocationCode}库位类型{type.ToString()}不存在", new string[] { "默认库位代码" }));
+ }
+ }
protected async Task CheckLocationGroupCodeAsync(string locationGroupCode, List validationRresult)
{
var item = await LocationGroupAppService.GetByCodeAsync(locationGroupCode).ConfigureAwait(false);
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs
index ce6566077..3f1400a4e 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs
@@ -10,6 +10,8 @@ using Volo.Abp.Caching;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Basedata.Domain.Shared;
+using Win_in.Sfs.Basedata.tests;
+using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Basedata.Application;
@@ -49,6 +51,10 @@ public class CustomerItemAppService : SfsBaseDataAppServiceBase> GetListByPartsAsync(List inputs)
@@ -56,6 +62,17 @@ public class CustomerItemAppService : SfsBaseDataAppServiceBase inputs.Contains(p.ItemCode)).ToListAsync().ConfigureAwait(false);
}
+ [HttpPost("get-first-location-code-by-item-code")]
+ public virtual async Task GetFirstLocationCodeByItemCode(string itemCode)
+ {
+ string code = "";
+ var customerItems = await _repository.GetListAsync(p => p.ItemCode == itemCode).ConfigureAwait(false);
+ if (customerItems.Count > 0)
+ {
+ code = customerItems.First(r=>!string.IsNullOrEmpty(r.LocationCode)).LocationCode;
+ }
+ return code;
+ }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs
index 4c21b2851..0c77e19ed 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs
@@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
+using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
@@ -81,7 +82,6 @@ public class ItemContainerAppService
return dtos;
}
-
protected override async Task ValidateImportModelAsync(ItemContainerImportInput importInput, List validationRresult)
{
await base.CheckItemBasicPackUomAsync(importInput.ItemCode, importInput.BasicUom, validationRresult).ConfigureAwait(false);
@@ -97,4 +97,11 @@ public class ItemContainerAppService
await _repository.UpsertAsync(entity).ConfigureAwait(false);
await ItemBasicAppService.UpsertStdPackQtyAsync(itemCode, stdPackQty).ConfigureAwait(false);
}
+
+ [HttpPut("get-by-item")]
+ public async Task GetByItemCodeAsync(string itemCode)
+ {
+ var entity = await _repository.FindAsync(p => p.ItemCode == itemCode).ConfigureAwait(false);
+ return ObjectMapper.Map(entity);
+ }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAppService.cs
index f7da4b279..204a4638e 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAppService.cs
@@ -99,6 +99,20 @@ public class ItemStoreRelationAppService : SfsBaseDataAppServiceBase GetByItemAndLocationAsync(string itemCode,string value, EnumStoreRelationType storeRelationType)
+ {
+ var entitie= await _repository.FirstOrDefaultAsync(p => p.ItemCode == itemCode&&p.StoreValue== value && p.Enabled == true && p.StoreRelationType == storeRelationType).ConfigureAwait(false);
+ if (entitie != null)
+ {
+ var dtos = ObjectMapper.Map(entitie);
+ return dtos;
+ }
+ else
+ {
+ return null;
+ }
+ }
///
/// 当前库位 允许的 零件关系
///
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAppService.cs
index fc7d9b96d..b5a28e7d7 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAppService.cs
@@ -14,6 +14,7 @@ using Volo.Abp.Validation;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Basedata.Domain.Shared;
+using Win_in.Sfs.Basedata.tests;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@@ -231,4 +232,19 @@ public class ItemBasicAppService
}
#endregion
+ [HttpPost("get-erp-code-by-mes-barcode")]
+ public virtual async Task GetErpCodeByMesBarCode(string BarCode)
+ {
+ var itemBasic = await _repository.GetAsync(p => p.Code == BarCode).ConfigureAwait(false);
+
+ ErpCodeRequest rest = new ErpCodeRequest();
+ rest.ErpCode = itemBasic.Code;
+ rest.ProductType = itemBasic.Type;
+ rest.ProductColor = itemBasic.Color;
+ rest.ProductState = itemBasic.Status.ToString();
+ rest.ProductProperty = "油漆件";
+ rest.From = "WIPT";
+ return rest;
+ }
+
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs
index 5431a0142..c70f4caf8 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs
@@ -68,7 +68,7 @@ public class PositionCodeAppService
var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false);
Check.NotNull(itemBasic, "物品代码", $"物品 {input.PartCode} 不存在");
//如果类型选择为原料,校验物料号类型必须为原料,器具、KItting 的不用加校验
- if (input.Type == EnumRecommendType.W && itemBasic.CanBuy != true)
+ if (input.Type == EnumRecommendType.RAW && itemBasic.CanBuy != true)
{
throw new UserFriendlyException($"{input.PartCode} 物料号类型必须为采购件");
}
@@ -80,7 +80,7 @@ public class PositionCodeAppService
var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false);
Check.NotNull(location, "库位代码", $"库位 {input.LocationCode} 不存在");
//如果类型选择为原料,库位的类型必须为原料库位
- if (input.Type == EnumRecommendType.W && location.Type != EnumLocationType.RAW)
+ if (input.Type == EnumRecommendType.RAW && location.Type != EnumLocationType.RAW)
{
throw new UserFriendlyException($"{input.LocationCode} 库位的类型必须为原料库位");
}
@@ -120,7 +120,7 @@ public class PositionCodeAppService
var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false);
Check.NotNull(itemBasic, "物品代码", $"物品 {input.PartCode} 不存在");
//如果类型选择为原料,校验物料号类型必须为原料,器具、KItting 的不用加校验
- if (input.Type == EnumRecommendType.W && itemBasic.Type != "10C02")
+ if (input.Type == EnumRecommendType.RAW && itemBasic.Type != "10C02")
{
throw new UserFriendlyException($"{input.PartCode} 物料号类型必须为原料");
}
@@ -132,7 +132,7 @@ public class PositionCodeAppService
var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false);
Check.NotNull(location, "库位代码", $"库位 {input.LocationCode} 不存在");
//如果类型选择为原料,库位的类型必须为原料库位
- if (input.Type == EnumRecommendType.W && location.Type!= EnumLocationType.RAW)
+ if (input.Type == EnumRecommendType.RAW && location.Type!= EnumLocationType.RAW)
{
throw new UserFriendlyException($"{input.LocationCode} 库位的类型必须为原料库位");
}
@@ -180,13 +180,13 @@ public class PositionCodeAppService
}
var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false);
//如果类型选择为原料,校验物料号类型必须为原料,器具、KItting 的不用加校验
- if (input.Type == EnumRecommendType.W && itemBasic.Type != "10C02")
+ if (input.Type == EnumRecommendType.RAW && itemBasic.Type != "10C02")
{
validationRresult.Add(new ValidationResult($"物品代码{input.PartCode} 物料号类型必须为原料", new string[] { "物料号类型" }));
}
var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false);
//如果类型选择为原料,库位的类型必须为原料库位
- if (input.Type==EnumRecommendType.W && location.Type != EnumLocationType.RAW)
+ if (input.Type==EnumRecommendType.RAW && location.Type != EnumLocationType.RAW)
{
validationRresult.Add(new ValidationResult($"库位代码{input.LocationCode} 库位的类型必须为原料库位", new string[] { "库位类型" }));
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs
index 88e1ba22e..3b126dc7a 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs
@@ -16,17 +16,10 @@ public class ProductionLineItemAppService :
SfsBaseDataAppServiceBase, IProductionLineItemAppService
{
- private new readonly IProductionLineItemRepository _repository;
-
public ProductionLineItemAppService(
- IProductionLineItemRepository repository
- , IDistributedCache cache
- , IProductionLineItemManager manager
- , IProductionLineAppService prodLineAppService
+ IProductionLineItemRepository repository, IDistributedCache cache
) : base(repository, cache)
{
- _repository = repository;
-
base.CreatePolicyName = ProductionLineItemPermissions.Create;
base.UpdatePolicyName = ProductionLineItemPermissions.Update;
base.DeletePolicyName = ProductionLineItemPermissions.Delete;
@@ -36,7 +29,7 @@ public class ProductionLineItemAppService :
public virtual async Task UpsertAsync(ProductionLineItemEditInput input)
{
var entity = ObjectMapper.Map(input);
- await _repository.UpsertAsync(entity).ConfigureAwait(false);
+ await _repository.UpdateAsync(entity).ConfigureAwait(false);
}
protected override async Task ValidateImportModelAsync(ProductionLineItemImportInput importInput,
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs
index 1859b5324..ade4d7ddb 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs
@@ -28,4 +28,13 @@ public sealed class CommonHelper
return DateTime.Now;
}
}
+
+ public static string CurTimeStr
+ {
+ get
+ {
+ return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ }
+ }
+
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
index 57f0475b5..e98b75340 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
@@ -4,6 +4,7 @@ using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Query.SqlExpressions;
using NetTopologySuite.Geometries;
using Omu.ValueInjecter;
using Volo.Abp;
@@ -382,10 +383,15 @@ public class BomManager : DomainService, IBomManager
public virtual async Task> GetAllItemByCode(string productCode,Guid id)
{
List boms = new List();
- var lst = await _repository.GetListAsync(p => p.Product == productCode).ConfigureAwait(false);
+ var lst = await
+ (await _repository.GetDbSetAsync().ConfigureAwait(false))
+ .Where(p => p.Product == productCode)
+ .AsNoTracking()
+ .ToListAsync().ConfigureAwait(false);
foreach (var bom in lst)
{
bom.Remark = id.ToString();
+ bom.SetId(GuidGenerator.Create());
boms.Add(bom);
var results= await GetAllItemByCode(bom.Component,bom.Id).ConfigureAwait(false);
boms.AddRange(results);
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/CustomerItems/CustomerItem.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/CustomerItems/CustomerItem.cs
index f8fd1657e..d4745c9fb 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/CustomerItems/CustomerItem.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/CustomerItems/CustomerItem.cs
@@ -56,6 +56,12 @@ public class CustomerItem : SfsBaseDataAggregateRootBase, IHasTimeRange
/// 结束时间
///
public DateTime? EndTime { get; set; }
+
+ ///
+ /// 客户零件库位
+ ///
+ public string LocationCode { get; set; }
+
}
/////
///// 客户零件
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLineItems/ProductionLineItem.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLineItems/ProductionLineItem.cs
index c319c0d17..649f0a8c1 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLineItems/ProductionLineItem.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLineItems/ProductionLineItem.cs
@@ -14,7 +14,6 @@ public class ProductionLineItem : SfsBaseDataAggregateRootBase
///
/// 生产线代码
///
- [Key]
[Display(Name = "生产线代码")]
[Required(ErrorMessage = "{0}是必填项")]
[IgnoreUpdate]
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/CustomerItems/CustomerItemDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/CustomerItems/CustomerItemDbContextModelCreatingExtensions.cs
index acc82761a..39e474079 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/CustomerItems/CustomerItemDbContextModelCreatingExtensions.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/CustomerItems/CustomerItemDbContextModelCreatingExtensions.cs
@@ -25,7 +25,7 @@ public static class CustomerItemDbContextModelCreatingExtensions
b.Property(q => q.ItemCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CustomerItemCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Version).HasMaxLength(SfsPropertyConst.DescLength);
-
+ b.Property(q => q.LocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
//None
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLineItems/ProductionLineItemDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLineItems/ProductionLineItemDbContextModelCreatingExtensions.cs
index 6da2af05f..7eb8a17de 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLineItems/ProductionLineItemDbContextModelCreatingExtensions.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLineItems/ProductionLineItemDbContextModelCreatingExtensions.cs
@@ -17,21 +17,8 @@ public static class ProductionLineItemDbContextModelCreatingExtensions
b.ConfigureByConvention();
//Configure Sfs base properties
b.ConfigureSfsBase();
-
- //Properties
- //b.Property(x => x.ProdLineId).IsRequired();
- //b.Property(x => x.ItemId).IsRequired();
- //b.Property(x => x.BomId).IsRequired();
- //b.Property(x => x.RoutingId).IsRequired();
-
b.Property(x => x.ProdLineCode).IsRequired();
b.Property(x => x.ItemCode).IsRequired();
-
- //Relations
- //None
-
- //Indexes
- b.HasIndex(q => new { q.ProdLineCode, q.ItemCode }).IsUnique();
});
}
}
diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs
index 31ae65e93..e5361fa7d 100644
--- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs
+++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs
@@ -24,23 +24,27 @@ public interface IExpectOutAppService
EnumInventoryStatus enumInventoryStatus,
string lot);
- Task RemoveListByItemCodeAndStatusAndPackingCodeAsync(
- string itemCode,
- string locationCode,
- string packingCode,
- EnumInventoryStatus enumInventoryStatus,
- string lot);
-
///
- /// 保存拆箱时涉及的明细修改
+ /// 保存拆箱时涉及的明细修改
///
///
Task> SaveDetail_SplitPackingAsync(SplitPacking_UpdateDetailInput input);
///
- /// 根据任务号、箱码、数量、库位取预计出列表
+ /// 根据任务号、箱码、数量、库位取预计出列表
///
///
Task> GetListByJobNumberAsync(SplitPacking_UpdateDetailInput input);
+
+ Task RemoveByNumberAndInventoryAsync(
+ string jobNumber,
+ string itemCode,
+ string locationCode,
+ string packingCode,
+ EnumInventoryStatus enumInventoryStatus,
+ string lot,
+ decimal qty);
+
+ Task RemoveByNumberAsync(string number);
}
diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
index 3a8a08cfe..fcbccf703 100644
--- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
+++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
@@ -604,8 +604,9 @@ public class BalanceAppService
[HttpGet("usable-list")]
public virtual async Task> GetUsableListAsync(RecommendBalanceRequestInput input)
{
+
var inventoryBalances = await _balanceManager
- .GetUsableListAsync(input.ItemCode, input.Locations, input.Statuses, true).ConfigureAwait(false);
+ .GetUsableListAsync(input.ItemCode, input.Locations, input.Statuses, input.IsPackingCode).ConfigureAwait(false);
var dtos = ObjectMapper.Map, List>(inventoryBalances);
diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs
index fb64edbd3..1f93d1907 100644
--- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs
+++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs
@@ -43,6 +43,48 @@ public class ExpectOutAppService
await _expectOutManager.RemoveAsync(jobNumber).ConfigureAwait(false);
}
+ [HttpPost("remove/job-number-and-inventory-balance")]
+ public virtual async Task RemoveByNumberAndInventoryAsync(
+ string jobNumber,
+ string itemCode,
+ string locationCode,
+ string packingCode,
+ EnumInventoryStatus enumInventoryStatus,
+ string lot,
+ decimal qty)
+ {
+ var expectOut= await _repository.FindAsync(p =>
+ p.ItemCode == itemCode &&
+ p.Status == enumInventoryStatus &&
+ p.PackingCode == packingCode &&
+ p.Lot == lot&&
+ p.JobNumber==jobNumber
+ ).ConfigureAwait(false);
+
+ if (expectOut != null)
+ {
+ expectOut.Qty -= qty;
+ if (expectOut.Qty == 0)
+ {
+ await _repository.DeleteAsync(expectOut).ConfigureAwait(false);
+ }
+ else
+ {
+ await _repository.UpdateAsync(expectOut).ConfigureAwait(false);
+ }
+ }
+ }
+
+ [HttpPost("remove/job-number")]
+ public virtual async Task RemoveByNumberAsync(string number)
+ {
+ var expectOut = await _repository.GetListAsync(p => p.JobNumber == number).ConfigureAwait(false);
+ if (expectOut != null && expectOut.Any())
+ {
+ await _repository.DeleteManyAsync(expectOut).ConfigureAwait(false);
+ }
+ }
+
[HttpPost("remove/{id}")]
public virtual async Task RemoveAsync(Guid id)
{
diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs
index 4ecd07b1e..8891a9be3 100644
--- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs
+++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs
@@ -867,6 +867,7 @@ public class BalanceManager : DomainService, IBalanceManager
.FilterLocationEnablePickAsync(locations)
//排序库存余额 最终可用的余额集合
.SortByFifo();
+ usableBalances = usableBalances.Where(p => p.Qty != 0).ToList();
return usableBalances;
}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs
index 4bb67435f..7e147f8c7 100644
--- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs
@@ -83,4 +83,9 @@ public enum EnumLocationType
/// Kitting线边
///
[Display(Name = "Kitting线边")] KittingWip = 15,
+
+ ///
+ /// 立体库
+ ///
+ [Display(Name = "立体库")] DimensionalStorehouse = 16,
}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs
index 55fbcf988..4c9ebc563 100644
--- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs
@@ -19,5 +19,10 @@ public enum EnumProductionLineType
///
/// 装配
///
- [Display(Name = "装配")] Assemble = 3
+ [Display(Name = "装配")] Assemble = 3,
+
+ ///
+ /// Kitting
+ ///
+ [Display(Name = "Kitting")] Kitting = 4
}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType - 复制.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType - 复制.cs
new file mode 100644
index 000000000..416d6706b
--- /dev/null
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType - 复制.cs
@@ -0,0 +1,18 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
+
+public enum EnumIssueSendType
+{
+ None = 0,
+
+ ///
+ /// 按数量
+ ///
+ [Display(Name = "按数量")] QtyType = 1,
+
+ ///
+ /// 按箱数
+ ///
+ [Display(Name = "按箱数")] BoxQtyType = 2
+}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs
new file mode 100644
index 000000000..2ca84955e
--- /dev/null
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
+public enum EnumIssueRequestType
+{
+ None = 0,
+
+ ///
+ /// 视觉
+ ///
+ [Display(Name = "视觉发起")]
+ Vision =1,
+
+ ///
+ /// Mes
+ ///
+ [Display(Name = "Mes发起")]
+ Mes =2,
+
+ ///
+ /// 立体库
+ ///
+ [Display(Name = "立体库发起")]
+ DimensionalStorehouse=3,
+
+ ///
+ /// 位置码
+ ///
+ [Display(Name = "位置码")]
+ PositionCode =4,
+}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs
deleted file mode 100644
index fb4faedca..000000000
--- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
-public enum EnumIssueType
-{
- None=0,
-
- ///
- /// 按箱 叫料
- ///
- BoxQty=1,
-
- ///
- /// 按数量 叫料
- ///
- Qty=2,
-
-
- ///
- /// 按视觉 叫料
- ///
- Vision = 3,
-
-
-}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumRecommendType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumRecommendType.cs
index 08e1bc6a2..5ff6d6616 100644
--- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumRecommendType.cs
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumRecommendType.cs
@@ -16,17 +16,17 @@ public enum EnumRecommendType
/// 原料
///
[Display(Name = "原料")]
- W = 1,
+ RAW = 1,
///
/// 半成品
///
[Display(Name = "半成品")]
- B = 2,
+ SEMI = 2,
///
/// kitting区
///
[Display(Name = "Kitting区")]
- K = 3
+ KITTING = 3
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs
index d6a0546ee..0454175f1 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs
@@ -15,6 +15,7 @@ public interface IChassisOperationSequenceAppService
///
///
///
+ ///
///
- Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber);
+ Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber,string chassisNumber);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultDTO.cs
new file mode 100644
index 000000000..dce8b9274
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultDTO.cs
@@ -0,0 +1,34 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Application.Dtos;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
+///
+/// 库存转移记录-实体DTO //??TransferLib实体
+///
+public class GaoTongResultDTO : EntityDto
+{
+ ///
+ ///
+ ///
+ [Display(Name = "")]
+ public string Code { get; set; }
+
+ ///
+ ///
+ ///
+ [Display(Name = "")]
+ public string Message { get; set; }
+
+ ///
+ ///
+ ///
+ [Display(Name = "")]
+ public string OperateTime { get; set; }
+}
+/*
+{"code":"1","message":"接收成功",
+"operateTime":"2020-01-0513:50:01"}
+
+*/
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultStatus.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultStatus.cs
new file mode 100644
index 000000000..306df7ca1
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultStatus.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
+public sealed class GaoTongResultStatus
+{
+ ///
+ /// 成功
+ ///
+ public const string Success = "1";
+
+ ///
+ /// 失败
+ ///
+ public const string Failure = "-1";
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/GaoTongPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/GaoTongPermissions.cs
new file mode 100644
index 000000000..e5fc16d51
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/GaoTongPermissions.cs
@@ -0,0 +1,8 @@
+using Volo.Abp.Authorization.Permissions;
+using Win_in.Sfs.Wms.Store.Domain;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
+public static class GaoTongPermissions
+{
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs
new file mode 100644
index 000000000..b7daebf3c
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.Application.Services;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
+///
+/// 立库接口
+///
+public interface IGaoTongAppService : IApplicationService
+{
+ ///
+ /// 组盘信息反馈到东阳WMS(喷涂完工转储)
+ ///
+ /// 组盘接口输入参数
+ /// 立库接口通用输出参数
+ Task FeedbackZuPanAsync(ZuPanEditInput input);
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/ZuPanEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/ZuPanEditInput.cs
new file mode 100644
index 000000000..743546879
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/ZuPanEditInput.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Application.Dtos;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
+///
+/// 新增和更新基础DTO //??TransferLib实体
+///
+public class ZuPanEditInput : EntityDto
+{
+ [Display(Name = "产品编号:映射ERP料号")]
+ public string ItemCode { get; set; }
+
+ [Display(Name = "器具号")]
+ public string ContainerCode { get; set; }
+
+ [Display(Name = "数量")]
+ public string Qty { get; set; }
+
+ [Display(Name = "固定值,在立库中配置。用于多立库时区分哪个立库")]
+ public string ToLocationCode { get; set; }
+
+ [Display(Name = "由1.2接口中获取富维东阳MES提供的来源位置")]
+ public string FromLocationCode { get; set; }
+
+}
+/*
+{
+ "ItemCode": "ERPCODE0001",
+ "Qty": 122,
+ "ContainerCode": "C111123",
+ "ToLocationCode": "W1",
+ "FromLocationCode": "WIPT"
+}
+*/
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs
index 5b4288f53..e8c35f78b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -59,4 +60,11 @@ public class CountJobDependentDetailDTO : SfsJobDetailDTOBase, IHasCountResult
///
[Display(Name = "盘点描述")]
public string CountDescription { get; set; }
+
+ ///
+ /// 是否删除
+ ///
+ [Display(Name = "是否删除")]
+
+ public bool IsDelete { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDetailDTO.cs
index 6af1900f5..3e38e5911 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDetailDTO.cs
@@ -6,6 +6,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class CountJobDetailDTO : SfsJobDetailDTOBase, IHasCountResult
{
+ ///
+ /// 盘点计划单号
+ ///
+ public string CountPlanNumber { get; set; }
///
/// 盘点次数
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs
index d1e4744c5..1699a4705 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs
@@ -23,12 +23,6 @@ public class CountJobCreateRequestInput
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Description { get; set; }
- ///
- /// 盘点执行形式
- ///
- [Display(Name = "盘点执行形式")]
- public CountPlanRequestType RequestType { get; set; }
-
///
/// 类型
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobDetailInput.cs
index ecb2add71..f87de249d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobDetailInput.cs
@@ -6,6 +6,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class CountJobDetailInput : SfsJobDetailInputBase, IHasCountResult
{
+ ///
+ /// 盘点计划单号
+ ///
+ public string CountPlanNumber { get; set; }
///
/// 盘点次数
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobImportInput.cs
new file mode 100644
index 000000000..75b1e526a
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobImportInput.cs
@@ -0,0 +1,54 @@
+using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain.Shared;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+[Display(Name = "盘点任务")]
+public class CountJobImportInput : SfsStoreImportInputBase
+{
+ ///
+ /// 盘点任务单号
+ ///
+ [Display(Name = "盘点任务单号")]
+ [Key]
+ [Required]
+ public string CountJobNumber { get; set; }
+
+ ///
+ /// 物品代码
+ ///
+ [Display(Name = "物料号")]
+ [Required(ErrorMessage = "{0}是必填项")]
+ public string ItemCode { get; set; }
+
+ ///
+ /// 物品名称
+ ///
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
+
+ ///
+ /// 箱码
+ ///
+ [Display(Name = "箱码")]
+ public string PackingCode { get; set; } = "";
+
+ ///
+ /// 库存状态
+ ///
+ [Display(Name = "库存状态")]
+ [Required(ErrorMessage = "{0}是必填项", AllowEmptyStrings = true)]
+ public EnumInventoryStatus Status { get; set; }
+
+ ///
+ /// 批次
+ ///
+ [Display(Name = "批次")]
+ public string Lot { get; set; } = "";
+
+ ///
+ /// 盘点数量
+ ///
+ [Display(Name = "盘点数量")]
+ [Required(ErrorMessage = "{0}是必填项")]
+ public decimal CountQty { get; set; }
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/DTOs/AssembleIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/DTOs/AssembleIssueJobDTO.cs
index ad35d8655..791161af2 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/DTOs/AssembleIssueJobDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/DTOs/AssembleIssueJobDTO.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -10,11 +11,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class AssembleIssueJobDTO : SfsJobDTOBase
{
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 生产线
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/Inputs/AssembleIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/Inputs/AssembleIssueJobEditInput.cs
index 0130ce68d..92f6458ff 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/Inputs/AssembleIssueJobEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/Inputs/AssembleIssueJobEditInput.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -25,11 +26,10 @@ public class AssembleIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCre
public string AssembleRequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 任务类型
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs
similarity index 94%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs
index 563285a34..f8932caf1 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs;
@@ -12,11 +13,10 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs;
public class CoatingIssueJobDTO : SfsJobDTOBase
{
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 生产线
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDetailDTO.cs
similarity index 100%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailDTO.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDetailDTO.cs
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobCheckInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobCheckInput.cs
similarity index 100%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobCheckInput.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobCheckInput.cs
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobDetailInput.cs
similarity index 100%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailInput.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobDetailInput.cs
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobEditInput.cs
similarity index 90%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobEditInput.cs
index 45f024128..64622363b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobEditInput.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs;
@@ -26,11 +27,10 @@ public class CoatingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCrea
public string MaterialRequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 任务类型
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs
index a1d432a34..6601669a4 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -10,11 +11,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionIssueJobDTO : SfsJobDTOBase
{
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 生产线
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs
index b045edec5..af14fc381 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs
index ce12a5905..49e3e43d9 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs
index 744659c31..a64b8e588 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs
@@ -9,16 +9,15 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput
{
- #region Create
///
- /// 上游任务编号
+ /// 上游任务编号
///
[Display(Name = "上游任务编号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string UpStreamJobNumber { get; set; }
///
- /// 要货单号
+ /// 要货单号
///
[Display(Name = "要货单号")]
[Required(ErrorMessage = "{0}是必填项")]
@@ -26,44 +25,42 @@ public class InjectionIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCr
public string InjectionIssueRequestNumber { get; set; }
///
- /// 叫料请求类型
- ///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
-
- ///
- /// 任务类型
+ /// 任务类型
///
[Display(Name = "任务类型")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumJobType JobType { get; set; }
///
- /// 是否自动完成
+ /// 是否自动完成
///
[Display(Name = "是否自动完成")]
[Required(ErrorMessage = "{0}是必填项")]
public bool IsAutoComplete { get; set; }
///
- /// 过期时间
+ /// 过期时间
///
[Display(Name = "过期时间")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime ExpiredTime { get; set; }
///
- /// 任务明细
+ /// 任务明细
///
[Display(Name = "任务明细")]
[Required(ErrorMessage = "{0}是必填项")]
public List Details { get; set; } = new();
///
- /// 使用在途库
+ /// 使用在途库
///
[Display(Name = "使用在途库")]
public bool UseOnTheWayLocation { get; set; }
- #endregion
+
+ ///
+ /// 叫料类型
+ ///
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/DTOs/KittingIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/DTOs/KittingIssueJobDTO.cs
index edfc95b19..2141ce1d8 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/DTOs/KittingIssueJobDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/DTOs/KittingIssueJobDTO.cs
@@ -1,5 +1,7 @@
using System.ComponentModel.DataAnnotations;
+using Microsoft.EntityFrameworkCore;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -10,12 +12,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingIssueJobDTO : SfsJobDTOBase
{
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
-
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 生产线
///
@@ -35,4 +35,6 @@ public class KittingIssueJobDTO : SfsJobDTOBase
///
[Display(Name = "使用在途库")]
public bool UseOnTheWayLocation { get; set; }
+
+ public EnumIssueSendType EnumIssueSendType { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs
index 318b19bd7..549de9dac 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -11,4 +12,10 @@ public interface IKittingIssueJobAppService
Task CancelByMaterialRequestAsync(string requestNumber);
Task> GetByRequestNumberAsync(string requestNumber);
+
+ ///
+ /// 执行任务明细
+ ///
+ ///
+ Task ExecuteDetailAsync(Guid masterId,Guid detailId, KittingIssueJobDetailDTO issueJobDetailDto);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/Inputs/KittingIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/Inputs/KittingIssueJobEditInput.cs
index 8fae44e90..d22be4f4d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/Inputs/KittingIssueJobEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/Inputs/KittingIssueJobEditInput.cs
@@ -26,11 +26,10 @@ public class KittingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCrea
public string KittingRequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 任务类型
@@ -65,5 +64,7 @@ public class KittingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCrea
///
[Display(Name = "使用在途库")]
public bool UseOnTheWayLocation { get; set; }
+
+ public EnumIssueSendType EnumIssueSendType { get; set; }
#endregion
}
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 1f473504a..480978f89 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,4 +10,19 @@ 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 MesDeliveryPlan { get; set; }
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "底盘号")]
+ public string IdentityNo { 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 fb12f3ecf..e7957adc4 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,4 +10,19 @@ 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 MesDeliveryPlan { get; set; }
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "底盘号")]
+ public string IdentityNo { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/DTOs/AssembleIssueNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/DTOs/AssembleIssueNoteDTO.cs
index 073f187c6..5662ecd0b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/DTOs/AssembleIssueNoteDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/DTOs/AssembleIssueNoteDTO.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -20,11 +21,10 @@ public class AssembleIssueNoteDTO : SfsStoreDTOBase,
public string RequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/IAssembleIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/IAssembleIssueNoteAppService.cs
index 83f8e6bbc..9e08af906 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/IAssembleIssueNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/IAssembleIssueNoteAppService.cs
@@ -12,10 +12,5 @@ public interface IAssembleIssueNoteAppService : ISfsStoreMasterReadOnlyAppServic
Task ConfirmAsync(Guid id);
- Task ConfirmAsync(string number);
-
- Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
- string requestType, bool includeDetails = false, CancellationToken cancellationToken = default);
-
- Task> GetListUnConfirmedByTypeAsync(string requestType);
+
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteEditInput.cs
index 731359c29..ac5e63b64 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteEditInput.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -41,11 +42,10 @@ public class AssembleIssueNoteEditInput : SfsStoreCreateOrUpdateInputBase
public string RequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteImportInput.cs
index 1a1487de5..6c43288f4 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteImportInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteImportInput.cs
@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -19,10 +20,10 @@ public class AssembleIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNumb
public string RequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDTO.cs
similarity index 82%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDTO.cs
index dfadc255f..df2738704 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDTO.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes;
@@ -18,13 +19,11 @@ public class CoatingIssueNoteDTO : SfsStoreDTOBase, I
///
[Display(Name = "请求代码")]
public string RequestNumber { get; set; }
-
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDetailDTO.cs
similarity index 100%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailDTO.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDetailDTO.cs
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs
index 79fbe99cc..20bb6f3c5 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs
@@ -13,10 +13,5 @@ public interface ICoatingIssueNoteAppService : ISfsStoreMasterReadOnlyAppService
Task ConfirmAsync(Guid id);
- Task ConfirmAsync(string number);
-
- Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
- string requestType, bool includeDetails = false, CancellationToken cancellationToken = default);
-
- Task